From mwithington at PLMresearch.com Mon Nov 3 09:00:53 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Mon, 3 Nov 2003 09:00:53 -0500 Subject: [nycphp-talk] OSCommerce Gotchas(?) Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3588356FB@network.PLMresearch.com> Hans, Happy to organize an osCommerce SIG but, being a relative newbie to nyphp, need some help doing so. Any sites/background information you can direct me to/forward regarding other nyphp SIG's would be helpful. Awaiting your thoughts, Mark -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere Sent: Friday, October 31, 2003 3:16 PM To: NYPHP Talk Subject: Re: [nycphp-talk] OSCommerce Gotchas(?) Mark Withington wrote: > I'm "no Jack Kennedy", but would be interested in an osCommerce SIG, > unfortunately I'm up in Boston so might not be the best one to try and > organize something in NYC. Would be happy to help out though. We're all virtual baby! :) I'd be happy if you wanted to start organizing it; let me know. H _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Mon Nov 3 10:12:14 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 03 Nov 2003 16:12:14 +0100 Subject: [nycphp-talk] OSCommerce Gotchas(?) In-Reply-To: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3588356FB@network.PLMresearch.com> References: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3588356FB@network.PLMresearch.com> Message-ID: <3FA6704E.7050205@nyphp.org> Mark Withington wrote: > Hans, > > Happy to organize an osCommerce SIG but, being a relative newbie to nyphp, > need some help doing so. Any sites/background information you can direct me > to/forward regarding other nyphp SIG's would be helpful. Great; I think people will enjoy a osCommerce SIG (by the way, sorry for missing your previous message). The other SIG NYPHP currently has is New York Front End (NYFE). Dan Krook had setup that up, so he'd probably be the one to talk to. Basically, maybe our first steps should be to get some web page up, describing the SIG, and then creating a mailing list. Let me know how you'd like to proceed, Mark, andn let's take this discussion to the NYPHP-Development list (http://nyphp.org/lists) H From mwithington at PLMresearch.com Mon Nov 3 11:14:31 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Mon, 3 Nov 2003 11:14:31 -0500 Subject: [nycphp-talk] OSCommerce Gotchas(?) Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3586A646D@network.PLMresearch.com> Kewl. Will ping Dan. Thanks, Mark -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Hans Zaunere Sent: Monday, November 03, 2003 10:12 AM To: NYPHP Talk Subject: Re: [nycphp-talk] OSCommerce Gotchas(?) Mark Withington wrote: > Hans, > > Happy to organize an osCommerce SIG but, being a relative newbie to > nyphp, need some help doing so. Any sites/background information you > can direct me to/forward regarding other nyphp SIG's would be helpful. Great; I think people will enjoy a osCommerce SIG (by the way, sorry for missing your previous message). The other SIG NYPHP currently has is New York Front End (NYFE). Dan Krook had setup that up, so he'd probably be the one to talk to. Basically, maybe our first steps should be to get some web page up, describing the SIG, and then creating a mailing list. Let me know how you'd like to proceed, Mark, andn let's take this discussion to the NYPHP-Development list (http://nyphp.org/lists) H _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jonbaer at jonbaer.net Mon Nov 3 07:54:30 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 3 Nov 2003 07:54:30 -0500 Subject: [nycphp-talk] OSCommerce Gotchas(?) References: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3588356FB@network.PLMresearch.com> <3FA6704E.7050205@nyphp.org> Message-ID: <001e01c3a209$9f8932c0$6400a8c0@thinkpad> i think the best thing for showing off oscommerce would be a complete case study that could fit into 30-45 minutes. something from start to finish (hosting, php setup, ssl, payment, etc) ... @ the moment im attempting to integrate phpbb w/ oscommerce (in terms of menu + admin) ... much of the work has been more tweak/config related but i can throw a case study together eventually. why doesn't oreilly already have the book out??? :-) - jon From bpang at bpang.com Mon Nov 3 15:45:02 2003 From: bpang at bpang.com (Brian Pang) Date: Mon, 03 Nov 2003 15:45:02 -0500 Subject: [nycphp-talk] forum: which linux flavor? Message-ID: I put this in the non-PHP forum with a poll, so if you have a reply or opinion, please put it there rather than posting back to the list. http://forums.nyphp.org/index.php?showtopic=49 ----- I've been using RedHat Linux since 6.2 as a desktop/workstation solution. Soon, RH will be phasing out their Free "stable" version of Linux, it's time to find a new distributor. Which do you use? Which do you recommend? And Why? From jsiegel1 at optonline.net Mon Nov 3 16:52:15 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Mon, 03 Nov 2003 16:52:15 -0500 Subject: [nycphp-talk] Session number never change Message-ID: <004701c3a254$bed49020$6401a8c0@EZDSDELL> Has anyone seen this one before? I'm working in a shared hosting environment and I'm using session vars to pass values from form to form. I grab the session id, append it to the URL and redirect to the next form. Everything works well. HOWEVER, the strange thing is that no matter how many times I play with the form, it always comes back with the same session id (even though I'm using session_destroy). Any clues? Jeff Siegel From jlacey at att.net Mon Nov 3 17:06:49 2003 From: jlacey at att.net (John Lacey) Date: Mon, 03 Nov 2003 15:06:49 -0700 Subject: [nycphp-talk] Session number never change In-Reply-To: <004701c3a254$bed49020$6401a8c0@EZDSDELL> References: <004701c3a254$bed49020$6401a8c0@EZDSDELL> Message-ID: <3FA6D179.5030701@att.net> Jeff Siegel wrote: >Has anyone seen this one before? I'm working in a shared hosting >environment and I'm using session vars to pass values from form to form. >I grab the session id, append it to the URL and redirect to the next >form. Everything works well. HOWEVER, the strange thing is that no >matter how many times I play with the form, it always comes back with >the same session id (even though I'm using session_destroy). > >Any clues? > > > > I think session_destroy( ) just destroys the session DATA, but leaves the session mechanism intact John From jsiegel1 at optonline.net Mon Nov 3 17:38:41 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Mon, 03 Nov 2003 17:38:41 -0500 Subject: [nycphp-talk] Session number never change In-Reply-To: <3FA6D179.5030701@att.net> Message-ID: <004e01c3a25b$3b575a50$6401a8c0@EZDSDELL> Perhaps the cache hadn't expired. It just seemed peculiar that it always came back with the same exact number. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of John Lacey Sent: Monday, November 03, 2003 5:07 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Session number never change Jeff Siegel wrote: >Has anyone seen this one before? I'm working in a shared hosting >environment and I'm using session vars to pass values from form to form. >I grab the session id, append it to the URL and redirect to the next >form. Everything works well. HOWEVER, the strange thing is that no >matter how many times I play with the form, it always comes back with >the same session id (even though I'm using session_destroy). > >Any clues? > > > > I think session_destroy( ) just destroys the session DATA, but leaves the session mechanism intact John _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Mon Nov 3 17:50:16 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Mon, 03 Nov 2003 17:50:16 -0500 Subject: [nycphp-talk] Session number never change In-Reply-To: <004e01c3a25b$3b575a50$6401a8c0@EZDSDELL> Message-ID: <000601c3a25c$d9802210$6401a8c0@EZDSDELL> Chalk it up to "my imagination"...I'm probably working too many hours! Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff Siegel Sent: Monday, November 03, 2003 5:39 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Session number never change Perhaps the cache hadn't expired. It just seemed peculiar that it always came back with the same exact number. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of John Lacey Sent: Monday, November 03, 2003 5:07 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Session number never change Jeff Siegel wrote: >Has anyone seen this one before? I'm working in a shared hosting >environment and I'm using session vars to pass values from form to form. >I grab the session id, append it to the URL and redirect to the next >form. Everything works well. HOWEVER, the strange thing is that no >matter how many times I play with the form, it always comes back with >the same session id (even though I'm using session_destroy). > >Any clues? > > > > I think session_destroy( ) just destroys the session DATA, but leaves the session mechanism intact John _______________________________________________ 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 Nov 3 20:42:28 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Mon, 3 Nov 2003 20:42:28 -0500 Subject: [nycphp-talk] Nested Set Version 1.3 Message-ID: <000b01c3a274$e8751880$bf8d3818@oberon1> I posted a topic over on the forums under New York PHP -> Technical Discussion -> AMP Technology and titled it 'PEAR::DB_NestedSet'. It probably should be under New York PHP -> NYPHP Staff -> Dev Team -> Nested Set Models Blow Chunks I was going to move it via the moderator's control panel -- but the action looked like it could be pretty drastic. The part about pruning everything made me uncomfortable. It looks like you are supposed 'pin' things down before you move topics from a forum. I thought I better read up on what the heck I am contemplating doing before pruning everything into oblivion. Then my attention span expired (sorry). Bottom Line: If anybody feels strongly that this is in the wrong place -- feel free to move it. Regards. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com From southwell at dneba.com Mon Nov 3 21:00:26 2003 From: southwell at dneba.com (Michael Southwell) Date: Mon, 03 Nov 2003 21:00:26 -0500 Subject: [nycphp-talk] include " I have this piece of data: $data="blah blah
"; Popbig puts up a link to a javascript popup. When I echo $data, I get the "blah blah
" but not the popbig. I can't say I'm completely surprised because I didn't really expect it to work. But how can I make it work? Maybe write it out with hex characters or entities (doesn't really seem as though that would work either). I hope this is clear; I can provide more script if necessary. 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 Mon Nov 3 21:03:39 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 3 Nov 2003 21:03:39 -0500 Subject: [nycphp-talk] security focus newsletter 221 Message-ID: <20031104020338.GA5579@panix.com> APACHE ------ Apache Web Server Multiple Module Local Buffer Overflow Vuln... http://www.securityfocus.com/bid/8911 The problem is reported to exist in mod_alias and mod_rewrite modules of the software. It has been reported that the problems presents itself if a regular expression is configured with more the 9 captures using parenthesis. It is reported that the vulnerability is in an Apache wrapper function for the regex interface. Apache Mod_Security Module Heap Corruption Vulnerability http://www.securityfocus.com/bid/8919 A vulnerability has been discovered in the mod_security module when handling specific data transmitted by the Apache server. The problem occurs within sec_filter_out() function located in the mod_security.c source file. Apache Web Server mod_cgid Module CGI Data Redirection Vulne... http://www.securityfocus.com/bid/8926 Apache has reported a potential vulnerability in the mod_cgid module when the threaded MPM (Multi-Processing Module) is used. The problem is said to be due to mishandling of CGI redirect paths. Reportedly, the module will incorrectly redirect the CGI output data to a seperate, unrelated thread. PHP --- Multiple Advanced Poll PHP Vulnerabilities http://www.securityfocus.com/bid/8890 Chi Kien Uong Guestbook [multiple] Vulnerabilities http://www.securityfocus.com/bid/8895 http://www.securityfocus.com/bid/8896 Les Visiteurs Multiple Remote File Include Vulnerabilities http://www.securityfocus.com/bid/8902 Bytehoard Files.INC.PHP Root Directory Disclosure Vulnerabil... http://www.securityfocus.com/bid/8910 E107 Chatbox.php Denial of Service Vulnerability http://www.securityfocus.com/bid/8930 Booby Error Message Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/8932 Ledscripts LedForums Multiple Fileds HTML Injection Vulnerab... http://www.securityfocus.com/bid/8934 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 Mon Nov 3 21:05:12 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 3 Nov 2003 21:05:12 -0500 Subject: [nycphp-talk] Fwd: PHP 4.3.4 Released Message-ID: <20031104020512.GB5579@panix.com> ----- Forwarded message from PEAR-DEV list ----- Date: Mon, 3 Nov 2003 20:20:26 -0500 Subject: [PEAR-DEV] PHP 4.3.4 Released PHP 4.3.4 has been released. The focus of this release was the resolution of bugs and at the time of release some 70 bugs were resolved. All users are encouraged to upgrade to 4.3.4. PHP 4.3.4 contains, among others, following important fixes: * Fixed disk_total_space() and disk_free_space() under FreeBSD. * Fixed FastCGI being unable to bind to a specific IP. * Fixed several bugs in mail() implementation on win32. * Fixed crashes in a number of functions. * Fixed compile failure on MacOSX 10.3 Panther. Enjoy, PHP Development Team. ----- End forwarded message ----- -- 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 Mon Nov 3 21:07:38 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 3 Nov 2003 21:07:38 -0500 Subject: [nycphp-talk] include " References: <5.1.0.14.2.20031103205443.00b22dd0@mail.optonline.net> Message-ID: <20031104020738.GC5579@panix.com> On Mon, Nov 03, 2003 at 09:00:26PM -0500, Michael Southwell wrote: > $data="blah blah
"; $data = 'blah blah
<' . "?php popbig('holster'); ?" . '>'; --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 southwell at dneba.com Mon Nov 3 22:02:33 2003 From: southwell at dneba.com (Michael Southwell) Date: Mon, 03 Nov 2003 22:02:33 -0500 Subject: [nycphp-talk] include " References: <5.1.0.14.2.20031103205443.00b22dd0@mail.optonline.net> <5.1.0.14.2.20031103205443.00b22dd0@mail.optonline.net> Message-ID: <5.1.0.14.2.20031103214706.00b22dd0@mail.optonline.net> At 09:07 PM 11/3/2003, you wrote: >On Mon, Nov 03, 2003 at 09:00:26PM -0500, Michael Southwell wrote: > > > $data="blah blah
"; > >$data = 'blah blah
<' . "?php popbig('holster'); ?" . '>'; hmmm, thanks but this writes it out as data (not displayed because of the <> but in the source). So it's there but it's not processed. I fixed it by replacing the function call with the actual text of the function. This seems a bit clumsy but at least it works. A word of explanation: I have some very similar pages which I'm converting to one page, with various display data in arrays and choosing which array by getting which one from the link to it. Sometimes there is a chance to view a larger picture of the product. So it's that link that I'm trying to get in here and there. This means I'll need to repeat the language of the function every time it's needed, but still this is cleaner than a lot of different pages. Or is there another way to do this? (I think I hear somebody whispering "you need object orientation.") 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 bw at megabit.net Mon Nov 3 22:15:55 2003 From: bw at megabit.net (Birgit Wolter) Date: Tue, 4 Nov 2003 04:15:55 +0100 Subject: [nycphp-talk] include " References: <5.1.0.14.2.20031103205443.00b22dd0@mail.optonline.net> Message-ID: <103877631.20031104041555@megabit.net> Why do you try to call php within php? When you say $data = ......, you are already within php. So it should be: $data = "blah blah
".popbig('holster'); Should you be in the html part then it looks something like this: .... blah blah
..... Hope this helps. Birgit > I have this piece of data: > $data="blah blah
"; > Popbig puts up a link to a javascript popup. > When I echo $data, I get the "blah blah
" but not the popbig. I can't > say I'm completely surprised because I didn't really expect it to > work. But how can I make it work? Maybe write it out with hex characters > or entities (doesn't really seem as though that would work either). > I hope this is clear; I can provide more script if necessary. > 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 danielc at analysisandsolutions.com Mon Nov 3 22:35:07 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 3 Nov 2003 22:35:07 -0500 Subject: [nycphp-talk] include " References: <5.1.0.14.2.20031103205443.00b22dd0@mail.optonline.net> <5.1.0.14.2.20031103205443.00b22dd0@mail.optonline.net> <5.1.0.14.2.20031103214706.00b22dd0@mail.optonline.net> Message-ID: <20031104033507.GA9738@panix.com> On Mon, Nov 03, 2003 at 10:02:33PM -0500, Michael Southwell wrote: > At 09:07 PM 11/3/2003, you wrote: > > > >$data = 'blah blah
<' . "?php popbig('holster'); ?" . '>'; > > hmmm, thanks but this writes it out as data (not displayed because of the > <> but in the source). So it's there but it's not processed. I fixed it > by replacing the function call with the actual text of the function. This > seems a bit clumsy but at least it works. Wait. I'm confused as to what you're doing. I thought you were using this script to generate a PHP page which THEN got browsed. Now, it seems the script you're writing is the browsed page itself. In this case, you need to do something along these lines, depending again on what you're trying to do... If you're trying to stick the string returned by popbig() (assuming you're returning a string, and not using the function just to echo out strings) into $data... $data = 'blah blah
' . popbig('holster'); By the way, don't forget to put in means for people to examine your photos if they don't have JavaScript activated. > A word of explanation: I have some very similar pages which I'm converting > to one page, with various display data in arrays and choosing which array > by getting which one from the link to it. Putting page contents in an array sounds wasteful. Store each page as a file. Store common headers and footers in two separate files. Include the headers/footers at the top/bottom of each page. Then, in the body of each page, include your popbig() function as needed. --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 Mon Nov 3 22:36:40 2003 From: soazine at erols.com (Phil Powell) Date: Mon, 3 Nov 2003 22:36:40 -0500 Subject: [nycphp-talk] "how many users online" PHP solution: sessions or DB? Message-ID: <020b01c3a284$dccfbb10$5c096444@philofsoa> http://codewalkers.com/seecode/75.html http://www.webkreator.com/php/concepts/counting-users-online-with-php.html The following two URLs illustrate different approaches to the idea of showing "how many users online" issue. I am looking at two different sites where I am looking into implementing this type of script; one that has mySQL and one that has no db access of any kind; both use PHP 4.1. I (for once) understand what I would need to do to implement it; problem comes in as to which solution would be the fastest, most efficient and most secure considering that one of them deals with sessions (then there is the cookie issue, but that's another issue altogether, see http://www.webkreator.com/php/configuration/php-session-security.html on security issues and cookies/sessions). What would one best recommend I use: the PHP/mySQL solution (for the non-db issue I would have to write complicated XML procedures instead), or sessions? Oh, more info: Site #1 (has mySQL) is Linux/Apache ??/mySQL 3.23.41 and PHP 4.1 Site #2 (has no DB) is generic UNIX/Apache ?? and PHP 4.1 Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Mon Nov 3 22:52:37 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 3 Nov 2003 22:52:37 -0500 Subject: [nycphp-talk] "how many users online" PHP solution: sessions or DB? In-Reply-To: <020b01c3a284$dccfbb10$5c096444@philofsoa> References: <020b01c3a284$dccfbb10$5c096444@philofsoa> Message-ID: <20031104035237.GA11631@panix.com> On Mon, Nov 03, 2003 at 10:36:40PM -0500, Phil Powell wrote: > > What would one best recommend I use An email program in which you've changed the preferences so it doesn't send HTML. An email program in which you've changed the preferences so wraps lines at around 75 characters. A secure email program. --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 Mon Nov 3 23:13:18 2003 From: dkrook at hotmail.com (D C Krook) Date: Mon, 03 Nov 2003 23:13:18 -0500 Subject: [nycphp-talk] "how many users online" PHP solution: sessions or DB? Message-ID: Phil, I don't have the answer to your question, but I am impressed with the clear description of your desired outcome, the outline of your current platform(s), and evidence that you've done research and explored several approaches. -Dan >http://codewalkers.com/seecode/75.html >http://www.webkreator.com/php/concepts/counting-users-online-with-php.html > >The following two URLs illustrate different approaches to the idea of >showing "how many >users online" issue. I am looking at two different sites where I am >looking into implementing >this type of script; one that has mySQL and one that has no db access of >any kind; both use >PHP 4.1. > >I (for once) understand what I would need to do to implement it; problem >comes in as to which >solution would be the fastest, most efficient and most secure considering >that one of them >deals with sessions (then there is the cookie issue, but that's another >issue altogether, >see http://www.webkreator.com/php/configuration/php-session-security.html >on security issues >and cookies/sessions). > >What would one best recommend I use: the PHP/mySQL solution (for the non-db >issue I would have >to write complicated XML procedures instead), or sessions? > >Oh, more info: > >Site #1 (has mySQL) is Linux/Apache ??/mySQL 3.23.41 and PHP 4.1 >Site #2 (has no DB) is generic UNIX/Apache ?? and PHP 4.1 > >Thanx >Phil _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus From soazine at erols.com Mon Nov 3 23:40:37 2003 From: soazine at erols.com (Phil Powell) Date: Mon, 3 Nov 2003 23:40:37 -0500 Subject: [nycphp-talk] "how many users online" PHP solution: sessions or DB? References: Message-ID: <023a01c3a28d$cb87a9e0$5c096444@philofsoa> Thank you, the ultimate goal being that I will actually get a non-smart-assed answer from Dan (A&S). Phil ----- Original Message ----- From: "D C Krook" To: Sent: Monday, November 03, 2003 11:13 PM Subject: Re: [nycphp-talk] "how many users online" PHP solution: sessions or DB? > Phil, > > I don't have the answer to your question, but I am impressed with the clear > description of your desired outcome, the outline of your current > platform(s), and evidence that you've done research and explored several > approaches. > > -Dan > > > > >http://codewalkers.com/seecode/75.html > >http://www.webkreator.com/php/concepts/counting-users-online-with-php.html > > > >The following two URLs illustrate different approaches to the idea of > >showing "how many > >users online" issue. I am looking at two different sites where I am > >looking into implementing > >this type of script; one that has mySQL and one that has no db access of > >any kind; both use > >PHP 4.1. > > > >I (for once) understand what I would need to do to implement it; problem > >comes in as to which > >solution would be the fastest, most efficient and most secure considering > >that one of them > >deals with sessions (then there is the cookie issue, but that's another > >issue altogether, > >see http://www.webkreator.com/php/configuration/php-session-security.html > >on security issues > >and cookies/sessions). > > > >What would one best recommend I use: the PHP/mySQL solution (for the non-db > >issue I would have > >to write complicated XML procedures instead), or sessions? > > > >Oh, more info: > > > >Site #1 (has mySQL) is Linux/Apache ??/mySQL 3.23.41 and PHP 4.1 > >Site #2 (has no DB) is generic UNIX/Apache ?? and PHP 4.1 > > > >Thanx > >Phil > > _________________________________________________________________ > 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 hans at nyphp.org Tue Nov 4 04:42:29 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 04 Nov 2003 10:42:29 +0100 Subject: [nycphp-talk] "how many users online" PHP solution: sessions or DB? In-Reply-To: <020b01c3a284$dccfbb10$5c096444@philofsoa> References: <020b01c3a284$dccfbb10$5c096444@philofsoa> Message-ID: <3FA77485.6030900@nyphp.org> Phil, Phil Powell wrote: > http://codewalkers.com/seecode/75.html > http://www.webkreator.com/php/concepts/counting-users-online-with-php.html > > The following two URLs illustrate different approaches to the idea of > showing "how many > users online" issue. I am looking at two different sites where I am > looking into implementing > this type of script; one that has mySQL and one that has no db access of > any kind; both use > PHP 4.1. > > I (for once) understand what I would need to do to implement it; problem > comes in as to which > solution would be the fastest, most efficient and most secure > considering that one of them > deals with sessions (then there is the cookie issue, but that's another > issue altogether, > see > http://www.webkreator.com/php/configuration/php-session-security.html on > security issues > and cookies/sessions). > > What would one best recommend I use: the PHP/mySQL solution (for the > non-db issue I would have > to write complicated XML procedures instead), or sessions? I think both links you mention are fairly good, and secure. Using the non-db solution (ie, it counts the number of session files in the tmp directory) would probably be slower. And, you'd have to take notice of the expire time for the sessions; by default, the php sessions files hang around for quite a while, and you'd be getting false counts. If possible, I'd go for the mysql method, but it obviously wouldn't work for the non-db site, and it might not fit with the architecture of the existing site. Thanks, Hans From ntang at mail.communityconnect.com Tue Nov 4 04:59:29 2003 From: ntang at mail.communityconnect.com (Nicholas Tang) Date: Tue, 04 Nov 2003 04:59:29 -0500 Subject: [nycphp-talk] "how many users online" PHP solution: sessions or DB? In-Reply-To: <3FA77485.6030900@nyphp.org> References: <020b01c3a284$dccfbb10$5c096444@philofsoa> <3FA77485.6030900@nyphp.org> Message-ID: <3FA77881.7010607@mail.communityconnect.com> I might be missing something, but won't counting the session files only work if you have one webserver? You can totally forget about scalability with that solution, and building crippled solutions always struck me as a bad way of doing things, as you'll just have to redo them in a few months anyways. So my vote is definitely for a db-based solution. Ours uses a db, and it works well. Nicholas Hans Zaunere wrote: > > > Phil, > > Phil Powell wrote: > >> http://codewalkers.com/seecode/75.html >> http://www.webkreator.com/php/concepts/counting-users-online-with-php.html >> >> >> The following two URLs illustrate different approaches to the idea of >> showing "how many >> users online" issue. I am looking at two different sites where I am >> looking into implementing >> this type of script; one that has mySQL and one that has no db access >> of any kind; both use >> PHP 4.1. >> I (for once) understand what I would need to do to implement it; >> problem comes in as to which >> solution would be the fastest, most efficient and most secure >> considering that one of them >> deals with sessions (then there is the cookie issue, but that's >> another issue altogether, >> see >> http://www.webkreator.com/php/configuration/php-session-security.html >> on security issues >> and cookies/sessions). >> >> What would one best recommend I use: the PHP/mySQL solution (for the >> non-db issue I would have >> to write complicated XML procedures instead), or sessions? > > > I think both links you mention are fairly good, and secure. Using the > non-db solution (ie, it counts the number of session files in the tmp > directory) would probably be slower. And, you'd have to take notice of > the expire time for the sessions; by default, the php sessions files > hang around for quite a while, and you'd be getting false counts. If > possible, I'd go for the mysql method, but it obviously wouldn't work > for the non-db site, and it might not fit with the architecture of the > existing site. > > Thanks, > > Hans > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From tgales at tgaconnect.com Tue Nov 4 06:38:25 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Tue, 4 Nov 2003 06:38:25 -0500 Subject: [nycphp-talk] Microsoft Outlook tip Message-ID: <000601c3a2c8$293e6620$bf8d3818@oberon1> For users or Microsoft Outlook: here's a tip on how to send text only email. If you use the internal Outlook editor as the default editor (as opposed to Word) It is easy to make you email message text-only. Just click on the Format in the menu bar on top, Then choose 'Plain Text' from the Drop down menu. (not sending in HTML format has the added benefit of not attaching those ATT0003.txt files which annoy some people). If you want to turn off HTML format and you have some other email program you can look at the following: http://www.expita.com/nomime.html#programs. Also Outlook users might want to search their help for "auto-format". (auto-format is what usually makes me send out HTML format when I wanted to send 'Plain Text') T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com From dmintz at davidmintz.org Tue Nov 4 09:33:55 2003 From: dmintz at davidmintz.org (David Mintz) Date: Tue, 4 Nov 2003 09:33:55 -0500 (EST) Subject: [nycphp-talk] Microsoft Outlook tip In-Reply-To: <000601c3a2c8$293e6620$bf8d3818@oberon1> References: <000601c3a2c8$293e6620$bf8d3818@oberon1> Message-ID: On Tue, 4 Nov 2003, Tim Gales wrote: > > For users of Microsoft Outlook: Why on earth would anybody wanna do that? (-: --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Anybody else got a problem with Webistics?" Sopranos 24:17 From shiflett at php.net Tue Nov 4 09:50:46 2003 From: shiflett at php.net (Chris Shiflett) Date: Tue, 4 Nov 2003 06:50:46 -0800 (PST) Subject: [nycphp-talk] "how many users online" PHP solution: sessions or DB? In-Reply-To: <3FA77881.7010607@mail.communityconnect.com> Message-ID: <20031104145046.6215.qmail@web14305.mail.yahoo.com> --- Nicholas Tang wrote: > I might be missing something, but won't counting the session files > only work if you have one webserver? Sessions can be stored in a central database, shared among a cluster (msession), and things like that. Chris ===== My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp From ntang at mail.communityconnect.com Tue Nov 4 10:18:20 2003 From: ntang at mail.communityconnect.com (Nicholas Tang) Date: Tue, 04 Nov 2003 15:18:20 -0000 Subject: [nycphp-talk] "how many users online" PHP solution: sessions or DB? In-Reply-To: <20031104145046.6215.qmail@web14305.mail.yahoo.com> References: <20031104145046.6215.qmail@web14305.mail.yahoo.com> Message-ID: <1067958776.4077.42.camel@dhcp-101-144.hq.communityconnect.com> On Tue, 2003-11-04 at 09:50, Chris Shiflett wrote: > > Sessions can be stored in a central database, shared among a cluster > (msession), and things like that. If they're in a database, then you're using a database already. And can you do something as simple as the listed: $handle = opendir(session_save_path()); if ($handle == false) return -1; while (($file = readdir($handle)) != false) { if (ereg("^sess", $file)) $count++; } closedir($handle); ...if you're using msessions? Does it store a local file for each session on each webserver in the cluster? If not, then you're right in the same boat again. Regardless, it seems to make more sense to me to do it yourself in a database, then you have full control over the parameters of the application and can adjust it as needed (timeouts, data stored, parameters, whatever). Nicholas -- Nicholas Tang Community Connect Inc. - http://www.communityconnect.com/ From soazine at pop.erols.com Tue Nov 4 10:26:17 2003 From: soazine at pop.erols.com (soazine at pop.erols.com) Date: Tue, 4 Nov 2003 10:26:17 -0500 Subject: [nycphp-talk] how many users online PHP solution: sessions or DB? Message-ID: <410-220031124152617901@M2W079.mail2web.com> This sounds like a good solution, but I don't understand why you would store a session cluster in a central database, in fact, why store sessions at all if you have a database in the first place? According to the initial information I received and researched on it, the DB solution doesn't involve sessions at all; it involves storing the user's IP address instead along with a session-like timestamp column; you compare the entered timestamp field with the current time to compare whether the user is still "in session" (simulated session you could say). Phil Original Message: ----------------- From: Nicholas Tang ntang at mail.communityconnect.com Date: 04 Nov 2003 10:12:56 -0500 To: talk at lists.nyphp.org Subject: Re: [nycphp-talk] "how many users online" PHP solution: sessions or DB? On Tue, 2003-11-04 at 09:50, Chris Shiflett wrote: > > Sessions can be stored in a central database, shared among a cluster > (msession), and things like that. If they're in a database, then you're using a database already. And can you do something as simple as the listed: $handle = opendir(session_save_path()); if ($handle == false) return -1; while (($file = readdir($handle)) != false) { if (ereg("^sess", $file)) $count++; } closedir($handle); ...if you're using msessions? Does it store a local file for each session on each webserver in the cluster? If not, then you're right in the same boat again. Regardless, it seems to make more sense to me to do it yourself in a database, then you have full control over the parameters of the application and can adjust it as needed (timeouts, data stored, parameters, whatever). Nicholas -- Nicholas Tang Community Connect Inc. - http://www.communityconnect.com/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . From nyphp at websapp.com Tue Nov 4 10:33:16 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Tue, 4 Nov 2003 10:33:16 -0500 Subject: [nycphp-talk] how many users online PHP solution: sessions or DB? In-Reply-To: <410-220031124152617901@M2W079.mail2web.com> Message-ID: Phil, You would still need a unique identifier (session ID) to identify the users. Session data whether stored on the file system, database, RAM, etc. is still session data regardless the storage medium. --Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of soazine at pop.erols.com > Sent: Tuesday, November 04, 2003 10:26 AM > To: talk at lists.nyphp.org > Subject: Re: [nycphp-talk] how many users online PHP solution: sessions > or DB? > > > This sounds like a good solution, but I don't understand why you would > store a session cluster in a central database, in fact, why store sessions > at all if you have a database in the first place? According to the initial > information I received and researched on it, the DB solution doesn't > involve sessions at all; it involves storing the user's IP address instead > along with a session-like timestamp column; you compare the entered > timestamp field with the current time to compare whether the user is still > "in session" (simulated session you could say). > > Phil > > Original Message: > ----------------- > From: Nicholas Tang ntang at mail.communityconnect.com > Date: 04 Nov 2003 10:12:56 -0500 > To: talk at lists.nyphp.org > Subject: Re: [nycphp-talk] "how many users online" PHP solution: > sessions or > DB? > > > On Tue, 2003-11-04 at 09:50, Chris Shiflett wrote: > > > > Sessions can be stored in a central database, shared among a cluster > > (msession), and things like that. > > If they're in a database, then you're using a database already. And can > you do something as simple as the listed: > > $handle = opendir(session_save_path()); > if ($handle == false) return -1; > > while (($file = readdir($handle)) != false) { > if (ereg("^sess", $file)) $count++; > } > closedir($handle); > > ...if you're using msessions? Does it store a local file for each > session on each webserver in the cluster? > > If not, then you're right in the same boat again. Regardless, it seems > to make more sense to me to do it yourself in a database, then you have > full control over the parameters of the application and can adjust it as > needed (timeouts, data stored, parameters, whatever). > > Nicholas > -- > Nicholas Tang > Community Connect Inc. - http://www.communityconnect.com/ > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > -------------------------------------------------------------------- > mail2web - Check your email from the web at > http://mail2web.com/ . > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From southwell at dneba.com Tue Nov 4 13:59:02 2003 From: southwell at dneba.com (Michael Southwell) Date: Tue, 04 Nov 2003 13:59:02 -0500 Subject: [nycphp-talk] need help understanding parsing difference Message-ID: <5.1.0.14.2.20031104134816.00b24cd8@mail.optonline.net> When $PRODUCTS[$here]["v1b"]="holster" and $j="v1b" echo " Message-ID: <4A34D0947B38AF4D8629DA86655D5906C108@ffth-exc01.thompsonhealth.org> I believe that 2 dimensional arrays need to break out of the echo statement to print the string. By the looks of it, you are printing $PRODUCTS[$here], which is an array, which is why it just prints Array, and php thinks [$here] is printing the [ and ] characters, with the variable $here inside. I like to break out of all my strings for arrays just to be on the safe side of things. Keith Richardson Thompson Health Information Systems keith.richardson at thompsonhealth.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Michael Southwell Sent: Tuesday, November 04, 2003 1:59 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] need help understanding parsing difference When $PRODUCTS[$here]["v1b"]="holster" and $j="v1b" echo " I think in both instances you _should_ put $j in quotes since you are going after the associative key/label. why it works in the second and not the first? not sure. > When $PRODUCTS[$here]["v1b"]="holster" > and $j="v1b" > echo " which is meaningless > but echo " path/holster which is correct (or to be more precise, what I wanted). > Why this difference? Thanks in advance. > From adam at trachtenberg.com Tue Nov 4 14:17:07 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Tue, 4 Nov 2003 14:17:07 -0500 (EST) Subject: [nycphp-talk] need help understanding parsing difference In-Reply-To: <5.1.0.14.2.20031104134816.00b24cd8@mail.optonline.net> References: <5.1.0.14.2.20031104134816.00b24cd8@mail.optonline.net> Message-ID: On Tue, 4 Nov 2003, Michael Southwell wrote: > When $PRODUCTS[$here]["v1b"]="holster" > and $j="v1b" > echo " which is meaningless > but echo " path/holster which is correct (or to be more precise, what I wanted). PHP doesn't know if you're referring to a two dimentional array named $PRODUCTS or some other potential weirdly constructed variable. They way to solve this while still using double quotes is to place the whole variable inside of {}s: echo "{$PRODUCTS[$here][$j]}" This "forced coersion" feature isn't well known. -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From southwell at dneba.com Tue Nov 4 17:17:50 2003 From: southwell at dneba.com (Michael Southwell) Date: Tue, 04 Nov 2003 17:17:50 -0500 Subject: [nycphp-talk] need help understanding parsing difference In-Reply-To: <5.1.0.14.2.20031104134816.00b24cd8@mail.optonline.net> Message-ID: <5.1.0.14.2.20031104171701.00b3ee68@mail.optonline.net> Thanks, Keith, Bryan, and Adam, for your *very helpful* responses. At 01:59 PM 11/4/2003, you wrote: >When $PRODUCTS[$here]["v1b"]="holster" >and $j="v1b" >echo "path/Array[v1b] which is meaningless >but echo "path/holster which is correct (or to be more precise, what I wanted). >Why this difference? Thanks in advance. 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 bpang at bpang.com Tue Nov 4 23:29:09 2003 From: bpang at bpang.com (Brian Pang) Date: Tue, 04 Nov 2003 23:29:09 -0500 Subject: [nycphp-talk] need help understanding parsing difference Message-ID: out of curiousity, which approach did you opt for? > Thanks, Keith, Bryan, and Adam, for your *very helpful* responses. > > At 01:59 PM 11/4/2003, you wrote: > >When $PRODUCTS[$here]["v1b"]="holster" > >and $j="v1b" > >echo " >path/Array[v1b] which is meaningless > >but echo " >path/holster which is correct (or to be more precise, what I wanted). > >Why this difference? Thanks in advance. > From suzerain at suzerain.com Wed Nov 5 01:55:05 2003 From: suzerain at suzerain.com (Marc Antony Vose) Date: Wed, 5 Nov 2003 01:55:05 -0500 Subject: [nycphp-talk] cURL funcs to secure server In-Reply-To: References: Message-ID: Hi there. I am trying to use the cURL functions to connect to a secure server, and it's failing with this error: Error [60]: error setting cerficate verify locations I don't know what this means. Anyone with relevant experience they can share to save me some time? Cheers, -- Marc Antony Vose http://www.suzerain.com/ Under capitalism man exploits man. Under communism it's the other way around. -- Unknown -------------- next part -------------- An HTML attachment was scrubbed... URL: From tgales at tgaconnect.com Wed Nov 5 02:14:08 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 5 Nov 2003 02:14:08 -0500 Subject: [nycphp-talk] cURL funcs to secure server In-Reply-To: Message-ID: <001901c3a36c$67dc1d60$bf8d3818@oberon1> Mark, You're missing some info needed to help out. i.e. is it an apache server but assuming apache: you might try looking here: http://www.apache-ssl.org/docs.html#SSLCACertificatePath It looks (on the surface) like the server can't find the certificate path. HTH 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 Marc Antony Vose Sent: Wednesday, November 05, 2003 1:55 AM To: NYPHP Talk Subject: [nycphp-talk] cURL funcs to secure server Hi there. I am trying to use the cURL functions to connect to a secure server, and it's failing with this error: Error [60]: error setting cerficate verify locations I don't know what this means. Anyone with relevant experience they can share to save me some time? Cheers, -- Marc Antony Vose http://www.suzerain.com/ Under capitalism man exploits man. Under communism it's the other way around. -- Unknown From tgales at tgaconnect.com Wed Nov 5 02:38:08 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 5 Nov 2003 02:38:08 -0500 Subject: [nycphp-talk] cURL funcs to secure server In-Reply-To: Message-ID: <001c01c3a36f$c20487c0$bf8d3818@oberon1> Marc, Disregard my earlier post. Try here instead: http://curl.haxx.se/mail/curlphp-2003-01/0011.html 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 Marc Antony Vose Sent: Wednesday, November 05, 2003 1:55 AM To: NYPHP Talk Subject: [nycphp-talk] cURL funcs to secure server Hi there. I am trying to use the cURL functions to connect to a secure server, and it's failing with this error: Error [60]: error setting cerficate verify locations I don't know what this means. Anyone with relevant experience they can share to save me some time? Cheers, -- Marc Antony Vose http://www.suzerain.com/ Under capitalism man exploits man. Under communism it's the other way around. -- Unknown From southwell at dneba.com Wed Nov 5 09:47:10 2003 From: southwell at dneba.com (Michael Southwell) Date: Wed, 05 Nov 2003 09:47:10 -0500 Subject: [nycphp-talk] need help understanding parsing difference In-Reply-To: Message-ID: <5.1.0.14.2.20031105094053.00b546e0@mail.optonline.net> At 11:29 PM 11/4/2003, you wrote: >out of curiousity, which approach did you opt for? It was Keith who analyzed exactly what was happening: $PRODUCTS[$here] --> Array [ --> [ $j --> vib ] --> ] Both the breaking out of quotation marks and Adam's { } "forced conversion" work perfectly. I had already figured out breaking the variable out, so I just stuck with that. Thanks again, guys. And Brian, sorry about misspelling your name. > > Thanks, Keith, Bryan, and Adam, for your *very helpful* responses. > > > > At 01:59 PM 11/4/2003, you wrote: > > >When $PRODUCTS[$here]["v1b"]="holster" > > >and $j="v1b" > > >echo " > >path/Array[v1b] which is meaningless > > >but echo " > >path/holster which is correct (or to be more precise, what I wanted). > > >Why this difference? Thanks in advance. > > > > >_______________________________________________ >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 Wed Nov 5 10:01:21 2003 From: southwell at dneba.com (Michael Southwell) Date: Wed, 05 Nov 2003 10:01:21 -0500 Subject: [nycphp-talk] include " References: <5.1.0.14.2.20031103214706.00b22dd0@mail.optonline.net> <5.1.0.14.2.20031103205443.00b22dd0@mail.optonline.net> <5.1.0.14.2.20031103205443.00b22dd0@mail.optonline.net> <5.1.0.14.2.20031103214706.00b22dd0@mail.optonline.net> Message-ID: <5.1.0.14.2.20031105095317.00b546e0@mail.optonline.net> At 10:35 PM 11/3/2003, you wrote: > > A word of explanation: I have some very similar pages which I'm > converting > > to one page, with various display data in arrays and choosing which array > > by getting which one from the link to it. > >Putting page contents in an array sounds wasteful. > >Store each page as a file. Store common headers and footers in two >separate files. Include the headers/footers at the top/bottom of each >page. Then, in the body of each page, include your popbig() function as >needed. Actually, this is the way the pages are set up already: everything is includes except the specific data for the page. So then I thought: this should be just one page with variable data; instead of ten pages each 2K, have one page 10K. Smaller and faster. This worked fine (once I got the coding correct) because the image display was formulaic. But it broke down with the print stylesheet which can't be formulaic because it's dependent on the sizes of the images; so newpages have to be decided individually. So I gave up on this. The whole application isn't really large enough for the "smaller and faster" to make much of a difference (so in that sense it was kind of an exercise). But what do you all think of the concept? Is there something I was overlooking? 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 soazine at pop.erols.com Wed Nov 5 10:26:47 2003 From: soazine at pop.erols.com (soazine at pop.erols.com) Date: Wed, 5 Nov 2003 10:26:47 -0500 Subject: [nycphp-talk] Function works, array_walk fails Message-ID: <176730-220031135152647712@M2W054.mail2web.com> I posted a problem on www.phpfreaks.com about the means of determining if a function you write will work by using array_walk to test a collection of parameters. Though I can verify that my function works by using scalar parameters, using array_walk completely fails to work (though it does produce a "true" output upon execution). The thread of my discussion, along with code and further explanation of my methodology, can be found here: http://www.phpfreaks.com/forums/topic10189.php I'm not in any major hurry, however, I would like to be able to successfully use array_walk in the future and, so far, I cannot; every time I use it the callback function never returns my changed value, even while using a reference as a value parameter in the callback function (again, see message thread). Thanks Phil -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . From hans at nyphp.org Wed Nov 5 10:39:52 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 05 Nov 2003 16:39:52 +0100 Subject: [nycphp-talk] Function works, array_walk fails In-Reply-To: <176730-220031135152647712@M2W054.mail2web.com> References: <176730-220031135152647712@M2W054.mail2web.com> Message-ID: <3FA919C8.2030700@nyphp.org> soazine at pop.erols.com wrote: > I posted a problem on www.phpfreaks.com about the means of determining if a > function you write will work by using array_walk to test a collection of > parameters. Though I can verify that my function works by using scalar > parameters, using array_walk completely fails to work (though it does > produce a "true" output upon execution). > > The thread of my discussion, along with code and further explanation of my > methodology, can be found here: > http://www.phpfreaks.com/forums/topic10189.php > > I'm not in any major hurry, however, I would like to be able to > successfully use array_walk in the future and, so far, I cannot; every time > I use it the callback function never returns my changed value, even while > using a reference as a value parameter in the callback function (again, see > message thread). You can't use the return value of the callback function, and it's not passed back through array_walk(). array_walk() only returns a boolean, and if you take particular note of the last paragraph at http://php.net/array_walk H From adam at trachtenberg.com Wed Nov 5 11:02:40 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Wed, 5 Nov 2003 11:02:40 -0500 (EST) Subject: [nycphp-talk] OT: Mac OS X 10.3 (Panther) Message-ID: If you are running the latest version of Max OS X (Panther, 10.3), can you please e-mail me off list the output from: "php -i"? I want to see the default configuration, but I managed to overwrite my copy with PHP 5. Thanks. -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From dmintz at davidmintz.org Wed Nov 5 11:22:28 2003 From: dmintz at davidmintz.org (David Mintz) Date: Wed, 5 Nov 2003 11:22:28 -0500 (EST) Subject: [nycphp-talk] Function works, array_walk fails In-Reply-To: <3FA919C8.2030700@nyphp.org> References: <176730-220031135152647712@M2W054.mail2web.com> <3FA919C8.2030700@nyphp.org> Message-ID: On Wed, 5 Nov 2003, Hans Zaunere wrote: > > > soazine at pop.erols.com wrote: > > > I posted a problem on www.phpfreaks.com about the means of determining if a > > function you write will work by using array_walk to test a collection of > > parameters. Though I can verify that my function works by using scalar > > parameters, using array_walk completely fails to work (though it does > > produce a "true" output upon execution). It sounds like you might find PHPUnit to be of interest. http://phpunit.sourceforge.net/ I bet you can write a test that will walk through an array of parameters and pass them to your function. It will take a little work to set up, but the setup work will already be done for the next test you write. HTH --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Anybody else got a problem with Webistics?" Sopranos 24:17 From keith.richardson at thompsonhealth.com Wed Nov 5 11:22:27 2003 From: keith.richardson at thompsonhealth.com (Keith Richardson) Date: Wed, 5 Nov 2003 11:22:27 -0500 Subject: [nycphp-talk] OT: Mac OS X 10.3 (Panther) In-Reply-To: <4A34D0947B38AF4D8629DA86655D590662D462@ffth-exc01.thompsonhealth.org> Message-ID: <4A34D0947B38AF4D8629DA86655D5906C10A@ffth-exc01.thompsonhealth.org> My 933mhz 14" iBook will be in within a week, and that will have panther running on it. If I dont see it go through the channels by the time I recieve it, I will post it on here. -keith richardson -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Adam Maccabee Trachtenberg Sent: Wednesday, November 05, 2003 11:03 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] OT: Mac OS X 10.3 (Panther) If you are running the latest version of Max OS X (Panther, 10.3), can you please e-mail me off list the output from: "php -i"? I want to see the default configuration, but I managed to overwrite my copy with PHP 5. Thanks. -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 danielc at analysisandsolutions.com Wed Nov 5 11:59:28 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 5 Nov 2003 11:59:28 -0500 Subject: [nycphp-talk] include " References: <5.1.0.14.2.20031103214706.00b22dd0@mail.optonline.net> <5.1.0.14.2.20031103205443.00b22dd0@mail.optonline.net> <5.1.0.14.2.20031103205443.00b22dd0@mail.optonline.net> <5.1.0.14.2.20031103214706.00b22dd0@mail.optonline.net> <5.1.0.14.2.20031105095317.00b546e0@mail.optonline.net> Message-ID: <20031105165928.GA17941@panix.com> On Wed, Nov 05, 2003 at 10:01:21AM -0500, Michael Southwell wrote: > At 10:35 PM 11/3/2003, you wrote: You being who? > So then I thought: this > should be just one page with variable data; instead of ten pages each 2K, > have one page 10K. Smaller and faster. It's bigger and slower. PHP now has to parse 10k of code instead of 2. Plus editing the content in such a way seems unwieldy. I find it far more direct to manage items by file name. Whatever is common between the pages should get templated. Then, there are two options: 1) have the template include the content, or 2) have the content include the templates. The approach you want depends on what you're doing. --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 davevgl at yahoo.com Wed Nov 5 11:59:28 2003 From: davevgl at yahoo.com (David Vogel) Date: Wed, 5 Nov 2003 08:59:28 -0800 (PST) Subject: [nycphp-talk] OT: Mac OS X 10.3 (Panther) In-Reply-To: Message-ID: <20031105165929.26194.qmail@web14304.mail.yahoo.com> Just installed 10.3, and haven't touched a thing yet, see attachment... cheers, Dave --- Adam Maccabee Trachtenberg wrote: > If you are running the latest version of Max OS X (Panther, 10.3), > can > you please e-mail me off list the output from: "php -i"? > > I want to see the default configuration, but I managed to overwrite > my > copy with PHP 5. > > Thanks. > > -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 __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: phpinfo.txt URL: From stephen at musgrave.org Wed Nov 5 12:01:06 2003 From: stephen at musgrave.org (Stephen Musgrave) Date: Wed, 05 Nov 2003 12:01:06 -0500 Subject: [nycphp-talk] Re: simple shopping cart In-Reply-To: <5.1.0.14.2.20031105100208.00b5c358@mail.optonline.net> Message-ID: Michael - Thanks for the follow-up, I've been meaning to post my solution to list. I decided on using Basketlib.. which ended up being the exact toolset that I needed. It's a real simple session management toolset. It could be used for keeping track of all sorts of visitor inquiry information. For example, if you were building a site for a used car lot and you wanted the user to be able to email the owner of the site with a list of cars they are interested in, this would serve as a good engine for that as well. They could browse the 'catalog', add to favorites list or whatever and then you could add the code to email the list. The documentation was good but I think I found a bug in one his examples. in his REAME [sic] file, he states the following: Here is sample code to enumerate the basket. if ($basket->Get_Basket_Count()>0) { # are there items in the basket I found this to be incorrect, that it required me to change the comparison operator from > to >=. https://sourceforge.net/projects/urklesphp/ STEPHEN MUSGRAVE. ........................ .. .. stephen at musgrave.org .. http://musgrave.org .. 718-486-6514 ........................ On 11/5/03 10:03 AM, "Michael Southwell" wrote: > Did you ever get any response to your request on NYPHP-Talk? I was > watching for one because I was interested in that myself; but I never saw one. > > 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 shawn at shawnlawyer.com Wed Nov 5 23:52:02 2003 From: shawn at shawnlawyer.com (Shawn Lawyer) Date: Wed, 5 Nov 2003 23:52:02 -0500 Subject: [nycphp-talk] Hans, phpmeetup References: <176730-220031135152647712@M2W054.mail2web.com> <3FA919C8.2030700@nyphp.org> Message-ID: <004d01c3a421$b887cf10$1ea0d718@Della> hans, you were intersested and discussing an email standard with me last week. regretfully with the schedule i maintain i was unable to attend the last meeting. i was windering if you would be at the php meet up tomorrow at 7pm. if you will be there let me know and i will attend. anyone else with interest in attending let me know. shawn From csnyder at chxo.com Thu Nov 6 00:38:13 2003 From: csnyder at chxo.com (Chris Snyder) Date: Thu, 06 Nov 2003 00:38:13 -0500 Subject: [nycphp-talk] favorite php site search implementation? Message-ID: <3FA9DE45.2080007@chxo.com> I need to provide an extremely user-friendly search function for a website of 200-400 pages. Normally I'd go with Google's free site search, but this can't have any branding, and the custom packages are too expensive. If I were building it myself, I would probably write a front-end to MySql's fulltext index... Has anyone done a search engine recently? Any favorite scripts/classes out there? csnyder From tgales at tgaconnect.com Thu Nov 6 01:07:38 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 6 Nov 2003 01:07:38 -0500 Subject: [nycphp-talk] favorite php site search implementation? In-Reply-To: <3FA9DE45.2080007@chxo.com> Message-ID: <001e01c3a42c$4b1f3ac0$bf8d3818@oberon1> Chris, re: I need to provide an extremely user-friendly search function for a website of 200-400 pages. Out of curiosity is that for a Berylium2 site? Are you searching for content that is already stored in a database -- or html pages? T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com From felix at students.poly.edu Thu Nov 6 02:52:42 2003 From: felix at students.poly.edu (felix zaslavskiy) Date: Thu, 6 Nov 2003 02:52:42 -0500 Subject: [nycphp-talk] application logic in stored procedures Message-ID: <20031106025242.5b8acb92.felix@students.poly.edu> I am just trying to get an understaning if its a good way to go. I have not implemented a full blown web based business application before but I have been doing a bit of looking around the net on the topic. It seems people say for anything that is not trivial and involves some tricky business rules go with full featured dbms, in my case that would be postgresql. For fast search/lookup stuff like many web stuff mysql may be faster. Then choosing mysql the option of stored procedures is no longer available. What I am afraid of is if I use mysql alot of my php code would be start looking like this start trabsaction->query->process->query->proces->query->end transaction. If this is the case why not just put most of this mess in a stored procedure? I dont like this turn into another pg vs mysql thread. I like to hear how people made decisions on wheather they needed stored procedures on basis of their project requirements. Felix Zaslavskiy From csnyder at chxo.com Thu Nov 6 08:38:45 2003 From: csnyder at chxo.com (Chris Snyder) Date: Thu, 06 Nov 2003 08:38:45 -0500 Subject: [nycphp-talk] favorite php site search implementation? In-Reply-To: <001e01c3a42c$4b1f3ac0$bf8d3818@oberon1> References: <001e01c3a42c$4b1f3ac0$bf8d3818@oberon1> Message-ID: <3FAA4EE5.9000005@chxo.com> Tim Gales wrote: >Out of curiosity is that for a Berylium2 site? >Are you searching for content that is already stored in a database -- >or html pages? > > A mix of static and dynamic. But it would be easy enough to write a crawler that loaded the text of all the static pages into a database. From jkelly at sussex.edu Thu Nov 6 11:15:15 2003 From: jkelly at sussex.edu (jessica kelly) Date: Thu, 06 Nov 2003 11:15:15 -0500 Subject: [nycphp-talk] favorite php site search implementation? Message-ID: I have one that I really like but it's a pearl search engine. KSearch from KScripts http://www.kscripts.com . Easy to set up & can be as powerful or as simple a search as you want it to be. Uses flat files but should be plenty fast for a 400 - 500 page site. It may be able to use MySQL as a db but I don't remember off the top of my head. Sincerely, Jessica Kelly, SCCC Web Administrator SCCC WebCT Administrator jkelly at sussex.edu 973-300-2148 1 College Hill, Newton, NJ 07860 >>> csnyder at chxo.com 11/6/03 12:38:13 AM >>> I need to provide an extremely user-friendly search function for a website of 200-400 pages. Normally I'd go with Google's free site search, but this can't have any branding, and the custom packages are too expensive. If I were building it myself, I would probably write a front-end to MySql's fulltext index... Has anyone done a search engine recently? Any favorite scripts/classes out there? csnyder _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From enunez at tiaa-cref.org Thu Nov 6 11:25:40 2003 From: enunez at tiaa-cref.org (Nunez, Eddy) Date: Thu, 6 Nov 2003 09:25:40 -0700 Subject: [nycphp-talk] Zend Studio update Message-ID: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9D93@msxnyusr01.msx.ops.tiaa-cref.org> A while back the zend guys offered the club a nice discount on their product. Now that they upgraded it to 3.0.1 (which fixed an IDE bug that annoyed the hell out of me) I am unable to get the update .. even though their email says "you are entitled to a free update". Anyone upgraded to 3.0.1 yet without that Upgrades Plus crap? -Eddy ************************************************************** 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 ************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From nyphp at websapp.com Thu Nov 6 11:35:58 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Thu, 6 Nov 2003 11:35:58 -0500 Subject: [nycphp-talk] Zend Studio update In-Reply-To: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9D93@msxnyusr01.msx.ops.tiaa-cref.org> Message-ID: Which version did you purcahse? --Daniel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Nunez, Eddy Sent: Thursday, November 06, 2003 11:26 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] Zend Studio update A while back the zend guys offered the club a nice discount on their product. Now that they upgraded it to 3.0.1 (which fixed an IDE bug that annoyed the hell out of me) I am unable to get the update .. even though their email says "you are entitled to a free update". Anyone upgraded to 3.0.1 yet without that Upgrades Plus crap? -Eddy ************************************************************** 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 nyphp at websapp.com Thu Nov 6 11:45:07 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Thu, 6 Nov 2003 11:45:07 -0500 Subject: [nycphp-talk] Zend Studio update In-Reply-To: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9D93@msxnyusr01.msx.ops.tiaa-cref.org> Message-ID: Eddy, Zend's response: "Everyone is entitled to the upgrade, it is a bug fix and is free from the pickup depot." If you are having trouble downloading the upgrade, please contact Michal (michal at zend.com). Best, Daniel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Nunez, Eddy Sent: Thursday, November 06, 2003 11:26 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] Zend Studio update A while back the zend guys offered the club a nice discount on their product. Now that they upgraded it to 3.0.1 (which fixed an IDE bug that annoyed the hell out of me) I am unable to get the update .. even though their email says "you are entitled to a free update". Anyone upgraded to 3.0.1 yet without that Upgrades Plus crap? -Eddy ************************************************************** 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 myersm at optonline.net Thu Nov 6 11:37:28 2003 From: myersm at optonline.net (Michael Myers) Date: Thu, 06 Nov 2003 11:37:28 -0500 Subject: [nycphp-talk] Pat on the Back Message-ID: <82CBDAC5-1077-11D8-92A8-0050E4A02242@optonline.net> Over the past few days I made substantial progress converting the first leg of a web application to "AMP". Compared to my non-AMP production version, it is wonderfully fast and has me really energized to move forward. I just want to thank the contributors to the NYPHP forum, as I have been trying to absorb the general types of advice regarding site structure, strategy, and coding practice. Even though I'm just scratching the surface, it has helped me a great deal already. Thanks! mpm From keremtuzemen at hotmail.com Thu Nov 6 12:12:26 2003 From: keremtuzemen at hotmail.com (Kerem Tuzemen) Date: Thu, 6 Nov 2003 12:12:26 -0500 Subject: [nycphp-talk] php-java on linux, weird behaviour... References: <001901c3a36c$67dc1d60$bf8d3818@oberon1> Message-ID: Hi everybody, I'm experiencing an interesting problem with Apache 1.3 , php 4.3.3 (as so) on Redhat linux 9 and I need your thoughts about this since I've spent almost three days without any success and started to feel like kicking this linux box. Here's the situation: I'm using php to connect to a java interface to a proprietary so library. When I run the java interface class code from the command line (java), as long as I set the LD_LIBRARY_PATH variable and java -cp option to include necessary jar files the code works perfectly. But when it comes to using php interface, although LD_LIBRARY_PATH env variable and all related java paths, etc in php.ini are set correctly, the java class code acts as these variables are not set and returns an UnsatisfiedLinkError to the proprietary so library or a NoClassDefFoundError. These two errors alternates without any specific pattern during the php calls to the interface java library. One thing I've noted is that, when I restart httpd service and open the php page calling the java class, I first get the UnsatisfiedLinkError and then it starts alternating. BTW, PHP calls to Java looks working perfectly since I don't have any problems when accessing java.lang.System properties. Any suggestions? Do you see anything that I'm missing or I should test? Zillions of thanks in advance, Kerem From ejp at well.com Thu Nov 6 12:09:01 2003 From: ejp at well.com (Edward Potter) Date: Thu, 6 Nov 2003 12:09:01 -0500 Subject: [nycphp-talk] forum: which linux flavor? In-Reply-To: References: Message-ID: Just got OS X Server. Pretty much the end of my Linux days for now. A beautiful piece of software. It looks like someone spend 6 months just designing icons. And if you really need the command line, it's always there. I drop into vi just to keep my hacker roots intact, but otherwise I've been swept away. And today I found out It includes QT Broadcasting with available plugsin's for live video streaming for the Japanese cell phone market, now that's kinda of radical. :-) -ed On Nov 3, 2003, at 3:45 PM, Brian Pang wrote: > I put this in the non-PHP forum with a poll, so if you have a reply or > opinion, please put it there rather than posting back to the list. > > http://forums.nyphp.org/index.php?showtopic=49 > ----- > I've been using RedHat Linux since 6.2 as a desktop/workstation > solution. > > Soon, RH will be phasing out their Free "stable" version of Linux, it's > time to find a new distributor. > > Which do you use? Which do you recommend? And Why? > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > //--------------------------------------- ed at exitart.org, ejp at well.com http://www.exitart.org http://mygoo.typepad.com From adam at trachtenberg.com Thu Nov 6 12:19:59 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Thu, 6 Nov 2003 12:19:59 -0500 (EST) Subject: [nycphp-talk] php-java on linux, weird behaviour... In-Reply-To: References: <001901c3a36c$67dc1d60$bf8d3818@oberon1> Message-ID: On Thu, 6 Nov 2003, Kerem Tuzemen wrote: > alternating. BTW, PHP calls to Java looks working perfectly since I don't > have any problems when accessing java.lang.System properties. > Any suggestions? Do you see anything that I'm missing or I should test? The Java extension? Ugh. Thar be dragons. I hate to say that there's really been no activity on this bridge in a year or two, so I'm not surprised if you encounter bugs. Personally, I find it a miracle that you can get get java.lang.System to work. :) I can also tell you that any future Java extension development will be PHP 5 only. So, unless you're providing patches, I wouldn't look for any updates on the 4.x branch. Sorry I don't have anything helpful to add here. -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From myersm at optonline.net Thu Nov 6 11:20:27 2003 From: myersm at optonline.net (Michael Myers) Date: Thu, 06 Nov 2003 11:20:27 -0500 Subject: [nycphp-talk] PHP code for calendar based navigation Message-ID: <221ED326-1075-11D8-92A8-0050E4A02242@optonline.net> Can anyone recommend a PHP class (or online site to search) for building a calendar based navigator? This would be a small calendar in the page margin that is used to navigate to different days of the month, often seen on weblog sites. I'm not running a weblog, but I do have date-based web pages. TIA, mpm From dmintz at davidmintz.org Thu Nov 6 13:47:25 2003 From: dmintz at davidmintz.org (David Mintz) Date: Thu, 6 Nov 2003 13:47:25 -0500 (EST) Subject: [nycphp-talk] favorite php site search implementation? In-Reply-To: <3FA9DE45.2080007@chxo.com> References: <3FA9DE45.2080007@chxo.com> Message-ID: On Thu, 6 Nov 2003, Chris Snyder wrote: > I need to provide an extremely user-friendly search function for a > website of 200-400 pages. > Normally I'd go with Google's free site search, but this can't have any > branding, and the custom packages are too expensive. > I hear htDig is pretty good: http://www.htdig.org/ --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Anybody else got a problem with Webistics?" Sopranos 24:17 From gw.nyphp at gwprogramming.com Thu Nov 6 14:27:59 2003 From: gw.nyphp at gwprogramming.com (George Webb) Date: Thu, 6 Nov 2003 14:27:59 -0500 Subject: [nycphp-talk] PHP code for calendar based navigation Message-ID: <20031106142759.O12981@vtbear.com> Hi mpm. I have enjoyed the cascade calendar class for PHP: http://www.cascade.org.uk/software/php/calendar/ I am using it for, among other things, the shipping/delivery date calendar for tastygram.com (http://www.tastygram.com/). (FYI, this site is build in InterShop/Perl; just the calendar HTML is built by PHP and then stuffed into a database...). I also just stumbled across these links: http://www.scriptsearch.com/PHP/Scripts_and_Programs/Calendars/ http://php.resourceindex.com/Complete_Scripts/Calendars/ Best, George. George Webb gw.nyphp at gwprogramming.com From jonbaer at jonbaer.net Thu Nov 6 14:48:16 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 6 Nov 2003 14:48:16 -0500 Subject: [nycphp-talk] PHP code for calendar based navigation References: <221ED326-1075-11D8-92A8-0050E4A02242@optonline.net> Message-ID: <003201c3a49e$ec045200$6400a8c0@thinkpad> Im not sure if you were looking for a widget or not, but I have used this in a few PHP CMS apps (mainly because of the keymapping w/ frames ability): http://dynarch.com/mishoo/calendar.epl http://dynarch.com/mishoo/calendar/ - jon ----- Original Message ----- From: "Michael Myers" To: "NYPHP Talk" Sent: Thursday, November 06, 2003 11:20 AM Subject: [nycphp-talk] PHP code for calendar based navigation > Can anyone recommend a PHP class (or online site to search) for > building a calendar based navigator? This would be a small calendar in From dmintz at davidmintz.org Thu Nov 6 15:25:38 2003 From: dmintz at davidmintz.org (David Mintz) Date: Thu, 6 Nov 2003 15:25:38 -0500 (EST) Subject: [nycphp-talk] PHP code for calendar based navigation In-Reply-To: <221ED326-1075-11D8-92A8-0050E4A02242@optonline.net> References: <221ED326-1075-11D8-92A8-0050E4A02242@optonline.net> Message-ID: On Thu, 6 Nov 2003, Michael Myers wrote: > Can anyone recommend a PHP class (or online site to search) for > building a calendar based navigator? This would be a small calendar in > the page margin that is used to navigate to different days of the > month, often seen on weblog sites. I'm not running a weblog, but I do > have date-based web pages. Jeez, the challenge is that there are so many to choose from. There are a few at phpbuilder.com's code gallery, as I recall. There's even one I wrote myself, if you want to look at it let me know and I'll put it someplace public. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "Anybody else got a problem with Webistics?" Sopranos 24:17 From soazine at pop.erols.com Thu Nov 6 16:56:17 2003 From: soazine at pop.erols.com (soazine at pop.erols.com) Date: Thu, 6 Nov 2003 16:56:17 -0500 Subject: [nycphp-talk] Second time array_walk failed for me Message-ID: <114780-220031146215617598@M2W094.mail2web.com> I posted the code, the script, the links and the explanation on this URL: http://www.phpfreaks.com/forums/viewtopic.php?p=38181#38181 it has everything you should need for me to explain why, for the second time, array_walk failed to do anything to the array element(s). Phil -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . From adam at trachtenberg.com Thu Nov 6 17:37:43 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Thu, 6 Nov 2003 17:37:43 -0500 (EST) Subject: [nycphp-talk] Second time array_walk failed for me In-Reply-To: <114780-220031146215617598@M2W094.mail2web.com> References: <114780-220031146215617598@M2W094.mail2web.com> Message-ID: On Thu, 6 Nov 2003, soazine at pop.erols.com wrote: > I posted the code, the script, the links and the explanation on this URL: > http://www.phpfreaks.com/forums/viewtopic.php?p=38181#38181 it has > everything you should need for me to explain why, for the second time, > array_walk failed to do anything to the array element(s). Don't return the modified value; assign it to the first parameter of your callback function. -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 Thu Nov 6 21:59:45 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 6 Nov 2003 21:59:45 -0500 Subject: [nycphp-talk] Second time array_walk failed for me References: <114780-220031146215617598@M2W094.mail2web.com> <00a901c3a4c1$2ab208e0$5c096444@philofsoa> Message-ID: <014a01c3a4db$33e0a7e0$5c096444@philofsoa> Well, further research yielded a solution, but leaves me with more questions, such as: 1) Why does the PHP manual say that "array_walk" CAN change the values in the array, when, in fact, it can't? 2) If 1 is answerable, does that mean the manual is either misleading on array_walk, or, oh no WRONG? Anyway I found the solution: don't use array_walk at all, use array_map instead. I would provide the URL to verify this but I am not sure how many of you here at NYPHP speak fluent French for me to be able to provide it w/o translation. On second thought, I will anyway to verify my claims in the belief that there are Francophones among you: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=3E968E2C.70204%40evidian.com&rnum=5&prev=/groups%3Fq%3Darray_walk%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3D3E968E2C.70204%2540evidian.com%26rnum%3D5 Thanx though Phil > > ----- Original Message ----- > > From: "Adam Maccabee Trachtenberg" > > To: ; "NYPHP Talk" > > Sent: Thursday, November 06, 2003 5:37 PM > > Subject: Re: [nycphp-talk] Second time array_walk failed for me > > > > > > > On Thu, 6 Nov 2003, soazine at pop.erols.com wrote: > > > > > > > I posted the code, the script, the links and the explanation on this > > URL: > > > > http://www.phpfreaks.com/forums/viewtopic.php?p=38181#38181 it has > > > > everything you should need for me to explain why, for the second time, > > > > array_walk failed to do anything to the array element(s). > > > > > > Don't return the modified value; assign it to the first parameter of > > > your callback function. > > > > > > -adam > > > > > > -- > > > adam at trachtenberg.com > > > author of o'reilly's php cookbook > > > avoid the holiday rush, buy your copy today! > > > > -- > adam at trachtenberg.com > author of o'reilly's php cookbook > avoid the holiday rush, buy your copy today! From nyphp at websapp.com Thu Nov 6 22:18:20 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Thu, 6 Nov 2003 22:18:20 -0500 Subject: [nycphp-talk] Second time array_walk failed for me In-Reply-To: <014a01c3a4db$33e0a7e0$5c096444@philofsoa> Message-ID: Phil, > > 1) Why does the PHP manual say that "array_walk" CAN change the values in > the array, when, in fact, it can't? yes it can! > 2) If 1 is answerable, does that mean the manual is either misleading on > array_walk, or, oh no WRONG? >From the manual: Note: If function needs to be working with the actual values of the array, specify the first parameter of function as a reference. Then, any changes made to those elements will be made in the original array itself. Some code to test: The output: array(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" } array(3) { [0]=> string(19) "I have changed you!" [1]=> string(19) "I have changed you!" [2]=> string(19) "I have changed you!" } Oh my, it works !! Great job PHP Team ! --Daniel From soazine at erols.com Thu Nov 6 22:46:19 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 6 Nov 2003 22:46:19 -0500 Subject: [nycphp-talk] Second time array_walk failed for me References: Message-ID: <01d401c3a4e1$b5fb5490$5c096444@philofsoa> Ok, Daniel, let's investigate here: 1) what version of PHP are you using? I am using 4.1.3 2) Why does your work, here is mine and it does NOT work! Go to http://valsignalandet.com/aablah.php and see the results.. It does NOT work!!! However, yours does (go to http://valsignalandet.com/aablah2.php) Here is the code I copied: Why does yours work and mine does not, exact same logic only different methodology, one returns a result, the other does not.. That is not enough proof to just say "Good job PHP Team" and declare array_walk saves the universe from eternal peril. Phil ----- Original Message ----- From: "Daniel Kushner" To: "NYPHP Talk" Sent: Thursday, November 06, 2003 10:18 PM Subject: RE: [nycphp-talk] Second time array_walk failed for me > Phil, > > > > > 1) Why does the PHP manual say that "array_walk" CAN change the values in > > the array, when, in fact, it can't? > > yes it can! > > > 2) If 1 is answerable, does that mean the manual is either misleading on > > array_walk, or, oh no WRONG? > > >From the manual: > Note: If function needs to be working with the actual values of the array, > specify the first parameter of function as a reference. Then, any changes > made to those elements will be made in the original array itself. > > > Some code to test: > $arr = array('a', 'b', 'c'); > var_dump($arr); > function change(&$array, $index) { > $array = 'I have changed you!'; > } > > array_walk($arr, 'change'); > var_dump($arr); > ?> > > The output: > array(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" } > > array(3) { [0]=> string(19) "I have changed you!" [1]=> string(19) "I have > changed you!" [2]=> string(19) "I have changed you!" } > > > > Oh my, it works !! Great job PHP Team ! > > --Daniel > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From nyphp at websapp.com Thu Nov 6 22:53:47 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Thu, 6 Nov 2003 22:53:47 -0500 Subject: [nycphp-talk] Second time array_walk failed for me In-Reply-To: <01d401c3a4e1$b5fb5490$5c096444@philofsoa> Message-ID: Can you paste the code that you're testing? > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell > Sent: Thursday, November 06, 2003 10:46 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Second time array_walk failed for me > > > Ok, Daniel, let's investigate here: > > 1) what version of PHP are you using? I am using 4.1.3 > > 2) Why does your work, here is mine and it does NOT work! > > > function change(&$array, $index) { > $array = strtoupper($array); > } > > $blah = array('a', 'b', 'c'); > var_dump($blah); > array_walk($blah, 'change'); > var_dump($blah); > > ?> > > Go to http://valsignalandet.com/aablah.php and see the results.. > It does NOT > work!!! > > However, yours does (go to http://valsignalandet.com/aablah2.php) Here is > the code I copied: > > $arr = array('a', 'b', 'c'); > var_dump($arr); > function change(&$array, $index) { > $array = 'I have changed you!'; > } > > array_walk($arr, 'change'); > var_dump($arr); > ?> > > > Why does yours work and mine does not, exact same logic only different > methodology, one returns a result, the other does not.. That is > not enough > proof to just say "Good job PHP Team" and declare array_walk saves the > universe from eternal peril. > > Phil > ----- Original Message ----- > From: "Daniel Kushner" > To: "NYPHP Talk" > Sent: Thursday, November 06, 2003 10:18 PM > Subject: RE: [nycphp-talk] Second time array_walk failed for me > > > > Phil, > > > > > > > > 1) Why does the PHP manual say that "array_walk" CAN change the values > in > > > the array, when, in fact, it can't? > > > > yes it can! > > > > > 2) If 1 is answerable, does that mean the manual is either > misleading on > > > array_walk, or, oh no WRONG? > > > > >From the manual: > > Note: If function needs to be working with the actual values of > the array, > > specify the first parameter of function as a reference. Then, > any changes > > made to those elements will be made in the original array itself. > > > > > > Some code to test: > > > $arr = array('a', 'b', 'c'); > > var_dump($arr); > > function change(&$array, $index) { > > $array = 'I have changed you!'; > > } > > > > array_walk($arr, 'change'); > > var_dump($arr); > > ?> > > > > The output: > > array(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" } > > > > array(3) { [0]=> string(19) "I have changed you!" [1]=> > string(19) "I have > > changed you!" [2]=> string(19) "I have changed you!" } > > > > > > > > Oh my, it works !! Great job PHP Team ! > > > > --Daniel > > > > > > _______________________________________________ > > 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 Nov 6 22:55:38 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 6 Nov 2003 22:55:38 -0500 Subject: [nycphp-talk] Second time array_walk failed for me In-Reply-To: References: <014a01c3a4db$33e0a7e0$5c096444@philofsoa> Message-ID: <20031107035538.GA9580@panix.com> On Thu, Nov 06, 2003 at 10:18:20PM -0500, Daniel Kushner wrote: > Phil wrote: > > > 1) Why does the PHP manual say that "array_walk" CAN change the values > > in the array, when, in fact, it can't? > > 2) If 1 is answerable, does that mean the manual is either misleading on > > array_walk, or, oh no WRONG? > > >From the manual: > Note: If function needs to be working with the actual values of the array, > specify the first parameter of function as a reference. Then, any changes > made to those elements will be made in the original array itself. Marv Albert here with the instant replay... including the behind the scenes action!!! Phil learned of the array_walk() function, but he didn't fully read the manual about it, so couldn't get it to work. Phil goes ahead and posts in several places about it: * Here on the NYPHP Talk mailing list * http://forums.nyphp.org/index.php?s=6a864e7ce96614312a68fc4f4b5a0fa2&showtopic=52&st=0&#entry150 * http://www.dbforums.com/t968865.html * http://www.phpfreaks.com/forums/viewtopic.php?p=38181#38181 * http://groups.google.com/groups?q=powell+array+walk+php&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=1cdca2a7.0311061401.6f9bed04%40posting.google.com&rnum=1 Then, back here on the list, Adam is kind enough to tell him how to get it to work. But Phil still misses the point and thinks he's found a bug in PHP or the manual. Now, Daniel goes to the manual for Phil and cuts and pastes the crucial text from the manual right here for him, PLUS provides an example. Folks, stay in your seats, the game's not over yet!!! --Dan "And Phil wonders why I give him a hard time..." Convissor -- 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 Thu Nov 6 22:53:57 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 6 Nov 2003 22:53:57 -0500 Subject: [nycphp-talk] Second time array_walk failed for me References: Message-ID: <01ee01c3a4e2$c56c9e60$5c096444@philofsoa> I did paste the code, here it is again: MINE: http://valsignalandet.com/aablah.php YOURS: http://valsignalandet.com/aablah2.php Environment: PHP 4.1.3 UNIX/Apache Phil ----- Original Message ----- From: "Daniel Kushner" To: "NYPHP Talk" Sent: Thursday, November 06, 2003 10:53 PM Subject: RE: [nycphp-talk] Second time array_walk failed for me > Can you paste the code that you're testing? > > > -----Original Message----- > > From: talk-bounces at lists.nyphp.org > > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell > > Sent: Thursday, November 06, 2003 10:46 PM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Second time array_walk failed for me > > > > > > Ok, Daniel, let's investigate here: > > > > 1) what version of PHP are you using? I am using 4.1.3 > > > > 2) Why does your work, here is mine and it does NOT work! > > > > > > > function change(&$array, $index) { > > $array = strtoupper($array); > > } > > > > $blah = array('a', 'b', 'c'); > > var_dump($blah); > > array_walk($blah, 'change'); > > var_dump($blah); > > > > ?> > > > > Go to http://valsignalandet.com/aablah.php and see the results.. > > It does NOT > > work!!! > > > > However, yours does (go to http://valsignalandet.com/aablah2.php) Here is > > the code I copied: > > > > > $arr = array('a', 'b', 'c'); > > var_dump($arr); > > function change(&$array, $index) { > > $array = 'I have changed you!'; > > } > > > > array_walk($arr, 'change'); > > var_dump($arr); > > ?> > > > > > > Why does yours work and mine does not, exact same logic only different > > methodology, one returns a result, the other does not.. That is > > not enough > > proof to just say "Good job PHP Team" and declare array_walk saves the > > universe from eternal peril. > > > > Phil > > ----- Original Message ----- > > From: "Daniel Kushner" > > To: "NYPHP Talk" > > Sent: Thursday, November 06, 2003 10:18 PM > > Subject: RE: [nycphp-talk] Second time array_walk failed for me > > > > > > > Phil, > > > > > > > > > > > 1) Why does the PHP manual say that "array_walk" CAN change the values > > in > > > > the array, when, in fact, it can't? > > > > > > yes it can! > > > > > > > 2) If 1 is answerable, does that mean the manual is either > > misleading on > > > > array_walk, or, oh no WRONG? > > > > > > >From the manual: > > > Note: If function needs to be working with the actual values of > > the array, > > > specify the first parameter of function as a reference. Then, > > any changes > > > made to those elements will be made in the original array itself. > > > > > > > > > Some code to test: > > > > > $arr = array('a', 'b', 'c'); > > > var_dump($arr); > > > function change(&$array, $index) { > > > $array = 'I have changed you!'; > > > } > > > > > > array_walk($arr, 'change'); > > > var_dump($arr); > > > ?> > > > > > > The output: > > > array(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" } > > > > > > array(3) { [0]=> string(19) "I have changed you!" [1]=> > > string(19) "I have > > > changed you!" [2]=> string(19) "I have changed you!" } > > > > > > > > > > > > Oh my, it works !! Great job PHP Team ! > > > > > > --Daniel > > > > > > > > > _______________________________________________ > > > 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 Thu Nov 6 22:59:16 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 6 Nov 2003 22:59:16 -0500 Subject: [nycphp-talk] include "<5.1.0.14.2.20031103205443.00b22dd0@mail.optonline.net><5.1.0.14.2.20031103205443.00b22dd0@mail.optonline.net><5.1.0.14.2.20031103214706.00b22dd0@mail.optonline.net><5.1.0.14.2.20031105095317.00b546e0@mail.optonline.net> <20031105165928.GA17941@panix.com> Message-ID: <020b01c3a4e3$8389bf40$5c096444@philofsoa> I never wonder why you give me a hard time. I just wonder why you can't provide solutions as your name suggests. Phil ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Wednesday, November 05, 2003 11:59 AM Subject: Re: [nycphp-talk] include " On Wed, Nov 05, 2003 at 10:01:21AM -0500, Michael Southwell wrote: > > At 10:35 PM 11/3/2003, you wrote: > > You being who? > > > So then I thought: this > > should be just one page with variable data; instead of ten pages each 2K, > > have one page 10K. Smaller and faster. > > It's bigger and slower. PHP now has to parse 10k of code instead of 2. > Plus editing the content in such a way seems unwieldy. I find it far > more direct to manage items by file name. > > Whatever is common between the pages should get templated. Then, there > are two options: 1) have the template include the content, or 2) have the > content include the templates. The approach you want depends on what > you're doing. > > --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 Thu Nov 6 23:07:00 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 6 Nov 2003 23:07:00 -0500 Subject: [nycphp-talk] Second time array_walk failed for me In-Reply-To: <01ee01c3a4e2$c56c9e60$5c096444@philofsoa> References: <01ee01c3a4e2$c56c9e60$5c096444@philofsoa> Message-ID: <20031107040700.GA11209@panix.com> On Thu, Nov 06, 2003 at 10:53:57PM -0500, Phil Powell wrote: > > Environment: PHP 4.1.3 UNIX/Apache Um, there doesn't seem to be a version 4.1.3. >From http://museum.php.net/php4/ php-4.1.2.tar.gz 20-May-2003 03:38 3.2M php-4.2.0.tar.gz 20-May-2003 03:38 3.3M --Dan "who knows how to replyy to a thread and delete unneded portions of prior posts, but doesn't seem to have the common sense to delete your threads" Convissor -- 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 Nov 6 23:10:11 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 6 Nov 2003 20:10:11 -0800 (PST) Subject: [nycphp-talk] Second time array_walk failed for me In-Reply-To: <01d401c3a4e1$b5fb5490$5c096444@philofsoa> Message-ID: <20031107041011.92266.qmail@web14307.mail.yahoo.com> --- Phil Powell wrote: > $array = strtoupper($array); An array is not a string. That's your problem. As for thinking that there is a bug and your general approach to asking questions, you should really take the time to read this: http://www.catb.org/~esr/faqs/smart-questions.html Specifically, this is relevant: -------------------------------------------------- Don't claim that you have found a bug When you are having problems with a piece of software, don't claim you have found a bug unless you are very, very sure of your ground. Hint: unless you can provide a source-code patch that fixes the problem, or a regression test against a previous version that demonstrates incorrect behavior, you are probably not sure enough. Remember, there are a lot of other users that are not experiencing your problem. Otherwise you would have learned about it while reading the documentation and searching the Web (you did do that before complaining, didn't you?). This means that very probably it is you who are doing something wrong, not the software. The people who wrote the software work very hard to make it work as well as possible. If you claim you have found a bug, you'll be implying that they did something wrong, and you will almost always offend them ? even when you are correct. It's especially undiplomatic to yell ?bug? in the Subject line. When asking your question, it is best to write as though you assume you are doing something wrong, even if you are privately pretty sure you have found an actual bug. If there really is a bug, you will hear about it in the answer. Play it so the maintainers will want to apologize to you if the bug is real, rather than so that you will owe them an apology if you have messed up. -------------------------------------------------- Hope that helps. Chris ===== My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp From soazine at erols.com Thu Nov 6 23:16:40 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 6 Nov 2003 23:16:40 -0500 Subject: [nycphp-talk] Second time array_walk failed for me References: <20031107041011.92266.qmail@web14307.mail.yahoo.com> Message-ID: <024e01c3a4e5$f3b8b3a0$5c096444@philofsoa> According to the manual: Applies the user-defined function function to each element of the array array. Typically, function takes on two parameters. The array parameter's value being the first, and the key/index second. If the optional userdata parameter is supplied, it will be passed as the third parameter to the callback function. [see http://www.php.net/manual/en/function.array-walk.php] This then indicates $array, which Daniel used as his parameter name, is NOT an array, BUT a string, as is also in my case, lest his assignment: $array = 'I have changed you!'; Be invalid because you are assigning a scalar value to an array (using http://www.php.net/manual/en/language.types.array.php in the manual as my backup), so therefore, I believe $array is a string, not an actual array, based on these findings. Phil ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Thursday, November 06, 2003 11:10 PM Subject: Re: [nycphp-talk] Second time array_walk failed for me > --- Phil Powell wrote: > > $array = strtoupper($array); > > An array is not a string. That's your problem. > > As for thinking that there is a bug and your general approach to asking > questions, you should really take the time to read this: > > http://www.catb.org/~esr/faqs/smart-questions.html > > Specifically, this is relevant: > > -------------------------------------------------- > Don't claim that you have found a bug > > When you are having problems with a piece of software, don't claim you > have found a bug unless you are very, very sure of your ground. Hint: > unless you can provide a source-code patch that fixes the problem, or a > regression test against a previous version that demonstrates incorrect > behavior, you are probably not sure enough. > > Remember, there are a lot of other users that are not experiencing your > problem. Otherwise you would have learned about it while reading the > documentation and searching the Web (you did do that before complaining, > didn't you?). This means that very probably it is you who are doing > something wrong, not the software. > > The people who wrote the software work very hard to make it work as well > as possible. If you claim you have found a bug, you'll be implying that > they did something wrong, and you will almost always offend them - even > when you are correct. It's especially undiplomatic to yell "bug" in the > Subject line. > > When asking your question, it is best to write as though you assume you > are doing something wrong, even if you are privately pretty sure you have > found an actual bug. If there really is a bug, you will hear about it in > the answer. Play it so the maintainers will want to apologize to you if > the bug is real, rather than so that you will owe them an apology if you > have messed up. > -------------------------------------------------- > > Hope that helps. > > Chris > > > ===== > My Blog > http://shiflett.org/ > HTTP Developer's Handbook > http://httphandbook.org/ > RAMP Training Courses > http://www.nyphp.org/ramp > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From nyphp at websapp.com Thu Nov 6 23:27:09 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Thu, 6 Nov 2003 23:27:09 -0500 Subject: [nycphp-talk] Second time array_walk failed for me In-Reply-To: <024e01c3a4e5$f3b8b3a0$5c096444@philofsoa> Message-ID: Phil, Chris must have been mislead by my stupid naming convention! I should never have named an array element $array.... --Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell > Sent: Thursday, November 06, 2003 11:17 PM > To: shiflett at php.net; NYPHP Talk > Subject: Re: [nycphp-talk] Second time array_walk failed for me > > > According to the manual: > > Applies the user-defined function function to each element of the array > array. Typically, function takes on two parameters. The array parameter's > value being the first, and the key/index second. If the optional userdata > parameter is supplied, it will be passed as the third parameter to the > callback function. > > [see http://www.php.net/manual/en/function.array-walk.php] > > This then indicates $array, which Daniel used as his parameter > name, is NOT > an array, BUT a string, as is also in my case, lest his assignment: > > $array = 'I have changed you!'; > > Be invalid because you are assigning a scalar value to an array (using > http://www.php.net/manual/en/language.types.array.php in the manual as my > backup), so therefore, I believe $array is a string, not an actual array, > based on these findings. > > > > Phil > > > > ----- Original Message ----- > From: "Chris Shiflett" > To: "NYPHP Talk" > Sent: Thursday, November 06, 2003 11:10 PM > Subject: Re: [nycphp-talk] Second time array_walk failed for me > > > > --- Phil Powell wrote: > > > $array = strtoupper($array); > > > > An array is not a string. That's your problem. > > > > As for thinking that there is a bug and your general approach to asking > > questions, you should really take the time to read this: > > > > http://www.catb.org/~esr/faqs/smart-questions.html > > > > Specifically, this is relevant: > > > > -------------------------------------------------- > > Don't claim that you have found a bug > > > > When you are having problems with a piece of software, don't claim you > > have found a bug unless you are very, very sure of your ground. Hint: > > unless you can provide a source-code patch that fixes the problem, or a > > regression test against a previous version that demonstrates incorrect > > behavior, you are probably not sure enough. > > > > Remember, there are a lot of other users that are not experiencing your > > problem. Otherwise you would have learned about it while reading the > > documentation and searching the Web (you did do that before complaining, > > didn't you?). This means that very probably it is you who are doing > > something wrong, not the software. > > > > The people who wrote the software work very hard to make it work as well > > as possible. If you claim you have found a bug, you'll be implying that > > they did something wrong, and you will almost always offend them - even > > when you are correct. It's especially undiplomatic to yell "bug" in the > > Subject line. > > > > When asking your question, it is best to write as though you assume you > > are doing something wrong, even if you are privately pretty > sure you have > > found an actual bug. If there really is a bug, you will hear about it in > > the answer. Play it so the maintainers will want to apologize to you if > > the bug is real, rather than so that you will owe them an apology if you > > have messed up. > > -------------------------------------------------- > > > > Hope that helps. > > > > Chris > > > > > > ===== > > My Blog > > http://shiflett.org/ > > HTTP Developer's Handbook > > http://httphandbook.org/ > > RAMP Training Courses > > http://www.nyphp.org/ramp > > _______________________________________________ > > 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 Thu Nov 6 23:33:02 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 6 Nov 2003 20:33:02 -0800 (PST) Subject: [nycphp-talk] Second time array_walk failed for me In-Reply-To: <024e01c3a4e5$f3b8b3a0$5c096444@philofsoa> Message-ID: <20031107043302.68972.qmail@web14303.mail.yahoo.com> --- Phil Powell wrote: > I believe $array is a string, not an actual array Then perhaps you should call it $element or something that makes sense. If Daniel's example does what you need, and you want to find out what is wrong with your own, alter one thing at a time in his example to make it exactly like yours and test after each change. One of these things is not like the other. One of these things doesn't belong... Chris ===== My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp From soazine at erols.com Thu Nov 6 23:32:36 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 6 Nov 2003 23:32:36 -0500 Subject: [nycphp-talk] Second time array_walk failed for me References: Message-ID: <027201c3a4e8$2b7c4c00$5c096444@philofsoa> Thanx, Daniel.. (and hey a nice Dan on NYPHP!) Phil ----- Original Message ----- From: "Daniel Kushner" To: "NYPHP Talk" ; Sent: Thursday, November 06, 2003 11:27 PM Subject: RE: [nycphp-talk] Second time array_walk failed for me > Phil, > > Chris must have been mislead by my stupid naming convention! I should never > have named an array element $array.... > > --Daniel > > > > -----Original Message----- > > From: talk-bounces at lists.nyphp.org > > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell > > Sent: Thursday, November 06, 2003 11:17 PM > > To: shiflett at php.net; NYPHP Talk > > Subject: Re: [nycphp-talk] Second time array_walk failed for me > > > > > > According to the manual: > > > > Applies the user-defined function function to each element of the array > > array. Typically, function takes on two parameters. The array parameter's > > value being the first, and the key/index second. If the optional userdata > > parameter is supplied, it will be passed as the third parameter to the > > callback function. > > > > [see http://www.php.net/manual/en/function.array-walk.php] > > > > This then indicates $array, which Daniel used as his parameter > > name, is NOT > > an array, BUT a string, as is also in my case, lest his assignment: > > > > $array = 'I have changed you!'; > > > > Be invalid because you are assigning a scalar value to an array (using > > http://www.php.net/manual/en/language.types.array.php in the manual as my > > backup), so therefore, I believe $array is a string, not an actual array, > > based on these findings. > > > > > > > > Phil > > > > > > > > ----- Original Message ----- > > From: "Chris Shiflett" > > To: "NYPHP Talk" > > Sent: Thursday, November 06, 2003 11:10 PM > > Subject: Re: [nycphp-talk] Second time array_walk failed for me > > > > > > > --- Phil Powell wrote: > > > > $array = strtoupper($array); > > > > > > An array is not a string. That's your problem. > > > > > > As for thinking that there is a bug and your general approach to asking > > > questions, you should really take the time to read this: > > > > > > http://www.catb.org/~esr/faqs/smart-questions.html > > > > > > Specifically, this is relevant: > > > > > > -------------------------------------------------- > > > Don't claim that you have found a bug > > > > > > When you are having problems with a piece of software, don't claim you > > > have found a bug unless you are very, very sure of your ground. Hint: > > > unless you can provide a source-code patch that fixes the problem, or a > > > regression test against a previous version that demonstrates incorrect > > > behavior, you are probably not sure enough. > > > > > > Remember, there are a lot of other users that are not experiencing your > > > problem. Otherwise you would have learned about it while reading the > > > documentation and searching the Web (you did do that before complaining, > > > didn't you?). This means that very probably it is you who are doing > > > something wrong, not the software. > > > > > > The people who wrote the software work very hard to make it work as well > > > as possible. If you claim you have found a bug, you'll be implying that > > > they did something wrong, and you will almost always offend them - even > > > when you are correct. It's especially undiplomatic to yell "bug" in the > > > Subject line. > > > > > > When asking your question, it is best to write as though you assume you > > > are doing something wrong, even if you are privately pretty > > sure you have > > > found an actual bug. If there really is a bug, you will hear about it in > > > the answer. Play it so the maintainers will want to apologize to you if > > > the bug is real, rather than so that you will owe them an apology if you > > > have messed up. > > > -------------------------------------------------- > > > > > > Hope that helps. > > > > > > Chris > > > > > > > > > ===== > > > My Blog > > > http://shiflett.org/ > > > HTTP Developer's Handbook > > > http://httphandbook.org/ > > > RAMP Training Courses > > > http://www.nyphp.org/ramp > > > _______________________________________________ > > > 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 websapp.com Fri Nov 7 00:43:44 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Fri, 7 Nov 2003 00:43:44 -0500 Subject: [nycphp-talk] Second time array_walk failed for me In-Reply-To: <027201c3a4e8$2b7c4c00$5c096444@philofsoa> Message-ID: Phil, Please take your personal thoughts off this list. We have over 1,300 subscribers, and we shouldn't be filling in their mailboxes with off topic emails. And now back to PHP :) Could you recheck your version. Dan mentioned that the one you are using shouldn't exist! Thanks, Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell > Sent: Thursday, November 06, 2003 11:33 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Second time array_walk failed for me > > > Thanx, Daniel.. (and hey a nice Dan on NYPHP!) > > Phil > ----- Original Message ----- > From: "Daniel Kushner" > To: "NYPHP Talk" ; > Sent: Thursday, November 06, 2003 11:27 PM > Subject: RE: [nycphp-talk] Second time array_walk failed for me > > > > Phil, > > > > Chris must have been mislead by my stupid naming convention! I should > never > > have named an array element $array.... > > > > --Daniel > > > > > > > -----Original Message----- > > > From: talk-bounces at lists.nyphp.org > > > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Phil Powell > > > Sent: Thursday, November 06, 2003 11:17 PM > > > To: shiflett at php.net; NYPHP Talk > > > Subject: Re: [nycphp-talk] Second time array_walk failed for me > > > > > > > > > According to the manual: > > > > > > Applies the user-defined function function to each element of > the array > > > array. Typically, function takes on two parameters. The array > parameter's > > > value being the first, and the key/index second. If the optional > userdata > > > parameter is supplied, it will be passed as the third parameter to the > > > callback function. > > > > > > [see http://www.php.net/manual/en/function.array-walk.php] > > > > > > This then indicates $array, which Daniel used as his parameter > > > name, is NOT > > > an array, BUT a string, as is also in my case, lest his assignment: > > > > > > $array = 'I have changed you!'; > > > > > > Be invalid because you are assigning a scalar value to an array (using > > > http://www.php.net/manual/en/language.types.array.php in the manual as > my > > > backup), so therefore, I believe $array is a string, not an actual > array, > > > based on these findings. > > > > > > > > > > > > Phil > > > > > > > > > > > > ----- Original Message ----- > > > From: "Chris Shiflett" > > > To: "NYPHP Talk" > > > Sent: Thursday, November 06, 2003 11:10 PM > > > Subject: Re: [nycphp-talk] Second time array_walk failed for me > > > > > > > > > > --- Phil Powell wrote: > > > > > $array = strtoupper($array); > > > > > > > > An array is not a string. That's your problem. > > > > > > > > As for thinking that there is a bug and your general approach to > asking > > > > questions, you should really take the time to read this: > > > > > > > > http://www.catb.org/~esr/faqs/smart-questions.html > > > > > > > > Specifically, this is relevant: > > > > > > > > -------------------------------------------------- > > > > Don't claim that you have found a bug > > > > > > > > When you are having problems with a piece of software, > don't claim you > > > > have found a bug unless you are very, very sure of your > ground. Hint: > > > > unless you can provide a source-code patch that fixes the > problem, or > a > > > > regression test against a previous version that > demonstrates incorrect > > > > behavior, you are probably not sure enough. > > > > > > > > Remember, there are a lot of other users that are not experiencing > your > > > > problem. Otherwise you would have learned about it while reading the > > > > documentation and searching the Web (you did do that before > complaining, > > > > didn't you?). This means that very probably it is you who are doing > > > > something wrong, not the software. > > > > > > > > The people who wrote the software work very hard to make it work as > well > > > > as possible. If you claim you have found a bug, you'll be implying > that > > > > they did something wrong, and you will almost always offend them - > even > > > > when you are correct. It's especially undiplomatic to yell "bug" in > the > > > > Subject line. > > > > > > > > When asking your question, it is best to write as though you assume > you > > > > are doing something wrong, even if you are privately pretty > > > sure you have > > > > found an actual bug. If there really is a bug, you will > hear about it > in > > > > the answer. Play it so the maintainers will want to apologize to you > if > > > > the bug is real, rather than so that you will owe them an apology if > you > > > > have messed up. > > > > -------------------------------------------------- > > > > > > > > Hope that helps. > > > > > > > > Chris > > > > > > > > > > > > ===== > > > > My Blog > > > > http://shiflett.org/ > > > > HTTP Developer's Handbook > > > > http://httphandbook.org/ > > > > RAMP Training Courses > > > > http://www.nyphp.org/ramp > > > > _______________________________________________ > > > > 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 Fri Nov 7 10:06:32 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 07 Nov 2003 10:06:32 -0500 Subject: [nycphp-talk] NYPHP Presentations Updated Message-ID: <3FABB4F8.8000604@nyphp.org> Sorry it's been so long in coming, but our presentations from the last couple of months are online. See http://nyphp.org/presentations If anyone notices any errors please let me know so they can be fixed. Hans From hans at nyphp.org Fri Nov 7 10:21:11 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 07 Nov 2003 10:21:11 -0500 Subject: [nycphp-talk] application logic in stored procedures In-Reply-To: <20031106025242.5b8acb92.felix@students.poly.edu> References: <20031106025242.5b8acb92.felix@students.poly.edu> Message-ID: <3FABB867.2000505@nyphp.org> felix zaslavskiy wrote: > I am just trying to get an understaning if its a good way to go. I > have not implemented a full blown web based business application > before but I have been doing a bit of looking around the net on the > topic. It seems people say for anything that is not trivial and > involves some tricky business rules go with full featured dbms, in my > case that would be postgresql. For fast search/lookup stuff like many > web stuff mysql may be faster. Then choosing mysql the option of > stored procedures is no longer available. What I am afraid of is if I > use mysql alot of my php code would be start looking like this start > trabsaction->query->process->query->proces->query->end transaction. > If this is the case why not just put most of this mess in a stored > procedure? That's a perfectly valid line of thought, and is exactly why MySQL will be getting stored procedures in the next major release. MySQL/PGSQL are difference animals, at least for the moment, and excel in different areas. You might even consider using both for a very large project. That said, there is business logic and then there is business logic. Pick the database(s) that are correct for the project, but don't pick something because of buzzwords (like "business logic goes in stored procedures") and be sure to define your tasks well. > I dont like this turn into another pg vs mysql thread. I like to hear > how people made decisions on wheather they needed stored procedures > on basis of their project requirements. It's a tough call. I still have not been romanced by PGSQL, but certainly see it's value. As a side note, we'll be having a great presentation on PGSQL from one of the core developers in Jan or Feb. H From hans at nyphp.org Fri Nov 7 10:26:35 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 07 Nov 2003 10:26:35 -0500 Subject: [nycphp-talk] Pat on the Back In-Reply-To: <82CBDAC5-1077-11D8-92A8-0050E4A02242@optonline.net> References: <82CBDAC5-1077-11D8-92A8-0050E4A02242@optonline.net> Message-ID: <3FABB9AB.3070607@nyphp.org> Michael Myers wrote: > Over the past few days I made substantial progress converting the first > leg of a web application to "AMP". Compared to my non-AMP production > version, it is wonderfully fast and has me really energized to move > forward. > > I just want to thank the contributors to the NYPHP forum, as I have been > trying to absorb the general types of advice regarding site structure, > strategy, and coding practice. Even though I'm just scratching the > surface, it has helped me a great deal already. > > Thanks! Many thanks Michael. As this list continues to mature, I'm so happy to hear people are finding value in it and with AMP Technology. Thanks again. Notes like this make it great. H From jonbaer at jonbaer.net Fri Nov 7 10:45:30 2003 From: jonbaer at jonbaer.net (jon baer) Date: Fri, 7 Nov 2003 10:45:30 -0500 Subject: [nycphp-talk] php on zaurus (ui options?) Message-ID: <000d01c3a546$2c784880$6400a8c0@thinkpad> i just installed php on a zaurus (w/ openzaurus 3.2) and wrote some small cli networking scripts to test out php embedded and they work fine but does anyone know if there are ui options i could use or how to go about cross-compiling a library like libncurses or qpe/qt for it? im trying to use it for mapping. - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From joshmccormack at travelersdiary.com Fri Nov 7 11:28:38 2003 From: joshmccormack at travelersdiary.com (joshmccormack at travelersdiary.com) Date: Fri, 7 Nov 2003 10:28:38 -0600 (CST) Subject: [nycphp-talk] application logic in stored procedures In-Reply-To: <3FABB867.2000505@nyphp.org> Message-ID: On Fri, 7 Nov 2003, Hans Zaunere wrote: > > > felix zaslavskiy wrote: > > how people made decisions on wheather they needed stored procedures > > on basis of their project requirements. > > It's a tough call. I still have not been romanced by PGSQL, but certainly see it's value. As a side note, we'll be having a great presentation on PGSQL from one of the core developers in Jan or Feb. > > H The performance of stored procedures over regular queries can be substantial. I'd recommend writing up a typical query as a stored procedure and run a benchmark. Then put it into your app and try it, and see if there's a noticeable difference. Josh From jlacey at att.net Fri Nov 7 11:54:23 2003 From: jlacey at att.net (John Lacey) Date: Fri, 07 Nov 2003 09:54:23 -0700 Subject: [nycphp-talk] application logic in stored procedures In-Reply-To: References: Message-ID: <3FABCE3F.5000100@att.net> and don't forget, there's a PlPHP procedural language for PostgreSQL, albeit beta... http://www.commandprompt.com/index.lxp?lxpt=22 it's not ready for prime time, but it's nice to know there's activity here. John joshmccormack at travelersdiary.com wrote: > On Fri, 7 Nov 2003, Hans Zaunere wrote: > > >> >>felix zaslavskiy wrote: >> >>>how people made decisions on wheather they needed stored procedures >>>on basis of their project requirements. >> >>It's a tough call. I still have not been romanced by PGSQL, but certainly see it's value. As a side note, we'll be having a great presentation on PGSQL from one of the core developers in Jan or Feb. >> >>H > > > The performance of stored procedures over regular queries can be substantial. I'd recommend writing up a typical query as a stored procedure and run a benchmark. Then put it into your app and try it, and see if there's a noticeable difference. > > Josh > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From dmintz at davidmintz.org Fri Nov 7 12:51:34 2003 From: dmintz at davidmintz.org (David Mintz) Date: Fri, 7 Nov 2003 12:51:34 -0500 (EST) Subject: [nycphp-talk] application logic in stored procedures In-Reply-To: References: Message-ID: On Fri, 7 Nov 2003 joshmccormack at travelersdiary.com wrote: > On Fri, 7 Nov 2003, Hans Zaunere wrote: > > felix zaslavskiy wrote: > > > how people made decisions on wheather they needed stored procedures > > > on basis of their project requirements. > > > > It's a tough call. I still have not been romanced by PGSQL, but > > certainly see it's value. As a side note, we'll be having a great > > presentation on PGSQL from one of the core developers in Jan or Feb. > > > > H I see the MySQL dudes plan to add stored procs in 5.0 and triggers in 5.1, so the arms race continues (got to maintain the balance of terror!). I wonder when the PGSQL dudes plan to make it a little easier to play with PGSQL on Windoze systems. --- David Mintz http://davidmintz.org/ Email: If you're not already whitelisted, see http://dmintzweb.com/whitelist.php first! ATTN Everybody: dmintz at panix.com will be unplugged as of 01-Dec-2003! Please use dmintz at davidmintz.org "Anybody else got a problem with Webistics?" Sopranos 24:17 From dmintz at davidmintz.org Fri Nov 7 12:58:05 2003 From: dmintz at davidmintz.org (David Mintz) Date: Fri, 7 Nov 2003 12:58:05 -0500 (EST) Subject: [nycphp-talk] application logic in stored procedures In-Reply-To: References: Message-ID: PS: http://www.mysql.com/doc/en/ANSI_diff_Triggers.html has some interesting user comments about this. --- David Mintz http://davidmintz.org/ Email: If you're not already whitelisted, see http://dmintzweb.com/whitelist.php first! ATTN Everybody: dmintz at panix.com will be unplugged as of 01-Dec-2003! Please use dmintz at davidmintz.org "Anybody else got a problem with Webistics?" Sopranos 24:17 From hans at nyphp.org Fri Nov 7 13:52:10 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 07 Nov 2003 13:52:10 -0500 Subject: [nycphp-talk] application logic in stored procedures In-Reply-To: References: Message-ID: <3FABE9DA.6000609@nyphp.org> David Mintz wrote: > On Fri, 7 Nov 2003 joshmccormack at travelersdiary.com wrote: > > >>On Fri, 7 Nov 2003, Hans Zaunere wrote: >> >>>felix zaslavskiy wrote: >>> >>>>how people made decisions on wheather they needed stored procedures >>>>on basis of their project requirements. >>> >>>It's a tough call. I still have not been romanced by PGSQL, but >>>certainly see it's value. As a side note, we'll be having a great >>>presentation on PGSQL from one of the core developers in Jan or Feb. >>> >>>H > > > > I see the MySQL dudes plan to add stored procs in 5.0 and triggers in 5.1, > so the arms race continues (got to maintain the balance of terror!). > > I wonder when the PGSQL dudes plan to make it a little easier to play with > PGSQL on Windoze systems. There was some discussion at the conference on this topic actually. From what I understand, PGSQL sees that Windows will not be worth supporting for real production deployment and so it'll most likely be on the back burner. In fact, a BSD family OS (like FreeBSD) is deemed the best environment for PGSQL. H From hans at nyphp.org Fri Nov 7 15:09:05 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 07 Nov 2003 15:09:05 -0500 Subject: [nycphp-talk] PHP Conference Pictures Message-ID: <3FABFBE1.8090004@nyphp.org> Just a couple pictures: http://www.nyphp.org/content/gallery/view_album.php?set_albumName=phpconference03 But not as good as: http://www.phpconference.de/2003/photos_en.php Hans From agfische at email.smith.edu Fri Nov 7 15:13:18 2003 From: agfische at email.smith.edu (Aaron Fischer) Date: Fri, 7 Nov 2003 15:13:18 -0500 Subject: [nycphp-talk] PHP Conference Pictures In-Reply-To: <3FABFBE1.8090004@nyphp.org> Message-ID: Wow, I had no idea PHPCon would be so, er, um, revealing! European flavor I suppose. Are nyphp meetings that spicy? :-) -Aaron On Friday, November 7, 2003, at 03:09 pm, Hans Zaunere wrote: > > But not as good as: > > http://www.phpconference.de/2003/photos_en.php From hans at nyphp.org Fri Nov 7 15:24:52 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 07 Nov 2003 15:24:52 -0500 Subject: [nycphp-talk] NYPHP Presentations Updated In-Reply-To: <3FABB4F8.8000604@nyphp.org> References: <3FABB4F8.8000604@nyphp.org> Message-ID: <3FABFF94.1060103@nyphp.org> And, I almost forgot. Andrew's coverage of PHPTAL (templating) is also online: http://www.nyphp.org/content/presentations/3templates/ Thanks Andrew! Hans Hans Zaunere wrote: > > Sorry it's been so long in coming, but our presentations from the last > couple of months are online. See http://nyphp.org/presentations > > If anyone notices any errors please let me know so they can be fixed. > > Hans > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From nyphp at enobrev.com Fri Nov 7 17:08:53 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Fri, 7 Nov 2003 17:08:53 -0500 Subject: [nycphp-talk] smtp socket error that i just don't get Message-ID: Hello all, I'm hoping you guys can lend a hand... Below is some code I grabbed from the manual (http://www.php.net/manual/en/ref.mail.php) for sending mail directly through the socket rather than using the mail command. Now it works well on my server, but when I installed it on my client's server, I get an endless loop of errors like so: Notice: fputs(): send of 41 bytes failed with errno=32 Broken pipe in /usr/local/etc/httpd/htdocs/bostonindoorgames/admin/mailer.php on line 136 Notice: fputs(): send of 42 bytes failed with errno=32 Broken pipe in /usr/local/etc/httpd/htdocs/bostonindoorgames/admin/mailer.php on line 136 The code is below, and line 136 is right under the comment // -------- PROBLEM STARTS HERE!!! ---------------- Now, as I mentioned, this same code works on my server just fine. There is surrounding code, but it's all involved in setting the vars and such for the email itself. I assure you all vars are set properly, as I've checked them at least 6 times. I thought that there may possibly be some kind of socket issue, but then wouldn't it have a problem connecting to the socket in the first place? Or even sending the HELO command after the connect? When searching for the error, I came up with this (which is a ll gibberish to me): Broken pipe =========== This condition is often normal, and the message is merely informational (as when piping many lines to the head program). The condition occurs when a write on a pipe does not find a reading process. This usually generates a signal to the executing program, but this message displays when the program ignores the signal. Check the process at the end of the pipe to see why it exited. The symbolic name forthis error is EPIPE, errno=32. // Open socket to SMTP server $connect = fsockopen (ini_get('SMTP'), ini_get('smtp_port'), $errno, $errstr, 30) or die('Could not talk to the sendmail server!'); $rcv = fgets($connect, 1024); // Send greeting to SMTP server fputs($connect, 'HELO {mail.' . $_SERVER['SERVER_NAME'] . '}' . $nl); $rcv = fgets($connect, 1024); // Loop through recipients and send mail foreach($recipients_array as $recipient) { if (strlen($recipient['recipient_name'])) { $to_name = $recipient['recipient_name']; } else { $to_name = ''; } $to_address = $recipient['recipient_email']; if (strlen($queue_array['unsubscribe_text'])) { $html_unsubscribe_link = '' . $queue_array['unsubscribe_text'] . ''; $ascii_unsubscribe_link = $queue_array['unsubscribe_text'] . ': ' . SITE_URL . 'unsubscribe.php?email=' . $to_address; } else { $html_unsubscribe_link = 'Unsubscribe'; $ascii_unsubscribe_link = 'Unsubscribe: ' . SITE_URL . 'unsubscribe.php?email=' . $to_address; } if (strlen(trim($to_name))) { $to_email = $to_name . ' <' . $to_address . '>'; } else { $to_email = $to_address; } $outer_boudary = "----=_EnoOuterBoundary_000"; $inner_boudary = "----=_EnoInnerBoundary_001"; $message_header = 'From: ' . $from_name . ' <' . $from_email . '>' . $nl . 'To: ' . $to_email . $nl . 'Subject: ' . $subject . $nl . 'MIME-Version: 1.0' . $nl . 'X-Mailer: Enobrev Mailer Version 1.0' . $nl . 'Content-Type: multipart/mixed;' . "\t" . 'boundary="' . $outer_boudary . '"' . $nl; // Messages start with text/html alternatives $message = 'This is a multi-part message in MIME format.' . $nl . $nl . '--' . $outer_boudary . $nl . 'Content-Type: multipart/alternative;' . $nl . "\t" . 'boundary="' . $inner_boudary . '"' . $nl . $nl // PLAIN SECTION . '--' . $inner_boudary . $nl . 'Content-Type: text/plain;' . $nl . "\t" . 'charset="iso-8859-1"' . $nl . 'Content-Transfer-Encoding: quoted-printable' . $nl . $nl // PLAIN TEXT . stripslashes($ascii_message . $nl . $nl . $ascii_unsubscribe_link) . $nl . $nl // HTML SECTION . '--' . $inner_boudary . $nl . 'Content-Type: text/html;' . $nl . "\t" . 'charset="iso-8859-1"' . $nl . 'Content-Transfer-Encoding: base64' . $nl . $nl // HTML . chunk_split(base64_encode($html_message . '

' . $html_unsubscribe_link)) . $nl . $nl // END INNER BOUNDARY . '--' . $inner_boudary . '--' . $nl . $nl // END MESSAGE . '--' . $outer_boudary . '--' . $nl; // ------------------------------------------- PROBLEM STARTS HERE!!! ------------------------------------------------------ fputs($connect, 'MAIL FROM:' . $from_email . $nl); // <-- LINE 136 $rcv = fgets($connect, 1024); fputs($connect, 'RCPT TO:' . $to_address . $nl); $rcv = fgets($connect, 1024); fputs($connect, 'DATA' . $nl); $rcv = fgets($connect, 1024); fputs($connect, $message_header . $message . $nl); $rcv = fgets($connect, 1024); fputs($connect, '.' . $nl); $rcv = fgets($connect, 1024); fputs($connect, 'RSET' . $nl); $rcv = fgets($connect, 1024); echo 'sent to ' . htmlspecialchars($to_email) . '
'; $db->Execute('DELETE FROM ' . TABLE_QUEUE_RECIPIENTS . ' WHERE queue_id = ' . $PassedVars['queue_id'] . ' AND recipient_id = ' . $recipient['recipient_id']); } fputs ($connect, 'QUIT' . $nl); $rcv = fgets ($connect, 1024); echo $rcv; fclose($connect); ini_restore('sendmail_from'); thank you for your help, and have a great weekend!!! Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Fri Nov 7 18:39:09 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 07 Nov 2003 18:39:09 -0500 Subject: [nycphp-talk] Sequenced Sessions WAS: Merging/reissuing sessions ... In-Reply-To: <20031031202525.52337.qmail@web14310.mail.yahoo.com> References: <20031031202525.52337.qmail@web14310.mail.yahoo.com> Message-ID: <3FAC2D1D.8010806@nyphp.org> Chris Shiflett wrote: > --- Hans Zaunere wrote: > >>I had written a session scheme that uses syn/ack numbers just like >>TCP does. >> >>I never really finished it but I have some more klunky code if you >>want to see it. > > > I'm not sure if I want to dig through "klunky" code, but I'd be > interested in hearing a description of your approach. :-) I've been meaning to clean it up and seperate it out into it's own PCOM, which I've begun to do at: http://posit.nyphp.org/~praxis/pas/ It's basically modeled after TCP sequence numbers. However, unlike a true TCP/IP connection between two systems, a browser-server relationship is one sided. That is to say, the client (browser) can't maintain it's own sequence numbers. This means that my sequenced sessions implementation is probably a bit weaker than the true TCP/IP scheme. Details of TCP/IP are in sections 3.2, 3.3 and 3.4. of http://www.faqs.org/rfcs/rfc793.html I've honestly just thrown the code together, but I'm curious if people can break it. It should be able to detect when a session becomes out of sync, and I'd love to hear ideas for making it better, or ways it can be broken - and even if in fact it works at all :) Hans From hans at nyphp.org Fri Nov 7 18:41:30 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 07 Nov 2003 18:41:30 -0500 Subject: [nycphp-talk] smtp socket error that i just don't get In-Reply-To: References: Message-ID: <3FAC2DAA.4070509@nyphp.org> Mark Armendariz wrote: > Hello all, > > I'm hoping you guys can lend a hand... Below is some code I grabbed from > the manual (http://www.php.net/manual/en/ref.mail.php) for sending mail > directly through the socket rather than using the mail command. Now it > works well on my server, but when I installed it on my client's server, > I get an endless loop of errors like so: > > *Notice*: fputs(): send of 41 bytes failed with errno=32 Broken pipe in > */usr/local/etc/httpd/htdocs/bostonindoorgames/admin/mailer.php* on line > *136* > > *Notice*: fputs(): send of 42 bytes failed with errno=32 Broken pipe in > */usr/local/etc/httpd/htdocs/bostonindoorgames/admin/mailer.php* on line > *136* > > The code is below, and line 136 is right under the comment // -------- > PROBLEM STARTS HERE!!! ---------------- > > Now, as I mentioned, this same code works on my server just fine. There > is surrounding code, but it's all involved in setting the vars and such > for the email itself. I assure you all vars are set properly, as I've > checked them at least 6 times. I thought that there may possibly be > some kind of socket issue, but then wouldn't it have a problem > connecting to the socket in the first place? Or even sending the HELO > command after the connect? > > When searching for the error, I came up with this (which is a ll > gibberish to me): > > Broken pipe > =========== > > This condition is often normal, and the message is merely > informational (as when piping many lines to the head program). > The condition occurs when a write on a pipe does not find a > reading process. This usually generates a signal to the executing > program, but this message displays when the program ignores the > signal. > > Check the process at the end of the pipe to see why it exited. > > The symbolic name forthis error is EPIPE, errno=32. > > > > // Open socket to SMTP server > $connect = fsockopen (ini_get('SMTP'), ini_get('smtp_port'), $errno, > $errstr, 30) or die('Could not talk to the sendmail server!'); > $rcv = fgets($connect, 1024); The mail server is probably not liking something about what you're sending it; either here, or later in the code. I'd begin to replace the simple: $rcv = fgets($connect, 1024); with some debugging that prints what the actual mail server's response is, for instance: $rcv = fgets($connect, 1024); trigger_error($rcv); Add this each time you try to send something to the mail server and see if it's having a problem. H From webmaster at localnotion.com Fri Nov 7 21:29:47 2003 From: webmaster at localnotion.com (webmaster at localnotion.com) Date: Sat, 8 Nov 2003 02:29:47 +0000 Subject: [nycphp-talk] application logic in stored procedures In-Reply-To: <3FABE9DA.6000609@nyphp.org> References: <3FABE9DA.6000609@nyphp.org> Message-ID: <1068258587.6ffcb80a398e2@webmail.localnotion.com> Did anyone mention that you can write Postgresql stored procedures in PHP? http://www.commandprompt.com/entry.lxp?lxpe=294 Quoting Hans Zaunere : > > > David Mintz wrote: > > > On Fri, 7 Nov 2003 joshmccormack at travelersdiary.com wrote: > > > > > >>On Fri, 7 Nov 2003, Hans Zaunere wrote: > >> > >>>felix zaslavskiy wrote: > >>> > >>>>how people made decisions on wheather they needed stored procedures > >>>>on basis of their project requirements. > >>> > >>>It's a tough call. I still have not been romanced by PGSQL, but > >>>certainly see it's value. As a side note, we'll be having a great > >>>presentation on PGSQL from one of the core developers in Jan or Feb. > >>> > >>>H > > > > > > > > I see the MySQL dudes plan to add stored procs in 5.0 and triggers in 5.1, > > so the arms race continues (got to maintain the balance of terror!). > > > > I wonder when the PGSQL dudes plan to make it a little easier to play with > > PGSQL on Windoze systems. > > There was some discussion at the conference on this topic actually. From > what I understand, PGSQL sees that Windows will not be worth supporting for > real production deployment and so it'll most likely be on the back burner. > In fact, a BSD family OS (like FreeBSD) is deemed the best environment for > PGSQL. > > H > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From ian at plusfour.org Fri Nov 7 22:20:53 2003 From: ian at plusfour.org (Ian Forsyth) Date: Fri, 7 Nov 2003 19:20:53 -0800 Subject: [nycphp-talk] Advice: Too many mysql connections. Message-ID: <8F6336C4-119A-11D8-A40D-003065778656@plusfour.org> Hello, I need some support. There is a site I do sys-admin type stuff for, that consistently has Too Many MySQL connections. Today, it happened 3 times already. Here is some info. Hardware: Dual Pentium 4, 1.8 GigHz, 40 Gigs SCSI Raid, 512 MB Ram. Server Software: Apache 1. 3.27, PHP 4.3.1, MySQL 4.0.12 Max Here is the my.cnf file. [mysqld] bind-address=127.0.0.1 set-variable = ft_min_word_len=2 set-variable = max_connections=300 The developer uses a phplib based database class. On average each 'page' is using 3 instances of the database class. The connect method is using mysql_connect();. The developer is re-working the db class so a maximum of instance of the class will be initialized on any page load. The site is used book dealer, and relies heavily on the full_text indexing of about 100,00 records. The site gets a lot of traffic. According to webalizer, it gets been getting about 20,000 'Visits' a month. There are not any other sites running on the computer. It is just this site. MyQuestions. What are your opinions regarding 1. Hardware, is there enough ram on the box to handle increasing the 'max_connections' to 500. 2. Which my-*.cnf should we be using. Everything is basically the defaults.. Here is a link to the results of the show variables. http://plusfour.org/mysqlVariables.txt 2. At what point do i give the my-large.cnf a try.. how can I test it.. 3. What are the pear classes for load testing? Thanks for any suggestions. Ian From dorgan at optonline.net Fri Nov 7 22:47:10 2003 From: dorgan at optonline.net (Donald J. Organ IV) Date: Fri, 07 Nov 2003 22:47:10 -0500 Subject: [nycphp-talk] OT: Coldfusion and mysql References: <20031105165929.26194.qmail@web14304.mail.yahoo.com> Message-ID: <003301c3a5aa$fd0fa470$c801a8c0@dj> Anyone know of a way to connect to mysql in coldfusion without using myodbc?? From lw3838 at hotmail.com Fri Nov 7 22:47:47 2003 From: lw3838 at hotmail.com (Lei Wang) Date: Fri, 07 Nov 2003 22:47:47 -0500 Subject: [nycphp-talk] NYPHP Presentations Updated Message-ID: Hans : Could you drop me from this emailing list? Or is there another way to do so? Many thanks. My email is lw3838 at hotmail.com Alex Wang >From: Hans Zaunere >Reply-To: NYPHP Talk >To: talk at lists.nyphp.org >Subject: [nycphp-talk] NYPHP Presentations Updated >Date: Fri, 07 Nov 2003 10:06:32 -0500 > > >Sorry it's been so long in coming, but our presentations from the last >couple of months are online. See http://nyphp.org/presentations > >If anyone notices any errors please let me know so they can be fixed. > >Hans > > > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk _________________________________________________________________ Frustrated with dial-up? Get high-speed for as low as $26.95. https://broadband.msn.com (Prices may vary by service area.) From shiflett at php.net Fri Nov 7 22:58:34 2003 From: shiflett at php.net (Chris Shiflett) Date: Fri, 7 Nov 2003 19:58:34 -0800 (PST) Subject: [nycphp-talk] Advice: Too many mysql connections. In-Reply-To: <8F6336C4-119A-11D8-A40D-003065778656@plusfour.org> Message-ID: <20031108035834.31954.qmail@web14307.mail.yahoo.com> --- Ian Forsyth wrote: > What are your opinions regarding 1. Hardware, is there enough ram on > the box to handle increasing the 'max_connections' to 500. Yes, probably. I frequently push MySQL up to 4096 connections. All you need to do is use top to tune your server. Also, use the prebuilt binaries MySQL AB offers if you're going to be pushing MySQL hard. I've experienced random crashes under heavy load when using a binary built from source. Chris ===== My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp From hans at nyphp.org Fri Nov 7 23:04:04 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 07 Nov 2003 23:04:04 -0500 Subject: [nycphp-talk] NYPHP Presentations Updated In-Reply-To: References: Message-ID: <3FAC6B34.2050902@nyphp.org> Look at the bottom of every message, including this one. You'll see something like: > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk If you continue to have difficulty, please contact listmaster at nyphp.org (do not just reply to this message). Lei Wang wrote: > Hans : Could you drop me from this emailing list? Or is there another > way to do so? Many thanks. > My email is lw3838 at hotmail.com > Alex Wang > > >> From: Hans Zaunere >> Reply-To: NYPHP Talk >> To: talk at lists.nyphp.org >> Subject: [nycphp-talk] NYPHP Presentations Updated >> Date: Fri, 07 Nov 2003 10:06:32 -0500 >> >> >> Sorry it's been so long in coming, but our presentations from the last >> couple of months are online. See http://nyphp.org/presentations >> >> If anyone notices any errors please let me know so they can be fixed. >> >> Hans >> >> >> >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk > > > _________________________________________________________________ > Frustrated with dial-up? Get high-speed for as low as $26.95. > https://broadband.msn.com (Prices may vary by service area.) > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Fri Nov 7 23:06:05 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 07 Nov 2003 23:06:05 -0500 Subject: [nycphp-talk] OT: Coldfusion and mysql In-Reply-To: <003301c3a5aa$fd0fa470$c801a8c0@dj> References: <20031105165929.26194.qmail@web14304.mail.yahoo.com> <003301c3a5aa$fd0fa470$c801a8c0@dj> Message-ID: <3FAC6BAD.1010809@nyphp.org> Donald J. Organ IV wrote: > Anyone know of a way to connect to mysql in coldfusion without using myodbc?? I've looked into this at one time, and came up dry. AFAIK, if you're on Windows you need an ODBC interface, and thusly myodbc. H From hans at nyphp.org Fri Nov 7 23:13:34 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 07 Nov 2003 23:13:34 -0500 Subject: [nycphp-talk] Advice: Too many mysql connections. In-Reply-To: <8F6336C4-119A-11D8-A40D-003065778656@plusfour.org> References: <8F6336C4-119A-11D8-A40D-003065778656@plusfour.org> Message-ID: <3FAC6D6E.4060507@nyphp.org> Ian Forsyth wrote: > Hello, > > I need some support. > > There is a site I do sys-admin type stuff for, that consistently has Too > Many MySQL connections. Today, it happened 3 times already. > > Here is some info. > > Hardware: > Dual Pentium 4, 1.8 GigHz, 40 Gigs SCSI Raid, 512 MB Ram. > > Server Software: > Apache 1. 3.27, PHP 4.3.1, MySQL 4.0.12 Max > > Here is the my.cnf file. > > [mysqld] > bind-address=127.0.0.1 > set-variable = ft_min_word_len=2 > set-variable = max_connections=300 > > The developer uses a phplib based database class. On average each 'page' > is using 3 instances of the database class. The connect method is using > mysql_connect();. The developer is re-working the db class so a maximum > of instance of the class will be initialized on any page load. The site > is used book dealer, and relies heavily on the full_text indexing of > about 100,00 records. Mostly as an FYI, keep in mind mysql_connect()'s behavior. If a connection already exists with the same host, user and password information, the connection will be reused by default. This means that even if 3 objects are created, they should be using a single MySQL connection (assuming they have the same connection information). > The site gets a lot of traffic. According to webalizer, it gets been > getting about 20,000 'Visits' a month. There are not any other sites > running on the computer. It is just this site. > > MyQuestions. > What are your opinions regarding 1. Hardware, is there enough ram on the > box to handle increasing the 'max_connections' to 500. 2. Which my-*.cnf I would most likely say "yes." Of course, use the standard utilities to determine system state (top,free,memfree,mem,vmstate,/proc,etc, depending on the platform). Also keep in mind the limit on file descriptions. I don't remember off hand what default values are, but MySQL is generally file descriptor heavy. > should we be using. Everything is basically the defaults.. Here is a > link to the results of the show variables. > > http://plusfour.org/mysqlVariables.txt I'm not seeing anything shockingly wrong here. There are some formulas to dig up and tweaks you could make, but since the issue seems to be connections now, this should probably wait until the box is humming along in a reliable state. > 2. At what point do i give the my-large.cnf a try.. how can I test it.. > 3. What are the pear classes for load testing? 512mb is not a large RAM system, and I'd hesitate making a change like that without first seeing how it responds to an increase in the max connections. Personally, I'd write a quick script for load testing so I can't be much help there either. H From wkamm at att.com Sat Nov 8 08:49:20 2003 From: wkamm at att.com (Kamm, William R (Bill), ALABS) Date: Sat, 8 Nov 2003 07:49:20 -0600 Subject: [nycphp-talk] OT: Coldfusion and mysql Message-ID: What about accessing a MS Access database from a LAMP system? I would like to ftp the database to the Linux server, and be able to get to it from PHP. Has anybody been able to do that before? Bill -----Original Message----- From: Hans Zaunere [mailto:hans at nyphp.org] Sent: Friday, November 07, 2003 11:06 PM To: NYPHP Talk Subject: Re: [nycphp-talk] OT: Coldfusion and mysql Donald J. Organ IV wrote: > Anyone know of a way to connect to mysql in coldfusion without using > myodbc?? I've looked into this at one time, and came up dry. AFAIK, if you're on Windows you need an ODBC interface, and thusly myodbc. H _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From tgales at tgaconnect.com Sat Nov 8 11:17:50 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Sat, 8 Nov 2003 11:17:50 -0500 Subject: [nycphp-talk] OT: Coldfusion and mysql In-Reply-To: Message-ID: <000801c3a613$db2facb0$bf8d3818@oberon1> > What about accessing a MS Access database from a LAMP system? > I would like to ftp the database to the Linux server, and be > able to get to it from PHP. Has anybody been able to do that before? > > Bill > Is there something that keeps you from using MySQL on the system where access runs? I'm just curious. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com From bpang at bpang.com Sat Nov 8 11:33:15 2003 From: bpang at bpang.com (Brian Pang) Date: Sat, 08 Nov 2003 11:33:15 -0500 Subject: [nycphp-talk] OT: Coldfusion and mysql Message-ID: I would say export your Access DB as a CSV and use phpMyAdmin to import it into mySQL. If you have to get the data back out and into Access, you could dump it out as CSV using phpMyAdmin. I don't think you can "run" Access on a linux server, or open it in any other way. I could be wrong, because I would never try it. You might be able to put Access on a Windows server and have php connect to it. I don't think I would ever try that myself, either. This is one of the stranger queries I've seen on this list. The "M" in LAMP is for "m"ySQL, not "M"S Access. Contemplating accessing MS Access from LAMP is a little contradictory. If you're stuck with your MS Access database, this would be one of those times (if I didn't hand the work to someone else), that I might consider just using ASP on a Windows box (ugh). good luck > What about accessing a MS Access database from a LAMP system? I would > like to ftp the database to the Linux server, and be able to get to it > from PHP. Has anybody been able to do that before? > > Bill From joshmccormack at travelersdiary.com Sat Nov 8 12:16:23 2003 From: joshmccormack at travelersdiary.com (Josh McCormack) Date: Sat, 08 Nov 2003 12:16:23 -0500 Subject: [nycphp-talk] OT: Coldfusion and mysql In-Reply-To: References: Message-ID: <3FAD24E7.80309@travelersdiary.com> Exporting it to CSV wouldn't include the structure, though. Is there a way to dump a MS Access DB to SQL + data the way you easily can with MySQL so you could just transfer it? Could be useful. Say if you wanted to have an office LAN MS Access db with client data to access with Outlook, and you could sync it with MySQL to have it available for web based apps. Josh Brian Pang wrote: > I would say export your Access DB as a CSV and use phpMyAdmin to import > it into mySQL. If you have to get the data back out and into Access, you > could dump it out as CSV using phpMyAdmin. > > I don't think you can "run" Access on a linux server, or open it in any > other way. I could be wrong, because I would never try it. > You might be able to put Access on a Windows server and have php connect > to it. I don't think I would ever try that myself, either. > > This is one of the stranger queries I've seen on this list. The "M" in > LAMP is for "m"ySQL, not "M"S Access. Contemplating accessing MS Access > from LAMP is a little contradictory. > > If you're stuck with your MS Access database, this would be one of those > times (if I didn't hand the work to someone else), that I might consider > just using ASP on a Windows box (ugh). > > good luck > > > >>What about accessing a MS Access database from a LAMP system? I would >>like to ftp the database to the Linux server, and be able to get to it >>from PHP. Has anybody been able to do that before? >> >>Bill > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jlacey at att.net Sat Nov 8 12:41:13 2003 From: jlacey at att.net (John Lacey) Date: Sat, 08 Nov 2003 10:41:13 -0700 Subject: [nycphp-talk] OT: Coldfusion and mysql In-Reply-To: <3FAD24E7.80309@travelersdiary.com> References: <3FAD24E7.80309@travelersdiary.com> Message-ID: <3FAD2AB9.7060104@att.net> Josh McCormack wrote: > Exporting it to CSV wouldn't include the structure, though. Is there a > way to dump a MS Access DB to SQL + data the way you easily can with > MySQL so you could just transfer it? > > Could be useful. Say if you wanted to have an office LAN MS Access db > with client data to access with Outlook, and you could sync it with > MySQL to have it available for web based apps. here's a few links: http://www.mysql.com/portal/software/item-266.html http://www.convert-in.com/acc2sql.htm http://www.fileheaven.com/Access-to-MySQL-Pro/download/975.htm I didn't check if they were all free/shareware, but I'm sure they have demo downloads From hans at nyphp.org Sat Nov 8 12:51:43 2003 From: hans at nyphp.org (Hans Zaunere) Date: Sat, 08 Nov 2003 12:51:43 -0500 Subject: [nycphp-talk] OT: Coldfusion and mysql In-Reply-To: References: Message-ID: <3FAD2D2F.7070502@nyphp.org> Kamm, William R (Bill), ALABS wrote: > What about accessing a MS Access database from a LAMP system? I would > like to ftp the database to the Linux server, and be able to get to it > from PHP. Has anybody been able to do that before? Again I'm shooting in the dark here, but maybe this helps: MS Access: http://forums.devshed.com/t37357/s.html MS SQL: http://www.freetds.org/ and http://us2.php.net/mssql H From wkamm at att.com Sat Nov 8 13:34:02 2003 From: wkamm at att.com (Kamm, William R (Bill), ALABS) Date: Sat, 8 Nov 2003 12:34:02 -0600 Subject: [nycphp-talk] OT: Coldfusion and mysql Message-ID: Unfortunately, our local swim team uses a vendor application that runs only on Windows, and uses Access. The meet results, etc. get entered into it that way. However, I run a web site on a LAMP platform, and would like to be able to query the DB real-time from PHP. So, it's read only, which should make it easier. I will try the links that others have provided. Thanks to everyone. Bill -----Original Message----- From: Tim Gales [mailto:tgales at tgaconnect.com] Sent: Saturday, November 08, 2003 11:18 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] OT: Coldfusion and mysql > What about accessing a MS Access database from a LAMP system? > I would like to ftp the database to the Linux server, and be > able to get to it from PHP. Has anybody been able to do that before? > > Bill > Is there something that keeps you from using MySQL on the system where access runs? I'm just curious. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From tgales at tgaconnect.com Sat Nov 8 14:07:02 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Sat, 8 Nov 2003 14:07:02 -0500 Subject: [nycphp-talk] OT: Coldfusion and mysql In-Reply-To: Message-ID: <000901c3a62b$7e50b990$bf8d3818@oberon1> No what I meant was is there a reason you couldn't run a version of MySQL on the Windows box. That way you might be able to have MySQL on the Windows system reading the info with a somewhat more native(?) odbc and let the Windows MySQL replicate the data up on the LAMP machine. Never tried replication -- but it might be less painless than the Linux odbc route. 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 Kamm, > William R (Bill), ALABS > Sent: Saturday, November 08, 2003 1:34 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] OT: Coldfusion and mysql > > > Unfortunately, our local swim team uses a vendor application > that runs only on Windows, and uses Access. The meet > results, etc. get entered into it that way. However, I run a > web site on a LAMP platform, and would like to be able to > query the DB real-time from PHP. So, it's read only, which > should make it easier. I will try the links that others have > provided. Thanks to everyone. > > Bill > > > -----Original Message----- > From: Tim Gales [mailto:tgales at tgaconnect.com] > Sent: Saturday, November 08, 2003 11:18 AM > To: 'NYPHP Talk' > Subject: RE: [nycphp-talk] OT: Coldfusion and mysql > > > > What about accessing a MS Access database from a LAMP > system? I would > > like to ftp the database to the Linux server, and be able > to get to it > > from PHP. Has anybody been able to do that before? > > > > Bill > > > Is there something that keeps you from using MySQL on the > system where access runs? I'm just curious. > > T. Gales & Associates > Helping People Connect with Technology http://www.tgaconnect.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 jonbaer at jonbaer.net Sat Nov 8 17:04:08 2003 From: jonbaer at jonbaer.net (jon baer) Date: Sat, 8 Nov 2003 17:04:08 -0500 Subject: [nycphp-talk] mysql ssl/php client Message-ID: <001901c3a644$3baa7680$6400a8c0@thinkpad> for a long time ive been tunneling mysql connections + finally looked into an ssl connection to a box @ home and came across the conlusion that you can't use the ssl php connection (like with using mysql client w/ --ssl flag) without using the php5 mysqli functions (specifically mysqli_real_connect, its c counterpart) ... from the docs the only thing im trying to figure out is if you need to connect and then set ssl via mysqli_set_ssl on the connection itself? how can one attempt this < php5? - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From wkamm at att.com Sat Nov 8 18:33:45 2003 From: wkamm at att.com (Kamm, William R (Bill), ALABS) Date: Sat, 8 Nov 2003 17:33:45 -0600 Subject: [nycphp-talk] OT: Coldfusion and mysql Message-ID: No good. The Windows box is just my laptop. The server hosting our swim club is a shared server, running Linux. I don't have any other server on the Internet itself, so it has to be that one. Bill -----Original Message----- From: Tim Gales [mailto:tgales at tgaconnect.com] Sent: Saturday, November 08, 2003 2:07 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] OT: Coldfusion and mysql No what I meant was is there a reason you couldn't run a version of MySQL on the Windows box. That way you might be able to have MySQL on the Windows system reading the info with a somewhat more native(?) odbc and let the Windows MySQL replicate the data up on the LAMP machine. Never tried replication -- but it might be less painless than the Linux odbc route. 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 Kamm, > William R (Bill), ALABS > Sent: Saturday, November 08, 2003 1:34 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] OT: Coldfusion and mysql > > > Unfortunately, our local swim team uses a vendor application > that runs only on Windows, and uses Access. The meet > results, etc. get entered into it that way. However, I run a > web site on a LAMP platform, and would like to be able to > query the DB real-time from PHP. So, it's read only, which > should make it easier. I will try the links that others have > provided. Thanks to everyone. > > Bill > > > -----Original Message----- > From: Tim Gales [mailto:tgales at tgaconnect.com] > Sent: Saturday, November 08, 2003 11:18 AM > To: 'NYPHP Talk' > Subject: RE: [nycphp-talk] OT: Coldfusion and mysql > > > > What about accessing a MS Access database from a LAMP > system? I would > > like to ftp the database to the Linux server, and be able > to get to it > > from PHP. Has anybody been able to do that before? > > > > Bill > > > Is there something that keeps you from using MySQL on the > system where access runs? I'm just curious. > > T. Gales & Associates > Helping People Connect with Technology http://www.tgaconnect.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 hans at nyphp.org Sun Nov 9 13:14:23 2003 From: hans at nyphp.org (Hans Zaunere) Date: Sun, 09 Nov 2003 13:14:23 -0500 Subject: [nycphp-talk] php-con Presentation Archives Online Message-ID: <3FAE83FF.7070106@nyphp.org> php-con West 2003 Presentation Archives Online http://www.php-con.com/2003/west/archives.php And, in other news, a NYPHP Development Meeting takes place this Tuesday, the 11th. Details at http://nyphp.org (main story). Hans From hans at nyphp.org Sun Nov 9 13:24:04 2003 From: hans at nyphp.org (Hans Zaunere) Date: Sun, 09 Nov 2003 13:24:04 -0500 Subject: [nycphp-talk] mysql ssl/php client In-Reply-To: <001901c3a644$3baa7680$6400a8c0@thinkpad> References: <001901c3a644$3baa7680$6400a8c0@thinkpad> Message-ID: <3FAE8644.20206@nyphp.org> jon baer wrote: > for a long time ive been tunneling mysql connections + finally looked into > an ssl connection to a box @ home and came across the conlusion that you > can't use the ssl php connection (like with using mysql client w/ --ssl > flag) without using the php5 mysqli functions (specifically > mysqli_real_connect, its c counterpart) ... > > from the docs the only thing im trying to figure out is if you need to > connect and then set ssl via mysqli_set_ssl on the connection itself? Hmm, that's an interesting point. While the mysql_connect() docs at php.net don't mention MYSQL_CLIENT_SSL as client flag, I think it is valid (in very recent versions of PHP). Jon, I'd be interested to know if you're able to get it to work, and if so, it's a documentation bug at php.net. H From dmintz at davidmintz.org Mon Nov 10 11:27:18 2003 From: dmintz at davidmintz.org (David Mintz) Date: Mon, 10 Nov 2003 11:27:18 -0500 (EST) Subject: [nycphp-talk] test 1 2 (ignore me) Message-ID: I've been moving my primary email account to a new host and screwing with things, and now I'm wondering whether something's broke, or the list has just been quiet, because I've been getting zero nyphp list mail. Pardon my noise. --- David Mintz http://davidmintz.org/ Email: If you're not already whitelisted, see http://dmintzweb.com/whitelist.php first! ATTN Everybody: dmintz at panix.com will be unplugged as of 01-Dec-2003! Please use dmintz at davidmintz.org "Anybody else got a problem with Webistics?" Sopranos 24:17 From nestorflorez at earthlink.net Mon Nov 10 11:39:44 2003 From: nestorflorez at earthlink.net (Nestor Florez) Date: Mon, 10 Nov 2003 08:39:44 -0800 (GMT-08:00) Subject: [nycphp-talk] ASP to PHP translation Message-ID: <3550531.1068482384430.JavaMail.root@bert.psp.pas.earthlink.net> People, I am trying to translate a ASP site to PHP, but I encounter is ASP some code for session time out. Is there session time out variable in php so that the php automatically logout after certain of ianctivity? This is the ASP code: -------------------------- Response.Expires = -1000 'Makes the browser not cache this page Response.Buffer = True 'Buffers the content so our Response.Redirect will work '-----setting session timeout to 1400 minutes---- Session.Timeout = 1400 -------------------------- Thanks, Nestor :-) From dmintz at davidmintz.org Mon Nov 10 12:09:05 2003 From: dmintz at davidmintz.org (David Mintz) Date: Mon, 10 Nov 2003 12:09:05 -0500 (EST) Subject: [nycphp-talk] ASP to PHP translation In-Reply-To: <3550531.1068482384430.JavaMail.root@bert.psp.pas.earthlink.net> Message-ID: On Mon, 10 Nov 2003, Nestor Florez wrote: > People, > > I am trying to translate a ASP site to PHP, but I encounter is ASP some code > for session time out. Is there session time out variable in php > so that the php automatically logout after certain of ianctivity? It sounds like you might be talking about session.gc_maxlifetime, see http://us3.php.net/manual/en/ref.session.php Then again maybe I've misunderstood session.gc_maxlifetime so when someone sets me straight, I'll learn something too. --- David Mintz http://davidmintz.org/ Email: If you're not already whitelisted, see http://dmintzweb.com/whitelist.php first! ATTN Everybody: dmintz at panix.com will be unplugged as of 01-Dec-2003! Please use dmintz at davidmintz.org "Anybody else got a problem with Webistics?" Sopranos 24:17 From jonbaer at jonbaer.net Mon Nov 10 12:49:46 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 10 Nov 2003 12:49:46 -0500 Subject: [nycphp-talk] ASP to PHP translation References: Message-ID: <003e01c3a7b3$0809f240$6400a8c0@thinkpad> Actually i think there are a few more steps ... what you need to do is provide the cookie with a timeout: session_set_cookie_params(int time - ms) then set a timeout for the cache (depending on ur setup) session_cache_expire(int time - m) To get accurate timeout working you need to include before every session_start(); Not to mention other timing adjustments: http://us3.php.net/manual/en/function.session-set-cookie-params.php > It sounds like you might be talking about session.gc_maxlifetime, see > http://us3.php.net/manual/en/ref.session.php From tgales at tgaconnect.com Mon Nov 10 13:16:40 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Mon, 10 Nov 2003 13:16:40 -0500 Subject: [nycphp-talk] ASP to PHP translation In-Reply-To: <3550531.1068482384430.JavaMail.root@bert.psp.pas.earthlink.net> Message-ID: <000901c3a7b6$ca47b790$bf8d3818@oberon1> Nestor Florez wrote: > I am trying to translate a ASP site to PHP... You are probably familiar with the following: http://asp2php.naken.cc/notes.php where Michael Kohn writes: "Time and Date functions aren't fully supported at this time. There was a reason for this, but since I haven't worked on that in a while I don't remember why." This fact will probably not be of any immediate help to you (sorry) -- I am mentioning this as a sort of a warning that there are some differences between ASPs concept of time PHPs (concept of time) which may present some 'gotcha's down the road. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com From csnyder at chxo.com Mon Nov 10 14:18:05 2003 From: csnyder at chxo.com (csnyder at chxo.com) Date: Mon, 10 Nov 2003 14:18:05 -0500 Subject: [nycphp-talk] MySql 4.0 Manual? Message-ID: <1068491885.3fafe46d0ea65@webmail.tuffmail.net> I'm trying to track down character set information specific to MySql 4.0, but the only manuals I can find at mysql.com are for 4.1. Perhaps I overlooked the link to older manuals? Or does anyone have a MySql 4.0 manual online? Thanks! csnyder From csnyder at chxo.com Mon Nov 10 14:33:24 2003 From: csnyder at chxo.com (csnyder at chxo.com) Date: Mon, 10 Nov 2003 14:33:24 -0500 Subject: [nycphp-talk] MySql 4.0 Manual? In-Reply-To: <1068491885.3fafe46d0ea65@webmail.tuffmail.net> References: <1068491885.3fafe46d0ea65@webmail.tuffmail.net> Message-ID: <1068492804.3fafe8047e26d@webmail.tuffmail.net> GAH! never mind, I answered my question another way. Turns out it was a front-end problem. Quoting me: > Or does anyone have a MySql 4.0 manual online? From danielc at analysisandsolutions.com Mon Nov 10 18:10:48 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 10 Nov 2003 18:10:48 -0500 Subject: [nycphp-talk] php in SecurityFocus Newsletter #222 Message-ID: <20031110231048.GA18493@panix.com> Synthetic Reality SymPoll Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/8956 MPM Guestbook Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/8958 ThWboard Vulnerabilities http://www.securityfocus.com/bid/8959 http://www.securityfocus.com/bid/8961 PHPKit Include.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/8960 PHPRecipeBook Unspecified Cross-Site Scripting/HTML Injection http://www.securityfocus.com/bid/8963 OpenAutoClassifieds Listing Parameter Cross-Site Scripting http://www.securityfocus.com/bid/8972 John Beatty Easy PHP Photo Album dir Parameter HTML Injection http://www.securityfocus.com/bid/8977 -- 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 Mon Nov 10 22:24:25 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 10 Nov 2003 22:24:25 -0500 Subject: [nycphp-talk] ASP to PHP translation In-Reply-To: <000901c3a7b6$ca47b790$bf8d3818@oberon1> References: <000901c3a7b6$ca47b790$bf8d3818@oberon1> Message-ID: <3FB05669.6090906@nyphp.org> Tim Gales wrote: > Nestor Florez wrote: > >>I am trying to translate a ASP site to PHP... > > > You are probably familiar with the following: > http://asp2php.naken.cc/notes.php > > where Michael Kohn writes: > "Time and Date functions aren't fully supported at this time. There was a > reason for this, but since I haven't worked on that in a while I don't > remember why." I'm not sure what Mr. Kohn means by this (even after reading the above URL). PHP's time/date functions are some of the most accurate and stable (they are wrappers on the underlying C libs), especially on a UNIX system. Granted, Windows' munge of what a date/time is may cause some confusion; but UNIX timestamps have been around longer :) In response to Nestor's original question, the only "foolproof" method of timeing out a session is to store it outside the session data itself. This is to say that timing out a cookie can be forged, and this is probably the method the previous ASP code uses. The only true method for timeouts, or just about anything sent to a browser, is to record the data privately and send only an ambiguous key to the client. H From ian at plusfour.org Mon Nov 10 23:12:27 2003 From: ian at plusfour.org (Ian Forsyth) Date: Mon, 10 Nov 2003 20:12:27 -0800 Subject: [nycphp-talk] Advice: Too many mysql connections. In-Reply-To: <3FAC6D6E.4060507@nyphp.org> Message-ID: <42CB92C8-13FD-11D8-9BB5-003065778656@plusfour.org> Hi, On Friday, November 7, 2003, at 08:13 PM, Hans Zaunere wrote: > > >> The developer uses a phplib based database class. On average each >> 'page' is using 3 instances of the database class. The connect method >> is using mysql_connect();. The developer is re-working the db class >> so a maximum of instance of the class will be initialized on any page >> load. The site is used book dealer, and relies heavily on the >> full_text indexing of about 100,00 records. > > Mostly as an FYI, keep in mind mysql_connect()'s behavior. If a > connection already exists with the same host, user and password > information, the connection will be reused by default. This means > that even if 3 objects are created, they should be using a single > MySQL connection (assuming they have the same connection information). That makes sense. All connections are using the same login info. > >> The site gets a lot of traffic. According to webalizer, it gets been >> getting about 20,000 'Visits' a month. There are not any other sites >> running on the computer. It is just this site. >> MyQuestions. >> What are your opinions regarding 1. Hardware, is there enough ram on >> the box to handle increasing the 'max_connections' to 500. 2. Which >> my-*.cnf > > I would most likely say "yes." Of course, use the standard utilities > to determine system state (top,free,memfree,mem,vmstate,/proc,etc, > depending on the platform). Also keep in mind the limit on file > descriptions. I don't remember off hand what default values are, but > MySQL is generally file descriptor heavy. > >> should we be using. Everything is basically the defaults.. Here is a >> link to the results of the show variables. >> http://plusfour.org/mysqlVariables.txt > > I'm not seeing anything shockingly wrong here. There are some > formulas to dig up and tweaks you could make, but since the issue > seems to be connections now, this should probably wait until the box > is humming along in a reliable state. > >> 2. At what point do i give the my-large.cnf a try.. how can I test >> it.. 3. What are the pear classes for load testing? > > 512mb is not a large RAM system, and I'd hesitate making a change like > that without first seeing how it responds to an increase in the max > connections. Personally, I'd write a quick script for load testing so > I can't be much help there either. Thanks very much, for the tips. I am going to make something to open up http connections till the connection results in a 'too-many mysql connections' error page late at night. I'll keep track of how many connections are opened. I'll trade in the different my-*.cnf config files and see what happens. When we tried setting max-connection to 500 using our existing minimal my.cnf config, we could not access the server via http, ssh, etc.. I'll see what happens after load tests. That way I can have some concrete data. Maybe its time for more ram. Again, thanks for the tips. Ian From tgales at tgaconnect.com Tue Nov 11 09:15:22 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Tue, 11 Nov 2003 09:15:22 -0500 Subject: [nycphp-talk] ASP to PHP translation In-Reply-To: <3FB05669.6090906@nyphp.org> Message-ID: <000d01c3a85e$3ed34050$bf8d3818@oberon1> Hans Zaunere wrote: > I'm not sure what Mr. Kohn means by this (even after reading > the above URL). I think he means you can't use his stuff to automatically convert asp to php because of what you pointed out namely: > ... Windows' > munge of what a date/time is may cause some confusion; but > UNIX timestamps have been around longer :) I meant the post to be a friendly reminder to watch out for the discepencancies in the representation of time which (can) exist when going from asp to php. I certainly didn't mean to imply that one time representation was better than the other. I think its safe to say that both are accurate -- just different. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com From nyphp at websapp.com Tue Nov 11 10:34:01 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Tue, 11 Nov 2003 10:34:01 -0500 Subject: [nycphp-talk] PIMP - The next generation in PHP Graphics Message-ID: Jeff, Do you have any comments on PIMP? http://www.coggeshall.org/archives/86_Back_from_the_Int_PHP_Conference.html --Daniel From southwell at dneba.com Wed Nov 12 15:29:48 2003 From: southwell at dneba.com (Michael Southwell) Date: Wed, 12 Nov 2003 15:29:48 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings Message-ID: <5.1.0.14.2.20031112152855.00b4bca0@mail.optonline.net> Settings in the php.ini file have an important effect on the operation, security and reliability of your application. For example, setting register_globals to a value of "on" makes it easier to pass variables from one script to another, but opens serious security vulnerabilities--so best practice is always to set it "off." What settings do you consider essential? How should they be set, and why? In next month's PHundamentals, we'll discuss how to manage these settings most effectively. ==================== Jeff Siegel and Mike Southwell The PHundamentals Team From danielc at analysisandsolutions.com Wed Nov 12 15:48:16 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 12 Nov 2003 15:48:16 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <5.1.0.14.2.20031112152855.00b4bca0@mail.optonline.net> References: <5.1.0.14.2.20031112152855.00b4bca0@mail.optonline.net> Message-ID: <20031112204816.GA12179@panix.com> Hi Folks: I've whipped up a patch file in Unifed Diff format which I apply to my new PHP 5 installations. Do note, this is a _development_ environment, so not all settings are appropriate for a live deployment. But, this patch file approach is helpful tool for upgrades, regardless of what settings you use. Enjoy! --Dan vvvvvvvvvvvvvvvvv ini5.sh vvvvvvvvvvvvvvvvvv #! /usr/bin/sh patch -i f:/php/ini5.diff c:/progra~1/php/php.ini-recommended -o c:/progra~1/php/php.ini chmod 755 c:/progra~1/php/php.ini ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ vvvvvvvvvvvvv ini5.diff vvvvvvvvvvvvvvvvvvvv --- php.ini-recommended 2003-09-30 22:18:28.000000000 -0400 +++ php.ini 2003-09-18 18:40:49.296875000 -0400 @@ -246 +246 @@ -memory_limit = 8M ; Maximum amount of memory a script may consume (8MB) +memory_limit = 30M ; Maximum amount of memory a script may consume (8MB) @@ -292 +292 @@ -display_errors = Off +display_errors = On @@ -302 +302 @@ -log_errors = On +log_errors = Off @@ -323 +323 @@ -track_errors = Off +track_errors = On @@ -392 +392 @@ -register_argc_argv = Off +register_argc_argv = On @@ -436,0 +437,2 @@ +;include_path = ".;c:\progra~1\pear\pear;d:\other\test\location" +include_path = ".;c:\progra~1\pear\pear" @@ -450 +452 @@ -extension_dir = "./" +extension_dir = "c:\progra~1\php\extensions" @@ -493 +495 @@ -;upload_tmp_dir = +upload_tmp_dir = "c:/temp" @@ -548 +550 @@ -;extension=php_bz2.dll +extension=php_bz2.dll @@ -559 +561 @@ -;extension=php_gd2.dll +extension=php_gd2.dll @@ -576 +578 @@ -;extension=php_mysql.dll +extension=php_mysql.dll @@ -609 +611 @@ -;sendmail_from = me at example.com +sendmail_from = office at analysis.users.panix.com @@ -851 +853 @@ -session.save_path = "/tmp" +session.save_path = "c:/temp" @@ -931 +933 @@ -session.use_trans_sid = 0 +session.use_trans_sid = 1 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- 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 felix at students.poly.edu Wed Nov 12 15:56:06 2003 From: felix at students.poly.edu (felix zaslavskiy) Date: Wed, 12 Nov 2003 15:56:06 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <5.1.0.14.2.20031112152855.00b4bca0@mail.optonline.net> References: <5.1.0.14.2.20031112152855.00b4bca0@mail.optonline.net> Message-ID: <20031112155606.237d1f04.felix@students.poly.edu> On Wed, 12 Nov 2003 15:29:48 -0500 Michael Southwell wrote: > Settings in the php.ini file have an important > effect on the operation, security and reliability of your application. > For example, setting register_globals to a value of "on" makes it easier to > pass variables from one script to another, but opens serious security > vulnerabilities--so best practice is always to set it "off." > Alot of shared hosts set register_globals to off in their php.ini file. If one needs to run scrip with register_globals to on then a nice trick exists. In .htaccess file one can set 'php_value register_globals 1' Also I seen programs that dont like magic_quote_gpc to be set to 1 to its one can also set that value to 0 in .htaccess file. > What settings do you consider essential? How should they be set, and why? > > In next month's PHundamentals, we'll discuss how to manage these settings > most effectively. > > ==================== > Jeff Siegel and Mike Southwell > The PHundamentals Team > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jlacey at att.net Wed Nov 12 16:19:18 2003 From: jlacey at att.net (John Lacey) Date: Wed, 12 Nov 2003 14:19:18 -0700 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <5.1.0.14.2.20031112152855.00b4bca0@mail.optonline.net> References: <5.1.0.14.2.20031112152855.00b4bca0@mail.optonline.net> Message-ID: <3FB2A3D6.2010100@att.net> well, for one, error_reporting should ideally be set for "all errors" (E_ALL) But when using someone else's code, Notices (E_NOTICE) may have to be turned off. If not, you may get lots of "benign" Notices being thrown because the programmer was not careful to code using good practices. (e.g. testing a variable when it was never set or reset should throw a Notice). Also, there are times when you might want to have display_errors set to "On" when developing, but turned off when the site goes live site so the user doesn't get nebulous error messages that they can't do anything about anyway. Logging to a file is recommended. When needing to do File Uploads, upload_max_filesize defautlts to 2M. Handling large [graphic] files may be a problem if this is too low. It is best to code with the short_open tags set to "Off", and use Message-ID: Also on some servers that use php as um.. Not a module (cgi?), they may sometimes allow you to have your own php.ini in your directory, so you can set 'register_globals=0' locally even if the server has them on. I do the same for overall error reporting on a site by site basis. The local .htaccess and php.ini can be real life savers in vhost settings... -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of felix zaslavskiy Sent: Wednesday, November 12, 2003 3:56 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHundamentals Topic #4: php.ini settings On Wed, 12 Nov 2003 15:29:48 -0500 Michael Southwell wrote: > Settings in the php.ini file have an important effect on the > operation, security and reliability of your application. > For example, setting register_globals to a value of "on" makes it > easier to pass variables from one script to another, but opens serious > security vulnerabilities--so best practice is always to set it "off." > Alot of shared hosts set register_globals to off in their php.ini file. If one needs to run scrip with register_globals to on then a nice trick exists. In .htaccess file one can set 'php_value register_globals 1' Also I seen programs that dont like magic_quote_gpc to be set to 1 to its one can also set that value to 0 in .htaccess file. > What settings do you consider essential? How should they be set, and why? > > In next month's PHundamentals, we'll discuss how to manage these > settings most effectively. > > ==================== > Jeff Siegel and Mike Southwell > The PHundamentals Team > > _______________________________________________ > 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 Nov 12 16:33:50 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 12 Nov 2003 13:33:50 -0800 (PST) Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <20031112204816.GA12179@panix.com> Message-ID: <20031112213350.18815.qmail@web14307.mail.yahoo.com> Well, here is one contribution: display_errors off log_errors on error_log /var/log/php_errors The path to the error_log is not as important as not displaying errors to the end user. This is for a production environment; errors on the screen are handy during development. :-) Chris ===== My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp From dmintz at davidmintz.org Wed Nov 12 16:46:29 2003 From: dmintz at davidmintz.org (David Mintz) Date: Wed, 12 Nov 2003 16:46:29 -0500 (EST) Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <5.1.0.14.2.20031112152855.00b4bca0@mail.optonline.net> Message-ID: On Wed, 12 Nov 2003, Michael Southwell wrote: > What settings do you consider essential? How should they be set, and why? This is pretty obvious, but since we're talking Phundamentals, it bears pointing out that the php.ini settings that cannot be overridden at runtime with ini_set() or via .htaccess probably merit special consideration, since you can't change them without editing php.ini and restarting apache. Of course, if you don't control the server, then you don't control the PHP_INI_SYSTEM values at all, so it's moot. http://www.php.net/ini_set is essential reading.to find out which are user-overridable and which aren't. My $.02: some of the ones I like to customize in php.ini, where possible are error_reporting (E_ALL for development); include_path (something sane for convenience's sake, but not too long for performance's sake); register_globals (off); display_errors (on, for development); log_errors can be your friend too. --- David Mintz http://davidmintz.org/ ATTN Everybody: dmintz at panix.com will be unplugged as of 01-Dec-2003! Please use dmintz at davidmintz.org "Anybody else got a problem with Webistics?" Sopranos 24:17 From jsiegel1 at optonline.net Wed Nov 12 17:31:51 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Wed, 12 Nov 2003 17:31:51 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <20031112155606.237d1f04.felix@students.poly.edu> Message-ID: <004201c3a96c$cfadc5a0$6401a8c0@EZDSDELL> Can you show a sample of what the .htaccess file would look like? Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of felix zaslavskiy Sent: Wednesday, November 12, 2003 3:56 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHundamentals Topic #4: php.ini settings On Wed, 12 Nov 2003 15:29:48 -0500 Michael Southwell wrote: > Settings in the php.ini file have an important > effect on the operation, security and reliability of your application. > For example, setting register_globals to a value of "on" makes it easier to > pass variables from one script to another, but opens serious security > vulnerabilities--so best practice is always to set it "off." > Alot of shared hosts set register_globals to off in their php.ini file. If one needs to run scrip with register_globals to on then a nice trick exists. In .htaccess file one can set 'php_value register_globals 1' Also I seen programs that dont like magic_quote_gpc to be set to 1 to its one can also set that value to 0 in .htaccess file. > What settings do you consider essential? How should they be set, and why? > > In next month's PHundamentals, we'll discuss how to manage these settings > most effectively. > > ==================== > Jeff Siegel and Mike Southwell > The PHundamentals Team > > _______________________________________________ > 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 enobrev.com Wed Nov 12 18:17:24 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Wed, 12 Nov 2003 18:17:24 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <004201c3a96c$cfadc5a0$6401a8c0@EZDSDELL> Message-ID: Sample local php.ini: --------------------- include_path = .:/path/to/global/includes:/path/to/local/includes register_globals = 0 error_reporting = 2047 display_errors = 1 Sample .htaccess ---------------- php_value include_path .:/path/to/global/includes:/path/to/local/includes php_value register_globals 0 php_value error_reporting 2047 php_value display_errors 1 ---- Mark -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff Siegel Sent: Wednesday, November 12, 2003 5:32 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] PHundamentals Topic #4: php.ini settings Can you show a sample of what the .htaccess file would look like? Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of felix zaslavskiy Sent: Wednesday, November 12, 2003 3:56 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHundamentals Topic #4: php.ini settings On Wed, 12 Nov 2003 15:29:48 -0500 Michael Southwell wrote: > Settings in the php.ini file have an important effect on the > operation, security and reliability of your application. > For example, setting register_globals to a value of "on" makes it easier to > pass variables from one script to another, but opens serious security > vulnerabilities--so best practice is always to set it "off." > Alot of shared hosts set register_globals to off in their php.ini file. If one needs to run scrip with register_globals to on then a nice trick exists. In .htaccess file one can set 'php_value register_globals 1' Also I seen programs that dont like magic_quote_gpc to be set to 1 to its one can also set that value to 0 in .htaccess file. > What settings do you consider essential? How should they be set, and why? > > In next month's PHundamentals, we'll discuss how to manage these settings > most effectively. > > ==================== > Jeff Siegel and Mike Southwell > The PHundamentals Team > > _______________________________________________ > 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 enobrev.com Wed Nov 12 18:19:14 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Wed, 12 Nov 2003 18:19:14 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: Message-ID: Also, something I've noticed on my server, and I'm not sure if this is a normal thing, but the .htaccess file works for all subdirectories and the php.ini only works for the directory it's in. I'm not sure if these are server specific settings or just the way it is. Anyone? Mark -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mark Armendariz Sent: Wednesday, November 12, 2003 6:17 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] PHundamentals Topic #4: php.ini settings Sample local php.ini: --------------------- include_path = .:/path/to/global/includes:/path/to/local/includes register_globals = 0 error_reporting = 2047 display_errors = 1 Sample .htaccess ---------------- php_value include_path .:/path/to/global/includes:/path/to/local/includes php_value register_globals 0 php_value error_reporting 2047 php_value display_errors 1 ---- Mark -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Jeff Siegel Sent: Wednesday, November 12, 2003 5:32 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] PHundamentals Topic #4: php.ini settings Can you show a sample of what the .htaccess file would look like? Jeff Siegel -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of felix zaslavskiy Sent: Wednesday, November 12, 2003 3:56 PM To: NYPHP Talk Subject: Re: [nycphp-talk] PHundamentals Topic #4: php.ini settings On Wed, 12 Nov 2003 15:29:48 -0500 Michael Southwell wrote: > Settings in the php.ini file have an important effect on the > operation, security and reliability of your application. > For example, setting register_globals to a value of "on" makes it easier to > pass variables from one script to another, but opens serious security > vulnerabilities--so best practice is always to set it "off." > Alot of shared hosts set register_globals to off in their php.ini file. If one needs to run scrip with register_globals to on then a nice trick exists. In .htaccess file one can set 'php_value register_globals 1' Also I seen programs that dont like magic_quote_gpc to be set to 1 to its one can also set that value to 0 in .htaccess file. > What settings do you consider essential? How should they be set, and why? > > In next month's PHundamentals, we'll discuss how to manage these settings > most effectively. > > ==================== > Jeff Siegel and Mike Southwell > The PHundamentals Team > > _______________________________________________ > 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 felix at students.poly.edu Wed Nov 12 18:14:37 2003 From: felix at students.poly.edu (felix zaslavskiy) Date: Wed, 12 Nov 2003 18:14:37 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: References: Message-ID: <20031112181437.44fd8396.felix@students.poly.edu> On Wed, 12 Nov 2003 18:19:14 -0500 "Mark Armendariz" wrote: > Also, something I've noticed on my server, and I'm not sure if this is a > normal thing, but the .htaccess file works for all subdirectories and the > php.ini only works for the directory it's in. I'm not sure if these are > server specific settings or just the way it is. Anyone? Its normal operation. Everything in .htaccess applies to the directory the file is in and to all the directoried below. > > Mark > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On > Behalf Of Mark Armendariz > Sent: Wednesday, November 12, 2003 6:17 PM > To: 'NYPHP Talk' > Subject: RE: [nycphp-talk] PHundamentals Topic #4: php.ini settings > > Sample local php.ini: > --------------------- > include_path = .:/path/to/global/includes:/path/to/local/includes > register_globals = 0 > error_reporting = 2047 > display_errors = 1 > > > > Sample .htaccess > ---------------- > php_value include_path .:/path/to/global/includes:/path/to/local/includes > php_value register_globals 0 > php_value error_reporting 2047 > php_value display_errors 1 > > > ---- > Mark > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On > Behalf Of Jeff Siegel > Sent: Wednesday, November 12, 2003 5:32 PM > To: 'NYPHP Talk' > Subject: RE: [nycphp-talk] PHundamentals Topic #4: php.ini settings > > Can you show a sample of what the .htaccess file would look like? > > Jeff Siegel > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of felix zaslavskiy > Sent: Wednesday, November 12, 2003 3:56 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PHundamentals Topic #4: php.ini settings > > > On Wed, 12 Nov 2003 15:29:48 -0500 > Michael Southwell wrote: > > > Settings in the php.ini file have an important effect on the > > operation, security and reliability of your application. > > For example, setting register_globals to a value of "on" makes it > easier to > > pass variables from one script to another, but opens serious security > > vulnerabilities--so best practice is always to set it "off." > > > > Alot of shared hosts set register_globals to off in their php.ini file. > If one needs to run scrip with register_globals to on then a nice trick > exists. In .htaccess file one can set 'php_value register_globals 1' > > Also I seen programs that dont like magic_quote_gpc to be set to 1 to its > one can also set that value to 0 in .htaccess file. > > > What settings do you consider essential? How should they be set, and > why? > > > > In next month's PHundamentals, we'll discuss how to manage these > settings > > most effectively. > > > > ==================== > > Jeff Siegel and Mike Southwell > > The PHundamentals Team > > > > _______________________________________________ > > 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 jonbaer at jonbaer.net Wed Nov 12 19:45:56 2003 From: jonbaer at jonbaer.net (jon baer) Date: Wed, 12 Nov 2003 19:45:56 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings References: Message-ID: <012f01c3a97f$80454570$6400a8c0@thinkpad> i currently use apache on the outside to specify certain php.ini values with , example: /usr/sbin/httpd -DEV ServerAdmin foo at foo.com DocumentRoot "/var/dev/www" ServerName dev # php stuff php_value auto_append_file "/var/dev/dev.inc" php_value error_reporting "E_ALL" One thing it lets you do more easily is within the append file include dev mysql settings vs. production values (ssl cert, user, pass, etc) ... Also, since it kinda pertains to php.ini but using php as a shell CLI it's worth I guess pointing out the 3 flags (-n to use no php.ini - giving you a "vanilla" php and -c to show where to locate a php.ini and -d key=value to set a value @ runtime). - jon From lists at ny-tech.net Wed Nov 12 21:11:09 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Wed, 12 Nov 2003 21:11:09 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <3FB2A3D6.2010100@att.net> Message-ID: <000b01c3a98b$68faefd0$6401a8c0@main> > -----Original Message----- > From: John Lacey [mailto:jlacey at att.net] > Sent: Wednesday, November 12, 2003 4:19 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PHundamentals Topic #4: php.ini settings > > > > It is best to code with the short_open tags set to "Off", and > use in all cases, but again, if using someone else's code, they > may have to > remain on. This option will be defaulted to "Off" in a > future release, > I believe. Is there a specific reason for this? I mean for register_globals we understand the risks involved, but why should the short tags not used? Just wanting to clarify this. > Session save path differences between Linux/Unix and Windows > boxen (/tmp vs. c:\temp) or whereever you choose to save > session info. > Whether session cookies will be used, or not for some. I tend to leave /tmp in place for session save path on my windows installations and create a tmp directory in the root of the webserver's drive. i.e. if apache is on D:, the /tmp will map to D:\tmp. From shiflett at php.net Wed Nov 12 21:38:05 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 12 Nov 2003 18:38:05 -0800 (PST) Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <000b01c3a98b$68faefd0$6401a8c0@main> Message-ID: <20031113023805.68188.qmail@web14308.mail.yahoo.com> > It is best to code with the short_open tags set to "Off", and > use they may have to remain on. This option will be defaulted to "Off" > in a future release, I believe. This is definitely not true. This gets brought up on php-dev from time to time, and it always gets shot down. I know Rasmus, Zeev, and Andi are very much against either disabling short tags or defaulting them to off, so I can't see this ever happening. Chris ===== My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp From jlacey at att.net Wed Nov 12 22:30:19 2003 From: jlacey at att.net (John Lacey) Date: Wed, 12 Nov 2003 20:30:19 -0700 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <20031113023805.68188.qmail@web14308.mail.yahoo.com> References: <20031113023805.68188.qmail@web14308.mail.yahoo.com> Message-ID: <3FB2FACB.7060705@att.net> that's good info... discussing php.ini is *sure* to be a great thread Chris Shiflett wrote: >>It is best to code with the short_open tags set to "Off", and >>use >they may have to remain on. This option will be defaulted to "Off" >>in a future release, I believe. > > > This is definitely not true. This gets brought up on php-dev from time to > time, and it always gets shot down. I know Rasmus, Zeev, and Andi are very > much against either disabling short tags or defaulting them to off, so I > can't see this ever happening. > > Chris > > ===== > My Blog > http://shiflett.org/ > HTTP Developer's Handbook > http://httphandbook.org/ > RAMP Training Courses > http://www.nyphp.org/ramp > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From bpang at bpang.com Thu Nov 13 10:10:00 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 13 Nov 2003 10:10:00 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings Message-ID: Of course everyone has an opinion about register_globals. Since it was defaulted to "off" I've learned to live with it think it's the right thing to do. If you're using third-party warez that need it "on," you could include something at the top of each page that defines the EGPCS vars as regular global vars. You'd have to put it on every page, but better than fixing every reference to a register_globals var instance in the code. Speaking of EGPCS, I find this to be a more useful setting than just GPCS: variables_order EGPCS short_open_tag on why not? fewer keystrokes and the file extension is already .php. Moving to a server with it off? Just do a grep on all the files... easy. also, makes reading inline var includes much easier From jonbaer at jonbaer.net Thu Nov 13 10:59:14 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 13 Nov 2003 10:59:14 -0500 Subject: [nycphp-talk] How do other templates handle NULL/empty vars? Message-ID: <008801c3a9ff$163543d0$6400a8c0@thinkpad> this is not really a big deal, but i was wondering how other template engines besides Smarty deal w/ null,empty characters when using "default" settings ... for example: $val = ''; $smarty->assign('code',$val); $smarty->display('code.tpl'); {$code|default:"N/A"} in Smarty a non-existant(NULL) or length of 0 would give me the default but might not always be the case on what id want (for example if it exists but the length is really 0) ... - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From tgales at tgaconnect.com Thu Nov 13 11:03:16 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 13 Nov 2003 11:03:16 -0500 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) Message-ID: <001a01c3a9ff$a8074830$bf8d3818@oberon1> There's really nothing new in the following article: http://www.informationweek.com/story/showArticle.jhtml?articleID=16000533 Other than the fact it is appearing in Information Week. (How dare they call PHP a "little-known" open-source scripting language). Still might be of interest to those on the list. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com From jonbaer at jonbaer.net Thu Nov 13 11:05:39 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 13 Nov 2003 11:05:39 -0500 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) References: <001a01c3a9ff$a8074830$bf8d3818@oberon1> Message-ID: <009601c3a9ff$fc0115b0$6400a8c0@thinkpad> yeah but if you look a large majority of jobs *still* call for MS .Net/c# and Java which is what i don't get, is there that big of a non published defection? - jon ----- Original Message ----- From: "Tim Gales" To: Sent: Thursday, November 13, 2003 11:03 AM Subject: [nycphp-talk] PHP dominance on websites (Information Week article) > There's really nothing new in the following article: > http://www.informationweek.com/story/showArticle.jhtml?articleID=16000533 > > Other than the fact it is appearing in Information Week. > (How dare they call PHP a "little-known" open-source scripting language). > > Still might be of interest to those on the list. > > T. Gales & Associates > Helping People Connect with Technology > > http://www.tgaconnect.com > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jeffb at uniquephoto.com Thu Nov 13 11:19:50 2003 From: jeffb at uniquephoto.com (Jeff Barrett) Date: Thu, 13 Nov 2003 11:19:50 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: Message-ID: On a side note: A good way to get script specific register globals support without having to modify every program to call some other script is to in your apache config add a line to your virtual host: php_admin_value auto_prepend_file /wwwPath/registerGlobals.php In php.ini turn register_globals off. The registerGlobals.php script took the view of which scripts are converted to support register_globals off, added them to an array and if the script being loaded was not in that array I emulated the action of register globals manually. Now when I redo an existing script I can make it register globals safe add it to the array and hopefully one day I will be able to turn it off in the ini file. The down side of this is for includes. If you include another script that requires register_globals on then the calling script must not be in the array until all the includes are fixed. > Of course everyone has an opinion about register_globals. > Since it was defaulted to "off" I've learned to live with it think it's > the right thing to do. > > If you're using third-party warez that need it "on," you could include > something at the top of each page that defines the EGPCS vars as regular > global vars. You'd have to put it on every page, but better than fixing > every reference to a register_globals var instance in the code. > From shiflett at php.net Thu Nov 13 11:30:25 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 13 Nov 2003 08:30:25 -0800 (PST) Subject: [nycphp-talk] PHP dominance on websites (Information Week article) In-Reply-To: <009601c3a9ff$fc0115b0$6400a8c0@thinkpad> Message-ID: <20031113163025.11563.qmail@web14309.mail.yahoo.com> --- jon baer wrote: > yeah but if you look a large majority of jobs *still* call for MS > .Net/c# and Java which is what i don't get, is there that big of a > non published defection? Adam, Dave, and I spoke on a PHP Panel recently for a bunch of CEO and CTO type people. It was pretty revealing to me, because most of these people considered themselves to be way ahead of the curve by being interested in PHP, and it was as if PHP was considered bleeding-edge technology. I think PHP might be penetrating the enterprise much like Linux did originally. Instead of people using Linux as a declared platform, it was simply the tool of choice when the task was to build a Web server, name server, firewall, mail server, or whatever. I think in the same way, PHP is used a lot of times when developers are asked to create a Web application of some sort. The application is the important part; management doesn't care so much about the tools you use to build it. Of course, Linux was in the enterprise the whole time, and companies like Google prospered while using it. The same can be said of places like Yahoo for PHP. But, the technologically savvy companies are always going to be making the best choices. What is more interesting, in terms of numbers alone, is when the non-savvy companies pick up on something. This is where PHP is just now knocking on the door, and this makes up a very large percentage of the enterprise. PHP is just getting started. :-) When it comes time to post job openings and such, I think the management just throws around words that they have heard. The more savvy companies have people that know what they're talking about write the job descriptions, make the job postings, and perform the interviews. I think these types of places will be in the minority for a long time, so we will only see PHP dominate job postings once it becomes a word that managers associate with Web development. It will happen, eventually. Chris ===== My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp From bpang at bpang.com Thu Nov 13 11:32:25 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 13 Nov 2003 11:32:25 -0500 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) Message-ID: 52% of Apache sites (Apache accounts for about 67% of websites?)... so php is found on about 35% or one-third of ALL sites http://news.netcraft.com/archives/web_server_survey.html "the survey would have shown that PHP has grown to be roughly equal to Microsoft's Active Server Pages (ASP)" But Microsoft web servers only account for 21% of webservers. Did I do this right? "Little-known," indeed. > (How dare they call PHP a "little-known" open-source scripting language). From sklar at sklar.com Thu Nov 13 11:52:49 2003 From: sklar at sklar.com (David Sklar) Date: Thu, 13 Nov 2003 11:52:49 -0500 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) In-Reply-To: <20031113163025.11563.qmail@web14309.mail.yahoo.com> Message-ID: > I think PHP might be penetrating the enterprise much like Linux did > originally. Exactly. I think PHP is doing what Linux did but with a 4 or 5 year lag. In 1998 I was at a conference of newspaper (online and offline) publishers. On a panel about open source I made the (I thought then) optimistic prediction that Oracle would release a Linux port of their database software in a few years. Most people there thought I was, to put it politely, way too optimistic. Oracle released a Linux port six or nine months later. Both I and my detractors were wrong. I don't know if there's an analogous PHP event like the Linux Oracle port (Yahoo! using PHP maybe) but PHP is still sort of in the stage that Linux was back then -- all of the technically savvy people are aware of it, it does a fabulous job at a certain well-defined set of tasks, it needs way better marketing and corporate backing, and there are crucial "enterprise" (ugh, I hate that word but it's handy shorthand) features that it still needs. Whether PHP will follow in Linux's penetration success depends hugely, IMHO, on the marketing and corporate backing piece (which leads to the feature-adding piece). When there are more companies, more larger companies, more well-publicized and well-publicizing companies that provide for PHP things like systems integration services, round-the-clock support, patent indemnification, pre-configured hardware and software, first-class benchmarks, reusable class libraries, application servers, and everything else that makes Fortune 1000 IT VP's sleep soundly at night, then PHP has a fighting chance to become more than a "little known scripting language". Netcraft surveys impress engineers. Magazine covers impress managers. Like it or not, that's the way the IT world works. Some of these are technical issues, but most of them are not, and that, I think, is PHP's biggest weakness. There are a lot of brilliant technologists hacking away on PHP but there are not very many brilliant marketers or deal makers. However distasteful that kind of thing is for programmers, it's absolutely necessary to break out of the geek ghetto and become the kind of phenomenon that Linux is. David From shiflett at php.net Thu Nov 13 11:52:13 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 13 Nov 2003 08:52:13 -0800 (PST) Subject: [nycphp-talk] PHP dominance on websites (Information Week article) In-Reply-To: Message-ID: <20031113165213.62635.qmail@web14306.mail.yahoo.com> --- Brian Pang wrote: > 52% of Apache sites (Apache accounts for about 67% of websites?)... so > php is found on about 35% or one-third of ALL sites > > http://news.netcraft.com/archives/web_server_survey.html > "the survey would have shown that PHP has grown to be roughly equal to > Microsoft's Active Server Pages (ASP)" But Microsoft web servers only > account for 21% of webservers. > > Did I do this right? It's been several days since I read that article, but I think the part you quote was stating that no similar survey is performed on IIS, but if one was, it would likely show PHP to be as popular as ASP, even on Windows. Chris ===== My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp From jlacey at att.net Thu Nov 13 11:52:12 2003 From: jlacey at att.net (John Lacey) Date: Thu, 13 Nov 2003 09:52:12 -0700 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) In-Reply-To: <20031113163025.11563.qmail@web14309.mail.yahoo.com> References: <20031113163025.11563.qmail@web14309.mail.yahoo.com> Message-ID: <3FB3B6BC.6090604@att.net> Chris Shiflett wrote: > --- jon baer wrote: > >>yeah but if you look a large majority of jobs *still* call for MS >>.Net/c# and Java which is what i don't get, is there that big of a >>non published defection? > > > Adam, Dave, and I spoke on a PHP Panel recently for a bunch of CEO and CTO > type people. It was pretty revealing to me, because most of these people > considered themselves to be way ahead of the curve by being interested in > PHP, and it was as if PHP was considered bleeding-edge technology. On a similar note, I recently attended a Novell Linux semimar populated primarily with technical people. I sat in my usual place in the back where I could see "the show of hands". It was interesting that out of more than 150 people, less than 5 raised their hands when asked who knew about things like the Mono project and the Evolution package, and others. The ingredient Novell brings to the table is marketing -- and along with it, decent product naming skills :) I could site examples, but it's pointless... From jonbaer at jonbaer.net Thu Nov 13 11:59:56 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 13 Nov 2003 11:59:56 -0500 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) References: Message-ID: <002801c3aa07$9101e7a0$6400a8c0@thinkpad> > Some of these are technical issues, but most of them are not, and that, I > think, is PHP's biggest weakness. There are a lot of brilliant the first time I got caught in a PHP vs. Java debate it had mainly to do with the fact that normally if there was a security issue it was forced up fixing the virtual machine itself which meant you had to wait for Sun's patch/rebuild. I see more and more PHP security bugs come out everyday but they are mainly XSS/SQL + other items which can't really pertain to the PHP language itself but it will still get the rap, because of the coding I guess(?) ... but alot of the "PHP sucks" people I speak w/ have issues with the eyeball popping debugging and the security still, yet its funny that they will still sit and wait for patches before continuing work. - jon From tgales at tgaconnect.com Thu Nov 13 12:04:17 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 13 Nov 2003 12:04:17 -0500 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) In-Reply-To: <20031113163025.11563.qmail@web14309.mail.yahoo.com> Message-ID: <001d01c3aa08$2ce7e0c0$bf8d3818@oberon1> Chris Shifflet wrote: >..I think the > management just throws around words that they have heard. The > more savvy companies have people that know what they're > talking about write the job descriptions, make the job > postings, and perform the interviews. Amen. Job recruiters squawk out a bunch of techno-babble buzzwords just like parrots repeat what they hear -- with absolutely zero understanding of what they are saying T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com From tgales at tgaconnect.com Thu Nov 13 12:09:20 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 13 Nov 2003 12:09:20 -0500 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) In-Reply-To: <009601c3a9ff$fc0115b0$6400a8c0@thinkpad> Message-ID: <001e01c3aa08$e0fa34a0$bf8d3818@oberon1> Jon Baer wrote: > yeah but if you look a large majority of jobs *still* call > for MS .Net/c# and Java which is what i don't get, is there > that big of a non published defection? Well what I don't get is why so many programmers (and hence the bosses who do the hiring and firing) become 'enraptured' (as in 'rapture of the deep') with Java. Perhaps given that it is only prudent to look and see how a certain component is actually being implemented before you use it. And given the fact that one has to go so deep into any given Java framework -- i.e. though mounds of javadoc cluttered with structures and interfaces that are not germaine to the task at hand -- to find the 'active ingredients' of a component, they do suffer from a lack of something to the brain when they (the programmers) stay down there too long. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com From sklar at sklar.com Thu Nov 13 12:13:43 2003 From: sklar at sklar.com (David Sklar) Date: Thu, 13 Nov 2003 12:13:43 -0500 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) In-Reply-To: <002801c3aa07$9101e7a0$6400a8c0@thinkpad> Message-ID: > I see more and more PHP security bugs > come out everyday but they are mainly XSS/SQL + other items which > can't really pertain to the PHP language itself but it will still get > the rap, because of the coding I guess(?) ... Indeed. The first question in the last "general intro to PHP" talk I gave was "I heard that PHP has lots of security problems. What's with that?!" My answer tried to separate problems with the language with problems in programs written in the language and turn it into a virtue of PHP: "because it's so easy to learn, beginning programmers often use it and since they're beginners, they often write programs that aren't as secure and robust as what an experienced programmer would do. But if you're a good programmer, you can write perfectly secure PHP programs." This is a perfect example of a problem PHP has that can only be fixed with marketing, not with technology. David From jlacey at att.net Thu Nov 13 13:07:47 2003 From: jlacey at att.net (John Lacey) Date: Thu, 13 Nov 2003 11:07:47 -0700 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) In-Reply-To: References: Message-ID: <3FB3C873.7060008@att.net> David Sklar wrote: > > Indeed. The first question in the last "general intro to PHP" talk I gave > was "I heard that PHP has lots of security problems. What's with that?!" My > answer tried to separate problems with the language with problems in > programs written in the language and turn it into a virtue of PHP: "because > it's so easy to learn, beginning programmers often use it and since they're > beginners, they often write programs that aren't as secure and robust as > what an experienced programmer would do. But if you're a good programmer, > you can write perfectly secure PHP programs." > > This is a perfect example of a problem PHP has that can only be fixed with > marketing, not with technology. > From the "Let's Do Something About It Dept." I'm almost finished with moding the phpTest engine for phundamentals quizzes, and I had a thought ( related to time :). I would volunteer to *contribute* to a document (html and .pdf) that would be available for downloading from the NYPHP site. The document would be geared towards the 'marketing aspect' of getting the word out concerning AMP technology and other closely-related areas. Since I've co-authored about eight technical books ( "semimar" and the use of "site" for "cite" notwithstanding :), I'd be happy to give it a go. Ideally, it would be less than 30 pages and pithy. Some suggested sections: - Executive Summary - Company software assets and the GPL - Links (Appendix) to Open Source studies (David Wheeler's, others) - Overview of AMP technology (pictures, bulleted items) - Where the pieces fit and what they can do - Where the pieces are not a good fit and why - Q & A (for ease of addressing important issues without the verbiage) - The compulsory "Interesting Statistics" section (who, where, how much) - ... It would be an NYPHP branded document (written using OpenOffice.org and exported to .pdf??), with additions as appropriate. what do ya'll think? John From lists at neoncowboy.com Thu Nov 13 15:12:10 2003 From: lists at neoncowboy.com (John Corry) Date: Thu, 13 Nov 2003 10:12:10 -1000 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: Message-ID: <20031113201244.0BBF7A85A6@virtu.nyphp.org> I have a function library that comes with me to each new project I start. Stuff like a MySQL class, HTML class, email address validation, authentication tools...that sort of stuff. I have a master function file that includes all of the other files. In my new site's .htaccess file (both on my Windows local development machine and the RHES production server at Rackspace) I set auto_prepend, like this: php_value auto_prepend_file path/to/my/functions/library/masterfile.php That way, I don't have to bother with making sure the path to my functions files are set in subdirectories or execute logic like: If this is my local workstation include from this path If this is the production server include from that path I just wanted to share this because I remember when I discovered it, it made me really, really happy. Thanks, Glad to be with you all, John Corry www.neoncowboy.com From danielc at analysisandsolutions.com Thu Nov 13 15:29:51 2003 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Thu, 13 Nov 2003 15:29:51 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <20031113201244.0BBF7A85A6@virtu.nyphp.org> References: <20031113201244.0BBF7A85A6@virtu.nyphp.org> Message-ID: <20031113202951.GA13391@panix.com> John: On Thu, Nov 13, 2003 at 10:12:10AM -1000, John Corry wrote: > > php_value auto_prepend_file path/to/my/functions/library/masterfile.php A nice idea. But people need to keep in mind, for this and in general, not all servers will allow you to set PHP stuff in .htaccess files. --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 southwell at dneba.com Thu Nov 13 15:37:17 2003 From: southwell at dneba.com (Michael Southwell) Date: Thu, 13 Nov 2003 15:37:17 -0500 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) In-Reply-To: <3FB3C873.7060008@att.net> References: Message-ID: <5.1.0.14.2.20031113153557.00b50910@mail.optonline.net> At 01:07 PM 11/13/2003, you wrote: >I would volunteer to *contribute* to a document (html and .pdf) that would >be available for downloading from the NYPHP site. The document would be >geared towards the 'marketing aspect' of getting the word out concerning >AMP technology and other closely-related areas. Since I've co-authored >about eight technical books ( "semimar" and the use of "site" for "cite" >notwithstanding :), I'd be happy to give it a go. >Ideally, it would be less than 30 pages and pithy. > >It would be an NYPHP branded document (written using OpenOffice.org and >exported to .pdf??), with additions as appropriate. > >what do ya'll think? > >John I'm in on this 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 lists at neoncowboy.com Thu Nov 13 15:51:22 2003 From: lists at neoncowboy.com (John Corry) Date: Thu, 13 Nov 2003 10:51:22 -1000 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <20031113202951.GA13391@panix.com> Message-ID: <20031113205157.AF443A8602@virtu.nyphp.org> > A nice idea. But people need to keep in mind, for this and > in general, not all servers will allow you to set PHP stuff > in .htaccess files. > > --Dan Yeah, I guess that would be a problem... But this is a good discussion as it prompts PHP folks to think more about what to consider when selecting a host. Of course a lot of times we inherit stuff to work on that places the hosting environment outside of our control. Anyway, if that helps anyone... John From hans at nyphp.org Thu Nov 13 15:53:44 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 13 Nov 2003 15:53:44 -0500 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) In-Reply-To: <3FB3C873.7060008@att.net> References: <3FB3C873.7060008@att.net> Message-ID: <3FB3EF58.6010508@nyphp.org> John Lacey wrote: > > David Sklar wrote: > > >> >> Indeed. The first question in the last "general intro to PHP" talk I gave >> was "I heard that PHP has lots of security problems. What's with >> that?!" My >> answer tried to separate problems with the language with problems in >> programs written in the language and turn it into a virtue of PHP: >> "because >> it's so easy to learn, beginning programmers often use it and since >> they're >> beginners, they often write programs that aren't as secure and robust as >> what an experienced programmer would do. But if you're a good programmer, >> you can write perfectly secure PHP programs." >> >> This is a perfect example of a problem PHP has that can only be fixed >> with >> marketing, not with technology. >> > > From the "Let's Do Something About It Dept." > > I'm almost finished with moding the phpTest engine for phundamentals > quizzes, and I had a thought ( related to time :). > > I would volunteer to *contribute* to a document (html and .pdf) that > would be available for downloading from the NYPHP site. The document > would be geared towards the 'marketing aspect' of getting the word out > concerning AMP technology and other closely-related areas. Since I've > co-authored about eight technical books ( "semimar" and the use of > "site" for "cite" notwithstanding :), I'd be happy to give it a go. > Ideally, it would be less than 30 pages and pithy. > > Some suggested sections: > > - Executive Summary > - Company software assets and the GPL > - Links (Appendix) to Open Source studies (David Wheeler's, others) > - Overview of AMP technology (pictures, bulleted items) > - Where the pieces fit and what they can do > - Where the pieces are not a good fit and why > - Q & A (for ease of addressing important issues without the verbiage) > - The compulsory "Interesting Statistics" section (who, where, how much) > - ... > > > It would be an NYPHP branded document (written using OpenOffice.org and > exported to .pdf??), with additions as appropriate. > > what do ya'll think? I very much like this idea, too. Debunking the myths that surround PHP is vital. H From hans at nyphp.org Thu Nov 13 16:01:15 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 13 Nov 2003 16:01:15 -0500 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) In-Reply-To: <001e01c3aa08$e0fa34a0$bf8d3818@oberon1> References: <001e01c3aa08$e0fa34a0$bf8d3818@oberon1> Message-ID: <3FB3F11B.3030809@nyphp.org> Tim Gales wrote: > Jon Baer wrote: > >>yeah but if you look a large majority of jobs *still* call >>for MS .Net/c# and Java which is what i don't get, is there >>that big of a non published defection? > > > Well what I don't get is why so many programmers (and hence the bosses who > do the hiring and firing) become 'enraptured' (as in 'rapture of the > deep') with Java. Perhaps given that it is only prudent to look and see Simply put, marketing. When involved with Open Source, it's easy to forget "everyone else." That is to say, it's a big world, and frankly most people don't *know* computer technology except for what is delivered to them in semi-technical trade magazines, tv, and those ads on the top of taxis. [1] Sun and Microsoft have more marketing muscle than all of Open Source; even Linux. It's not until IBM got on board, and floated $1 billion, that Linux was even known outside tech-heavy sectors. And it still has a long way to go. While it's beginning to become a buzzword (which has it's own pros-and-cons) and pushed heavily on TV, the old boys of technology don't move that fast; even in an industry that moves faster than any other. Ironic. H [1] I bring up taxi ads because I still remember the day I saw a Penguin on a cab's roof and was dumbfounded. From hans at nyphp.org Fri Nov 14 08:41:32 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 14 Nov 2003 08:41:32 -0500 Subject: [nycphp-talk] [Fwd: NYLUG Workshop: An introduction to RPMs, Friday 11/14 @ 6:15pm] Message-ID: <3FB4DB8C.8020403@nyphp.org> Thought I'd pass this on. I'm going to try and attend tonight; should be fun. -------- Original Message -------- Subject: [nylug-announce] NYLUG Workshop: An introduction to RPMs, Friday 11/14 @ 6:15pm Date: Tue, 11 Nov 2003 20:04:46 -0500 From: Ron Guerin Reply-To: Announcements for NYLUG Organization: NYLUG To: NYLUG Announcements PLEASE NOTE: This event is at the World Financial Center Winter Garden, meeting up at the corner of Park Place and Broadway. NOT at IBM. WHAT ? An introduction to RPMs. Specifically discussion will focus around learning how to *create* RPMs. We are all aware of the power the RPM packaging system has. Surprisingly, tapping the power of RPM is quite *easy*. This, in turn allows for endless possibilities. By creating your own RPMs, you may customize software to your desire, provide updates that your distribution has yet to provide (new Gaim all the time! no waiting!), and have the ability to support your distribution to the end of time (Red Hat Linux will ever die!). WHO ? Sunny Dubey will be the speaker. If you wish to speak as well, simply email him! (See below) CONTACT ? Sunny Dubey: sdubey at nylug dot org WHEN ? 6:15 PM Friday the 14th, Nov 2003 (Sorry for the late announcement!!) WHERE ? The "Winter Garden" in the World Financial Center of lower Manhattan (Insanely *lovely* area). However we are meeting on the corner of Broadway and Park Place before going there. (MAPS: http://nylug.opencurve.org/location.html ) There is a Duane Reade on the corner, you can't miss it ! Just look for a guy with a leather jacket, and holding a newspaper in his hands. (haha!) DIRECTIONS ? Trains: A, C, N, R, 2, 3, 4, 5 Buses: M1, M6, M15, M22, M103, B51, X25 A & C trains: Take the train to Chambers street. Once you exit, you will need to walk one block East towards Broadway. Once you hit Broadway, simply walk 1 or 2 blocks south. N & R trains: Take the train to City Hall. Once you exit, you will simply need to 1 block south. 2 & 3 trains: Take the train to Park Place. Once you exit, you need to walk 1 or 2 blocks towards Broadway. 4 & 5 trains: Take the train to Brooklyn Bridge City Hall. You will need to walk East along the park. Once you hit Broadway just walk 4 blocks down to Park Place. M1 & M6 Buses (UPTOWN DIRECTION): Try to get off as near as possible to Park Place. and simply walk one block east to Broadway. M1 & M6 Buses (DOWNTOWN DIRECTION): Try to get of as near as possible to Park Place. Nothing more needed! M15, M22, M103, B51, X25 (All directions): Get off at Park Row, and simply walk west till you hit Broadway, and 1 block north to Park Place. =============================================================================== _______________________________________________ nylug-announce mailing list nylug-announce at mail.nylug.org http://www.nylug.org/mailman/listinfo/nylug-announce From jlacey at att.net Fri Nov 14 09:33:16 2003 From: jlacey at att.net (John Lacey) Date: Fri, 14 Nov 2003 07:33:16 -0700 Subject: [nycphp-talk] AMP "marketing document" In-Reply-To: <5.1.0.14.2.20031113153557.00b50910@mail.optonline.net> References: <5.1.0.14.2.20031113153557.00b50910@mail.optonline.net> Message-ID: <3FB4E7AC.6050902@att.net> > >> I would volunteer to *contribute* to a document (html and .pdf) that >> would be available for downloading from the NYPHP site. The document >> would be geared towards the 'marketing aspect' of getting the word out >> concerning AMP technology and other closely-related areas. >> > Michael Southwell wrote: > > I'm in on this > Hi Michael, I'll prime the pump by starting on the Executive Summary section next week. The document needs to be concise and minimally technical (a handful of pages to begin with is ok). The process should help to get the contributors in marketing-mode. There's some very heavy techies on NYPHP (not to mean horizontally challenged :) and I'm always learning from them. Here's an opportunity for those folks to sharpen their marketing skills -- and to remind the contributors to back off the technical. First question should be: "Who's the audience?" I think taking it offline after this would minimize noise on the lists. Do you want it in HTML first? I figured you'd be in the better position to drop it where belongs for others to comment. Since I'm throwing the first pitch, I'll take the "you're off-base" hits from people. It's all about process. John btw, use the jlacey at beopen.biz address -- thanks From tgales at tgaconnect.com Sat Nov 15 13:10:23 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Sat, 15 Nov 2003 13:10:23 -0500 Subject: [nycphp-talk] apocryphal safe mode bug and SANS' alert CAN-2003-0863 Message-ID: <000b01c3aba3$bd889650$bf8d3818@oberon1> I was searching the SANS Institute's website looking for reported (purported) PHP bugs. When up popped s blurb about CAN-2003-0863. I knew that CANs are only candidates for becoming a CVE (common vulnerability and exposure) but the following made me want to look into it further. "CAN-2003-0863" "The php_check_safe_mode_include_dir function in fopen_wrappers.c of PHP 4.3.x returns a success value (0) when the safe_mode_include_dir variable is not specified in configuration, which differs from the previous failure value and may allow remote attackers to exploit file include vulnerabilities in PHP applications." clicking on the link (http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0863) took me to a page which gave the origin of the 'bug' report as coming from http://marc.theaimsgroup.com/?l=bugtraq&m=105839111204227 And clicking on that link provided an email written by Michal Krause and dated 2003-07-16 7:46:43 subject line: "PHP safe mode broken". In the body of the email Krause states: "This behaviour could make older working setups insecure after upgrading to PHP 4.3.x. I tried to report this bug to PHP developers twice in last weeks, but I didn't receive any answer." I can remember thinking this looks bleak for me (as I had already upgraded from 4.2.2) and how could I mend my "broken safe mode". I thought to myself surely something as important as this will show up if I search http://lists.php.net -- but I couldn't find any mention of it. Then I thought maybe there was a response to his post. So, I went back to bugtraq link above. There was indeed a response from Krause himself stating: "To test it[his patch], create simple PHP script owned by some regular user, which will try to include /etc/passwd for example. This script should fail on safe mode error (when safe mode is enabled, of course). " I couldn't believe my eyes -- this guy had it 180 degrees backwards -- or did he? I searched Google again and found more about "CAN-2003-0863". I think I got something different than what comes up now -- namely http://xforce.iss.net/xforce/xfdb/12714 But that web page looks pretty authoritative (after all ISS is the home of "X-Force Research"-- with a name like that how could it be wrong?) The ISS web page states: "Platforms Affected: Linux Any version PHP 4.3 to 4.3.2 Unix Any version Windows Any version Remedy: No remedy available as of July 2003. Consequences: Bypass Security " I'll just stop here -- I have already gone on too long. Anyway its no wonder people think PHP has security problems. (also I apologize for going on and on -- but this gets me upset) T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From shiflett at php.net Sat Nov 15 16:09:06 2003 From: shiflett at php.net (Chris Shiflett) Date: Sat, 15 Nov 2003 13:09:06 -0800 (PST) Subject: [nycphp-talk] apocryphal safe mode bug and SANS' alert CAN-2003-0863 In-Reply-To: <000b01c3aba3$bd889650$bf8d3818@oberon1> Message-ID: <20031115210906.39388.qmail@web14310.mail.yahoo.com> --- Tim Gales wrote: > "CAN-2003-0863" "The php_check_safe_mode_include_dir function in > fopen_wrappers.c of PHP 4.3.x returns a success value (0) when the > safe_mode_include_dir variable is not specified in configuration [snip] > Anyway its no wonder people think PHP has security problems. I might be misunderstanding, but someone thinks it is a bug in PHP if, when you don't enable safe_mode, that safe_mode is not enabled for you? I read your entire email, and I saw nothing that could be classified as a bug or a security vulnerability. If I omit safe_mode from my php.ini, why should PHP assume I meant to enable it? Please correct me if I misinterpreted anything. Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp From shiflett at php.net Sat Nov 15 16:35:06 2003 From: shiflett at php.net (Chris Shiflett) Date: Sat, 15 Nov 2003 13:35:06 -0800 (PST) Subject: [nycphp-talk] apocryphal safe mode bug and SANS' alert CAN-2003-0863 In-Reply-To: <000b01c3aba3$bd889650$bf8d3818@oberon1> Message-ID: <20031115213506.49265.qmail@web14302.mail.yahoo.com> --- Tim Gales wrote: > http://marc.theaimsgroup.com/?l=bugtraq&m=105839111204227 OK, I read this email. I think I misunderstood before. This guy seems to be claiming that having safe_mode enabled but ommitting safe_mode_include_dir in your configuration basically disables the check when you go to include something. He also cites some code in fopen_wrappers.c. Well, it seems to me that he is just wrong. From the code: PHPAPI int php_check_safe_mode_include_dir(char *path TSRMLS_DC) { if (PG(safe_mode)) { if (PG(safe_mode_include_dir) && *PG(safe_mode_include_dir)) { [snip] } return -1; } return 0; } The part I snipped out is where the checks are made, and that part is irrelevant for this argument. As you can see, the default return (since any previous return would end the function) for the case where safe_mode is enabled is -1. This is a safe approach. Unless safe_mode_include_dir is specified and the permissions checks succeed, permission is not granted. The default return for when safe_mode is not enabled is 0, which makes sense. This guy's argument is that the code returns 0 when safe_mode_include_dir is not set, which is untrue. Doing a cvs annotate on this code shows this for that particular line: 1.141 (jflemer 01-Feb-02): return -1; So, that line has not changed since Feb 2002. His email is from Jul 2003. This leads me to believe that his argument is completely invalid, even at the time that he wrote that email. Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp From tgales at tgaconnect.com Sat Nov 15 20:06:04 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Sat, 15 Nov 2003 20:06:04 -0500 Subject: [nycphp-talk] apocryphal safe mode bug and SANS' alert CAN-2003-0863 In-Reply-To: <20031115213506.49265.qmail@web14302.mail.yahoo.com> Message-ID: <000001c3abdd$cf578f50$bf8d3818@oberon1> Chris Schiflett wrote: > So, that line has not changed since Feb 2002. His email is > from Jul 2003. This leads me to believe that his argument is > completely invalid, even at the time that he wrote that email. > Firstly, thanks very much Chris for taking the time to read and respond to my earlier post. Your response is pretty compelling evidence that there is and was no bug (and your response is much more concise and concrete than the argument I had in mind) The guy was clearly wrong but still SANS picked it up and published it as a possible problem. And the ISS page makes it look like there is a gaping security hole in PHP. Maybe NYPHP should have a section debunking some of the myths which get propagated about PHP. T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com > From danielk at us.ibm.com Mon Nov 17 10:24:20 2003 From: danielk at us.ibm.com (Daniel Krook) Date: Mon, 17 Nov 2003 10:24:20 -0500 Subject: [nycphp-talk] PHP dominance on websites (Information Week article) In-Reply-To: <3FB3F11B.3030809@nyphp.org> Message-ID: > It's not until IBM got on board, and floated $1 billion, that Linux was even known outside tech-heavy sectors. Looks like the same may happen for Mozilla in the coming months. Here are a couple of snippets. : ) "IBM has led the industry in promoting compliance to open standards and interoperability. It is critical that IBM adhere to Java and W3C Web standards throughout its internal Web application portfolio. "In 2004, the IBM CIO office is planning to adopt Mozilla as the default/standard browser on all of the internal client platforms," says John Walicki, who leads the development of the standard Linux Client image within IBM." "The IBM Browser Development Center is dedicated to helping IBM developers support Mozilla within their application frameworks. It also assists people in working with the Mozilla community, and enhance the browser as necessary. "It's important that IBM products are designed to work with a cross-platform browser like Mozilla," says Walter Lee, manager of the Browser Development Center. "IBM is investing billions in Linux development and Mozilla is an especially great browser match for Linux." The team has helped provide Mozilla compatibility for several products. The team has worked with the WebSphere Portal, Domino, Lotus e-mail and AIX teams. "We're able to help make middleware work with Linux and Mozilla browsers," says Mike Kaply, Mozilla advocate, Browser Development Center. " Daniel Krook, Application Developer, Production Services, ibm.com 1133 Westchester Avenue, White Plains, NY 10604 Tel: (914) 642-4474, Tieline 224-4474 danielk at us.ibm.com Personal: http://info.krook.org/ Persona: http://w3.ibm.com/persona/users/9/0/x/90MC212-P.html From hans at nyphp.org Mon Nov 17 18:53:03 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 17 Nov 2003 18:53:03 -0500 Subject: [nycphp-talk] Some Tidbits: PostgreSQL, MaxDB, PHP Benchmarks Message-ID: <3FB95F5F.3020405@nyphp.org> To some, these might be old news, but I thought it interesting enough to post. Interesting, too, is the release of MaxDB and PostgreSQL within hours of each other :) ----------------------------------------------------- http://www.postgresql.org/presskit/en/presskit74.html The PostgreSQL Global Development Group (PGDG) is pleased to announce the availability of version 7.4 of the PostgreSQL Object Relational Database Management System (ORDBMS). This major release is the work of our world wide network of hundreds of developers and contributors over the last 9 months. It provides commercial-grade enterprise database functionality and performance with the flexibility and low total cost of ownership widely associated with Open Source software. "If you tried PostgreSQL before, and went with a commercial database like Oracle or DB2 instead, it's time to re-evaluate," says Rod Taylor of Inquent Technologies. "PostgreSQL's expanding enterprise feature set and performance improvements over the last two years make PostgreSQL competitive with even the highest-end database systems. And you can't beat the cost." ----------------------------------------------- http://www.mysql.com/press/release_2003_35.html Short Background * MaxDB by MySQL is a re-branded and enhanced version of SAP DB, SAP AG's open source database. * Through a technology and cross licensing partnership with SAP AG, MySQL AB has acquired full commercial rights to develop and market future releases of SAP DB. MaxDB features beyond those currently available in MySQL * Views * Server Side Cursors * Stored Procedures and Triggers * Automatic failover (to standby server) * Scheduling and automatic messaging on alerts * Snapshots * Archive tables * Synonyms ----------------------------------------------- PHP Benchmarking Tools http://www.sebastian-bergmann.de/PHP_Benchmark/ Hans From lists at redibishosting.com Tue Nov 18 11:28:20 2003 From: lists at redibishosting.com (Deidra McIntyre) Date: Tue, 18 Nov 2003 11:28:20 -0500 (EST) Subject: [nycphp-talk] Take redIbis' 2003 technology survey Message-ID: <2275.172.129.181.212.1069172900.squirrel@www.myhostingadmin.com> NYPHP listers, The first annual redIbis' Multicultural Initiatives Survey (MIS), a collaborative effort among the Association of Chinese Computer Professionals (ACCP), the Black Data Processing Associates (BDPA), and Hispanics in Information Technology & Telecommunications (HITT), launched today. Take the survey: http://www.redibis.com/mis_2003/ Business owners and professionals in the technology fields - Biotech/IT/Telecommunications - are invited to answer questions in this short survey. The goal of this project is to ensure that the voice of African Americans/people of African descent, Chinese/Asian, and Latino technologists is chronicled on the major issues of this year. However, all ethnicities in the field are invited to partake in this project. Feel free to forward this email to other technology professionals. Thank you, Deidra ******* Deidra McIntyre President & Founder redIbis techSolid(brightFuture) About redIbis http://www.redibis.com redIbis is a non-competitive organization that works to foster business, career networking, and educational opportunities among information technology (IT), technology, and telecommunications business owners and industry professional organizations of color. At present, three national organizations, the internationally influential Association of Chinese Computer Professionals (http://www.gnyccp.org), the nearly 30-year-old Black Data Processing Associates (http://www.bdpa.org) and the fast-growing Hispanics in Information Technology & Telecommunications (http://www.hittglobal.org), are our key strategic partners involved in planning, promoting and co-sponsoring multi-cultural and multi-ethnic redIbis events. Collectively, we share a vision that technology businesses by people of color must thrive in order to ensure a bright future for American as well as global economies. redIbis takes its name from the Scarlet Ibis, a bird indigenous to the tropical regions of the world including Africa, Asia, the Caribbean, South and Central America. ### From jsiegel1 at optonline.net Tue Nov 18 21:08:42 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Tue, 18 Nov 2003 21:08:42 -0500 Subject: [nycphp-talk] Failure to write session data Message-ID: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> My client's website is running PHP v. 4.1.2. The website's error handler sent me the following: "ERROR NUMBER: 2 ERR DETAILS: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp)" The interesting thing here is the specific error (failure to write session data) even though session.save_path is already set in the php.ini to "/tmp." A bit of Googling turned up the following: creating a tmp folder in SERVER ROOT like /var/www/tmp and setting permissions accordingly. I'm not sure if the following is relevant to the above problem but since it is "session" related, it may be of some importance here. When going from one page to another, I pass the session ID by appending it to the URL, e.g., header("Location: http://{$_SERVER['HTTP_HOST']}/mynextpage.php?code=" . session_id()); And then, on that next page, I grab the ID using session_id ($_GET['code']); Jeff Siegel From danielc at analysisandsolutions.com Tue Nov 18 22:01:28 2003 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Tue, 18 Nov 2003 22:01:28 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> References: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> Message-ID: <20031119030128.GA24605@panix.com> Hi Jeff: On Tue, Nov 18, 2003 at 09:08:42PM -0500, Jeff Siegel wrote: > > "ERROR NUMBER: 2 > ERR DETAILS: Failed to write session data (files). Please verify that > the current setting of session.save_path is correct (/tmp)" > > The interesting thing here is the specific error (failure to write > session data) even though session.save_path is already set in the > php.ini to "/tmp." The path in the error message reflects the path in the ini file. It sounds like you're saying that you're expecting it to be the other way around: that you need to set the ini file to "/tmp" just because the error message says so. The question is _why_ /tmp wasn't accessible. Was it working okay until all of a sudden you got this error message? Or did this message come up as you're trying to initially configure things. I'm assuming it was a sudden error... So, is /tmp on the same computer and/or hard drive as the web server? If /tmp is being served from another computer, then it could have been a transient network failure. To avoid such, change the path to something that's on the same machine as the web server. See you, --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 Tue Nov 18 22:42:38 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Tue, 18 Nov 2003 22:42:38 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <20031119030128.GA24605@panix.com> References: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> <20031119030128.GA24605@panix.com> Message-ID: <3FBAE6AE.5000401@optonline.net> Dan, Just to clarify things a bit. It was working fine all along. Nothing was changed either in the INI file or the location of the tmp directory (which is on the same physical drive as the site itself). Jeff =================== Daniel Convissor wrote: >Hi Jeff: > >On Tue, Nov 18, 2003 at 09:08:42PM -0500, Jeff Siegel wrote: > > >>"ERROR NUMBER: 2 >>ERR DETAILS: Failed to write session data (files). Please verify that >>the current setting of session.save_path is correct (/tmp)" >> >>The interesting thing here is the specific error (failure to write >>session data) even though session.save_path is already set in the >>php.ini to "/tmp." >> >> > >The path in the error message reflects the path in the ini file. It >sounds like you're saying that you're expecting it to be the other way >around: that you need to set the ini file to "/tmp" just because the error >message says so. > >The question is _why_ /tmp wasn't accessible. Was it working okay until >all of a sudden you got this error message? Or did this message come up >as you're trying to initially configure things. I'm assuming it was a >sudden error... > >So, is /tmp on the same computer and/or hard drive as the web server? If >/tmp is being served from another computer, then it could have been a >transient network failure. > >To avoid such, change the path to something that's on the same machine as >the web server. > >See you, > >--Dan > > > From hans at nyphp.org Tue Nov 18 22:52:52 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 18 Nov 2003 22:52:52 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <3FBAE6AE.5000401@optonline.net> References: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> <20031119030128.GA24605@panix.com> <3FBAE6AE.5000401@optonline.net> Message-ID: <3FBAE914.9060504@nyphp.org> Jeff Siegel wrote: > Just to clarify things a bit. It was working fine all along. Nothing was > changed either in the INI file or the location of the tmp directory > (which is on the same physical drive as the site itself). Plenty of disk space left? And make sure the permissions on /tmp are correct. They should be owner, group, world writeable, with the sticky bit set (it'll appear as a 't' on the perms line). H From hans at nyphp.org Tue Nov 18 22:59:27 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 18 Nov 2003 22:59:27 -0500 Subject: [nycphp-talk] apocryphal safe mode bug and SANS' alert CAN-2003-0863 In-Reply-To: <000001c3abdd$cf578f50$bf8d3818@oberon1> References: <000001c3abdd$cf578f50$bf8d3818@oberon1> Message-ID: <3FBAEA9F.7050404@nyphp.org> Tim Gales wrote: > Chris Schiflett wrote: > >>So, that line has not changed since Feb 2002. His email is >>from Jul 2003. This leads me to believe that his argument is >>completely invalid, even at the time that he wrote that email. >> > > > Firstly, thanks very much Chris for taking the time to read > and respond to my earlier post. > > Your response is pretty compelling evidence that there is and was no bug > (and your response is much more concise and concrete than the argument I > had in mind) > > The guy was clearly wrong but still SANS picked it up and published it as > a > possible problem. > > And the ISS page makes it look like there is a gaping security hole in > PHP. > > Maybe NYPHP should have a section debunking some of the myths which get > propagated about PHP. I think these types of inflammatory security alerts, and then them being blindly accepted by ISS and the like, is a real problem. As we've discussed in regards to prior SecurityFocus alerts, and as Chris I think rightly points out in this case, no one reviews these "alerts" - and frankly it's a little scary what other false positives there are, not only in PHP. I think it would be of great benefit to PHP's growth to have some followup to security alerts than come out for PHP. Even something as simple as "yes, it's valid" or "no, we can't find any backing to that claim" would be of great value, and might get these "expert security teams" to wake up. H From jsiegel1 at optonline.net Wed Nov 19 07:05:24 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Wed, 19 Nov 2003 07:05:24 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <3FBAE914.9060504@nyphp.org> References: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> <20031119030128.GA24605@panix.com> <3FBAE6AE.5000401@optonline.net> <3FBAE914.9060504@nyphp.org> Message-ID: <3FBB5C84.7060608@optonline.net> Plenty of disk space and all permissions are set correctly. Let me also add that this seems to be an intermittent problem and not one that is tied to, say, a browser version issue. It can happen if someone is using a very old browser version or a new one but it is *not* easily reproducible in either case. One of the Googled solutions mentioned setting up a new tmp directory. However, my guess is that the directory would not accomplish anything (I would think) since all permissions are already set correctly on the server and there is a lot of disk space. Someone did write (again, this comes from my Googling) that this seems to happen "under load" though the writer was not particularly helpful in defining "under load." It should be noted, however, that the server has DEFINITELY experienced an increase in hits since the average number of transactions through the site has nearly doubled in the past two days from approximately 500 per day to a bit over 900 per day. So...that translates to 900 or so session files per day with the bulk of them happening between the hours of 6am and 10pm. Just seems like a lot of session files in a short period of time. Hans Zaunere wrote: > > > Jeff Siegel wrote: > >> Just to clarify things a bit. It was working fine all along. Nothing >> was changed either in the INI file or the location of the tmp >> directory (which is on the same physical drive as the site itself). > > > Plenty of disk space left? And make sure the permissions on /tmp are > correct. They should be owner, group, world writeable, with the sticky > bit set (it'll appear as a 't' on the perms line). > > H > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jsiegel1 at optonline.net Tue Nov 18 23:25:20 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Tue, 18 Nov 2003 23:25:20 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <3FBAE914.9060504@nyphp.org> References: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> <20031119030128.GA24605@panix.com> <3FBAE6AE.5000401@optonline.net> <3FBAE914.9060504@nyphp.org> Message-ID: <3FBAF0B0.1070805@optonline.net> I think 26 gig of disk space is probably enough. No? ;) Filesystem Size Used Avail Use% Mounted on /dev/sda2 33G 5.0G 26G 16% / /dev/sda1 23M 5.9M 15M 28% /boot none 503M 0 503M 0% /dev/shm (<== Vat's dis?) And here are the permissions (everything looks kosher...even the sticky bit): drwxrwxrwt 3 root root 12288 Nov 18 23:32 tmp Jeff Hans Zaunere wrote: > > > Jeff Siegel wrote: > >> Just to clarify things a bit. It was working fine all along. Nothing >> was changed either in the INI file or the location of the tmp >> directory (which is on the same physical drive as the site itself). > > > Plenty of disk space left? And make sure the permissions on /tmp are > correct. They should be owner, group, world writeable, with the sticky > bit set (it'll appear as a 't' on the perms line). > > H > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From hans at nyphp.org Wed Nov 19 08:40:38 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 19 Nov 2003 08:40:38 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <3FBB5C84.7060608@optonline.net> References: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> <20031119030128.GA24605@panix.com> <3FBAE6AE.5000401@optonline.net> <3FBAE914.9060504@nyphp.org> <3FBB5C84.7060608@optonline.net> Message-ID: <3FBB72D6.40904@nyphp.org> Jeff Siegel wrote: > Plenty of disk space and all permissions are set correctly. > Let me also add that this seems to be an intermittent problem and not > one that is tied to, say, a browser version issue. It can happen if > someone is using a very old browser version or a new one but it is *not* > easily reproducible in either case. > > One of the Googled solutions mentioned setting up a new tmp directory. > However, my guess is that the directory would not accomplish anything (I > would think) since all permissions are already set correctly on the > server and there is a lot of disk space. > > Someone did write (again, this comes from my Googling) that this seems > to happen "under load" though the writer was not particularly helpful in > defining "under load." It should be noted, however, that the server has > DEFINITELY experienced an increase in hits since the average number of > transactions through the site has nearly doubled in the past two days > from approximately 500 per day to a bit over 900 per day. So...that > translates to 900 or so session files per day with the bulk of them > happening between the hours of 6am and 10pm. Just seems like a lot of > session files in a short period of time. What's the general number of files in /tmp ? Are we talking thousands? Might be time to increase the garbage collector frequency; or, upgrade PHP as we had talked about :) H From tgales at tgaconnect.com Wed Nov 19 09:10:43 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 19 Nov 2003 09:10:43 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> Message-ID: <001001c3aea6$ec074750$bf8d3818@oberon1> Jeff Siegel wrote: > "ERROR NUMBER: 2 > ERR DETAILS: Failed to write session data (files). Please > verify that the current setting of session.save_path is > correct (/tmp)" > I noticed in the manual under session_write_close() it says: "Session data is usually stored after your script terminated without the need to call session_write_close(), but as session data is locked to prevent concurrent writes only one script may operate on a session at any time". If it is safe to assume that your are not using framesets -- i.e. the above does not apply, I would consider other errors that might occur -- i.e. it might be that the version of PHP you are running is mis-reporting the error as a file write error ( this thought has probably more than likely occurred to you but I throw it out just in case). Sorry I can't be of any more 'real' help. T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com > From mwithington at PLMresearch.com Wed Nov 19 11:49:53 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Wed, 19 Nov 2003 11:49:53 -0500 Subject: [nycphp-talk] M Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE358835B93@network.PLMresearch.com> I'm currently using DeZign for databases v2.5.2 for my MySQL ER stuff. Anyone have any experience with other _reasonably_priced_ alternatives? -------------------------- 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 From tom at supertom.com Wed Nov 19 11:59:24 2003 From: tom at supertom.com (tom at supertom.com) Date: Wed, 19 Nov 2003 11:59:24 -0500 Subject: [nycphp-talk] M In-Reply-To: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE358835B93@network.PLMresearch.com> Message-ID: Mark, Are you having an issue with Dezign? We use it, and so far it has been OK. We also use ErWin, but I don't think qualifies as reasonably priced. 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 Mark Withington Sent: Wednesday, November 19, 2003 11:50 AM To: 'NYPHP Talk' Subject: [nycphp-talk] M I'm currently using DeZign for databases v2.5.2 for my MySQL ER stuff. Anyone have any experience with other _reasonably_priced_ alternatives? -------------------------- 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 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From mwithington at PLMresearch.com Wed Nov 19 12:14:36 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Wed, 19 Nov 2003 12:14:36 -0500 Subject: [nycphp-talk] M Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE358835B97@network.PLMresearch.com> No problems with it, just want to ensure it's a valid/stable tool before I start committing lots of time learning/using it. thanks -------------------------- 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 tom at supertom.com Sent: Wednesday, November 19, 2003 11:59 AM To: NYPHP Talk Subject: RE: [nycphp-talk] M Mark, Are you having an issue with Dezign? We use it, and so far it has been OK. We also use ErWin, but I don't think qualifies as reasonably priced. 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 Mark Withington Sent: Wednesday, November 19, 2003 11:50 AM To: 'NYPHP Talk' Subject: [nycphp-talk] M I'm currently using DeZign for databases v2.5.2 for my MySQL ER stuff. Anyone have any experience with other _reasonably_priced_ alternatives? -------------------------- 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 _______________________________________________ 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 Wed Nov 19 12:15:21 2003 From: tom at supertom.com (tom at supertom.com) Date: Wed, 19 Nov 2003 12:15:21 -0500 Subject: [nycphp-talk] M In-Reply-To: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE358835B97@network.PLMresearch.com> Message-ID: I would say it is, we bought it and some of the other associated plugins as well, and we haven't had any issues. We use it fairly often - a few times a week. Large ERDs without problem. I would say it is stable - but if anyone has any alternatives, I'll gladly listen. 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 Mark Withington Sent: Wednesday, November 19, 2003 12:15 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] M No problems with it, just want to ensure it's a valid/stable tool before I start committing lots of time learning/using it. thanks -------------------------- 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 tom at supertom.com Sent: Wednesday, November 19, 2003 11:59 AM To: NYPHP Talk Subject: RE: [nycphp-talk] M Mark, Are you having an issue with Dezign? We use it, and so far it has been OK. We also use ErWin, but I don't think qualifies as reasonably priced. 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 Mark Withington Sent: Wednesday, November 19, 2003 11:50 AM To: 'NYPHP Talk' Subject: [nycphp-talk] M I'm currently using DeZign for databases v2.5.2 for my MySQL ER stuff. Anyone have any experience with other _reasonably_priced_ alternatives? -------------------------- 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 _______________________________________________ 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 jeffb at uniquephoto.com Wed Nov 19 13:46:38 2003 From: jeffb at uniquephoto.com (Jeff Barrett) Date: Wed, 19 Nov 2003 13:46:38 -0500 Subject: [nycphp-talk] M In-Reply-To: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE358835B93@network.PLMresearch.com> Message-ID: I use http://www.thekompany.com/products/dataarchitect/ I would consider it barely stable and some real bugs still exist in it. I am lucky in that the biggest database I have to keep tabs on is only like 40 small tables and we don't use it to keep track of much more then the basic structure. It reversed several mysql databases with no real problem. But the program crashes every now and then on save and it can be a real kludge to work with. For the $40 it cost it was a good deal I guess. In short I wish I had ErWin again it always seemed to do exactly what I wanted not that I wanted much from it. Jeff > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Mark Withington > Sent: Wednesday, November 19, 2003 11:50 AM > To: 'NYPHP Talk' > Subject: [nycphp-talk] M > > > I'm currently using DeZign for databases v2.5.2 for my MySQL ER stuff. > Anyone have any experience with other _reasonably_priced_ alternatives? > > -------------------------- > 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 > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From tgales at tgaconnect.com Wed Nov 19 14:15:57 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 19 Nov 2003 14:15:57 -0500 Subject: [nycphp-talk] M In-Reply-To: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE358835B93@network.PLMresearch.com> Message-ID: <001a01c3aed1$8f95e870$bf8d3818@oberon1> Mark L. Withington wrote > I'm currently using DeZign for databases v2.5.2 for my MySQL > ER stuff. Anyone have any experience with other > _reasonably_priced_ alternatives? You might try looking at this http://www.fabforce.net/dbdesigner4/doc/index.html I don't have much experience with it (just toyed around with a few tables) But it looks pretty good. (If you find any serious flaws in it I would be interested in hearing about them) T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From patrick.fee at baesystems.com Wed Nov 19 15:28:37 2003 From: patrick.fee at baesystems.com (Fee, Patrick J (US SSA)) Date: Wed, 19 Nov 2003 15:28:37 -0500 Subject: [nycphp-talk] PHP and MySQL "Action Items" modules... Message-ID: <728813C3358BF04CB3A3DA2341D44A7176BB19@e2k11.na.baesystems.com> Afternoon all. Can anyone suggest a GNU license solution for an action items list. It could be a PostNule or PHPNuke module ... but I need to build a portal site and the one requirement is that it handle Action Items: Listed them, who is responsible, and the current status (Open, closed, re-opened, etc.). Can anyone help me find a basic solution that is open source? I want to use PostNuke or PHPNuke .... PJF Patrick J. Fee Web & Database Group Manager BAE SYSTEMS From jlacey at att.net Wed Nov 19 18:42:10 2003 From: jlacey at att.net (John Lacey) Date: Wed, 19 Nov 2003 16:42:10 -0700 Subject: [nycphp-talk] slashdot first response Message-ID: <3FBBFFD2.9070001@att.net> thought y'all would enjoy this slashdot post featuring PHP in the first post http://slashdot.org/article.pl?sid=03/11/19/1855252 John From nyphp at enobrev.com Thu Nov 20 03:14:19 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Thu, 20 Nov 2003 03:14:19 -0500 Subject: [nycphp-talk] Cross domain Logins Message-ID: Anyone here ever create a cross-domain login system? I'm still waiting for details to see if the domains will have access to the same db or same server. I figure one way to do it would be to somehow transfer session info form one domain to the other, but it seems like there's plenty of security issues in doing so. I thought maybe passing an md5 encrypted string with the username, password form one site to the next might work as well, but I'm still not too sure of the security issues, especially considering the issues pointed out a couple weeks back regarding auto-logins. Anyone have experience with this? Thanks! Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From mwithington at PLMresearch.com Thu Nov 20 08:03:42 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Thu, 20 Nov 2003 08:03:42 -0500 Subject: [nycphp-talk] Cross domain Logins Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3586A64D1@network.PLMresearch.com> Not sure, but I think this might be a good job for cURL login script. I've got one kicking around if you need it. Let me know and I can rummage through my sock drawer and find it. -------------------------- 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 Mark Armendariz Sent: Thursday, November 20, 2003 3:14 AM To: 'NYPHP Talk' Subject: [nycphp-talk] Cross domain Logins Anyone here ever create a cross-domain login system? I'm still waiting for details to see if the domains will have access to the same db or same server. I figure one way to do it would be to somehow transfer session info form one domain to the other, but it seems like there's plenty of security issues in doing so. I thought maybe passing an md5 encrypted string with the username, password form one site to the next might work as well, but I'm still not too sure of the security issues, especially considering the issues pointed out a couple weeks back regarding auto-logins. Anyone have experience with this? Thanks! Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From nyphp at enobrev.com Thu Nov 20 08:48:20 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Thu, 20 Nov 2003 08:48:20 -0500 Subject: [nycphp-talk] Cross domain Logins In-Reply-To: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3586A64D1@network.PLMresearch.com> Message-ID: definitely a good idea... mind if i take a gander? (if you can find it) thanks!! _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mark Withington Sent: Thursday, November 20, 2003 8:04 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Cross domain Logins Not sure, but I think this might be a good job for cURL login script. I've got one kicking around if you need it. Let me know and I can rummage through my sock drawer and find it. -------------------------- 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 Mark Armendariz Sent: Thursday, November 20, 2003 3:14 AM To: 'NYPHP Talk' Subject: [nycphp-talk] Cross domain Logins Anyone here ever create a cross-domain login system? I'm still waiting for details to see if the domains will have access to the same db or same server. I figure one way to do it would be to somehow transfer session info form one domain to the other, but it seems like there's plenty of security issues in doing so. I thought maybe passing an md5 encrypted string with the username, password form one site to the next might work as well, but I'm still not too sure of the security issues, especially considering the issues pointed out a couple weeks back regarding auto-logins. Anyone have experience with this? Thanks! Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Thu Nov 20 08:50:10 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 20 Nov 2003 08:50:10 -0500 Subject: [nycphp-talk] Cross domain Logins In-Reply-To: References: Message-ID: <3FBCC692.7020707@nyphp.org> Mark Armendariz wrote: > Anyone here ever create a cross-domain login system? I'm still waiting > for details to see if the domains will have access to the same db or > same server. I figure one way to do it would be to somehow transfer > session info form one domain to the other, but it seems like there's > plenty of security issues in doing so. I thought maybe passing an md5 > encrypted string with the username, password form one site to the next > might work as well, but I'm still not too sure of the security issues, > especially considering the issues pointed out a couple weeks back > regarding auto-logins. In addition to passing some type of key (for instance an md5), you can fingerprint the browser. If a shared DB is available, you could store the browser's request header and then compare it to what the browser requests on the second server (domain). This adds a bit of security. I once had to do a cross-site login thing between a cold fusion server and a PHP server. They didn't share a DB, and I had very little control over the CF site. What I finally did was implement a call-ahead to the php site. 1) User logs into CF and is directed to a protected page. 2) Within this protected page is a tag that makes a request to a private URL on the php server. 3) The php server records the unique key, and could store other info, like a browser fingerprint. 4) When the user clicks a link with the unique key to get to the PHP server, the PHP box is already aware that this person is coming. While I'm still passing a unique key via a get, the call-ahead provides some added security, especially when the systems don't share a DB. H From mwithington at PLMresearch.com Thu Nov 20 08:52:19 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Thu, 20 Nov 2003 08:52:19 -0500 Subject: [nycphp-talk] Cross domain Logins Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE358835BE6@network.PLMresearch.com> Wish I could say that I was smart enough to write the code ;-) It was generated by the fellow who owns http://www.daum.net "; $GETURL = ""; $POSTFIELDS = "id=$id&pw=$pw"; function AUTH_SITE_COOKIE_STORE($LOGINURL,$POSTFIELDS) { $parseURL = parse_url($LOGINURL); $ch = curl_init(); curl_setopt($ch, CURLOPT_COOKIEJAR, "$parseURL[host].cookie"); curl_setopt($ch, CURLOPT_URL,"$LOGINURL"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "$POSTFIELDS"); ob_start(); curl_exec ($ch); ob_end_clean(); curl_close ($ch); return "$parseURL[host].cookie"; } function AUTH_SITE_GET($GETURL,$cookieFile) { $parseURL = parse_url($GETURL); $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_COOKIEFILE, "$cookieFile"); curl_setopt($ch, CURLOPT_URL,"$GETURL"); $result = curl_exec ($ch); curl_close ($ch); $fp = fopen ("$parseURL[host].html", "w"); fwrite($fp,$result); fclose ($fp); return $result; } $cookieFile = AUTH_SITE_COOKIE_STORE($LOGINURL,$POSTFIELDS); echo $result = AUTH_SITE_GET($GETURL,$cookieFile); ?> -------------------------- 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 Mark Armendariz Sent: Thursday, November 20, 2003 8:48 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Cross domain Logins definitely a good idea... mind if i take a gander? (if you can find it) thanks!! _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mark Withington Sent: Thursday, November 20, 2003 8:04 AM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Cross domain Logins Not sure, but I think this might be a good job for cURL login script. I've got one kicking around if you need it. Let me know and I can rummage through my sock drawer and find it. -------------------------- 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 Mark Armendariz Sent: Thursday, November 20, 2003 3:14 AM To: 'NYPHP Talk' Subject: [nycphp-talk] Cross domain Logins Anyone here ever create a cross-domain login system? I'm still waiting for details to see if the domains will have access to the same db or same server. I figure one way to do it would be to somehow transfer session info form one domain to the other, but it seems like there's plenty of security issues in doing so. I thought maybe passing an md5 encrypted string with the username, password form one site to the next might work as well, but I'm still not too sure of the security issues, especially considering the issues pointed out a couple weeks back regarding auto-logins. Anyone have experience with this? Thanks! Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpang at bpang.com Thu Nov 20 09:47:22 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 20 Nov 2003 09:47:22 -0500 Subject: [nycphp-talk] Cross domain Logins Message-ID: The way to do this is to use what is called a "pixel beacon" or "web beacon." http://www.webopedia.com/TERM/W/Web_beacon.html (Of course, PHP won't let you make a GIF, but it's a reasonable description). Use PHP to create an image which is called from the "other domain." When calling that image, pass along login information in the query string (in some decryptable format). As part of the image creation, you can set a cookie or session. Basically, what you'll have is... Site1.com makes a call to an image on Site2.com as http://www.site2.com/beacon.php?action=login&username=foo (ok, not encrypted or anything) beacon.php generates an image and sets a cookie: (Sample code, YMMV) SetCookie("username",$_GET['username']); Header ("Content-type: image/jpeg"); $im = ImageCreate (1, 1) or die ("Cannot Initialize new GD image stream"); $background_color = ImageColorAllocate ($im, 255, 255, 255); $text_color = ImageColorAllocate ($im, 233, 14, 91); ImageString ($im, 1, 5, 5, $_GET['username'], $text_color); ImageJPEG ($im); ImageDestroy($im); There, by visiting one domain, you've now set a cookie on the other domain. The only catch is that it requires a little bit of cooperation between the webmasters (if they won't put your image/beacon on their page, all is lost). This technique is regularly used in banner ads and Yahoo! even includes it in their privacy statements. http://privacy.yahoo.com/privacy/us/pixels/details.html I haven't done it yet, but I've been tempted to put ALL of my session and cookie functions into images, even when not going cross-domain. > > Anyone here ever create a cross-domain login system? I'm still waiting for > details to see if the domains will have access to the same db or same > server. I figure one way to do it would be to somehow transfer session info > form one domain to the other, but it seems like there's plenty of security > issues in doing so. I thought maybe passing an md5 encrypted string with > the username, password form one site to the next might work as well, but I'm > still not too sure of the security issues, especially considering the issues > pointed out a couple weeks back regarding auto-logins. > > Anyone have experience with this? > > Thanks! > > Mark > > From crisscott at netzero.com Thu Nov 20 09:57:08 2003 From: crisscott at netzero.com (Scott Mattocks) Date: Thu, 20 Nov 2003 09:57:08 -0500 Subject: [nycphp-talk] Apache 2.0 and PHP Message-ID: <3FBCD644.4050403@netzero.com> Hello, We will be switching over to a new server that is going to be running Apache 2.0.46. Our current system runs Apache 1.3.something with PHP 4.3.2. When Apache 2.0 first came out I heard a lot of people saying not to run it if you are using PHP but I can't remember why. Are there still issues mixing the two? Should we reconsider our Apache distribution and what advice do you guys have to make the transition easier? Thanks, Scott Mattocks From jlacey at att.net Thu Nov 20 10:00:23 2003 From: jlacey at att.net (John Lacey) Date: Thu, 20 Nov 2003 08:00:23 -0700 Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <3FBCD644.4050403@netzero.com> References: <3FBCD644.4050403@netzero.com> Message-ID: <3FBCD707.50505@att.net> Scott Mattocks wrote: > Hello, > We will be switching over to a new server that is going to be running > Apache 2.0.46. Our current system runs Apache 1.3.something with PHP > 4.3.2. When Apache 2.0 first came out I heard a lot of people saying > not to run it if you are using PHP but I can't remember why. Are there > still issues mixing the two? Should we reconsider our Apache > distribution and what advice do you guys have to make the transition > easier? my understanding is to continue to use 1.3.x since there are 3rd party modules and libraries out there that are not thread-safe From hans at nyphp.org Thu Nov 20 10:14:37 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 20 Nov 2003 10:14:37 -0500 Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <3FBCD644.4050403@netzero.com> References: <3FBCD644.4050403@netzero.com> Message-ID: <3FBCDA5D.7070006@nyphp.org> Scott Mattocks wrote: > Hello, > We will be switching over to a new server that is going to be running > Apache 2.0.46. Our current system runs Apache 1.3.something with PHP > 4.3.2. When Apache 2.0 first came out I heard a lot of people saying Is there something specific about Apache 2 that you need? If not, stick with Apache 1. > not to run it if you are using PHP but I can't remember why. Are there > still issues mixing the two? Should we reconsider our Apache > distribution and what advice do you guys have to make the transition > easier? Very little, if any, progress has been made on this front. It's not PHP/Apache 2.0/ per se, but rather the libs that PHP uses. For instance, let's say you compile PHP with GD support - is GD thread safe? Then you compile GD with libjpeg - is libjpeg thread safe? The number of combinations of libs that PHP can be used with is huge, and thus ensuring each is thread safe is very hard. That said, the PHPZend/Apache 2.0/ interaction, at the SAPI and engine levels, could be improved, but there is little motivation because of the library issues. It's a chicken-before-the-egg problem. You could use Apache 2 with the prefork MPM. However, that's basically the same as Apache 1, but using a not-so-well-tested SAPI - so why switch? :) H From hans at nyphp.org Thu Nov 20 10:15:12 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 20 Nov 2003 10:15:12 -0500 Subject: [nycphp-talk] slashdot first response In-Reply-To: <3FBBFFD2.9070001@att.net> References: <3FBBFFD2.9070001@att.net> Message-ID: <3FBCDA80.9090202@nyphp.org> John Lacey wrote: > > thought y'all would enjoy this slashdot post featuring PHP in the first > post > > http://slashdot.org/article.pl?sid=03/11/19/1855252 That's interesting; especially since slashdotters aren't know for their love of PHP :) H From hans at nyphp.org Thu Nov 20 10:16:31 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 20 Nov 2003 10:16:31 -0500 Subject: [nycphp-talk] PHP and MySQL "Action Items" modules... In-Reply-To: <728813C3358BF04CB3A3DA2341D44A7176BB19@e2k11.na.baesystems.com> References: <728813C3358BF04CB3A3DA2341D44A7176BB19@e2k11.na.baesystems.com> Message-ID: <3FBCDACF.2030607@nyphp.org> Fee, Patrick J (US SSA) wrote: > Afternoon all. > > Can anyone suggest a GNU license solution for an action items list. > It could be a PostNule or PHPNuke module ... but I need to build a > portal site and the one requirement is that it handle Action Items: > Listed them, who is responsible, and the current status (Open, closed, > re-opened, etc.). > > Can anyone help me find a basic solution that is open source? I want to > use PostNuke or PHPNuke .... Don't know the nukes myself, but there are some project management types of applications - dotProject comes to mind, IIRC. H From alexander_chan at yahoo.com Thu Nov 20 11:52:38 2003 From: alexander_chan at yahoo.com (Alexander Chan) Date: Thu, 20 Nov 2003 08:52:38 -0800 (PST) Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <3FBCDA5D.7070006@nyphp.org> Message-ID: <20031120165238.63347.qmail@web11603.mail.yahoo.com> hi everybody, is there a project/list that is going through the various modules and checking if the modules are threadsafe for apache 2? From jlacey at att.net Thu Nov 20 12:02:12 2003 From: jlacey at att.net (John Lacey) Date: Thu, 20 Nov 2003 10:02:12 -0700 Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <3FBCDA5D.7070006@nyphp.org> References: <3FBCD644.4050403@netzero.com> <3FBCDA5D.7070006@nyphp.org> Message-ID: <3FBCF394.8000303@att.net> Hans Zaunere wrote: > > > Scott Mattocks wrote: > >> not to run it if you are using PHP but I can't remember why. Are >> there still issues mixing the two? Should we reconsider our Apache >> distribution and what advice do you guys have to make the transition >> easier? > > > Very little, if any, progress has been made on this front. It's not > PHP/Apache 2.0/ per se, but rather the libs that PHP uses. For > instance, let's say you compile PHP with GD support - is GD thread > safe? Then you compile GD with libjpeg - is libjpeg thread safe? The > number of combinations of libs that PHP can be used with is huge, and > thus ensuring each is thread safe is very hard. That said, the > PHPZend/Apache 2.0/ interaction, at the SAPI and engine levels, could be > improved, but there is little motivation because of the library issues. > It's a chicken-before-the-egg problem. > > You could use Apache 2 with the prefork MPM. However, that's basically > the same as Apache 1, but using a not-so-well-tested SAPI - so why > switch? :) > > Seems that some might use the thread-safety issue to knock PHP with FUD. Perhaps we need to nip that one in the bud by saying a few [mininally techy] words about the effectiveness of running in Apache 2 prefork mode in the AMP marketing doc? I'll at least put in some info and then others can improve. Anyone have any stories on this? John From spot at deviantart.com Thu Nov 20 14:56:24 2003 From: spot at deviantart.com (Spot) Date: Thu, 20 Nov 2003 13:56:24 -0600 Subject: [nycphp-talk] Hello / Geo coords Message-ID: <00c001c3afa0$60c5f4c0$6501a8c0@spot> Hey everyone, Just thought I would introduce myself as new member to the list and pose a question at the same time. My name is Spot(yes, legally). I am with deviantART.com. We are the largest art community in the world with a little under 500,000 artists, almost 3 million pieces of art and close to 80 million hits a month. We move about 55mbit/s average. Running on 37 boxes (last I checked) and two 9 terabyte fibre enclosures. All on Apache/PHP/Mysql. Except for Zues talking to the fibre enclosures for raw data (images). All of our code is from the ground up. No external libraries. Currently we are employing somewhat of a locational system where we allow artists to provide their Geo coords (after getting them from Maporama.com) and then, currently using GeoURL.org, we pull in RSS feeds and allow them to see lists of artists close to them. We are interested in bringing as much of this "in-house" as possible. Especially the GeoURL functionality. Does anyone have any information on methods for creating "crow flies" distances between artists based on geo coords? I would be interested in using a third party library if there is one. Thanks! Spot Director of Prints deviantART Inc. www.deviantart.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Thu Nov 20 15:33:34 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 20 Nov 2003 15:33:34 -0500 Subject: [nycphp-talk] Hello / Geo coords In-Reply-To: <00c001c3afa0$60c5f4c0$6501a8c0@spot> References: <00c001c3afa0$60c5f4c0$6501a8c0@spot> Message-ID: <3FBD251E.8030403@nyphp.org> Spot wrote: > Hey everyone, > > Just thought I would introduce myself as new member to the list and pose > a question at the same time. > > My name is Spot(yes, legally). I am with deviantART.com. We are the > largest art community in the world with a little under 500,000 artists, > almost 3 million pieces of art and close to 80 million hits a month. We > move about 55mbit/s average. Running on 37 boxes (last I checked) and > two 9 terabyte fibre enclosures. All on Apache/PHP/Mysql. Except for > Zues talking to the fibre enclosures for raw data (images). All of our > code is from the ground up. No external libraries. That's quite a setup. While some other major PHP sites might get more hits, I'd bet deviantART is heavier (because your primary dealings are with images). Are you guys hosted out of LA? > Currently we are employing somewhat of a locational system where we > allow artists to provide their Geo coords (after getting them from > Maporama.com) and then, currently using GeoURL.org, we pull in RSS feeds > and allow them to see lists of artists close to them. > > We are interested in bringing as much of this "in-house" as possible. > Especially the GeoURL functionality. Does anyone have any information on > methods for creating "crow flies" distances between artists based on geo > coords? I would be interested in using a third party library if there is > one. Dealing with lat/long is fairly straightforward... just a series of mathematical equations and you can generate distances. I used to deal with these equations alot back in the GPS days, but of course they escape me now. Maybe this is handy: http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=php+lat%2Flong noteably: http://mx.coldstorageonline.com/highlight.php?file=geo_data.php&type=php http://jan.ucc.nau.edu/~cvm/latlongdist.html and I think the formula actually is at the top of: http://jan.ucc.nau.edu/~cvm/latlon_formula.html Newer versions of MySQL also support GIS types of operations, and postgresql might already. Also, there are loads of zipcode calculation libs out there, which work on basically the same principal... actually, just using zipcodes might be easier :) H From tgales at tgaconnect.com Thu Nov 20 15:36:28 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 20 Nov 2003 15:36:28 -0500 Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <3FBCF394.8000303@att.net> Message-ID: <000d01c3afa5$f9ce7e30$bf8d3818@oberon1> John Lacey wrote: > Seems that some might use the thread-safety issue to knock > PHP with FUD. Who's the 'some' -- java fanatics? You might find this interesting: "Despite a strong commitment among enterprises that are developing applications around Java 2 Platform, Enterprise Edition, those organizations are only averaging about 88 percent availability for existing Java-based production applications..." "With an average availability of 88 percent, that is "the equivalent of having an application down one day a week..." "When it comes to meeting performance expectations, respondents also reported that on average they achieved their target performance only 80 percent of the time. Some 65 percent of the respondents reported achieving their target performance 90 percent of the time..." This comes from an article "Survey Questions Java App Reliability" By Paula Musich November 18, 2003 at http://www.eweek.com/article2/0,4149,1388643,00.asp?kc=EWNWS111903DTX1K000 0599. The survey covered 360 enterprises representing 16 industries, 43 countries, and equally divided between large and small organizations. T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From hans at nyphp.org Thu Nov 20 15:37:43 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 20 Nov 2003 15:37:43 -0500 Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <3FBCF394.8000303@att.net> References: <3FBCD644.4050403@netzero.com> <3FBCDA5D.7070006@nyphp.org> <3FBCF394.8000303@att.net> Message-ID: <3FBD2617.9020808@nyphp.org> John Lacey wrote: > > > Hans Zaunere wrote: > >> >> >> Scott Mattocks wrote: >> >> not to run it if you are using PHP but I can't remember why. Are >> >>> there still issues mixing the two? Should we reconsider our Apache >>> distribution and what advice do you guys have to make the transition >>> easier? >> >> >> >> Very little, if any, progress has been made on this front. It's not >> PHP/Apache 2.0/ per se, but rather the libs that PHP uses. For >> instance, let's say you compile PHP with GD support - is GD thread >> safe? Then you compile GD with libjpeg - is libjpeg thread safe? The >> number of combinations of libs that PHP can be used with is huge, and >> thus ensuring each is thread safe is very hard. That said, the >> PHPZend/Apache 2.0/ interaction, at the SAPI and engine levels, could >> be improved, but there is little motivation because of the library >> issues. It's a chicken-before-the-egg problem. >> >> You could use Apache 2 with the prefork MPM. However, that's >> basically the same as Apache 1, but using a not-so-well-tested SAPI - >> so why switch? :) >> >> > Seems that some might use the thread-safety issue to knock PHP with FUD. > Perhaps we need to nip that one in the bud by saying a few [mininally > techy] words about the effectiveness of running in Apache 2 prefork mode > in the AMP marketing doc? I'll at least put in some info and then > others can improve. Anyone have any stories on this? I used to run a production system with Apache 2, PHP 4 and MySQL/Oracle under RH 7.3 and used the threaded MPM. It ran, for the most part, 100%, until it was decided we needed it to do other fancy things. Initially, only the MySQL and OCI8 extensions were compiled in, which is why it had worked. When we began to add other stuff (somehow mhash sticks out?) a lot of strange things happened. So, we went to Apache 1 and haven't looked back since :) Touching on this subject for the marketing document is a great idea, but something we'd have to treat with care. Anything surrouding the topic of thread safety gets extremly technical, extremly quickly. Suffice it to say, possibly, that "bigger version numbers aren't always better." I think the CTO types, in dealing with Windows NT, 2000 and 2003, could understand that :) H From hans at nyphp.org Thu Nov 20 15:38:49 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 20 Nov 2003 15:38:49 -0500 Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <20031120165238.63347.qmail@web11603.mail.yahoo.com> References: <20031120165238.63347.qmail@web11603.mail.yahoo.com> Message-ID: <3FBD2659.1060807@nyphp.org> Alexander Chan wrote: > hi everybody, > > is there a project/list that is going through the > various modules and checking if the modules are > threadsafe for apache 2? Rasmus had began a list for this, but the URL escapes me at the moment. It might be on his site (lerdorf.ca) but a bit of googling I'm sure would locate it (I did look, but no luck :( H From jlacey at att.net Thu Nov 20 16:03:00 2003 From: jlacey at att.net (John Lacey) Date: Thu, 20 Nov 2003 14:03:00 -0700 Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <000d01c3afa5$f9ce7e30$bf8d3818@oberon1> References: <000d01c3afa5$f9ce7e30$bf8d3818@oberon1> Message-ID: <3FBD2C04.4090305@att.net> Tim Gales wrote: > You might find this interesting: > > "Despite a strong commitment among enterprises that are developing > applications around Java 2 Platform, Enterprise Edition, those > organizations are only averaging about 88 percent availability for > existing Java-based production applications..." > > "With an average availability of 88 percent, that is "the equivalent of > having an application down one day a week..." > > "When it comes to meeting performance expectations, respondents also > reported that on average they achieved their target performance only 80 > percent of the time. Some 65 percent of the respondents reported achieving > their target performance 90 percent of the time..." > > This comes from an article "Survey Questions Java App Reliability" By > Paula Musich November 18, 2003 at > http://www.eweek.com/article2/0,4149,1388643,00.asp?kc=EWNWS111903DTX1K000 > 0599. The survey covered > 360 enterprises representing 16 industries, 43 countries, and equally > divided between large and small organizations. "statistics" are probably reason enough to start on a CxO-level document 47% of statistics are made up on the spot :) J From tgales at tgaconnect.com Thu Nov 20 16:15:21 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Thu, 20 Nov 2003 16:15:21 -0500 Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <3FBD2C04.4090305@att.net> Message-ID: <001101c3afab$842c73c0$bf8d3818@oberon1> > > > 47% of statistics are made up on the spot > > > > :) > > J > Mark Twain said: "There's lies, there's damn lies and then > there's statistics" > > But the article was in "Eweek" -- not that their so-called > (brand of) journalism is very often much more than minimal > rewrites of press releases from vendors. But they used to > trumpet how java was going to obsolete all other programming > languages, find a cure for cancer, and establish a lasting > peace in the middle east. > T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From jlacey at att.net Thu Nov 20 16:23:34 2003 From: jlacey at att.net (John Lacey) Date: Thu, 20 Nov 2003 14:23:34 -0700 Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <3FBD2617.9020808@nyphp.org> References: <3FBCD644.4050403@netzero.com> <3FBCDA5D.7070006@nyphp.org> <3FBCF394.8000303@att.net> <3FBD2617.9020808@nyphp.org> Message-ID: <3FBD30D6.6080703@att.net> Hans, I'm beginning to have trouble reading the nested "wrotes" can we start using braces? :) yeah, I agree with caution on keeping it as non-techy as we can, after all, there's enough tech stuff available out there to confuse them further Hans Zaunere wrote: > > > John Lacey wrote: > >> >> >> Hans Zaunere wrote: >> >>> >>> >>> Scott Mattocks wrote: >>> >> not to run it if you are using PHP but I can't remember why. Are >>> >>>> there still issues mixing the two? Should we reconsider our Apache >>>> distribution and what advice do you guys have to make the transition >>>> easier? >>> >>> >>> >>> >>> Very little, if any, progress has been made on this front. It's not >>> PHP/Apache 2.0/ per se, but rather the libs that PHP uses. For >>> instance, let's say you compile PHP with GD support - is GD thread >>> safe? Then you compile GD with libjpeg - is libjpeg thread safe? >>> The number of combinations of libs that PHP can be used with is huge, >>> and thus ensuring each is thread safe is very hard. That said, the >>> PHPZend/Apache 2.0/ interaction, at the SAPI and engine levels, could >>> be improved, but there is little motivation because of the library >>> issues. It's a chicken-before-the-egg problem. >>> >>> You could use Apache 2 with the prefork MPM. However, that's >>> basically the same as Apache 1, but using a not-so-well-tested SAPI - >>> so why switch? :) >>> >>> >> Seems that some might use the thread-safety issue to knock PHP with >> FUD. Perhaps we need to nip that one in the bud by saying a few >> [mininally techy] words about the effectiveness of running in Apache 2 >> prefork mode in the AMP marketing doc? I'll at least put in some info >> and then others can improve. Anyone have any stories on this? > > > I used to run a production system with Apache 2, PHP 4 and MySQL/Oracle > under RH 7.3 and used the threaded MPM. It ran, for the most part, > 100%, until it was decided we needed it to do other fancy things. > Initially, only the MySQL and OCI8 extensions were compiled in, which is > why it had worked. When we began to add other stuff (somehow mhash > sticks out?) a lot of strange things happened. So, we went to Apache 1 > and haven't looked back since :) > > Touching on this subject for the marketing document is a great idea, but > something we'd have to treat with care. Anything surrouding the topic > of thread safety gets extremly technical, extremly quickly. Suffice it > to say, possibly, that "bigger version numbers aren't always better." I > think the CTO types, in dealing with Windows NT, 2000 and 2003, could > understand that :) > > H > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From hans at nyphp.org Thu Nov 20 16:53:25 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 20 Nov 2003 16:53:25 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: References: Message-ID: <3FBD37D5.3030405@nyphp.org> David Mintz wrote: > On Wed, 12 Nov 2003, Michael Southwell wrote: > > >>What settings do you consider essential? How should they be set, and why? > > > This is pretty obvious, but since we're talking Phundamentals, it bears > pointing out that the php.ini settings that cannot be overridden at > runtime with ini_set() or via .htaccess probably merit special > consideration, since you can't change them without editing php.ini and > restarting apache. To backtrack a bit... A lot of the replies to this last PHundamentals thread was in regards to the act of setting the ini settings. Going back over my mailbox and seeing the wording we chose, "How should they be set..." I can see the confusion. That was next month's topic :) This month was to be a seeding of what ini settings are important to keep in mind, and what values they should have. So, here's my 2 cents, albeit a dollar short and a day late: In simple terms, compare the recommended php.ini and the standard php.ini that come with every PHP distribution. http://cvs.php.net/cvs.php/php-src/php.ini-dist?login=2 http://cvs.php.net/cvs.php/php-src/php.ini-recommended?login=2 Those that have a stricter setting in the recommended version should be kept in mind :) When I set up a new environment, production or development, I generally just drop php.ini-recommended into place (named as php.ini of course) and things are happy. The directives noted at the top of the recommended php.ini are most crucial, with these additional notes: register_globals: NO! OFF!! display_errors: On if it's a very big site and you're in development mode. log_errors: Always on, production or dev output_buffering: This is one of the few directives I will sometimes tweak, even when using the php.ini-recommended. While buffering can be great, it can sometimes cause a lot of confusing and subtle bugs. I'll typically turn this off, especially during development. magic_quote_gpc: This is up there with register_globals, IMO. Having stuff do a lot of automatic stuff for you generally isn't good. Keep this off, always. error_reporting: This is a big one; E_ALL is good. With log_errors and display_errors on, in development, you can watch your site work perfectly, without even a warning. Then when it goes it to production, flip display_errors off and you're golden. Coding to E_ALL error standards can also help trace bugs, or even catch intrusion. If a lot of warning about undefined variables come up, either there's a bug in the call to that script, or someone is where they aren't supposed to be. There are some others, not even considering the safe_mode, session, and more specialized ini settings. max_execution_time: I personally think 30 is too high on trafficed sites. If you know you're not doing any heavy calculations, bring this down and save a Denial of Service attack. max_input_time: Same here. DoS friendly. include_path: can often be a critical setting, of course Viva php.ini-recommended! H From southwell at dneba.com Thu Nov 20 16:51:48 2003 From: southwell at dneba.com (Michael Southwell) Date: Thu, 20 Nov 2003 16:51:48 -0500 Subject: [nycphp-talk] need help with debugging mail() Message-ID: <5.1.0.14.2.20031120164136.019400d8@mail.optonline.net> I am moving a site from one server to another one (the new one is in nyc and has a 2-letter extension ;-). The contact form on the old site is working perfectly, but identical code on the new one isn't. Phpinfo tells me that sendmail is there and presumably working. Docs say that mail() returns TRUE or FALSE so I tried this code: ---------------- if (mail($to,$subject,$message,$from)==FALSE) do something else do something else -------------- which always does something else so mail seems to be returning TRUE but the message never arrives. How do I do a better job of debugging what's happening? 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 hans at nyphp.org Thu Nov 20 16:58:48 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 20 Nov 2003 16:58:48 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <3FB2A3D6.2010100@att.net> References: <5.1.0.14.2.20031112152855.00b4bca0@mail.optonline.net> <3FB2A3D6.2010100@att.net> Message-ID: <3FBD3918.6000601@nyphp.org> John Lacey wrote: > It is best to code with the short_open tags set to "Off", and use in all cases, but again, if using someone else's code, they may have to > remain on. This option will be defaulted to "Off" in a future release, > I believe. This one slipped past my previous post. I agree that always using long opening tags are the way to go, but turning this to off prevents sexiness like this:
  • One of the conundrums of php I guess :) H From spot at deviantart.com Thu Nov 20 17:15:55 2003 From: spot at deviantart.com (Spot) Date: Thu, 20 Nov 2003 16:15:55 -0600 Subject: [nycphp-talk] need help with debugging mail() References: <5.1.0.14.2.20031120164136.019400d8@mail.optonline.net> Message-ID: <015c01c3afb3$de961390$6501a8c0@spot> Firewall blocking port 25? ----- Original Message ----- From: "Michael Southwell" To: Sent: Thursday, November 20, 2003 3:51 PM Subject: [nycphp-talk] need help with debugging mail() > I am moving a site from one server to another one (the new one is in nyc > and has a 2-letter extension ;-). The contact form on the old site is > working perfectly, but identical code on the new one isn't. Phpinfo tells > me that sendmail is there and presumably working. Docs say that mail() > returns TRUE or FALSE so I tried this code: > ---------------- > if (mail($to,$subject,$message,$from)==FALSE) do something > else do something else > -------------- > which always does something else so mail seems to be returning TRUE but the > message never arrives. How do I do a better job of debugging what's happening? > > > 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 bpang at bpang.com Thu Nov 20 17:28:03 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 20 Nov 2003 17:28:03 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings Message-ID: what reason other than portability ease (moving from server1 with short_open_tags=on => server2 with short_open_tags=off) is there for having short_open_tags=on?? I mean, why sacrifice the "sexiness" of ? We're programmers, we need all the help we can get! ;) > > > John Lacey wrote: > > It is best to code with the short_open tags set to "Off", and use > in all cases, but again, if using someone else's code, they may have to > > remain on. This option will be defaulted to "Off" in a future release, > > I believe. > > This one slipped past my previous post. I agree that always using long opening tags are the way to go, but turning this to off prevents sexiness like this: > >
  • > > One of the conundrums of php I guess :) > > H > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From jlacey at att.net Thu Nov 20 18:01:26 2003 From: jlacey at att.net (John Lacey) Date: Thu, 20 Nov 2003 16:01:26 -0700 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: <3FBD3918.6000601@nyphp.org> References: <5.1.0.14.2.20031112152855.00b4bca0@mail.optonline.net> <3FB2A3D6.2010100@att.net> <3FBD3918.6000601@nyphp.org> Message-ID: <3FBD47C6.2040303@att.net> Hans Zaunere wrote: > > > John Lacey wrote: > >> It is best to code with the short_open tags set to "Off", and use >> > have to remain on. This option will be defaulted to "Off" in a future >> release, I believe. > > > This one slipped past my previous post. I agree that always using long > opening tags are the way to go, but turning this to off prevents > sexiness like this: > >
  • You might have also missed Chris Shiflett's response re: the defaulted off statement. (I had to check the correct spelling of his last name on his book I bought with my hard-earned money I had set aside for my cat's birthday present :) anyhoo, Chris [rightly] took me to task about it and said that they vetoed that idea in more rarified circles. This list is good practice for forcing me to think about making statements like that. J From jonbaer at jonbaer.net Thu Nov 20 18:15:47 2003 From: jonbaer at jonbaer.net (jon baer) Date: Thu, 20 Nov 2003 18:15:47 -0500 Subject: [nycphp-talk] need help with debugging mail() References: <5.1.0.14.2.20031120164136.019400d8@mail.optonline.net> Message-ID: <00b001c3afbc$3b433ac0$6600a8c0@thinkpad> normally when working with mail on a local basis or @ least up to the gateway its very convienent to do protocol analysis yourself using ethereal or ngrep. Where does phpinfo() tell you your sendmail path + setting is on both boxes? i accidentally copied a php.ini over to a box once w/ bad settings. - jon ----- Original Message ----- From: "Michael Southwell" To: Sent: Thursday, November 20, 2003 4:51 PM Subject: [nycphp-talk] need help with debugging mail() > I am moving a site from one server to another one (the new one is in nyc > and has a 2-letter extension ;-). The contact form on the old site is > working perfectly, but identical code on the new one isn't. Phpinfo tells > me that sendmail is there and presumably working. Docs say that mail() > returns TRUE or FALSE so I tried this code: > ---------------- > if (mail($to,$subject,$message,$from)==FALSE) do something > else do something else > -------------- > which always does something else so mail seems to be returning TRUE but the > message never arrives. How do I do a better job of debugging what's happening? > > > 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 hans at nyphp.org Thu Nov 20 19:08:40 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 20 Nov 2003 19:08:40 -0500 Subject: [nycphp-talk] need help with debugging mail() In-Reply-To: <5.1.0.14.2.20031120164136.019400d8@mail.optonline.net> References: <5.1.0.14.2.20031120164136.019400d8@mail.optonline.net> Message-ID: <3FBD5788.1040503@nyphp.org> Michael Southwell wrote: > I am moving a site from one server to another one (the new one is in nyc > and has a 2-letter extension ;-). The contact form on the old site is > working perfectly, but identical code on the new one isn't. Phpinfo > tells me that sendmail is there and presumably working. Docs say that > mail() returns TRUE or FALSE so I tried this code: > ---------------- > if (mail($to,$subject,$message,$from)==FALSE) do something > else do something else > -------------- > which always does something else so mail seems to be returning TRUE but > the message never arrives. How do I do a better job of debugging what's > happening? Do you have shell access? If so, ssh in and do something like: mail your at email.com fill in the subject and enter a period on it's own line to finish up the body of the message. If you get the email, then the mail subsystem is probably fairly sane. If not, it's not sane, and you need to tinker with sysadmin stuff to get it working. You can also view the system mail logs. Depending on the platform, it's probably /var/log/maillog Depending on the success of the step above, do: tail -f /var/log/maillog while trying the webpage or using the mail command from a terminal. If the mail command works, but the webpage doesn't, ensure that your permissions are set correctly. The settings php.ini has for mail (noteably the sendmail command) needs to be readable and executeable by the user apache is running as, or as the user if it's cgi. H From nyphp at enobrev.com Thu Nov 20 19:54:20 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Thu, 20 Nov 2003 19:54:20 -0500 Subject: [nycphp-talk] Cross domain Logins In-Reply-To: Message-ID: WOW, 3 incredible suggestions!!! Brian, Mark and Hans, Thank you all so much for your methods. I'm going to get my morning thing moving (yes it is 744 pm) and read over these again over some coffee to figure out where to go with this. I've gotten the reply from my client and it turns out these will be on the same server and if I wish, we can use the same database for the two sites. This is great news, and I would have probably come up with something fairly subpar for this, but I'm really going to look into what you guys have given me for a far superior solution. I definitely figured grabbing the user agent and remote address info would prove helpful. Even if it changes due to aol's proxies, etc, they will just have to enter the password, and continue - but the majority should be verified appropriately. The callahead (kinda like a reservation - good for function / variable names :) is what I has in mind but I wasn't quite sure how to implement it. And the image thing.. Magnificent! Now doesn't this cause security errors on IE without some kind of specialized privacy policy that explains the off-domain image? At least for ie? Getting the image on both sites is not an issue by any means - Just wondering if it's absolutely a tried and true solution. Definitely an incredible idea. OK, dunkin donuts, here I come. Thank you all for your input!!! Mark -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Brian Pang Sent: Thursday, November 20, 2003 9:47 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Cross domain Logins The way to do this is to use what is called a "pixel beacon" or "web beacon." http://www.webopedia.com/TERM/W/Web_beacon.html (Of course, PHP won't let you make a GIF, but it's a reasonable description). Use PHP to create an image which is called from the "other domain." When calling that image, pass along login information in the query string (in some decryptable format). As part of the image creation, you can set a cookie or session. Basically, what you'll have is... Site1.com makes a call to an image on Site2.com as http://www.site2.com/beacon.php?action=login&username=foo (ok, not encrypted or anything) beacon.php generates an image and sets a cookie: (Sample code, YMMV) SetCookie("username",$_GET['username']); Header ("Content-type: image/jpeg"); $im = ImageCreate (1, 1) or die ("Cannot Initialize new GD image stream"); $background_color = ImageColorAllocate ($im, 255, 255, 255); $text_color = ImageColorAllocate ($im, 233, 14, 91); ImageString ($im, 1, 5, 5, $_GET['username'], $text_color); ImageJPEG ($im); ImageDestroy($im); There, by visiting one domain, you've now set a cookie on the other domain. The only catch is that it requires a little bit of cooperation between the webmasters (if they won't put your image/beacon on their page, all is lost). This technique is regularly used in banner ads and Yahoo! even includes it in their privacy statements. http://privacy.yahoo.com/privacy/us/pixels/details.html I haven't done it yet, but I've been tempted to put ALL of my session and cookie functions into images, even when not going cross-domain. > > Anyone here ever create a cross-domain login system? I'm still waiting for > details to see if the domains will have access to the same db or same > server. I figure one way to do it would be to somehow transfer session info > form one domain to the other, but it seems like there's plenty of > security issues in doing so. I thought maybe passing an md5 encrypted > string with the username, password form one site to the next might > work as well, but I'm > still not too sure of the security issues, especially considering the issues > pointed out a couple weeks back regarding auto-logins. > > Anyone have experience with this? > > Thanks! > > Mark > > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Thu Nov 20 21:27:40 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 20 Nov 2003 18:27:40 -0800 (PST) Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <3FBCD644.4050403@netzero.com> Message-ID: <20031121022740.27348.qmail@web14309.mail.yahoo.com> --- Scott Mattocks wrote: > We will be switching over to a new server that is going to be running > Apache 2.0.46. Our current system runs Apache 1.3.something with PHP > 4.3.2. When Apache 2.0 first came out I heard a lot of people saying > not to run it if you are using PHP but I can't remember why. Are there > still issues mixing the two? I had dinner with Rasmus last night and brought this specific topic up. I can't say that I've ever been entirely clear on it all, especially since mod_perl 2.0 has plenty of third-party modules and such that aren't thread safe. But, since he has always been the person warning against Apache 2 the most, I figured he was the best person to talk to. It was also convenient, because 2 of the 3 core mod_perl developers were there as well, so I sparked a good conversation and basically sat back and listened. :-) Apache 2 is fine in pre-fork mode is what I got out of it. Rasmus just isn't a big fan of using software until it has been around for a very long time, but my opinion is that Apache 2 is working well for a lot of very important sites, including Ticketmaster (those guys had some crazy stories about server load when a big show goes on sale). But, he did admit that using the pre-fork MPM eliminated the threading issues as well as pretty much all of his complaints. Nat Torkington came to the same conclusion, as mentioned in his journal (http://use.perl.org/~gnat/journal/15902). So, I'm going to start telling people that Apache 2 is fine as long as you use the pre-fork MPM or you're sure that all third-party modules you use are thread safe. Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp From danielc at analysisandsolutions.com Thu Nov 20 22:39:59 2003 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Thu, 20 Nov 2003 22:39:59 -0500 Subject: [nycphp-talk] Hello / Geo coords In-Reply-To: <3FBD251E.8030403@nyphp.org> References: <00c001c3afa0$60c5f4c0$6501a8c0@spot> <3FBD251E.8030403@nyphp.org> Message-ID: <20031121033959.GA16029@panix.com> Hey Folks: On Thu, Nov 20, 2003 at 03:33:34PM -0500, Hans Zaunere wrote: > > Dealing with lat/long is fairly straightforward... just a series of > mathematical equations and you can generate distances. I think his main question was where to get the geocoded data. > Also, there are loads of zipcode calculation > libs out there, which work on basically the same principal... actually, > just using zipcodes might be easier :) Ding! That reminds me, there are some vendors/libraries out there where you can obtain tables that map zip codes centroids to lat/long data. I even have a table of zipcode, state, postoffice, latitude, longitude. I don't feel like looking at my notes as to the source, but if you want it, you can have it. 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 bpang at bpang.com Thu Nov 20 22:48:38 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 20 Nov 2003 22:48:38 -0500 Subject: [nycphp-talk] Cross domain Logins Message-ID: > I've gotten the reply from my client and it turns out these will be on the > same server and if I wish, we can use the same database for the two sites. I was fortunate to be in a similar situation when I had to use this; same server leveraging the same database. > And the image thing.. Magnificent! Now doesn't this cause security errors > on IE without some kind of specialized privacy policy that explains the > off-domain image? At least for ie? Not that I'm aware of. Again, consider banner ads. Do you get warnings from IE everytime a banner tries to set a cookie? (ok, if you have it set to prompt you when cookies are being set, with the option to refuse them, but that is different). >Getting the image on both sites is not > an issue by any means - Just wondering if it's absolutely a tried and true > solution. Definitely an incredible idea. this is why I included the link to yahoo's privacy policy. I'd say it's pretty tried and true just based on that. From nyphp at websapp.com Thu Nov 20 22:54:29 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Thu, 20 Nov 2003 22:54:29 -0500 Subject: [nycphp-talk] Hello / Geo coords In-Reply-To: <00c001c3afa0$60c5f4c0$6501a8c0@spot> Message-ID: Spot, Here's some code that I have from a long time ago that calculates the distance between airports based on longitude and latitude. You can do the same with Zip codes once you convert a zip code to long/lat. Best, Daniel Kushner $db = new My_DB("SELECT * FROM airports AS a WHERE id IN ('$origin', '$destination')"); $db->next_record(); $a = deg2rad($db->f('latitude')); $b = deg2rad($db->f('longitude')); $origin_id = $db->f('id'); $origin_name = $db->f('name'); $db->next_record(); $c = deg2rad($db->f('latitude')); $d = deg2rad($db->f('longitude')); $destination_id = $db->f('id'); $destination_name = $db->f('name'); $r=3963.1; //radius of the earth in miles //calculate the distance between the two points $distance = acos( (cos($a) * cos($b) * cos($c) * cos($d)) + (cos($a) * sin($b) * cos($c) * sin($d)) + (sin($a) * sin($c)) ) * $r; if($origin == $destination) { echo "Distance = 0
    "; } else { echo "Origin: ($origin_id) $origin_name
    "; echo "Destination: ($destination_id) $destination_name
    "; echo "Distance in miles: ", round($distance,4), "
    "; echo "Distance in kilometers: ", round(($distance*1.609),4), "
    "; } -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Spot Sent: Thursday, November 20, 2003 2:56 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] Hello / Geo coords Hey everyone, Just thought I would introduce myself as new member to the list and pose a question at the same time. My name is Spot(yes, legally). I am with deviantART.com. We are the largest art community in the world with a little under 500,000 artists, almost 3 million pieces of art and close to 80 million hits a month. We move about 55mbit/s average. Running on 37 boxes (last I checked) and two 9 terabyte fibre enclosures. All on Apache/PHP/Mysql. Except for Zues talking to the fibre enclosures for raw data (images). All of our code is from the ground up. No external libraries. Currently we are employing somewhat of a locational system where we allow artists to provide their Geo coords (after getting them from Maporama.com) and then, currently using GeoURL.org, we pull in RSS feeds and allow them to see lists of artists close to them. We are interested in bringing as much of this "in-house" as possible. Especially the GeoURL functionality. Does anyone have any information on methods for creating "crow flies" distances between artists based on geo coords? I would be interested in using a third party library if there is one. Thanks! Spot Director of Prints deviantART Inc. www.deviantart.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiegel1 at optonline.net Thu Nov 20 23:26:13 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Thu, 20 Nov 2003 23:26:13 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <3FBB72D6.40904@nyphp.org> References: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> <20031119030128.GA24605@panix.com> <3FBAE6AE.5000401@optonline.net> <3FBAE914.9060504@nyphp.org> <3FBB5C84.7060608@optonline.net> <3FBB72D6.40904@nyphp.org> Message-ID: <3FBD93E5.3020208@optonline.net> Just thought a brief follow-up may be of some interest. Well, as a result of my brilliant programming skills, the problem has been solved! What did I do? I did nothing! The problem, being intermittent, has decided - on its own - to go away. This happened despite the still high number of daily transactions. Go figure. Jeff Hans Zaunere wrote: > > > Jeff Siegel wrote: > >> Plenty of disk space and all permissions are set correctly. >> Let me also add that this seems to be an intermittent problem and not >> one that is tied to, say, a browser version issue. It can happen if >> someone is using a very old browser version or a new one but it is >> *not* easily reproducible in either case. >> >> One of the Googled solutions mentioned setting up a new tmp directory. >> However, my guess is that the directory would not accomplish anything >> (I would think) since all permissions are already set correctly on the >> server and there is a lot of disk space. >> >> Someone did write (again, this comes from my Googling) that this seems >> to happen "under load" though the writer was not particularly helpful >> in defining "under load." It should be noted, however, that the server >> has DEFINITELY experienced an increase in hits since the average >> number of transactions through the site has nearly doubled in the past >> two days from approximately 500 per day to a bit over 900 per day. >> So...that translates to 900 or so session files per day with the bulk >> of them happening between the hours of 6am and 10pm. Just seems like a >> lot of session files in a short period of time. > > > What's the general number of files in /tmp ? Are we talking thousands? > Might be time to increase the garbage collector frequency; or, upgrade > PHP as we had talked about :) > > H > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From spot at deviantart.com Thu Nov 20 23:57:48 2003 From: spot at deviantart.com (Spot) Date: Thu, 20 Nov 2003 22:57:48 -0600 Subject: [nycphp-talk] Hello / Geo coords References: Message-ID: <006a01c3afec$02b22d80$6501a8c0@spot> Ah, wonderful. Thank you Daniel. Unfortunately the zip code solution is not going to work for us (as hoped). About 45% of our traffic is non-US/Canada. This code will be very helpful. Thank you again. Spot ----- Original Message ----- From: Daniel Kushner To: NYPHP Talk Sent: Thursday, November 20, 2003 9:54 PM Subject: RE: [nycphp-talk] Hello / Geo coords Spot, Here's some code that I have from a long time ago that calculates the distance between airports based on longitude and latitude. You can do the same with Zip codes once you convert a zip code to long/lat. Best, Daniel Kushner $db = new My_DB("SELECT * FROM airports AS a WHERE id IN ('$origin', '$destination')"); $db->next_record(); $a = deg2rad($db->f('latitude')); $b = deg2rad($db->f('longitude')); $origin_id = $db->f('id'); $origin_name = $db->f('name'); $db->next_record(); $c = deg2rad($db->f('latitude')); $d = deg2rad($db->f('longitude')); $destination_id = $db->f('id'); $destination_name = $db->f('name'); $r=3963.1; //radius of the earth in miles //calculate the distance between the two points $distance = acos( (cos($a) * cos($b) * cos($c) * cos($d)) + (cos($a) * sin($b) * cos($c) * sin($d)) + (sin($a) * sin($c)) ) * $r; if($origin == $destination) { echo "Distance = 0
    "; } else { echo "Origin: ($origin_id) $origin_name
    "; echo "Destination: ($destination_id) $destination_name
    "; echo "Distance in miles: ", round($distance,4), "
    "; echo "Distance in kilometers: ", round(($distance*1.609),4), "
    "; } -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Spot Sent: Thursday, November 20, 2003 2:56 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] Hello / Geo coords Hey everyone, Just thought I would introduce myself as new member to the list and pose a question at the same time. My name is Spot(yes, legally). I am with deviantART.com. We are the largest art community in the world with a little under 500,000 artists, almost 3 million pieces of art and close to 80 million hits a month. We move about 55mbit/s average. Running on 37 boxes (last I checked) and two 9 terabyte fibre enclosures. All on Apache/PHP/Mysql. Except for Zues talking to the fibre enclosures for raw data (images). All of our code is from the ground up. No external libraries. Currently we are employing somewhat of a locational system where we allow artists to provide their Geo coords (after getting them from Maporama.com) and then, currently using GeoURL.org, we pull in RSS feeds and allow them to see lists of artists close to them. We are interested in bringing as much of this "in-house" as possible. Especially the GeoURL functionality. Does anyone have any information on methods for creating "crow flies" distances between artists based on geo coords? I would be interested in using a third party library if there is one. Thanks! Spot Director of Prints deviantART Inc. www.deviantart.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 danielc at analysisandsolutions.com Fri Nov 21 00:29:43 2003 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Fri, 21 Nov 2003 00:29:43 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <3FBD93E5.3020208@optonline.net> References: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> <20031119030128.GA24605@panix.com> <3FBAE6AE.5000401@optonline.net> <3FBAE914.9060504@nyphp.org> <3FBB5C84.7060608@optonline.net> <3FBB72D6.40904@nyphp.org> <3FBD93E5.3020208@optonline.net> Message-ID: <20031121052943.GA7111@panix.com> Hi Jeff: On Thu, Nov 20, 2003 at 11:26:13PM -0500, Jeff Siegel wrote: > been solved! What did I do? I did nothing! The problem, being > intermittent, has decided - on its own - to go away. Perhaps there's some sort of OS limit on the number of inodes and/or file handles that can be 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 danielc at analysisandsolutions.com Fri Nov 21 00:59:37 2003 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Fri, 21 Nov 2003 00:59:37 -0500 Subject: [nycphp-talk] need help with debugging mail() In-Reply-To: <5.1.0.14.2.20031120164136.019400d8@mail.optonline.net> References: <5.1.0.14.2.20031120164136.019400d8@mail.optonline.net> Message-ID: <20031121055936.GA8871@panix.com> Hi Michael: The sendmail path may be wrong. If you can log in to a shell, you can try some commands to find it. For example, one of the following: find /usr/sbin -name sendmail find /usr/bin -name sendmail find /usr -name sendmail locate sendmail Make sure the path matches what's in the php.ini file. 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 Fri Nov 21 02:29:35 2003 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Fri, 21 Nov 2003 02:29:35 -0500 Subject: [nycphp-talk] mysql cvs? Message-ID: <20031121072934.GA19773@panix.com> Hi Folks: Sorry to ask this here, but maybe someone knows. I'm looking to examine the current MySQL CVS source. I've searched high and low on the web and newsgroup archives but haven't found it anywhere. Not even in the MySQL documentation. Is it out there? Of course, the right place to ask is the MySQL list, but I'm already subscribed to several lists and don't want another just to answer a simple question. Thanks, --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 Fri Nov 21 02:37:00 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Fri, 21 Nov 2003 02:37:00 -0500 Subject: [nycphp-talk] mysql cvs? In-Reply-To: <20031121072934.GA19773@panix.com> Message-ID: <000d01c3b002$41650af0$6401a8c0@main> I don't think mySQL uses CVS anymore. From this page, http://www.mysql.com/portal/sites/programming/index.html , they are claiming to be using BitKeeper. "BitKeeper is a powerful, distributed source management system which has been used by the MySQL team to manage the MySQL development since July of 2000. Prior to that, MySQL source code was stored in CVS." Nasir > -----Original Message----- > From: Daniel Convissor [mailto:danielc at analysisandsolutions.com] > Sent: Friday, November 21, 2003 2:30 AM > To: NYPHP Talk > Subject: [nycphp-talk] mysql cvs? > > > Hi Folks: > > Sorry to ask this here, but maybe someone knows. I'm looking > to examine > the current MySQL CVS source. I've searched high and low on > the web and > newsgroup archives but haven't found it anywhere. Not even > in the MySQL > documentation. Is it out there? > > Of course, the right place to ask is the MySQL list, but I'm already > subscribed to several lists and don't want another just to > answer a simple > question. > > Thanks, > > --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 Fri Nov 21 06:53:24 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Fri, 21 Nov 2003 06:53:24 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <20031121052943.GA7111@panix.com> References: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> <20031119030128.GA24605@panix.com> <3FBAE6AE.5000401@optonline.net> <3FBAE914.9060504@nyphp.org> <3FBB5C84.7060608@optonline.net> <3FBB72D6.40904@nyphp.org> <3FBD93E5.3020208@optonline.net> <20031121052943.GA7111@panix.com> Message-ID: <3FBDFCB4.7010300@optonline.net> Dan, Now *that's* an interesting thought! The puzzling thing is the intermittent nature of the problem even though the number of transactions has been, for the past several days, nearly double its usual amount. It hasn't happened again since the first time I posted the problem. As soon as it surfaces again, I'll revisit the file handle issue. However, following your lead, I Googled the following (see below). The PDF doc goes into a fair amount of detail on many issues though I'm not qualified to comment on its accuracy. "Your exceeding the default 8192 (if this is Linux) file handle limit. This is a pretty low limit, raise with "sysctl -w fs.file-max=32767" as root. If your on a RH box put "fs.file-max = 32767" in /etc/sysctl.conf so it gets redone next time you boot. ftp://kalamazoolinux.org/pub/pdf/PerfTune2001.pdf " Jeff Daniel Convissor wrote: > Hi Jeff: > > On Thu, Nov 20, 2003 at 11:26:13PM -0500, Jeff Siegel wrote: > > >>been solved! What did I do? I did nothing! The problem, being >>intermittent, has decided - on its own - to go away. > > > Perhaps there's some sort of OS limit on the number of inodes and/or file > handles that can be used? > > --Dan > From hans at nyphp.org Fri Nov 21 08:39:29 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 21 Nov 2003 08:39:29 -0500 Subject: [nycphp-talk] mysql cvs? In-Reply-To: <20031121072934.GA19773@panix.com> References: <20031121072934.GA19773@panix.com> Message-ID: <3FBE1591.9060809@nyphp.org> Daniel Convissor wrote: > Hi Folks: > > Sorry to ask this here, but maybe someone knows. I'm looking to examine > the current MySQL CVS source. I've searched high and low on the web and > newsgroup archives but haven't found it anywhere. Not even in the MySQL > documentation. Is it out there? They use bitkeeper. http://www.mysql.com/doc/en/Installing_source_tree.html H From nyphp at enobrev.com Fri Nov 21 09:19:59 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Fri, 21 Nov 2003 09:19:59 -0500 Subject: [nycphp-talk] Oracle Access? Message-ID: Morning all... I've recently got a small job from a client who wants to run with oracle (they already have it). Unfortunately I can't have access to their server. And as much as I've always wanted to, I've not yet had the opportunity to learn oracle. I use adodb, so i figured i wouldn't run into too many issues learning the basics (as this is a very basic job - basic updates and selects only.). So does anyone know where i can get access to oracle somewhere. I couldn't seem to find a trial or developer download or anyhting that might suggest i could use / learn it without purchasing it. Thanks!! Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From tom at supertom.com Fri Nov 21 09:18:08 2003 From: tom at supertom.com (tom at supertom.com) Date: Fri, 21 Nov 2003 09:18:08 -0500 Subject: [nycphp-talk] Oracle Access? In-Reply-To: Message-ID: Mark, You can download developer versions: http://otn.oracle.com/software/products/oracle9i/index.html You'll need an OTN account, which is free. 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 Mark Armendariz Sent: Friday, November 21, 2003 9:20 AM To: 'NYPHP Talk' Subject: [nycphp-talk] Oracle Access? Morning all... I've recently got a small job from a client who wants to run with oracle (they already have it). Unfortunately I can't have access to their server. And as much as I've always wanted to, I've not yet had the opportunity to learn oracle. I use adodb, so i figured i wouldn't run into too many issues learning the basics (as this is a very basic job - basic updates and selects only.). So does anyone know where i can get access to oracle somewhere. I couldn't seem to find a trial or developer download or anyhting that might suggest i could use / learn it without purchasing it. Thanks!! Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From nyphp at enobrev.com Fri Nov 21 09:38:50 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Fri, 21 Nov 2003 09:38:50 -0500 Subject: [nycphp-talk] Hello / Geo coords In-Reply-To: Message-ID: here's a function i've ben using for a couple years now. I can honestly say I have no idea whether or not i wrote it as i'd done a LOT of variations of it at the time. From what I know it's worked well for around 2 years now (for my client). I've only tested with US values, but i imagine it should work for other values as well. Good luck!! function getDistance($fromLatitude, $fromLongitude, $toLatitude, $toLongitude) { /* assume your points, in decimal, are in $fromLongitude,$fromLatitude and $toLongitude,$toLatitude * this can also be useful with the US ZIPcodes at * http://ftp.census.gov/geo/www/gazetteer/places.html */ $Pi = 3.1415926535897932384626; $Radius = doubleval($Pi/180.0); $fromLongitude = doubleval($fromLongitude) * $Radius; $fromLatitude = doubleval($fromLatitude) * $Radius; $toLongitude = doubleval($toLongitude) * $Radius; $toLatitude = doubleval($toLatitude) * $Radius; $theta = $toLongitude - $fromLongitude; $Distance = acos(sin($fromLatitude) * sin($toLatitude) + cos($fromLatitude) * cos($toLatitude) * cos($theta)); if ($Distance < 0) { $Distance += $Pi; } $Distance = $Distance * 6371.2; $Miles = doubleval($Distance * 0.621); $Distance = sprintf("%.2f", $Distance); $Miles = sprintf("%.4f", $Miles); return $Miles; } _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Daniel Kushner Sent: Thursday, November 20, 2003 10:54 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Hello / Geo coords Spot, Here's some code that I have from a long time ago that calculates the distance between airports based on longitude and latitude. You can do the same with Zip codes once you convert a zip code to long/lat. Best, Daniel Kushner $db = new My_DB("SELECT * FROM airports AS a WHERE id IN ('$origin', '$destination')"); $db->next_record(); $a = deg2rad($db->f('latitude')); $b = deg2rad($db->f('longitude')); $origin_id = $db->f('id'); $origin_name = $db->f('name'); $db->next_record(); $c = deg2rad($db->f('latitude')); $d = deg2rad($db->f('longitude')); $destination_id = $db->f('id'); $destination_name = $db->f('name'); $r=3963.1; //radius of the earth in miles //calculate the distance between the two points $distance = acos( (cos($a) * cos($b) * cos($c) * cos($d)) + (cos($a) * sin($b) * cos($c) * sin($d)) + (sin($a) * sin($c)) ) * $r; if($origin == $destination) { echo "Distance = 0
    "; } else { echo "Origin: ($origin_id) $origin_name
    "; echo "Destination: ($destination_id) $destination_name
    "; echo "Distance in miles: ", round($distance,4), "
    "; echo "Distance in kilometers: ", round(($distance*1.609),4), "
    "; } -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Spot Sent: Thursday, November 20, 2003 2:56 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] Hello / Geo coords Hey everyone, Just thought I would introduce myself as new member to the list and pose a question at the same time. My name is Spot(yes, legally). I am with deviantART.com. We are the largest art community in the world with a little under 500,000 artists, almost 3 million pieces of art and close to 80 million hits a month. We move about 55mbit/s average. Running on 37 boxes (last I checked) and two 9 terabyte fibre enclosures. All on Apache/PHP/Mysql. Except for Zues talking to the fibre enclosures for raw data (images). All of our code is from the ground up. No external libraries. Currently we are employing somewhat of a locational system where we allow artists to provide their Geo coords (after getting them from Maporama.com) and then, currently using GeoURL.org, we pull in RSS feeds and allow them to see lists of artists close to them. We are interested in bringing as much of this "in-house" as possible. Especially the GeoURL functionality. Does anyone have any information on methods for creating "crow flies" distances between artists based on geo coords? I would be interested in using a third party library if there is one. Thanks! Spot Director of Prints deviantART Inc. www.deviantart.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From nyphp at enobrev.com Fri Nov 21 09:40:26 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Fri, 21 Nov 2003 09:40:26 -0500 Subject: [nycphp-talk] Oracle Access? In-Reply-To: Message-ID: Tom, you are king! Thank you. _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of tom at supertom.com Sent: Friday, November 21, 2003 9:18 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Oracle Access? Mark, You can download developer versions: http://otn.oracle.com/software/products/oracle9i/index.html You'll need an OTN account, which is free. 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 Mark Armendariz Sent: Friday, November 21, 2003 9:20 AM To: 'NYPHP Talk' Subject: [nycphp-talk] Oracle Access? Morning all... I've recently got a small job from a client who wants to run with oracle (they already have it). Unfortunately I can't have access to their server. And as much as I've always wanted to, I've not yet had the opportunity to learn oracle. I use adodb, so i figured i wouldn't run into too many issues learning the basics (as this is a very basic job - basic updates and selects only.). So does anyone know where i can get access to oracle somewhere. I couldn't seem to find a trial or developer download or anyhting that might suggest i could use / learn it without purchasing it. Thanks!! Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Fri Nov 21 09:56:43 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 21 Nov 2003 09:56:43 -0500 Subject: [nycphp-talk] Hello / Geo coords In-Reply-To: References: Message-ID: <3FBE27AB.3060004@nyphp.org> Mark Armendariz wrote: > here's a function i've ben using for a couple years now. I can honestly > say I have no idea whether or not i wrote it as i'd done a LOT of > variations of it at the time. From what I know it's worked well for > around 2 years now (for my client). I've only tested with US values, > but i imagine it should work for other values as well. This, and Daniel's code, are perfect candidates for a PCOM! :) Avoid the holiday rush - Submit Yours Today at http://pcomd.net ! H > > Good luck!! > > function getDistance($fromLatitude, $fromLongitude, $toLatitude, > $toLongitude) { > > /* assume your points, in decimal, are in $fromLongitude,$fromLatitude > and $toLongitude,$toLatitude > * this can also be useful with the US ZIPcodes at > * http://ftp.census.gov/geo/www/gazetteer/places.html > */ > > $Pi = 3.1415926535897932384626; > $Radius = doubleval($Pi/180.0); > > $fromLongitude = doubleval($fromLongitude) * $Radius; $fromLatitude = > doubleval($fromLatitude) * $Radius; > $toLongitude = doubleval($toLongitude) * $Radius; $toLatitude = > doubleval($toLatitude) * $Radius; > > $theta = $toLongitude - $fromLongitude; > $Distance = acos(sin($fromLatitude) * sin($toLatitude) + > cos($fromLatitude) * cos($toLatitude) * cos($theta)); > if ($Distance < 0) { > $Distance += $Pi; > } > > $Distance = $Distance * 6371.2; > $Miles = doubleval($Distance * 0.621); > $Distance = sprintf("%.2f", $Distance); > $Miles = sprintf("%.4f", $Miles); > > return $Miles; > } > > > ------------------------------------------------------------------------ > *From:* talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] *On Behalf Of *Daniel Kushner > *Sent:* Thursday, November 20, 2003 10:54 PM > *To:* NYPHP Talk > *Subject:* RE: [nycphp-talk] Hello / Geo coords > > Spot, > > Here's some code that I have from a long time ago that calculates the > distance between airports based on longitude and latitude. You can do > the same with Zip codes once you convert a zip code to long/lat. > > Best, > Daniel Kushner > > $db = new My_DB("SELECT * > FROM airports AS a > WHERE id IN ('$origin', '$destination')"); > > $db->next_record(); > $a = deg2rad($db->f('latitude')); > $b = deg2rad($db->f('longitude')); > $origin_id = $db->f('id'); > $origin_name = $db->f('name'); > > $db->next_record(); > $c = deg2rad($db->f('latitude')); > $d = deg2rad($db->f('longitude')); > $destination_id = $db->f('id'); > $destination_name = $db->f('name'); > > > $r=3963.1; //radius of the earth in miles > > //calculate the distance between the two points > $distance = acos( > (cos($a) * cos($b) * cos($c) * cos($d)) + > (cos($a) * sin($b) * cos($c) * sin($d)) + > (sin($a) * sin($c)) > ) * $r; > > if($origin == $destination) { > echo "Distance = 0
    "; > } else { > echo "Origin: ($origin_id) $origin_name
    "; > echo "Destination: ($destination_id) $destination_name
    "; > echo "Distance in miles: ", round($distance,4), "
    "; > echo "Distance in kilometers: ", round(($distance*1.609),4), "
    "; > } > > -----Original Message----- > *From:* talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]*On Behalf Of *Spot > *Sent:* Thursday, November 20, 2003 2:56 PM > *To:* talk at lists.nyphp.org > *Subject:* [nycphp-talk] Hello / Geo coords > > Hey everyone, > > Just thought I would introduce myself as new member to the list and > pose a question at the same time. > > My name is Spot(yes, legally). I am with deviantART.com. We are the > largest art community in the world with a little under 500,000 > artists, almost 3 million pieces of art and close to 80 million hits > a month. We move about 55mbit/s average. Running on 37 boxes (last I > checked) and two 9 terabyte fibre enclosures. All on > Apache/PHP/Mysql. Except for Zues talking to the fibre enclosures > for raw data (images). All of our code is from the ground up. No > external libraries. > > Currently we are employing somewhat of a locational system where we > allow artists to provide their Geo coords (after getting them from > Maporama.com) and then, currently using GeoURL.org, we pull in RSS > feeds and allow them to see lists of artists close to them. > > We are interested in bringing as much of this "in-house" as > possible. Especially the GeoURL functionality. Does anyone have any > information on methods for creating "crow flies" distances between > artists based on geo coords? I would be interested in using a third > party library if there is one. > > > Thanks! > > Spot > Director of Prints > deviantART Inc. > www.deviantart.com > > > ------------------------------------------------------------------------ > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Fri Nov 21 10:03:34 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 21 Nov 2003 10:03:34 -0500 Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <20031121022740.27348.qmail@web14309.mail.yahoo.com> References: <20031121022740.27348.qmail@web14309.mail.yahoo.com> Message-ID: <3FBE2946.2030506@nyphp.org> Chris Shiflett wrote: > --- Scott Mattocks wrote: > >>We will be switching over to a new server that is going to be running >>Apache 2.0.46. Our current system runs Apache 1.3.something with PHP >>4.3.2. When Apache 2.0 first came out I heard a lot of people saying >>not to run it if you are using PHP but I can't remember why. Are there >>still issues mixing the two? > > > I had dinner with Rasmus last night and brought this specific topic up. I > can't say that I've ever been entirely clear on it all, especially since > mod_perl 2.0 has plenty of third-party modules and such that aren't thread > safe. But, since he has always been the person warning against Apache 2 > the most, I figured he was the best person to talk to. It was also > convenient, because 2 of the 3 core mod_perl developers were there as > well, so I sparked a good conversation and basically sat back and > listened. :-) > > Apache 2 is fine in pre-fork mode is what I got out of it. Rasmus just > isn't a big fan of using software until it has been around for a very long > time, but my opinion is that Apache 2 is working well for a lot of very > important sites, including Ticketmaster (those guys had some crazy stories > about server load when a big show goes on sale). But, he did admit that > using the pre-fork MPM eliminated the threading issues as well as pretty > much all of his complaints. > > Nat Torkington came to the same conclusion, as mentioned in his journal > (http://use.perl.org/~gnat/journal/15902). > > So, I'm going to start telling people that Apache 2 is fine as long as you > use the pre-fork MPM or you're sure that all third-party modules you use > are thread safe. Interesting... but did he, or anyone else, have a compelling reason to use Apache 2 in the pre-fork MPM? As I understand it, Apache 2's architecture is significantly more complex, incurs more overhead, and as Rasmus pointed out, is not as well tested. And, when combined with being more complex, this becomes exponentially more important - not to mention PHP's SAPI for Apache 2, is eh, new. If you could run this by him over dinner tonight, that'd be great :) H From hans at nyphp.org Fri Nov 21 10:08:00 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 21 Nov 2003 10:08:00 -0500 Subject: [nycphp-talk] PHundamentals Topic #4: php.ini settings In-Reply-To: References: Message-ID: <3FBE2A50.4020303@nyphp.org> Brian Pang wrote: > what reason other than portability ease (moving from server1 with > short_open_tags=on => server2 with short_open_tags=off) is there for > having short_open_tags=on?? I suppose the only advantage is it forces your code to use the long tags, which are generally easier to read. Also, I recall there were some issues with the short I mean, why sacrifice the "sexiness" of ? > We're programmers, we need all the help we can get! ;) Yes, sexiness must be preserved. H From hans at nyphp.org Fri Nov 21 10:10:46 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 21 Nov 2003 10:10:46 -0500 Subject: [nycphp-talk] [Fwd: [PHP-EVANGELISM] Re: who is running WAMP/LAMP?] Message-ID: <3FBE2AF6.8000102@nyphp.org> The who's who of large sites using PHP is always interesting so I thought to pass it on. H -------- Original Message -------- Subject: [PHP-EVANGELISM] Re: who is running WAMP/LAMP? Date: Fri, 21 Nov 2003 14:44:26 +0100 From: Morten Fangel To: php-evangelism at lists.php.net References: Anders Thoresson wrote: > For an ongoing discussion I'm involved in, I would appreciate examples > of large and well known sites running either WAMP or LAMP environments. > > Thanks in advance. > Hi Anders You name looks some where nordic / scandinavian so I'm confident that you will be able to read the danish page http://www.eksperten.dk/spm/350755 It's the larges IT-community in Denmark (and the rest of the nordic contries)... The thread is about which danish pages are running PHP... a quick summary www.tv2.dk <- the second larges TV-station in denmark www.tvdanmark.dk <- another tv-station www.nokia.dk <- guess www.roskildefestival.dk <- the (somewhere) world famous fesival in roskilde www.boomtown.dk <- the larges internet-cafe in denmark www.tdc.dk <- the larges ISP / Phone company in denmark www.buy-hp.dk <- guess www.tiscali.dk <- another big ISP www.sdu.dk <- second larges university in denmark Morten -- PHP Evangelism Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php From southwell at dneba.com Fri Nov 21 11:59:29 2003 From: southwell at dneba.com (Michael Southwell) Date: Fri, 21 Nov 2003 11:59:29 -0500 Subject: [nycphp-talk] no longer need help with debugging mail() In-Reply-To: <5.1.0.14.2.20031120164136.019400d8@mail.optonline.net> Message-ID: <5.1.0.14.2.20031121115356.00b4dea0@mail.optonline.net> Thanks for all the responses (though many suggestions assumed--incorrectly--that I have access to the server). It turns out that the problem was angle brackets in the $from variable ($from="my name ";), which were no problem on one site and a problem on the other one (haven't yet figured out why). Changing them to entities fixed everything--but I think I'll just get rid of them anyway. At 04:51 PM 11/20/2003, I wrote: >I am moving a site from one server to another one (the new one is in nyc >and has a 2-letter extension ;-). The contact form on the old site is >working perfectly, but identical code on the new one isn't. Phpinfo tells >me that sendmail is there and presumably working. Docs say that mail() >returns TRUE or FALSE so I tried this code: >---------------- >if (mail($to,$subject,$message,$from)==FALSE) do something >else do something else >-------------- >which always does something else so mail seems to be returning TRUE but >the message never arrives. How do I do a better job of debugging what's >happening? 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 tom at supertom.com Fri Nov 21 12:09:36 2003 From: tom at supertom.com (tom at supertom.com) Date: Fri, 21 Nov 2003 12:09:36 -0500 Subject: [nycphp-talk] LIPHP meeting - 11/24 @ 8pm - Hauppauge In-Reply-To: <3FBE27AB.3060004@nyphp.org> Message-ID: Hey gang, The greatly anticipated monthly LIPHP meeting is once again upon us! Don't be fooled, 11/24 IS the last Monday of the month. Get your fix of LIPHP BEFORE your turkey! Our meetings are the last Monday of every month, at 8pm in Hauppauge, LI, NY. For directions and to join the mailing list (90 members and counting!), go here: http://liphp.org Regarding the meeting topic, we are switching things around bit, to elicit more participation and attendance, and frankly, to make up for the shortage of speakers. In future meetings where we do not have a speaker, the format will be more of a discussion: - Problems/Questions/Interesting things regarding PHP and AMP technology - Found any cool sites using PHP and AMP technology - show your site - attendants are encouraged to show their work, and demonstrate functionality/design/etc. - web related discussions - front end design, cool javascript widgets, happenings in the "corporate" web world, etc. - trends in development, and even open source in general Basically, I have found that many interesting discussions flourish on related topics after the presentations, so I felt this was a way to bring this fact out to the community - that all this web/PHP cool stuff is going on right here on Long Island! We'll still be doing presentations in the future, but they will most likely be either less in-depth or not monthly, again due to the lack of speakers. I personally have some ideas for future presentations, but am not confident to say that I would have them available before January. Anyone interested in doing presentations please contact me directly or send email to the list. Newbies and Pros are both encouraged to attend, LIPHP has something for everyone. If you are just learning, or polishing off the next big ERP system, we are all very interested in hearing about it. Thanks to the folks at NYPHP and LILUG, who I have gleened many of these (and future!) ideas from. The Krispy Kremes will definitely be here (and we always have leftovers - come and eat them, already!!). You should be, too. See you Monday @ 8pm Tom http://www.liphp.org *************************************************** What's Tom listening to right now? Find out here: http://www.supertom.com/current_track.php From nyphp at enobrev.com Fri Nov 21 12:33:08 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Fri, 21 Nov 2003 12:33:08 -0500 Subject: [nycphp-talk] no longer need help with debugging mail() In-Reply-To: <5.1.0.14.2.20031121115356.00b4dea0@mail.optonline.net> Message-ID: By entities, you're referring to < and > ? And you mentioned you're going to get rid of them. So are you only going to use the email address without the Name? Wondering as I've run into a couple uunexpected missed emails from a newsletter system I wrote and I'm not finding errors in the logs, no bouncebacks or much of anything.. Mark -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Michael Southwell Sent: Friday, November 21, 2003 11:59 AM To: NYPHP Talk Subject: [nycphp-talk] no longer need help with debugging mail() Thanks for all the responses (though many suggestions assumed--incorrectly--that I have access to the server). It turns out that the problem was angle brackets in the $from variable ($from="my name ";), which were no problem on one site and a problem on the other one (haven't yet figured out why). Changing them to entities fixed everything--but I think I'll just get rid of them anyway. At 04:51 PM 11/20/2003, I wrote: >I am moving a site from one server to another one (the new one is in >nyc and has a 2-letter extension ;-). The contact form on the old site >is working perfectly, but identical code on the new one isn't. Phpinfo >tells me that sendmail is there and presumably working. Docs say that >mail() returns TRUE or FALSE so I tried this code: >---------------- >if (mail($to,$subject,$message,$from)==FALSE) do something else do >something else >-------------- >which always does something else so mail seems to be returning TRUE but >the message never arrives. How do I do a better job of debugging >what's happening? 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 adam at trachtenberg.com Fri Nov 21 12:37:06 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Fri, 21 Nov 2003 12:37:06 -0500 (EST) Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: <3FBE2946.2030506@nyphp.org> References: <20031121022740.27348.qmail@web14309.mail.yahoo.com> <3FBE2946.2030506@nyphp.org> Message-ID: On Fri, 21 Nov 2003, Hans Zaunere wrote: > Interesting... but did he, or anyone else, have a compelling reason > to use Apache 2 in the pre-fork MPM? 1) You want to use mod_perl 2.0. (That's why Ticketmaster uses Apache 2.0, they're all mod_perl hackers.) 2) You want to use Windows. (Insert disclaimer here.) 3) Your answer here. Seriously, I most often see #2 posted as a reason why someone's running Apache 2.0. -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From shiflett at php.net Fri Nov 21 12:53:18 2003 From: shiflett at php.net (Chris Shiflett) Date: Fri, 21 Nov 2003 09:53:18 -0800 (PST) Subject: [nycphp-talk] Apache 2.0 and PHP In-Reply-To: Message-ID: <20031121175318.94017.qmail@web14302.mail.yahoo.com> I missed Hans's response somehow. Oops. :-) --- Adam Maccabee Trachtenberg wrote: > On Fri, 21 Nov 2003, Hans Zaunere wrote: > > Interesting... but did he, or anyone else, have a compelling reason > > to use Apache 2 in the pre-fork MPM? > > 1) You want to use mod_perl 2.0. (That's why Ticketmaster uses Apache > 2.0, they're all mod_perl hackers.) Yeah, mod_perl 2.0 seems to have some nice features over mod_perl 1.0, including increased stability (I know this sounds odd, since it's newer, but their testing framework is brilliant). So, Ticketmaster probably wants to take advantage of this, plus Apache 2 has been out for over a year and a half now, so it's not as risky to use it now as it might have been a year ago. > 2) You want to use Windows. (Insert disclaimer here.) Good God. :-) > 3) Your answer here. Apache 2 is considerably faster - at least, that's what a lot of smart Apache hackers tell me. Some people would probably exchange some reliability for speed, depending on their needs (and depending on how much perceived reliability they have to exchange). And, like I said, a lot of people consider it to be quite stable and reliable now, and the internals have been redesigned and are supposedly better. Yahoo uses Apache 1, and Rasmus seems to still prefer this to Apache 2. For those who want to use Apache 2 and were being held back because of the perceived problems with it and PHP, I think they can go ahead now. Basically, don't switch to Apache 2 because of PHP, but don't let PHP stop you either. That's my take. :-) Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security Handbook Coming mid-2004 HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp From adam at trachtenberg.com Fri Nov 21 12:58:37 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Fri, 21 Nov 2003 12:58:37 -0500 (EST) Subject: [nycphp-talk] Hello / Geo coords In-Reply-To: References: Message-ID: On Fri, 21 Nov 2003, Mark Armendariz wrote: > here's a function i've ben using for a couple years now. I can honestly say > I have no idea whether or not i wrote it as i'd done a LOT of variations of > it at the time. From what I know it's worked well for around 2 years now > (for my client). I've only tested with US values, but i imagine it should > work for other values as well. I believe this (and all other variations, including an article in php|architect) comes from piece of code written by Dave Sklar. http://px.sklar.com/code.html?id=88 As far as I know, he was the first person to come up with the idea of leveraging the US census ZIP Code data in combination with this algorithm. Of course, Dave did not invent the "great circle" algorithm, so the credit only goes so far. :) -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From southwell at dneba.com Fri Nov 21 13:29:50 2003 From: southwell at dneba.com (Michael Southwell) Date: Fri, 21 Nov 2003 13:29:50 -0500 Subject: [nycphp-talk] no longer need help with debugging mail() In-Reply-To: References: <5.1.0.14.2.20031121115356.00b4dea0@mail.optonline.net> Message-ID: <5.1.0.14.2.20031121132655.00b43820@mail.optonline.net> At 12:33 PM 11/21/2003, you wrote: >By entities, you're referring to < and > ? yes >And you mentioned you're going to get rid of them. So are you only going to >use the email address without the Name? maybe, or parens, or square brackets, which won't confuse anything >Wondering as I've run into a couple uunexpected missed emails from a >newsletter system I wrote and I'm not finding errors in the logs, no >bouncebacks or much of anything.. It seems odd that there would be no record someplace if they don't go out, and if they do go out why would there be any problem further down the line? one more of those baffling and maddening things.... 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 Fri Nov 21 13:53:06 2003 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Fri, 21 Nov 2003 13:53:06 -0500 Subject: [nycphp-talk] no longer need help with debugging mail() In-Reply-To: <5.1.0.14.2.20031121115356.00b4dea0@mail.optonline.net> References: <5.1.0.14.2.20031120164136.019400d8@mail.optonline.net> <5.1.0.14.2.20031121115356.00b4dea0@mail.optonline.net> Message-ID: <20031121185305.GA524@panix.com> Hi Michael: On Fri, Nov 21, 2003 at 11:59:29AM -0500, Michael Southwell wrote: > It turns out that > the problem was angle brackets in the $from variable ($from="my name > ";), which were no problem on one site and a problem on > the other one (haven't yet figured out why). It seems the standards say they should be there: name-addr = [display-name] angle-addr angle-addr = [CFWS] "<" addr-spec ">" [CFWS] / obs-angle-addr >From Section "3.4. Address Specification" of RFC 2822. ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt Though I didn't feel like taking the time to figure out if "obs-angle-addr" means that this is depricated, no longer necessary or what. --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 Thomas.Freedman at ubs.com Fri Nov 21 14:56:46 2003 From: Thomas.Freedman at ubs.com (Freedman, Tom S.) Date: Fri, 21 Nov 2003 14:56:46 -0500 Subject: [nycphp-talk] no longer need help with debugging mail() Message-ID: >-----Original Message----- >From: Daniel Convissor [mailto:danielc at analysisandsolutions.com] >Sent: Friday, November 21, 2003 1:53 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] no longer need help with debugging mail() > > >It seems the standards say they should be there: > name-addr = [display-name] angle-addr > angle-addr = [CFWS] "<" addr-spec ">" [CFWS] / obs-angle-addr > >>From Section "3.4. Address Specification" of RFC 2822. >ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt > >Though I didn't feel like taking the time to figure out if >"obs-angle-addr" means that this is depricated, no longer necessary or >what. It means that you can use the format listed OR "obs-angle-addr" which is an obsolete addressing format (described, cryptically, here: ). Either way, the lt/gt symbols are part of the standard. Not that following standards ever meant you weren't going to break something. :-) -Tom 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 jsiegel1 at optonline.net Sat Nov 22 08:47:34 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Sat, 22 Nov 2003 08:47:34 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <3FBDFCB4.7010300@optonline.net> References: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> <20031119030128.GA24605@panix.com> <3FBAE6AE.5000401@optonline.net> <3FBAE914.9060504@nyphp.org> <3FBB5C84.7060608@optonline.net> <3FBB72D6.40904@nyphp.org> <3FBD93E5.3020208@optonline.net> <20031121052943.GA7111@panix.com> <3FBDFCB4.7010300@optonline.net> Message-ID: <3FBF68F6.8070606@optonline.net> It seems the error has resurfaced (it has only occurred once since my last posting). Following Dan's lead, I checked the file handles using this command: sysctl fs.file-nr and came up with the following: fs.file-nr 11145 10529 104856 According to the Linux performance doc that I had referred to in an earlier post, it says the following: "Value #1 ? The number of allocated file handles Value #2 ? The number of used file handles Value #3 ? The maximum number of file handles the kernel will allocate You can raise the file handle limit with sysctl -w fs.file-max=32767 Ideally, the first number should approach the maximum number with the center number far behind. Raise the limit until this occurs. A system needs to be up for a reasonable period of time before you should measure against these values." *HOWEVER*, if this performance doc is correct, well, the max. number of file handles *already* seems quite large. So I have the following question: Since the max number (value #3)is already quite large, is there something that's preventing Linux from allocating additional file handles? (And, just an observation...is it a coincidence that the allocated file handles is about 10% of the max. number?) Jeff Siegel From danielc at analysisandsolutions.com Sat Nov 22 11:42:18 2003 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Sat, 22 Nov 2003 11:42:18 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <3FBF68F6.8070606@optonline.net> References: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> <20031119030128.GA24605@panix.com> <3FBAE6AE.5000401@optonline.net> <3FBAE914.9060504@nyphp.org> <3FBB5C84.7060608@optonline.net> <3FBB72D6.40904@nyphp.org> <3FBD93E5.3020208@optonline.net> <20031121052943.GA7111@panix.com> <3FBDFCB4.7010300@optonline.net> <3FBF68F6.8070606@optonline.net> Message-ID: <20031122164218.GB22195@panix.com> On Sat, Nov 22, 2003 at 08:47:34AM -0500, Jeff Siegel wrote: > > fs.file-nr 11145 10529 104856 But, of course, you're looking AFTER the fact. Though, admittedly, this probably isn't your problem. To check at the moment of the error, put some code in your error handler to check the handle situation. Hmm... perhaps even add a debug_backtrace in there and/or other system performance examination tools. --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 Sat Nov 22 21:21:38 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Sat, 22 Nov 2003 21:21:38 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <20031122164218.GB22195@panix.com> References: <001a01c3ae42$22f741d0$6401a8c0@EZDSDELL> <20031119030128.GA24605@panix.com> <3FBAE6AE.5000401@optonline.net> <3FBAE914.9060504@nyphp.org> <3FBB5C84.7060608@optonline.net> <3FBB72D6.40904@nyphp.org> <3FBD93E5.3020208@optonline.net> <20031121052943.GA7111@panix.com> <3FBDFCB4.7010300@optonline.net> <3FBF68F6.8070606@optonline.net> <20031122164218.GB22195@panix.com> Message-ID: <3FC019B2.9080909@optonline.net> Unfortunately the debug_backtrace is a 4.3.0 function and I'm using 4.1.2. Jeff Daniel Convissor wrote: > On Sat, Nov 22, 2003 at 08:47:34AM -0500, Jeff Siegel wrote: > >>fs.file-nr 11145 10529 104856 > > > But, of course, you're looking AFTER the fact. Though, admittedly, this > probably isn't your problem. To check at the moment of the error, put > some code in your error handler to check the handle situation. Hmm... > perhaps even add a debug_backtrace in there and/or other system > performance examination tools. > > --Dan > From spot at deviantart.com Sat Nov 22 23:00:29 2003 From: spot at deviantart.com (Spot) Date: Sat, 22 Nov 2003 22:00:29 -0600 Subject: [nycphp-talk] Hello / Geo coords References: Message-ID: <01f401c3b176$5622e2d0$6501a8c0@spot> Thank you so much Mark! Spot ----- Original Message ----- From: Mark Armendariz To: 'NYPHP Talk' Sent: Friday, November 21, 2003 8:38 AM Subject: RE: [nycphp-talk] Hello / Geo coords here's a function i've ben using for a couple years now. I can honestly say I have no idea whether or not i wrote it as i'd done a LOT of variations of it at the time. From what I know it's worked well for around 2 years now (for my client). I've only tested with US values, but i imagine it should work for other values as well. Good luck!! function getDistance($fromLatitude, $fromLongitude, $toLatitude, $toLongitude) { /* assume your points, in decimal, are in $fromLongitude,$fromLatitude and $toLongitude,$toLatitude * this can also be useful with the US ZIPcodes at * http://ftp.census.gov/geo/www/gazetteer/places.html */ $Pi = 3.1415926535897932384626; $Radius = doubleval($Pi/180.0); $fromLongitude = doubleval($fromLongitude) * $Radius; $fromLatitude = doubleval($fromLatitude) * $Radius; $toLongitude = doubleval($toLongitude) * $Radius; $toLatitude = doubleval($toLatitude) * $Radius; $theta = $toLongitude - $fromLongitude; $Distance = acos(sin($fromLatitude) * sin($toLatitude) + cos($fromLatitude) * cos($toLatitude) * cos($theta)); if ($Distance < 0) { $Distance += $Pi; } $Distance = $Distance * 6371.2; $Miles = doubleval($Distance * 0.621); $Distance = sprintf("%.2f", $Distance); $Miles = sprintf("%.4f", $Miles); return $Miles; } ------------------------------------------------------------------------------ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Daniel Kushner Sent: Thursday, November 20, 2003 10:54 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Hello / Geo coords Spot, Here's some code that I have from a long time ago that calculates the distance between airports based on longitude and latitude. You can do the same with Zip codes once you convert a zip code to long/lat. Best, Daniel Kushner $db = new My_DB("SELECT * FROM airports AS a WHERE id IN ('$origin', '$destination')"); $db->next_record(); $a = deg2rad($db->f('latitude')); $b = deg2rad($db->f('longitude')); $origin_id = $db->f('id'); $origin_name = $db->f('name'); $db->next_record(); $c = deg2rad($db->f('latitude')); $d = deg2rad($db->f('longitude')); $destination_id = $db->f('id'); $destination_name = $db->f('name'); $r=3963.1; //radius of the earth in miles //calculate the distance between the two points $distance = acos( (cos($a) * cos($b) * cos($c) * cos($d)) + (cos($a) * sin($b) * cos($c) * sin($d)) + (sin($a) * sin($c)) ) * $r; if($origin == $destination) { echo "Distance = 0
    "; } else { echo "Origin: ($origin_id) $origin_name
    "; echo "Destination: ($destination_id) $destination_name
    "; echo "Distance in miles: ", round($distance,4), "
    "; echo "Distance in kilometers: ", round(($distance*1.609),4), "
    "; } -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Spot Sent: Thursday, November 20, 2003 2:56 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] Hello / Geo coords Hey everyone, Just thought I would introduce myself as new member to the list and pose a question at the same time. My name is Spot(yes, legally). I am with deviantART.com. We are the largest art community in the world with a little under 500,000 artists, almost 3 million pieces of art and close to 80 million hits a month. We move about 55mbit/s average. Running on 37 boxes (last I checked) and two 9 terabyte fibre enclosures. All on Apache/PHP/Mysql. Except for Zues talking to the fibre enclosures for raw data (images). All of our code is from the ground up. No external libraries. Currently we are employing somewhat of a locational system where we allow artists to provide their Geo coords (after getting them from Maporama.com) and then, currently using GeoURL.org, we pull in RSS feeds and allow them to see lists of artists close to them. We are interested in bringing as much of this "in-house" as possible. Especially the GeoURL functionality. Does anyone have any information on methods for creating "crow flies" distances between artists based on geo coords? I would be interested in using a third party library if there is one. Thanks! Spot Director of Prints deviantART Inc. www.deviantart.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 tgales at tgaconnect.com Sun Nov 23 07:49:49 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Sun, 23 Nov 2003 07:49:49 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <3FBF68F6.8070606@optonline.net> Message-ID: <000601c3b1c0$487b1950$bf8d3818@oberon1> Jeff Siegel wrote: > It seems the error has resurfaced (it has only occurred once since my > last posting)... For more background information you might try: http://www.phpbuilder.com/mail/php-developer-list/2001042/1192.php particulary this may be of interest: "We have a workaround in PHP (we have a function called redirect() which first calls our session_write handler with the session_id() and session_encode(), before outputing the headers.. " (from the above link) T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From jonbaer at jonbaer.net Sun Nov 23 23:48:19 2003 From: jonbaer at jonbaer.net (jon baer) Date: Sun, 23 Nov 2003 23:48:19 -0500 Subject: [nycphp-talk] PHP application install methods (pear/etc) Message-ID: <002801c3b246$2f129e30$6500a8c0@thinkpad> hi, ive notice a few applications post a nice neat installation script located usually under /install directory - mainly for mysql schemas and such + then a new session tests to see if the dir exists warning the user to remove it for security purposes. normally when you pop in the mysql user/pass/db like this its considered unsecure unless you tunnel or SSL (which ive still not been able to accomplish w/ MySQL4 + php client classes) ... @ the moment it seems as if every app has its own way of installation (README vs. GUI scripts), but is there anything or any method on articles anywhere discussing this from 3rd party view ... i see more + more apps applying phplib/smarty so i thought maybe there would be a norm (since there is no actual .jar like install) ... php --install *.gz would be a nice idea ... i had been thinking pear install would make more sense but is there a way to run a php script from within the install (for db setup?) - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From danielc at analysisandsolutions.com Mon Nov 24 01:22:03 2003 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 24 Nov 2003 01:22:03 -0500 Subject: [nycphp-talk] bikesummer.org, mac ie, etc Message-ID: <20031124062202.GA15841@panix.com> Hi Folks: I'm looking forward to being one of the presenters at this month's meeting. I'll be providing highlights from the http://www.bikesummer.org/2003/ site. I just implemented some fixes tonight. So, if you've looked at the site at any point using Internet Explorer or Netscape 6 on the Mac OR you viewed the photo gallery at some point over this weekend using any browser, please stop by again to see how things really look. FYI: on the Mac IE front... it took me a while to pin down, but it turns out table row background colors end up being shown in the cell spacing. Thus, background colors are best specified for cells. See a new page I put together explaining/demonstrating the whole shebang: http://www.analysisandsolutions.com/code/iemac.htm See you, --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 Nov 24 09:56:46 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Mon, 24 Nov 2003 09:56:46 -0500 Subject: [nycphp-talk] Failure to write session data In-Reply-To: <000601c3b1c0$487b1950$bf8d3818@oberon1> References: <000601c3b1c0$487b1950$bf8d3818@oberon1> Message-ID: <3FC21C2E.1040908@optonline.net> Tim, Thanks so much for tracking this down. This *definitely* adds another set of questions (or at least, possible solutions) as opposed to assuming the issue is simply (or only) a file handle issue. Jeff Tim Gales wrote: > Jeff Siegel wrote: > >>It seems the error has resurfaced (it has only occurred once since my >>last posting)... > > > For more background information you might try: > http://www.phpbuilder.com/mail/php-developer-list/2001042/1192.php > > particulary this may be of interest: > > "We have a workaround in PHP (we have a function called redirect() which > first calls our session_write handler with the session_id() and > session_encode(), before outputing the headers.. " > > (from the above link) > > T. Gales & Associates > 'Helping People Connect with Technology' > > http://www.tgaconnect.com > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jonbaer at jonbaer.net Mon Nov 24 10:50:45 2003 From: jonbaer at jonbaer.net (jon baer) Date: Mon, 24 Nov 2003 10:50:45 -0500 Subject: [nycphp-talk] bikesummer.org, mac ie, etc References: <20031124062202.GA15841@panix.com> Message-ID: <002a01c3b2a2$b9976a20$6400a8c0@thinkpad> > FYI: on the Mac IE front... it took me a while to pin down, but it turns > out table row background colors end up being shown in the cell spacing. > Thus, background colors are best specified for cells. See a new I must admit I was recently a victim of this during an interview showing off a project which looked like crap under a mac, back in 2000 (40 years ago) i had a nice g3 to test and qa stuff on + now im left w/ calling friends asking how things look :-) Thank you for pointing this out ... BTW, is there any online solution to this? I had been thinking a while back a nice idea would be a box which could do this type of work, snapshot to the web for other developers ... - jon From lists at ny-tech.net Mon Nov 24 15:43:31 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Mon, 24 Nov 2003 15:43:31 -0500 Subject: [nycphp-talk] bikesummer.org, mac ie, etc In-Reply-To: <002a01c3b2a2$b9976a20$6400a8c0@thinkpad> Message-ID: <003701c3b2cb$a0b3a9a0$6401a8c0@main> > BTW, is there any online solution to this? I had been > thinking a while back a nice idea would be a box which could > do this type of work, snapshot to the web for other developers ... > There sure is :) http://www.browsercam.com/ I'm not sure how good it is, since I never tried it, but a friend of mine recommended this site to me. - Nasir From danielc at analysisandsolutions.com Mon Nov 24 16:48:38 2003 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 24 Nov 2003 16:48:38 -0500 Subject: [nycphp-talk] bikesummer.org, mac ie, etc In-Reply-To: <003701c3b2cb$a0b3a9a0$6401a8c0@main> References: <002a01c3b2a2$b9976a20$6400a8c0@thinkpad> <003701c3b2cb$a0b3a9a0$6401a8c0@main> Message-ID: <20031124214838.GA13909@panix.com> Hola: On Mon, Nov 24, 2003 at 03:43:31PM -0500, Nasir Zubair wrote: > > There sure is :) http://www.browsercam.com/ Interesting concept, but not cheap. Noted they don't have Mozilla only up to 1.1 (let alone none on the mac) and no Firebird or Camino. 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 Mon Nov 24 18:30:20 2003 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 24 Nov 2003 18:30:20 -0500 Subject: [nycphp-talk] blah blah SecurityFocus #224 blah blah Message-ID: <20031124233020.GA29284@panix.com> INTERESTNG ---------- Apple Safari Web Browser Null Character Cookie Stealing Vuln... http://www.securityfocus.com/bid/9065 PHP --- PHPList Remote File Include Vulnerability http://www.securityfocus.com/bid/9046 phpWebFileManager index.php Directory Traversal Vulnerabilit... http://www.securityfocus.com/bid/9053 Koch Roland Rolis Guestbook $path Remote File Include Vulner... http://www.securityfocus.com/bid/9054 Justin Hagstrom Auto Directory Index Cross-Site Scripting Vu... http://www.securityfocus.com/bid/9056 MediaWiki 'IP' Parameter Remote File Include Vulnerability http://www.securityfocus.com/bid/9057 phpFriendlyAdmin Unspecified Cross-Site Scripting Vulnerabil... http://www.securityfocus.com/bid/9075 See you tomorrow! --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 nyphp at enobrev.com Tue Nov 25 00:30:19 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Tue, 25 Nov 2003 00:30:19 -0500 Subject: [nycphp-talk] bikesummer.org, mac ie, etc In-Reply-To: <003701c3b2cb$a0b3a9a0$6401a8c0@main> Message-ID: It's actually an incredible service. You can sign up at their site for an 8 hour trial. They offer screenshots on so many browsers on each platform, and even offer to generate a PSD (photoshop file) for download so you can flip through all of them at once. (As a warning, I tested a site with every browser and every platform and that psd came out to about 150 mb). The guy who runs it seems to be incredibly helpful service wise as well. I've been wanting to get an account, but I'm waiting til I have enough work to supplement the monthly price ($40 which isn't much, but it is Christmas season). They offer hourly signups as well which does well for me. Mark -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Nasir Zubair Sent: Monday, November 24, 2003 3:44 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] bikesummer.org, mac ie, etc > BTW, is there any online solution to this? I had been thinking a > while back a nice idea would be a box which could do this type of > work, snapshot to the web for other developers ... > There sure is :) http://www.browsercam.com/ I'm not sure how good it is, since I never tried it, but a friend of mine recommended this site to me. - Nasir _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From lists at ny-tech.net Tue Nov 25 07:39:16 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Tue, 25 Nov 2003 07:39:16 -0500 Subject: [nycphp-talk] mySQL Gotchas Message-ID: <000001c3b351$24e66e30$6401a8c0@main> Have a dose of mySQL bashing: http://sql-info.de/mysql/gotchas.html I would have considered it a sincere critique of mySQL's problems if this guy wasn't so sarcastic. - Nasir From rdumas at cmj.com Tue Nov 25 16:15:26 2003 From: rdumas at cmj.com (Robert Dumas) Date: Tue, 25 Nov 2003 16:15:26 -0500 Subject: [nycphp-talk] Listing files... alphabetically Message-ID: <26F69C024813D811BFFD00508B8FA3E319F074@webproxy.uat.dbinsight.com> I'm sort of cutting my teeth in PHP (i know very minor stuff, but I'm otherwise a newbie) and I'm trying to come up with a directory lister that, well, lists all the files in subdirectories from $path and does it in alphabetical order (well, acutally numerical, since the subdirectories are all numbers). They're all MP3 files and each folder has files named simply "01.mp3", "02.mp3", etc. Here's the code I have. I left in a few commented lines, but don't hold that against me. '.$key.' => '.$val.'\n'; } closedir($handle); ?> The problem I get is that this error message when I try to view it: Warning: Wrong datatype in asort() call in /usr/local/apache/cmjnetwork.com/htdocs/sirius/index.php on line 35 Warning: Variable passed to each() is not an array or object in /usr/local/apache/cmjnetwork.com/htdocs/sirius/index.php on line 37 Does anyone know why? Cheers. Robert D. -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at trachtenberg.com Tue Nov 25 16:25:52 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Tue, 25 Nov 2003 16:25:52 -0500 (EST) Subject: [nycphp-talk] Listing files... alphabetically In-Reply-To: <26F69C024813D811BFFD00508B8FA3E319F074@webproxy.uat.dbinsight.com> References: <26F69C024813D811BFFD00508B8FA3E319F074@webproxy.uat.dbinsight.com> Message-ID: On Tue, 25 Nov 2003, Robert Dumas wrote: > Here's the code I have. I left in a few commented lines, but don't hold that > against me. Your code works for me. When you had the original opendir() or die() line, did your code die? If so, it probably means the you don't have permission to read the directory. (Which does seem weird because I'm guessing its globally readable, but still.) > $path = '/usr/local/apache/cmjnetwork.com/htdocs/sirius/'; > //$handle = @opendir($path) or die("Unable to open $path"); > $handle = opendir($path); > > while ( false !== ($file = readdir($handle)) ) { Try putting a 'print "$file\n";' line here to make sure you're actually iterating through the files you think you're iterating through. > The problem I get is that this error message when I try to view it: > Warning: Wrong datatype in asort() call in > /usr/local/apache/cmjnetwork.com/htdocs/sirius/index.php on line 35 This would happen if no files get placed in the $filetlist. The it's not an array, but a string (or some other non-initialized value, like NULL) and asort() will complain. > Warning: Variable passed to each() is not an array or object in > /usr/local/apache/cmjnetwork.com/htdocs/sirius/index.php on line 37 Likewise with each(). To prevent errors like this, always initialize variables. Placing a simple: $filetlist = array(); at the top of your code will prevent these errors even when there are legitimately no files in your directory. -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 Tue Nov 25 16:33:40 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Tue, 25 Nov 2003 16:33:40 -0500 (EST) Subject: [nycphp-talk] Listing files... alphabetically In-Reply-To: References: <26F69C024813D811BFFD00508B8FA3E319F074@webproxy.uat.dbinsight.com> Message-ID: On Tue, 25 Nov 2003, Adam Maccabee Trachtenberg wrote: > On Tue, 25 Nov 2003, Robert Dumas wrote: > > > Here's the code I have. I left in a few commented lines, but don't hold that > > against me. > > Your code works for me. Actually, this is a lie. Your code lists files, but doesn't do them the way (I think) you want them to. You should be using ksort() instead of asort() since you're sorting on the filename (which should be the array key) not the modified time (which is the array value). Also, you don't want to put \n inside single quotes. You should place it inside double quotes, or it will be a literal \n and not a newline. Last, check out natsort(), which will sort your numbers how you expect them to sort. You may need to actually use uksort(), since there's no knatsort(). Try: uksort($filetlist, 'strnatcmp'); -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 Tue Nov 25 17:01:41 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 25 Nov 2003 17:01:41 -0500 Subject: [nycphp-talk] mySQL Gotchas In-Reply-To: <000001c3b351$24e66e30$6401a8c0@main> References: <000001c3b351$24e66e30$6401a8c0@main> Message-ID: <3FC3D145.6080501@nyphp.org> Nasir Zubair wrote: > Have a dose of mySQL bashing: > > http://sql-info.de/mysql/gotchas.html > > I would have considered it a sincere critique of mySQL's problems if this > guy wasn't so sarcastic. He's the other AMP... Apache/mod_perl/PostgreSQL :) Not so bad, except I wish he'd know what NULL meant. H From rdumas at cmj.com Tue Nov 25 17:26:29 2003 From: rdumas at cmj.com (Robert Dumas) Date: Tue, 25 Nov 2003 17:26:29 -0500 Subject: [nycphp-talk] Listing files... alphabetically Message-ID: <26F69C024813D811BFFD00508B8FA3E319F075@webproxy.uat.dbinsight.com> I really appreciate the help. Hooo, boy, am I close now. Here's the current code. It seems to work, with only two problems: 1) it outputs all the filenames under the FIRST bullet point. 2) likely related to #1. the links do not point to the proper subfolders. function dirlist($path) { $handle = opendir($path); $filetlist = array(); $subflist = array(); while ( false !== ($file = readdir($handle)) ) { if ( ($file!='.') && ($file!='..') && ($file!='index.php') ) { $filetlist[] = $file; $subpath = $path.$file; $subhandle = opendir($subpath); while ( false !== ($subfile = readdir($subhandle)) ) { if ( ($subfile!='.') && ($subfile!='..') ) { $subflist[] = $subfile; } } } } natsort($filetlist); natsort($subflist); echo ''; } // end dirlist() --RD -------------- next part -------------- An HTML attachment was scrubbed... URL: From amanda at deanrocks.com Tue Nov 25 23:01:46 2003 From: amanda at deanrocks.com (amanda at deanrocks.com) Date: Tue, 25 Nov 2003 22:01:46 -0600 (CST) Subject: [nycphp-talk] DeanRocks.com Help Request- Again! Message-ID: <3430.64.223.152.63.1069819306.squirrel@www.deanrocks.com> Dear Members of NY PHP List! Unfortunately, the programmer I've enlisted to help me redesign Dean Rocks.com hasn't been able to work on the site very much. I have a clear idea of what the site needs in order to really get going. We have over a thousand people visiting the site every day and there is no LOGIN! Nothing has changed on the site in the last month, partially due to my own frustration with not being a web savvy person! The first thing I need help with is a LOGIN system, the next thing would be some sort of database or blog to catalogue Dean's endorsements. Please, anyone who really has the time to do this..HELP ME! This could bring in many, many votes for Dean by transforming endorsements from a name on a list to a powerful tool to inspire people. If you would like more info on my vision for this site, please e-mail me ASAP! Thanks and sorry to bother the list again! Amanda (amanda at deanrocks.com) p.s. peter, i lost your e-mail address! From adam at trachtenberg.com Wed Nov 26 01:54:02 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Wed, 26 Nov 2003 01:54:02 -0500 (EST) Subject: [nycphp-talk] Listing files... alphabetically In-Reply-To: <26F69C024813D811BFFD00508B8FA3E319F075@webproxy.uat.dbinsight.com> References: <26F69C024813D811BFFD00508B8FA3E319F075@webproxy.uat.dbinsight.com> Message-ID: On Tue, 25 Nov 2003, Robert Dumas wrote: > I really appreciate the help. Hooo, boy, am I close now. > > Here's the current code. It seems to work, with only two problems: > 1) it outputs all the filenames under the FIRST bullet point. > 2) likely related to #1. the links do not point to the proper subfolders. Your problem is that your code collects all thee subfolder files but doesn't track their parent folder. So, when you natsort() them everything gets mix up. The easiest way to solve this problem is with recursion. When you use recursion, you call a function from *within* that function. (If you've never done this before, it can be a bit of a mind twister.) In this case, your code to print a subfolder is practically identical to the code to print its parent. Whenever you notice this self-similarity, it's a good sign you want to use recursion. Here's a rewritten version that does the same thing that you were trying to do: function dirlist($path, $level) { if (is_dir($path)) { $files = array(); $handle = opendir($path); while ( false !== ($file = readdir($handle)) ) { if ( ($file!='.') && ($file!='..') && ($file!='index.php') ) { $files[] = $file; } } closedir($handle); natsort($files); echo "\n"; } } dirlist('/path/to/songs.mp3', 0); If you look at the code, you see that I iterate through a directory and gather up all the files. Then I sort them. Last, I print them, but after I print each item, I call dirlist() again! If it's not a directory, nothing happens. If it is, then I repeat the whole process inline. Since you print
  • s differently if they're in a subfolder instead of the top level, I needed to use a $level variable to track where you are and add the tag around $val. Also, I used $path as the prefix, but this isn't really right. You'll probably want to modify this. That's left as an exercise for the programmer. -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 Nov 26 02:01:54 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Wed, 26 Nov 2003 02:01:54 -0500 (EST) Subject: [nycphp-talk] Listing files... alphabetically In-Reply-To: References: <26F69C024813D811BFFD00508B8FA3E319F075@webproxy.uat.dbinsight.com> Message-ID: On Wed, 26 Nov 2003, Adam Maccabee Trachtenberg wrote: > Here's a rewritten version that does the same thing that you were > trying to do: Sorry again. I would be remiss if I did not take this opportunity to mention that Recipe 19.9 in "PHP Cookbook" (Sklar & Trachtenberg) covers "Processing All Files in a Directory (Recursively)." The code there is similar, but superior to the function I just hacked up. :) -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From mz34 at nyu.edu Wed Nov 26 09:49:04 2003 From: mz34 at nyu.edu (Matthew Zimmerman) Date: Wed, 26 Nov 2003 09:49:04 -0500 Subject: [nycphp-talk] PHP/XSLT in NYU Connect magazine. In-Reply-To: References: <26F69C024813D811BFFD00508B8FA3E319F075@webproxy.uat.dbinsight.com> Message-ID: Here is an article I wrote for this Fall's Connect magazine (NYU's Information Technology Magazine) about using PHP and XSLT to publish XML on the web. Very rudimentary (especially for this skill sets of most people on this list) but you might find it interesting none the less. Plus it promotes PHP at NYU! http://www.nyu.edu/its/pubs/connect/fall03/zimmerman_xml.html Matt From keremtuzemen at hotmail.com Wed Nov 26 10:51:24 2003 From: keremtuzemen at hotmail.com (Kerem Tuzemen) Date: Wed, 26 Nov 2003 10:51:24 -0500 Subject: [nycphp-talk] Re: [nycphp-dev] intro & content protection question References: Message-ID: Another way would be to generate image files containing the text on the fly. Kerem ----- Original Message ----- From: -sry To: dev at lists.nyphp.org ; talk at lists.nyphp.org Sent: Wednesday, November 26, 2003 7:18 AM Subject: [nycphp-dev] intro & content protection question Hiya listies, I'm cross-posting this to both the dev and talk lists, as I am not quite sure in which category this really belongs. I'm brand-spanking new to both PHP and mySQL, though I've been programming for a number of years (since about 1985) and am based in C so I think PHP is going to be pretty easy to pick up. I've had exposure to SQL through Cold Fusion in the late 90s and the mySQL documentation makes it look pretty easy/straightforward, but I'm sure I'll have some basic questions about both aspects of the current design I'm working on once I get to coding. Until then, I'm still shaking out the bugs in the architectural planning stage and need some help deciding how to implement my design. Here's the deal. I am designing a thing (don't want to release too many details until the project is released) that best compares to the old SAT reading comprehension test with one difference: I don't want people to skip tests or skip around the reading/test sets out of order. This is not a problem, as I can just validate the user's position in the sequence and control their flow through the sets. There will be a total of 20 reading/test sequences with at least one or two forms at the start of the process to collect demographics and set up the user prefs. Again, all of this seems pretty straightforward to me and is not my issue yet (not until I start coding ;-)) Okay, here's my question, I was originally thinking along the lines of doing this in Flash to protect the content of the reading tests (don't ask why, just accept I wanted to) from being lifted. If I dynamically generate the pages, the resulting content will be HTML that can just be saved and walked off with by whomever views the pages. The content of the reading tests is of value to me and I don't want to present it in "liftable" text format. In Flash, the text is part of the SWF file and cannot be saved easily (I do realize someone with enough motivation could manually retype the content viewed and walk off with it but that's an awful lot of effort to steal something publicly accessible for free, isn't it?) Since I was planning on doing this in Flash, I planned on controlling flow through ActionScript to PHP and PHP to mySQL. I also wanted to use the PHP/mySQL combo to allow users to stop the reading/test sequence and come back to it, as well as to set a variety of env vars (like colors, fonts, other fluff). The more I think through the functional flow of this project, however, the more silly it seems to be involving Flash at all. The only thing stopping me from keeping it purely PHP at this point is how to protect the content at the point it appears in the client browser. Is there any way to do this? Since PHP parses and then returns HTML to the client, I don't see how to make the page content not accessible via View | Source or by saving the resultant page. Ideas? Suggestions? Oh, one more kink in the works, one of the user prefs may be to view the reading sections in a language other than English, (i.e., read in a non-English language, take the test in English) and again, this is not hard--just have separate source files for the content of the reading part and insert whichever one based on the user pref). This is a LOT easier to do with PHP by just setting the CHAR-SET and displaying HTML than it is to import non-English into Flash. This user pref may have to wait for a "rev 2" of this project ;-) ADthanxVANCE! -sry ---------------------------------------------------------------------- Sarah R. Yoffa http://www.sarahryoffa.com/ sryBoston at hotmail.com "Stupid rules are meant to be changed, not broken." [-sry on sci.space.shuttle, c. 1993] ---------------------------------------------------------------------- ------------------------------------------------------------------------------ _______________________________________________ dev mailing list dev at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Wed Nov 26 10:56:00 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 26 Nov 2003 10:56:00 -0500 Subject: [nycphp-talk] Re: [nycphp-dev] intro & content protection question In-Reply-To: References: Message-ID: <3FC4CD10.20204@nyphp.org> -sry wrote: > Hiya listies, > > I'm cross-posting this to both the dev and talk lists, as I > am not quite sure in which category this really belongs. This is the correct list (NYPHP-Talk), although the NYFE (Frontend) list might be helpful too. http://nyphp.org/lists > I'm brand-spanking new to both PHP and mySQL, though > I've been programming for a number of years (since about > 1985) and am based in C so I think PHP is going to be > pretty easy to pick up. I've had exposure to SQL through Welcome. C is good :) ... > The more I think through the functional flow of this project, > however, the more silly it seems to be involving Flash at all. > The only thing stopping me from keeping it purely PHP at > this point is how to protect the content at the point it appears > in the client browser. Is there any way to do this? Since PHP > parses and then returns HTML to the client, I don't see how > to make the page content not accessible via View | Source > or by saving the resultant page. Ideas? Suggestions? I have little experience in this field (that is of frontend stuff) but I do remember taking some tests online (like at Brainbench way back when). I think they used some type of Javascript to block cutting-pasting, and saving. True, this is easily circumvented, but might be enough for what you need. Lastly, if you can for people to use IE, there are probably a number of ActiveX and browser plugin types of components that could offer the most protection. H From nyphp at enobrev.com Wed Nov 26 11:22:19 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Wed, 26 Nov 2003 11:22:19 -0500 Subject: [nycphp-talk] Re: [nycphp-dev] intro & content protection question In-Reply-To: <3FC4CD10.20204@nyphp.org> Message-ID: > The more I think through the functional flow of this project, however, > the more silly it seems to be involving Flash at all. > The only thing stopping me from keeping it purely PHP at this point is > how to protect the content at the point it appears in the client > browser. Is there any way to do this? Since PHP parses and then > returns HTML to the client, I don't see how to make the page content > not accessible via View | Source or by saving the resultant page. > Ideas? Suggestions? Well there's nothing wrong with using flash strictly for the text display, and it might be one of your easier / more reliable options. Just have the swf on the page call up the correct text (via xml file, getVariable, etc) accodding to what question they are on, and use the swf as the 'text reader' with a scroll bar, etc to allow the user to read all the text. Make sure the text is not selectable (just a basic attribute on a flash text box). This allows you to have easy control of the entire app over nice and comfortable php, and still protect your text with a usable and protective text reader. The reason I say it may be your best option is that no matter WHAT you do, the user COULD just take a screen shot of your text and keep the image files. And if you're generating images, you're giving them something to save already. Flash allows for dynamic text loading without much server side work and a small clientside footprint. And since the text will be dynamic, even if they decompile the swf, the text won't be there. Just make sure your backend script only sends data to the swf In the testing browser. Good luck! Mark From bpang at bpang.com Wed Nov 26 11:34:33 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 26 Nov 2003 11:34:33 -0500 Subject: [nycphp-talk] Re: [nycphp-dev] intro & content protection question Message-ID: You could display the content in a popup window without the menubar and then use javascript to disable the mouse right-click. Sorry, I don't have the code, but I've seen it done. > > Okay, here's my question, I was originally thinking along > the lines of doing this in Flash to protect the content of > the reading tests (don't ask why, just accept I wanted to) > from being lifted. If I dynamically generate the pages, the > resulting content will be HTML that can just be saved and > walked off with by whomever views the pages. From rdumas at cmj.com Wed Nov 26 11:55:11 2003 From: rdumas at cmj.com (Robert Dumas) Date: Wed, 26 Nov 2003 11:55:11 -0500 Subject: [nycphp-talk] Listing files... alphabetically Message-ID: <26F69C024813D811BFFD00508B8FA3E319F078@webproxy.uat.dbinsight.com> Funny you should mention that; when I got home, I grabbed my copy of the PHP Cookbook and saw the same thing. I think the "Doh!" I emitted could be heard a hundred miles away. In either case, thanks for the help. --RD -----Original Message----- From: Adam Maccabee Trachtenberg [mailto:adam at trachtenberg.com] Sent: Wednesday, November 26, 2003 2:02 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Listing files... alphabetically I would be remiss if I did not take this opportunity to mention that Recipe 19.9 in "PHP Cookbook" (Sklar & Trachtenberg) covers "Processing All Files in a Directory (Recursively)." -------------- next part -------------- An HTML attachment was scrubbed... URL: From jlacey at att.net Wed Nov 26 11:59:08 2003 From: jlacey at att.net (John Lacey) Date: Wed, 26 Nov 2003 09:59:08 -0700 Subject: [nycphp-talk] Listing files... alphabetically In-Reply-To: References: <26F69C024813D811BFFD00508B8FA3E319F075@webproxy.uat.dbinsight.com> Message-ID: <3FC4DBDC.5020604@att.net> Adam Maccabee Trachtenberg wrote: > > > Sorry again. I would be remiss if I did not take this opportunity to > mention that Recipe 19.9 in "PHP Cookbook" (Sklar & Trachtenberg) > covers "Processing All Files in a Directory (Recursively)." > ... another cookbook I've found very helpful along with David & Adam's is Paul Dubois' MySQL Cookbook From tgales at tgaconnect.com Wed Nov 26 13:16:57 2003 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 26 Nov 2003 13:16:57 -0500 Subject: [nycphp-talk] RE: [nycphp-dev] intro & content protection question In-Reply-To: Message-ID: <003e01c3b449$7ed9a170$bf8d3818@oberon1> Sarah R. Yoffa writes: "... to protect the content of the reading tests (don't ask why, just accept I wanted to) from being lifted..." If your in the mood to buy something and you have an extra $15 lying around you could look at http://www.aw-soft.com/htmlguard.html It has nothing to do with PHP (per se) but you might be able to work it into your site somehow. T. Gales & Associates Helping People Connect with Technology http://www.tgaconnect.com From sryBoston at hotmail.com Sat Nov 29 16:52:40 2003 From: sryBoston at hotmail.com (-sry) Date: Sat, 29 Nov 2003 16:52:40 -0500 Subject: [nycphp-talk] translating behaviors from JavaScript to PHP Message-ID: [ repost - sent to the wrong list ] > Hiya listies, > > Seems like PHP is a bit of a sledgehammer for web design, > but I like it so far :) > > I'm currently giving my brain a rest from the Flash/text > protection thingy and revisiting a CSS design issue I'm > trying to learn (positioning vs tables). I'm doing this vis a > vis my personal web site. Since I like to keep code as > modularized as possible, I separated out my JavaScript > (for mouseover behavior and other sillyness) into a .js file. > As a mechanism for putting my hands on some PHP as I > learn it, I figured I'd take the existing page design and > behavior and "translate" it into a PHP implementation. > > Obviously, I don't separate the PHP code from the page > (the HTML, CSS, etc.) and obviously I have to adapt the > few aspects of syntax which actually differ (PHP is sooooo > kewl, btw :-) I love that my first language was C, this gives > me such a head start learning any of the new languages > coming out these days!) > > Do I just do a one to one translation of the code? > > http://www.sarahryoffa.com/ > http://www.sarahryoffa.com/mouseovers.js > has the sorta-working table version with the stylesheet > embedded in the HEAD, while > > http://www.sarahryoffa.com/debug/indexDebug.html > http://www.sarahryoffa.com/debug/debugMouseovers.js > has the sorta-working CSS version with the stylesheet > linked in. > > The .css files contain basically identical information and > how they are read by the browser is irrelevant (AFAIK) > > The JavaScript files are also nearly-identical (only difference > is the content of the "answers" to the who, what, where > links). No issues here relevant to this post (but I'm still > trying to figure out why some onmouseovers work right > and others don't when they all have the same code :-( if > anyone knows or wants to look at this problem, I'm still > stumped. mouseover the "what" and then compare the > behaviors of the "University of Massachusetts" and the > "Mechanical Engineering" links to see what I mean.) > > In the tables version, when a long "answer" is displayed on > mouseover, the table readjusts itself and the large image > in the middle/bottom of the screen (with the quote--yellow > for the tables, orange for the CSS version) moves down > nicely. > > In the CSS version, since I'm absolute-positioning, the > long "answer" text just writes itself "under" the quote > image. This is not good. > > The copout solution to tackling the CSS positioning issue is > to simply display that amount of text which will fit into the > "answer" DIV (one paragraph at a time) and if there's more > text, make a ">>" link to continue. This is not hard but > if I'm doing this anyway, I'll want to separate out the dynamically > loaded content of the "answers" into 3 (who, what, where) > text files.This is my preferred modal approach anyway. > > Is there a way in PHP to #include the "next" paragraph of > text (assume I have the "answers" in files named by the > convention of "whoAns.txt", "whatAns.txt" and "whereAns.txt" > all located in the same directory as the page from which they > are called)? Do I need to break the text into edible chunks > ahead of time? Ick, if yes. Ideally, the length and content of the > "answers" will be completely independent of how they get > displayed (separation of design and content). I'm just not sure > of the best approach if the implementation is in PHP. Options > I can think of: > > 1. parse the strings in the "answer.txt" files and count chars, > display up to xxx chars (however many I determine will "fit" > on the screen without flowing into the next DIV), ending with > a space, then display a ">>" to the next paragraph; onClick, > parse the next xxx chars of the string up to a space char and > display them, etc. until the entire string has been displayed. > > PROBLEM with this idea: the string contains HTML (links) > and the tags have TARGETs so between the href info > and the TARGET attributes, I have a lot of non-displaying > characters in the string...this won't accomplish my goal of > displaying equal-sized chunks of text in the small space. > > 2. manually divide up the "answer.txt" strings into paragraphs > using the

    and search the string for these, inserting a ">>" > after each one. > > PROBLEM with this idea: What if one paragraph is long and > another is short? I suppose then, I am modifying my content > to suit the needs of my implementation -- sounds kinda ass- > backwards to me. > > I'm sure there are other ideas on how to do this but these are > the two that jumped out at me. > > -sry > ---------------------------------------------------------------------- > Sarah R. Yoffa > http://www.sarahryoffa.com/ > sryBoston at hotmail.com > "Stupid rules are meant to be changed, not broken." > [-sry on sci.space.shuttle, c. 1993] > ---------------------------------------------------------------------- From jsiegel1 at optonline.net Sun Nov 30 21:22:32 2003 From: jsiegel1 at optonline.net (Jeff Siegel) Date: Sun, 30 Nov 2003 21:22:32 -0500 Subject: [nycphp-talk] Viewing HTTP Headers Message-ID: <3FCAA5E7.5080502@optonline.net> Thought this would be of interest. Jeff Knight told me about Firebird (I'm running the Windows version) and one of the really cool extensions allows you to view HTTP headers. Below is some sample output. Jeff Siegel ==================================================== SAMPLE OUTPUT FROM EXTENSION "LIVE HTTP HEADERS" ==================================================== http://192.168.1.112/mrs/admin/login.php POST /mrs/admin/login.php HTTP/1.1 Host: 192.168.1.112 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://192.168.1.112/mrs/admin/login.php Cookie: PHPSESSID=d637bd1942ff5262fe4a4a5d0ed443a8 Content-Type: application/x-www-form-urlencoded Content-Length: 75 PHPSESSID=d637bd1942ff5262fe4a4a5d0ed443a8&usrname=&password=&Submit=Submit HTTP/1.x 200 OK Date: Sun, 31 Oct 2004 01:17:06 GMT Server: Apache/2.0.40 (Red Hat Linux) Accept-Ranges: bytes X-Powered-By: PHP/4.2.2 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=ISO-8859-1 ----------------------------------------------------------