From hans at nyphp.org Tue Jul 1 09:56:54 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 01 Jul 2003 09:56:54 -0400 Subject: [nycphp-talk] PHP 5.0.0 Beta 1 In-Reply-To: <20030629223415.C5B7DA87C8@virtu.nyphp.org> References: <20030629223415.C5B7DA87C8@virtu.nyphp.org> Message-ID: <3F019326.7010103@nyphp.org> Jon Baer wrote: > is there a more complete list of what protocols are supported (low-level) > with stream_socket_client in 5? I'm going out on a limb here, but I think generally "anything" is supported. http://us4.php.net/manual/en/function.stream-get-transports.php http://us4.php.net/manual/en/function.stream-get-wrappers.php I believe will list what's available by default, and you can register your own wrappers, which entails various behaviors on send/recv etc. H From jonbaer at jonbaer.net Tue Jul 1 13:20:34 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Tue, 1 Jul 2003 10:20:34 -0700 Subject: [nycphp-talk] PHP 5.0.0 Beta 1 References: <20030629223415.C5B7DA87C8@virtu.nyphp.org> <3F019326.7010103@nyphp.org> Message-ID: <004701c33ff5$1525c4c0$6400a8c0@FlipWilson> i was looking for the default list since i tried stream_get_transports() on win32 and red hat and got nothing (bombed on win32) ... has the beta been running ok for u? - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: "Hans Zaunere" To: Sent: Tuesday, July 01, 2003 6:56 AM Subject: Re: [nycphp-talk] PHP 5.0.0 Beta 1 > > > Jon Baer wrote: > > > is there a more complete list of what protocols are supported (low-level) > > with stream_socket_client in 5? > > I'm going out on a limb here, but I think generally "anything" is supported. > > http://us4.php.net/manual/en/function.stream-get-transports.php > http://us4.php.net/manual/en/function.stream-get-wrappers.php > > I believe will list what's available by default, and you can register your own wrappers, which entails various behaviors on send/recv etc. > > H > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From DArmstrong at lucascareers.com Tue Jul 1 12:24:57 2003 From: DArmstrong at lucascareers.com (Armstrong, Dale) Date: Tue, 1 Jul 2003 12:24:57 -0400 Subject: [nycphp-talk] PHP/Postgres/Linux PERM position in NYC. Message-ID: <5E78C9CE14A9C94899DEC75CF243B8990230E37D@ex01.lucas.internal> Hello: I'm looking for the following person: Position is in NY City; Local Candidates get preference; Base Salary is $100K+. Please pay attention to the Skillset at the end of the Job Description. If you are this person, or know someone, please email your resume to me, and I'll be in touch! Regards, Dale Senior Engineer/Developer (VP or CTO Level) - A True Rock Star that can keep up with our business initiatives. The Advertising Technology Experts. We offer an enterprise solution called the Queue Management System to Online Publishers (Forbes, MSN, etc) to streamline their operations. Our Queue Management System ("QMS") is the industry's premier, web-based Ad Operations management system designed specifically for use by publishers, agencies and advertisers. QMS is a processing workflow application that helps companies run their business. QMS does the following to address the issues and problems in the Online and Offline Advertising Industry: * Sales insertion order management (Integrates with sales CRM, i.e. Salesforce.com, SAP, etc.) * Sales operations management * Ad operations task management * Automated and integrated reporting with client ad server (i.e. DoubleClick, etc.) * Automated invoicing, reconciliation and billing We are looking for an intense technology/ business Rock Star to help further develop our QMS platform to include the following business objectives: Further Develop our QMS product for Online Advertising Publishers (Sales, Ad Ops and Billing) Help take our QMS Product into Broadcast Television, Print and Radio Spearhead and Manage Online and Offline Integration projects for the biggest media companies in the world (APIs, XML, etc) Technical Skill Set: UNIX, Linux, PHP, My SQL, Apache, PostGres, C++, databases in General (Oracle, SQL Server, etc). XML and API knowledge a + The product is currently written in PHP, Linux and postgres. That skill set is a massive PLUS. Dale T. Armstrong Staff Recruiter LucasGroup Recruiting Excellence Since 1970 3384 Peachtree Rd., Suite 700 Atlanta, GA 30326 Local: 404-239-5630, Ext. 150 Toll Free: 800-466-4489, Ext. 150 Fax: 404-260-7293 darmstrong at LucasCareers.com www.LucasCareers.com LucasGroup, In Partnership with THE WALL STREET JOURNAL. & CareerJournal Online. ***The information contained in this email is proprietary and confidential and is intended solely for the use of the named addressee. Do not disclose, copy, distribute, or disseminate it to any other party without the expressed consent of the sending party. If you have received this message in error please return the message to the sender by replying to it and then delete the message from your computer. -------------- next part -------------- A non-text attachment was scrubbed... Name: Dale T. Armstrong (DArmstrong at lucascareers.com).vcf Type: text/x-vcard Size: 357 bytes Desc: Dale T. Armstrong (DArmstrong at lucascareers.com).vcf URL: From agfische at email.smith.edu Tue Jul 1 12:35:10 2003 From: agfische at email.smith.edu (Aaron Fischer) Date: Tue, 1 Jul 2003 12:35:10 -0400 Subject: [nycphp-talk] PHP/Postgres/Linux PERM position in NYC. In-Reply-To: <5E78C9CE14A9C94899DEC75CF243B8990230E37D@ex01.lucas.internal> Message-ID: If the message gets posted four times does that mean that it pays $400K+? :-) On Tuesday, Jul 1, 2003, at 12:24 US/Eastern, Armstrong, Dale wrote: > > Hello: I'm looking for the following person: Position is in NY City; > Local Candidates get preference; Base Salary is $100K+. Please pay > attention to the Skillset at the end of the Job Description. > > If you are this person, or know someone, please email your resume to > me, > and I'll be in touch! Regards, Dale > > > Senior Engineer/Developer (VP or CTO Level) - A True Rock Star that can > keep up with our business initiatives. > > The Advertising Technology Experts. We offer an enterprise solution > called the Queue Management System to Online Publishers (Forbes, MSN, > etc) to streamline their operations. > > Our Queue Management System ("QMS") is the industry's premier, > web-based > Ad Operations management system designed specifically for use by > publishers, agencies and advertisers. QMS is a processing workflow > application that helps companies run their business. QMS does the > following to address the issues and problems in the Online and Offline > Advertising Industry: > > * Sales insertion order management (Integrates with sales CRM, > i.e. Salesforce.com, SAP, etc.) > * Sales operations management > * Ad operations task management > * Automated and integrated reporting with client ad server (i.e. > DoubleClick, etc.) > * Automated invoicing, reconciliation and billing > > We are looking for an intense technology/ business Rock Star to help > further develop our QMS platform to include the following business > objectives: > > Further Develop our QMS product for Online Advertising Publishers > (Sales, Ad Ops and Billing) > Help take our QMS Product into Broadcast Television, Print and Radio > Spearhead and Manage Online and Offline Integration projects for the > biggest media companies in the world (APIs, XML, etc) > > Technical Skill Set: > UNIX, Linux, PHP, My SQL, Apache, PostGres, C++, databases in General > (Oracle, SQL Server, etc). XML and API knowledge a + The product is > currently written in PHP, Linux and postgres. That skill set is a > massive PLUS. > > > Dale T. Armstrong > Staff Recruiter > LucasGroup > Recruiting Excellence Since 1970 > > 3384 Peachtree Rd., Suite 700 > Atlanta, GA 30326 > Local: 404-239-5630, Ext. 150 > Toll Free: 800-466-4489, Ext. 150 > Fax: 404-260-7293 > darmstrong at LucasCareers.com > www.LucasCareers.com > > LucasGroup, In Partnership with THE > WALL STREET JOURNAL. & CareerJournal Online. > > ***The information contained in this email is proprietary and > confidential and is intended solely for the use of the named addressee. > Do not disclose, copy, distribute, or disseminate it to any other party > without the expressed consent of the sending party. If you have > received > this message in error please return the message to the sender by > replying to it and then delete the message from your computer. > (DArmstrong at lucascareers.com).vcf>_____________________________________ > __________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From dmintz at panix.com Tue Jul 1 17:52:37 2003 From: dmintz at panix.com (David Mintz) Date: Tue, 1 Jul 2003 17:52:37 -0400 (EDT) Subject: [nycphp-talk] cross-platform master-slave replication ? In-Reply-To: <20030629223416.35879A88C6@virtu.nyphp.org> References: <20030629223416.35879A88C6@virtu.nyphp.org> Message-ID: Hello I'm trying to learn to set up MySQL database replication with two boxes on which I have sufficient privileges to play, one that would be master is Win2K running 3.23.51-max-nt-log; the would-be slave, a RH 7.2 box running 3.23.52 I follow the directions in Paul DuBois' MySQL [4] book verbatim. (He says, match server versions, like use 3.23.x with 3.23.x but he doesn't say anyting about not trying it cross-platform.) I set up the master and restart and it seems ok. I set up the slave configuration thus [mysqld] # stuff snipped # slave config server-id=2 master-host=mintzd.nysd.circ2.dcn master-user=slave master-password=deep.secret and I get a lot of this: Number of processes running now: 2 mysqld process hanging, pid 23568 - killed /usr/bin/safe_mysqld: line 262: kill: (23568) - No such process 030701 17:57:52 mysqld restarted /usr/bin/safe_mysqld: line 273: 23593 Segmentation fault $NOHUP_NICENESS $ledir/$MYSQLD $defaults -- basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-locking >>$err_log 2>&1 Number of processes running now: 1 mysqld process hanging, pid 23596 - killed 030701 17:57:54 mysqld restarted /usr/bin/safe_mysqld: line 273: 23617 Segmentation fault $NOHUP_NICENESS $ledir/$MYSQLD $defaults -- basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file --skip-locking >>$err_log 2>&1 This goes on and on until I kill it. So I comment out the slave configuration lines and try again, and all is well. I've repeated this several times, and hypothesize that it doesn't like being enslaved, but I can't figure out why. Any clues greatly appreciated. Thanks! --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "You want me to pour the beer, Frank?" From hans at nyphp.org Wed Jul 2 10:29:08 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 02 Jul 2003 10:29:08 -0400 Subject: [nycphp-talk] PHP 5.0.0 Beta 1 In-Reply-To: <004701c33ff5$1525c4c0$6400a8c0@FlipWilson> References: <20030629223415.C5B7DA87C8@virtu.nyphp.org> <3F019326.7010103@nyphp.org> <004701c33ff5$1525c4c0$6400a8c0@FlipWilson> Message-ID: <3F02EC34.7010407@nyphp.org> Jon Baer wrote: > i was looking for the default list since i tried stream_get_transports() on > win32 and red hat and got nothing (bombed on win32) ... has the beta been > running ok for u? I'm not too surprised it bombed on Windows, but under RH it should have returned something, I'd think. Any luck trying the other stream_get_* functions? H From hans at nyphp.org Wed Jul 2 10:38:44 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 02 Jul 2003 10:38:44 -0400 Subject: [nycphp-talk] cross-platform master-slave replication ? In-Reply-To: References: <20030629223416.35879A88C6@virtu.nyphp.org> Message-ID: <3F02EE74.9030707@nyphp.org> David Mintz wrote: > Hello > > I'm trying to learn to set up MySQL database replication with two boxes on > which I have sufficient privileges to play, one that would be master is > Win2K running 3.23.51-max-nt-log; the would-be slave, a RH 7.2 box running > 3.23.52 FYI: http://www.phpbuilder.com/columns/tanoviceanu20000912.php3 > I follow the directions in Paul DuBois' MySQL [4] book verbatim. (He says, > match server versions, like use 3.23.x with 3.23.x but he doesn't say > anyting about not trying it cross-platform.) I set up the master and > restart and it seems ok. I set up the slave configuration thus OS platforms shouldn't matter, but try bringing the MySQL versions up to 4.0.13. According to: http://www.mysql.com/doc/en/Replication_Problems.html it may help. H From winston at xylophage.com Wed Jul 2 12:00:18 2003 From: winston at xylophage.com (Winston Churchill-Joell) Date: Wed, 2 Jul 2003 12:00:18 -0400 Subject: [nycphp-talk] PHP session id's in access logs Message-ID: <46DAC58F-ACA6-11D7-87DB-003065569500@xylophage.com> Hi all, I have a question about user session id's showing up in apache access logs. We're trying to do some more in-depth analysis of our traffic and sessions came up, of course. My understanding of how PHP manages sessions is that it will propagate the ID in the URL if the browser doesn't support cookies. So how does a user session become apparent in the access logs when the visitor's browser does support cookies? I apologize if the answer to this question is painfully obvious... Thanks in advance, Winston From dj at waletzky.com Wed Jul 2 12:34:32 2003 From: dj at waletzky.com (D. J. Waletzky) Date: Wed, 02 Jul 2003 16:34:32 -0000 Subject: [nycphp-talk] PHP session id's in access logs In-Reply-To: <46DAC58F-ACA6-11D7-87DB-003065569500@xylophage.com> References: <46DAC58F-ACA6-11D7-87DB-003065569500@xylophage.com> Message-ID: <1057163677.1580.12.camel@pete> Just a thought, but I know Apache can log the username of the client, if you use HTTP authentication. I know when I look at logs for parts of my site which use Apache authentication, it does log my username in a separate field. The relevant variable is $_SERVER["PHP_AUTH_USER"]. The problem is that you may have to get users to authenticate themselves... someone who has a deeper understanding of HTTP authentication should comment here. On Wed, 2003-07-02 at 12:00, Winston Churchill-Joell wrote: > Hi all, > > I have a question about user session id's showing up in apache access > logs. We're trying to do some more in-depth analysis of our traffic and > sessions came up, of course. My understanding of how PHP manages > sessions is that it will propagate the ID in the URL if the browser > doesn't support cookies. So how does a user session become apparent in > the access logs when the visitor's browser does support cookies? I > apologize if the answer to this question is painfully obvious... > > Thanks in advance, > Winston > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk -- D. J. Waletzky dj at waletzky.com "Non sunt multiplicanda entia praeter necessitam." -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 232 bytes Desc: This is a digitally signed message part URL: From winston at xylophage.com Wed Jul 2 12:42:27 2003 From: winston at xylophage.com (Winston Churchill-Joell) Date: Wed, 2 Jul 2003 12:42:27 -0400 Subject: [nycphp-talk] PHP session id's in access logs In-Reply-To: <1057163677.1580.12.camel@pete> Message-ID: <2A57E050-ACAC-11D7-87DB-003065569500@xylophage.com> Well, that did get me thinking about environment variables -- I might be in danger of answering my own question, but is it as simple as disabling session.use_cookies in the .ini file? On Wednesday, July 2, 2003, at 12:34 PM, D. J. Waletzky wrote: > Just a thought, but I know Apache can log the username of the client, > if > you use HTTP authentication. I know when I look at logs for parts of my > site which use Apache authentication, it does log my username in a > separate field. The relevant variable is $_SERVER["PHP_AUTH_USER"]. The > problem is that you may have to get users to authenticate themselves... > someone who has a deeper understanding of HTTP authentication should > comment here. > > On Wed, 2003-07-02 at 12:00, Winston Churchill-Joell wrote: >> Hi all, >> >> I have a question about user session id's showing up in apache access >> logs. We're trying to do some more in-depth analysis of our traffic >> and >> sessions came up, of course. My understanding of how PHP manages >> sessions is that it will propagate the ID in the URL if the browser >> doesn't support cookies. So how does a user session become apparent in >> the access logs when the visitor's browser does support cookies? I >> apologize if the answer to this question is painfully obvious... >> >> Thanks in advance, >> Winston >> >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk > -- > D. J. Waletzky > dj at waletzky.com > > "Non sunt multiplicanda entia praeter necessitam." > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From andrew at digitalpulp.com Wed Jul 2 13:12:22 2003 From: andrew at digitalpulp.com (Andrew Yochum) Date: Wed, 2 Jul 2003 13:12:22 -0400 Subject: [nycphp-talk] PHP session id's in access logs In-Reply-To: <46DAC58F-ACA6-11D7-87DB-003065569500@xylophage.com> References: <46DAC58F-ACA6-11D7-87DB-003065569500@xylophage.com> Message-ID: <20030702171221.GE12303@thighmaster.digitalpulp.com> Hi Winston, On Wed, Jul 02, 2003 at 12:00:18PM -0400, Winston Churchill-Joell wrote: > Hi all, > > I have a question about user session id's showing up in apache access > logs. We're trying to do some more in-depth analysis of our traffic and > sessions came up, of course. My understanding of how PHP manages > sessions is that it will propagate the ID in the URL if the browser > doesn't support cookies. So how does a user session become apparent in > the access logs when the visitor's browser does support cookies? I > apologize if the answer to this question is painfully obvious... Are you trying to log that session ID if using cookie-based sessions? Here's an example from my httpd.conf file for the log format that includes cookies: LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\"" combinedcookie ...which simply adds \"%{Cookie}i\" to log the stock combined log format. You'll get all cookies stored by your site, but at least you have the session ID there for use. Andrew -- Andrew Yochum Digital Pulp, Inc. 212.679.0676x255 andrew at digitalpulp.com From andrew at digitalpulp.com Wed Jul 2 13:26:10 2003 From: andrew at digitalpulp.com (Andrew Yochum) Date: Wed, 2 Jul 2003 13:26:10 -0400 Subject: [nycphp-talk] PHP session id's in access logs In-Reply-To: <20030702171221.GE12303@thighmaster.digitalpulp.com> References: <46DAC58F-ACA6-11D7-87DB-003065569500@xylophage.com> <20030702171221.GE12303@thighmaster.digitalpulp.com> Message-ID: <20030702172609.GG12303@thighmaster.digitalpulp.com> On Wed, Jul 02, 2003 at 01:12:22PM -0400, Andrew Yochum wrote: [...] > Are you trying to log that session ID if using cookie-based sessions? > > Here's an example from my httpd.conf file for the log format that includes > cookies: > LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\"" combinedcookie > ...which simply adds \"%{Cookie}i\" to log the stock combined log format. > You'll get all cookies stored by your site, but at least you have the session > ID there for use. > > Andrew I should also mention that if you're using Apache 2.0, you can log a specific cookie value with %{cookiename}C ... See: http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#formats Andrew -- Andrew Yochum Digital Pulp, Inc. 212.679.0676x255 andrew at digitalpulp.com From winston at xylophage.com Wed Jul 2 13:43:20 2003 From: winston at xylophage.com (Winston Churchill-Joell) Date: Wed, 2 Jul 2003 13:43:20 -0400 Subject: [nycphp-talk] PHP session id's in access logs In-Reply-To: <20030702172609.GG12303@thighmaster.digitalpulp.com> Message-ID: Hi Andrew, Yes, we are using 2.0 -- thanks for the code snippet and for pointing me in the right direction! Best, Winston On Wednesday, July 2, 2003, at 01:26 PM, Andrew Yochum wrote: > On Wed, Jul 02, 2003 at 01:12:22PM -0400, Andrew Yochum wrote: > [...] >> Are you trying to log that session ID if using cookie-based sessions? >> >> Here's an example from my httpd.conf file for the log format that >> includes >> cookies: >> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" >> \"%{User-Agent}i\" \"%{Cookie}i\"" combinedcookie >> ...which simply adds \"%{Cookie}i\" to log the stock combined log >> format. >> You'll get all cookies stored by your site, but at least you have the >> session >> ID there for use. >> >> Andrew > > I should also mention that if you're using Apache 2.0, you can log a > specific > cookie value with %{cookiename}C ... See: > http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#formats > > Andrew > > -- > Andrew Yochum > Digital Pulp, Inc. > 212.679.0676x255 > andrew at digitalpulp.com > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From ttoomey at ydnt.com Thu Jul 3 12:02:06 2003 From: ttoomey at ydnt.com (Tim Toomey) Date: Thu, 3 Jul 2003 11:02:06 -0500 Subject: [nycphp-talk] batch print Message-ID: <003e01c3417c$768629c0$8b00a8c0@timmerslaptop> Is it possible to batch print an entire mysql table in detailed view with php? My work wants to be able to batch print the entire day's orders with a few clicks (in the detailed invoice view) and I don't think I can do it without getting all the invoices forwarded individually to say outlook and then have them batch printed there. thanks, -timmy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at wnymusic.com Thu Jul 3 14:49:48 2003 From: jay at wnymusic.com (Jay) Date: Thu, 3 Jul 2003 14:49:48 -0400 Subject: [nycphp-talk] Speed/Bandwidth Tests? References: Message-ID: <02a601c34193$e12bd510$e400fa0a@synacor.com> Anyone here have any experience with bandwidth testing? Basically, I'm looking to determine a website visitor's connection speed so I can direct them to an appropriate media stream. Looking for a PHP solution but an Javascript/applet one will work just fine. Thanks! Jay G. From hans at nyu.edu Thu Jul 3 15:25:16 2003 From: hans at nyu.edu (Hans Zaunere) Date: Thu, 03 Jul 2003 15:25:16 -0400 Subject: [nycphp-talk] [Fwd: Web defacement challenge] Message-ID: <3F04831C.2060009@nyu.edu> This is probably old news for many of you, but I figured I'd pass it on. I'm seeing a flurry unknown/unauthorized hits on our sites here at work, but the 'contestants' haven't proved anything yet. Anyway, enjoy the 4th, H -------- Original Message -------- Subject: Re: Web defacement challenge Date: Wed, 02 Jul 2003 13:14:39 -0400 To: NYU Security Alert list The actual challenge information can be found at http://www.defacers-challenge.com/defeng.htm > Date: Wed, 2 Jul 2003 12:24:17 -0400 > Subject: Web defacement challenge > To All NYU Webserver Administrators: > > It had come to our attention from several credible sources that there > is a open hacker challenge for this holiday weekend. Specifically, to > deface 6000 web sites in 6 hours on July 4th. Unfortunately, I don't > have more specific information, but the ISS security company is > investigating and will post more info as it's available on their > X-force web page: > > http://xforce.iss.net/index.php > > July 4th weekend has traditionally been a popular time for launching > of new compromises, or new exploits for known compromises. So, it > would be in your best interests to check to make sure that your > servers are up to date on all patches, and that you keep an eye out > for strange behavior over the weekend. If you pick up anything > unusual, please let us know at > From jonbaer at jonbaer.net Thu Jul 3 20:21:33 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Thu, 3 Jul 2003 17:21:33 -0700 Subject: [nycphp-talk] batch print References: <003e01c3417c$768629c0$8b00a8c0@timmerslaptop> Message-ID: <00c001c341c2$39a23b20$6400a8c0@FlipWilson> are u looking for the bit of code to send data to print or what the sql would be? - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: Tim Toomey To: talk at lists.nyphp.org Sent: Thursday, July 03, 2003 9:02 AM Subject: [nycphp-talk] batch print Is it possible to batch print an entire mysql table in detailed view with php? My work wants to be able to batch print the entire day's orders with a few clicks (in the detailed invoice view) and I don't think I can do it without getting all the invoices forwarded individually to say outlook and then have them batch printed there. thanks, -timmy ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From ttoomey at ydnt.com Thu Jul 3 18:01:39 2003 From: ttoomey at ydnt.com (Tim Toomey) Date: Thu, 3 Jul 2003 17:01:39 -0500 Subject: [nycphp-talk] batch print References: <003e01c3417c$768629c0$8b00a8c0@timmerslaptop> <00c001c341c2$39a23b20$6400a8c0@FlipWilson> Message-ID: <002201c341ae$b18934e0$8b00a8c0@timmerslaptop> I was kind of looking for both, I eventually found a contribution that made database entries into .pdf files so I could batch print so I cheated a bit. :) -timmy ----- Original Message ----- From: Jon Baer To: NYPHP Talk Sent: Thursday, July 03, 2003 7:21 PM Subject: Re: [nycphp-talk] batch print are u looking for the bit of code to send data to print or what the sql would be? - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: Tim Toomey To: talk at lists.nyphp.org Sent: Thursday, July 03, 2003 9:02 AM Subject: [nycphp-talk] batch print Is it possible to batch print an entire mysql table in detailed view with php? My work wants to be able to batch print the entire day's orders with a few clicks (in the detailed invoice view) and I don't think I can do it without getting all the invoices forwarded individually to say outlook and then have them batch printed there. thanks, -timmy ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.net Fri Jul 4 00:40:14 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Thu, 3 Jul 2003 21:40:14 -0700 Subject: [nycphp-talk] batch print References: <003e01c3417c$768629c0$8b00a8c0@timmerslaptop><00c001c341c2$39a23b20$6400a8c0@FlipWilson> <002201c341ae$b18934e0$8b00a8c0@timmerslaptop> Message-ID: <01fd01c341e6$5c8d6640$6400a8c0@FlipWilson> very nice ... was it using PDFlib or doing it on it's own? in any case, here is a snippet for mixing javascript/php for printing ... - jon


stuff to print pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: Tim Toomey To: NYPHP Talk Sent: Thursday, July 03, 2003 3:01 PM Subject: Re: [nycphp-talk] batch print I was kind of looking for both, I eventually found a contribution that made database entries into .pdf files so I could batch print so I cheated a bit. :) -timmy ----- Original Message ----- From: Jon Baer To: NYPHP Talk Sent: Thursday, July 03, 2003 7:21 PM Subject: Re: [nycphp-talk] batch print are u looking for the bit of code to send data to print or what the sql would be? - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: Tim Toomey To: talk at lists.nyphp.org Sent: Thursday, July 03, 2003 9:02 AM Subject: [nycphp-talk] batch print Is it possible to batch print an entire mysql table in detailed view with php? My work wants to be able to batch print the entire day's orders with a few clicks (in the detailed invoice view) and I don't think I can do it without getting all the invoices forwarded individually to say outlook and then have them batch printed there. thanks, -timmy -------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Sat Jul 5 15:35:58 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Sat, 5 Jul 2003 15:35:58 -0400 Subject: [nycphp-talk] security focus 6/30 Message-ID: <20030705193558.GA24688@panix.com> PHP related highlights from SecurityFocus Newsletter #203 ----------------------------- Tutos File_Select.PHP Cross-Site Scripting Vulnerability http://www.securityfocus.com/bid/8011 Tutos File_New Arbitrary File Upload Vulnerability http://www.securityfocus.com/bid/8012 XMB Forum Multiple Cross-Site Scripting And HTML Injection http://www.securityfocus.com/bid/8013 VisNetic WebMail Information Disclosure Vulnerability http://www.securityfocus.com/bid/8018 Multiple GuestBookHost HTML Injection Vulnerabilities http://www.securityfocus.com/bid/8025 Enjoy, --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From southwell at dneba.com Mon Jul 7 22:11:09 2003 From: southwell at dneba.com (Michael Southwell) Date: Mon, 07 Jul 2003 22:11:09 -0400 Subject: [nycphp-talk] need some (sorry) ASP help Message-ID: <5.1.0.14.2.20030707220949.00b37300@mail.optonline.net> Help! I can do this stuff blindfolded in PHP but now I am forced to do some work on a windows server using ASP. I hope you don't mind my imposing on you all for a tiny bit of help. I have photos and legends for them in an array. I pass a variable for which photo and legend to a display script with no problem for the photo, but how do I pick up the variable for the array element? Here are the relevant lines from the display script: ========================== .jpg">
<% response.write legend(2) %> =========================== In the second line I have hard-wired element 2 just for testing, but obviously I want the ASP equivalent of $legend($which). Maybe I could figure out how to do this eventually, but I know somebody out there can tell me how in 15 seconds. TIA, and again I apologize for this OT question. I know there is an asp list out there somewhere; if somebody can point me at that, I'll never have to bother any of you with this stuff again--I hope. 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 Ed at ComSimplicity.com Mon Jul 7 23:32:26 2003 From: Ed at ComSimplicity.com (Ed McCarroll) Date: Mon, 7 Jul 2003 20:32:26 -0700 Subject: [nycphp-talk] need some (sorry) ASP help In-Reply-To: <5.1.0.14.2.20030707220949.00b37300@mail.optonline.net> Message-ID: For a good list that is less PHP-centric (not that that's a bad thing) go to: http://lists.evolt.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ed McCarroll MailTo:Ed at ComSimplicity.com ComSimplicity (310) 838-4330 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - From frankaltea at yahoo.com Tue Jul 8 09:33:51 2003 From: frankaltea at yahoo.com (Francisco Altea) Date: Tue, 8 Jul 2003 06:33:51 -0700 (PDT) Subject: [nycphp-talk] OT: Need some advice on Grad. Studies in Comp. Sci. In-Reply-To: <000001c34417$59fcc460$6501a8c0@main> Message-ID: <20030708133351.67923.qmail@web80505.mail.yahoo.com> It all depends on what your interests are actually. Look for researches that the faculty are doing and see if you want to be part of it. The websites of the school department is a good start. Look also into the tools and technology these researches are using. Stick to the open source technologies. Math expertise or the lack of it will factor in depending on the specific field you want to go into. I guess what I am saying is you have to know where to start and proceed from there. It will also determine if you want to get "married" into it. Hope this helps. __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From danielc at analysisandsolutions.com Tue Jul 8 09:57:12 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Tue, 8 Jul 2003 09:57:12 -0400 Subject: [nycphp-talk] highlights from SecurityFocus Newsletter #204 Message-ID: <20030708135712.GA6484@panix.com> Interesting Article... ----------------------------- Penetration Testing for Web Applications (Part Two) http://www.securityfocus.com/infocus/1709 PHP Related Vulnerabilities... ----------------------------- Mantis Weak Configuration File Permission Vulnerability http://www.securityfocus.com/bid/8059 CutePHP CuteNews HTML Injection Vulnerability http://www.securityfocus.com/bid/8060 PABox Password Reset Vulnerability http://www.securityfocus.com/bid/8067 PABox Admin Control Panel PHP Code Injection Vulnerability http://www.securityfocus.com/bid/8068 --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 Tue Jul 8 09:58:49 2003 From: dkrook at hotmail.com (D C Krook) Date: Tue, 08 Jul 2003 09:58:49 -0400 Subject: [nycphp-talk] need some (sorry) ASP help Message-ID: Michael, My ASP's a bit rusty, but this may be what you need. <% Dim w w = Request("which") %> <%= legend(w) %> >Help! I can do this stuff blindfolded in PHP but now I am forced to do >some work on a windows server using ASP. >I hope you don't mind my imposing on you all for a tiny bit of help. > >I have photos and legends for them in an array. I pass a variable for >which photo and legend to a display >script with no problem for the photo, but how do I pick up the variable for >the array element? > >Here are the relevant lines from the display script: >========================== >.jpg">
><% response.write legend(2) %> >=========================== > >In the second line I have hard-wired element 2 just for testing, but >obviously I want the ASP >equivalent of $legend($which). Maybe I could figure out how to do this >eventually, but I know >somebody out there can tell me how in 15 seconds. TIA, and again I >apologize for this OT question. > >I know there is an asp list out there somewhere; if somebody can point me >at that, I'll never have to >bother any of you with this stuff again--I hope. > > >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 >====================================================== _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From nyphp at websapp.com Tue Jul 8 10:18:38 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Tue, 8 Jul 2003 10:18:38 -0400 Subject: [nycphp-talk] Interesting Article about .NET Message-ID: I noticed a nice article about .NET. It is important to know what's happening in the online world. Quote from the article: "Three years later, most of the hopes behind the .Net initiative have not been realized," Helms said, adding that .Net has now almost vanished from Microsoft's vocabulary. END QUOTE The article can be found at http://www.eweek.com/article2/0,,1184728,00.asp . Best, Daniel Kushner Vice President, New York PHP http://nyphp.org/ daniel at nyphp.org From wheelie at acedsl.com Tue Jul 8 11:51:34 2003 From: wheelie at acedsl.com (Joshua Glenn) Date: Tue, 8 Jul 2003 11:51:34 -0400 Subject: [nycphp-talk] Question about encryption In-Reply-To: Message-ID: Hey All, I'm working on a site and the client has made the username and password for members of the site a combination of their ID and lastname. I know, it's terribly unsecure, but none the less that's what I have to work with. So, a username looks like 123456GLENN and the password (which is also their ID) would be 123456. The ID of a member needs to be passed in the URL on occasion and I was thinking of using some sort of encryption on the ID in the URL. However, after looking at the different encryption methods I'm a bit confused and wondering if anybody out there has a better idea. Thanks, Josh From nyphp at websapp.com Tue Jul 8 15:00:30 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Tue, 8 Jul 2003 15:00:30 -0400 Subject: [nycphp-talk] Job Offer - QA & Support Engineer Message-ID: The list seems to be pretty quiet so I am trying to liven things up by posting job offers :) QA & Support Engineer For testing cutting edge media rich Internet applications & development tools. Be a part of a great and innovative team and be a driving force for continuous excellence through innovation. * Good understanding of Internet technologies * Working knowledge of HTML & JavaScript * Experience with using Flash an advantage * Programming experience an advantage * Self motivated, responsible & methodical * Articulate, great human skills a must! Please contact gil at oddcast.com (mention NYPHP) Best, Daniel Kushner Vice President, New York PHP http://nyphp.org/ daniel at nyphp.org From David.SextonJr at ubs.com Tue Jul 8 15:38:28 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Tue, 8 Jul 2003 15:38:28 -0400 Subject: [nycphp-talk] Question about encryption Message-ID: <18D7B8CAA5284F478470828806DB124603789EC6@psle01.xchg.pwj.com> If you really need to make your auth process virtually hack-proof, you should use SSL. I've never used PHP's OpenSSL functions, but you might want to check into it if that type of security is warranted. The username/password scheme that has been chosen is just adding to the probability that unauthorized access will occur, but maybe you want to create a system where users can modify their own passwords, or use another service to authenticate against a more secure user database. For example, permissioning a group of users to access an FTP directory, then trying the connection using PHP's FTP functions against the FTP service. On NT, this is nice because you don't have to maintain another user database, and users can change their domain passwords whenever they want (and it would filter down to your app automatically). As for passing user id's around, why not use sessions? They are easier to work with and provide a little more security in that the user's credentials aren't floating back and forth (although it doesn't address session hijacking). Hope it gives you some ideas. -----Original Message----- From: Joshua Glenn [mailto:wheelie at acedsl.com] Sent: Tuesday, July 08, 2003 11:52 AM To: NYPHP Talk Subject: [nycphp-talk] Question about encryption Hey All, I'm working on a site and the client has made the username and password for members of the site a combination of their ID and lastname. I know, it's From bpang at bpang.com Tue Jul 8 16:08:28 2003 From: bpang at bpang.com (Brian Pang) Date: Tue, 08 Jul 2003 16:08:28 -0400 Subject: [nycphp-talk] Question about encryption Message-ID: When I have to auto-gen passwords, I typically base them off of some other required information and encrypt/encode them one way or another (and use a substring thereof) (depends if I need to be able to decrypt them or not). Like this, or some variation: $passGenStr = $ID . $firstName; $generatedPassword = substr(base64_encode($passGenStr), 3, 12); at least this way it's (nominally) harder to figure out which part of the base64_encoded string you've used. Of course, somebody could figure out some way to decode them or reverse engineer the process. I would certainly never store them in the database without some form of encryption/encoding (again, it depends if I need to be able to decrypt them or not) regardless of what method I used to auto-gen the password in the first place. I would certainly advise against the method described in your original email as it is far to easy to figure out. Still, there is the issue of interception, but that's something else entirely. > If you really need to make your auth process virtually hack-proof, you > should use SSL. I've never used PHP's OpenSSL functions, but you might want > to check into it if that type of security is warranted. > > The username/password scheme that has been chosen is just adding to the > probability that unauthorized access will occur, but maybe you want to > create a system where users can modify their own passwords, or use another > service to authenticate against a more secure user database. For example, > permissioning a group of users to access an FTP directory, then trying the > connection using PHP's FTP functions against the FTP service. On NT, this is > nice because you don't have to maintain another user database, and users can > change their domain passwords whenever they want (and it would filter down > to your app automatically). > > As for passing user id's around, why not use sessions? They are easier to > work with and provide a little more security in that the user's credentials > aren't floating back and forth (although it doesn't address session > hijacking). > > Hope it gives you some ideas. > > -----Original Message----- > From: Joshua Glenn [mailto:wheelie at acedsl.com] > Sent: Tuesday, July 08, 2003 11:52 AM > To: NYPHP Talk > Subject: [nycphp-talk] Question about encryption > > > Hey All, > > I'm working on a site and the client has made the username and password for > members of the site a combination of their ID and lastname. I know, it's > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From oprusak at trafficmac.com Wed Jul 9 10:07:41 2003 From: oprusak at trafficmac.com (Ophir Prusak) Date: Wed, 9 Jul 2003 10:07:41 -0400 Subject: [nycphp-talk] Job offer - Two Senior Developers Message-ID: <012101c34623$765fdee0$8701a8c0@sparta> Hi All, The company I work for - www.TrafficMac.com is looking to hire two senior developers. Please send cover letter and resume to techjobs at trafficmac.com with "Senior Developer - NYPHP list" in the subject line. No phone calls please. Here's the official job description: Trafficmac is looking to hire two Senior Internet Application Developers. Trafficmac is a process company. We specialize in implementing, streamlining and automating work flow process for the advertising industry. The ideal candidate would have been responsible for hands-on development of complex, database driven web sites. Required Skill Sets: - Bachelors degree in Computer Science with 4-6 years programming experience. - Experience as a senior developer in a formal software development environment on several web based projects. - Thorough understanding of software engineering concepts and principles - Experience working in a team environment. - Experience using CVS. - At least 2 years experience using PHP (including OO). - Advanced knowledge of web protocols and web related programming requirements - Advanced knowledge of the UNIX operating system (preferably FreeBSD) - Experience building highly interactive, database-driven web applications - Advanced understanding of databases (preferably PostgreSQL and Oracle) including highly complex database and query design (stored procedures, query optimization, etc). - Advanced understanding of fault tolerant web site architecture. - Experience with Smarty Templates a plus. - Experience with online advertising a plus. - Excellent written and verbal communication skills. Please include URLs of sites that you've developed, preferably at least %50 of the code base. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Wed Jul 9 11:29:37 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 09 Jul 2003 11:29:37 -0400 Subject: [nycphp-talk] Proper File Downloads Across Browsers Message-ID: <3F0C34E1.3060509@nyphp.org> Hey all, I've written a file/report manager for our Intranet, and it entails mostly of presenting a directory listing, some meta data, and then allowing the user to download the file, or if it's a zip, to browse it online. Things have worked out smashingly, but I ran into some oddities when presenting a file for download. I currently have something along the lines of: header('Content-type: application/x-download'); header("Content-Disposition: attachment; filename={$meta['filesaveas']}"); readfile(DATADIR.$meta[FILE]); This causes both IE and Mozilla to properly present the Save As dialog box, and save the file without munging the extension, etc. However, I realize that application/x-download isn't a valid MIME type, so it's basically working by default, rather than by design. I had originally used application/octet-stream for the Content-type, which worked with Mozilla, but IE 6.0 insisted it was a WinZip file and would append .zip to my prepared filename (which is generally .rpt for Crystal Reports). If anyone has any best-practice ideas for the proper MIME type to use, I'd appreciate it. To be safe, I'll need to support Netscape 4.7 and IE 5.5 or better versions of either. I'd like to avoid browser detection if possible, but if someone has a surefire Browser Version => Content-Type mapping, I would toss get_browser() into the mix. Thanks, H From nyphp at websapp.com Wed Jul 9 11:44:46 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Wed, 9 Jul 2003 11:44:46 -0400 Subject: [nycphp-talk] Job Offer Postings Message-ID: Hi NYPHPers, The job market seems to be picking up lately and NYPHP is receiving more job offers than ever. In order to keep the lists clean and on topic, we will be posting job offers to the jobs mailing list (jobs at lists.nyphp.org). If you are interested in receiving these offers, please sign up at http://lists.nyphp.org/mailman/listinfo/jobs . If any of you would like to post a job offer, please also use the jobs list and not talk at lists.nyphp.org. Thank you and have a great summer, Daniel Kushner Vice President, New York PHP http://nyphp.org/ daniel at nyphp.org From nyphp at psydeshow.org Wed Jul 9 12:53:43 2003 From: nyphp at psydeshow.org (Chris Snyder) Date: Wed, 09 Jul 2003 12:53:43 -0400 Subject: [nycphp-talk] Proper File Downloads Across Browsers In-Reply-To: <3F0C34E1.3060509@nyphp.org> References: <3F0C34E1.3060509@nyphp.org> Message-ID: <3F0C4897.9040006@psydeshow.org> The header combination I've had the most luck with looks like: > Content-Disposition: attachment; > filename="mx1200-photos-2002-02-12-coffee[1].zip" > Content-Length: 181041 > Cache-Control: private > Content-Type: application/x-zip-compressed I still have some users who have to right-click and choose Save Target As. I don't know of a magic MIME-type that works for all files, I thought application/octet-stream was it, but if IE has associated that with zip (or any other filetype) in the past, then good luck. In other words, the MIME-type is more of an associative hint to the browser-- if you use application/x-crystal-report, and instruct your users to associate that with the proper application, then it will work from there. If the reports are plain-text or html, then use the appropriate mime type -- of course IE may act broken and try to suggest a filename suffix that it will understand later when it doesn't have the benefit of a content-type header to guide it. It's frustrating, but you can see why they made it that way. chris. From jonbaer at jonbaer.net Wed Jul 9 15:36:01 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Wed, 9 Jul 2003 12:36:01 -0700 Subject: [nycphp-talk] XML <-> Globals Message-ID: <008201c34651$548dcba0$6400a8c0@FlipWilson> im trying to attempt to dump some properties for an application into an xml file that looks as such: bar jon baer 00:30:00 and using phpxmlclasses ... "); } $parser = new Path_parser(); $parser->set_handler("/register/global","register"); if(!$parser->parse_file("globals.xml")) { print("Error:".$parser->get_error()."
\n"); } ?> what id like to end up w/ is a common file that all my objects/pages can read and dump into something like $_XML['foo'] similar to the other predefined variables. what is the best method to attempt this if i want my order to go as such: XML->SESSION->POST->GET->etc. im trying to do the same with $_REMOTE['foo'] to read a connection if it can be made. if i place it in the auto_include (php.ini) would this work? pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From nyphp at NewAgeWeb.com Wed Jul 9 12:58:11 2003 From: nyphp at NewAgeWeb.com (Jerry Kapron) Date: Wed, 09 Jul 2003 12:58:11 -0400 Subject: [nycphp-talk] Compressing PDF's Message-ID: <002501c3463b$48775220$de01a8c0@duron.lan.newageweb.com> Does anyone know of a way to compress an *existing* raw PDF (ascii) file in LAMP environment? cheers, Jerry From hans at nyphp.org Wed Jul 9 15:18:02 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 09 Jul 2003 15:18:02 -0400 Subject: [nycphp-talk] XML <-> Globals In-Reply-To: <008201c34651$548dcba0$6400a8c0@FlipWilson> References: <008201c34651$548dcba0$6400a8c0@FlipWilson> Message-ID: <3F0C6A6A.2040502@nyphp.org> Jon Baer wrote: > im trying to attempt to dump some properties for an application into an xml > file that looks as such: > > > > bar > jon baer > 00:30:00 > > > and using phpxmlclasses ... > > include_once("class_path_parser.php"); > > function register($name,$attribs,$content) { > $key = $attribs['name']; > echo("Key: $key Value: $content
"); > } > > $parser = new Path_parser(); > $parser->set_handler("/register/global","register"); > if(!$parser->parse_file("globals.xml")) { > print("Error:".$parser->get_error()."
\n"); > } > ?> > > what id like to end up w/ is a common file that all my objects/pages can > read and dump into something like $_XML['foo'] similar to the other > predefined variables. what is the best method to attempt this if i want my > order to go as such: XML->SESSION->POST->GET->etc. AFAIK, you can't create your own, true, superglobals. Thus, there'd be no way to specify the variables_order for an userland var like $_XML (since it's not really a superglobal) > im trying to do the same with $_REMOTE['foo'] to read a connection if it can > be made. > > if i place it in the auto_include (php.ini) would this work? Yeah, but even an auto_included file is much later than when the real superglobals get created. To emulate user defined superglobals at runtime, I've done the nasty: $_SERVER['XML'] = array('new','york','php'); function foo() { echo implode('-',$_SERVER['XML']); new-york-php } Which keeps an array named XML out of the global namespace; otherwise, $GLOBALS is probably best. H From hans at nyphp.org Wed Jul 9 15:23:12 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 09 Jul 2003 15:23:12 -0400 Subject: [nycphp-talk] Compressing PDF's In-Reply-To: <002501c3463b$48775220$de01a8c0@duron.lan.newageweb.com> References: <002501c3463b$48775220$de01a8c0@duron.lan.newageweb.com> Message-ID: <3F0C6BA0.1040302@nyphp.org> Hey Jerry, Jerry Kapron wrote: > Does anyone know of a way to compress an *existing* raw PDF (ascii) file in > LAMP environment? Since PDF is just text, why not gzip, bzip2 or even zip? For example, $compressed = `/usr/bin/gzip -c something.pdf`; [those are backticks] And I think newer versions of PHP support this type of thing internally via http://us2.php.net/zlib H From hans at nyphp.org Wed Jul 9 15:29:58 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 09 Jul 2003 15:29:58 -0400 Subject: [nycphp-talk] Proper File Downloads Across Browsers In-Reply-To: <3F0C4897.9040006@psydeshow.org> References: <3F0C34E1.3060509@nyphp.org> <3F0C4897.9040006@psydeshow.org> Message-ID: <3F0C6D36.9010009@nyphp.org> Chris Snyder wrote: > The header combination I've had the most luck with looks like: > >> Content-Disposition: attachment; >> filename="mx1200-photos-2002-02-12-coffee[1].zip" >> Content-Length: 181041 >> Cache-Control: private >> Content-Type: application/x-zip-compressed I forgot about the Content-Length; that's probably a good call in general. > I still have some users who have to right-click and choose Save Target As. > I don't know of a magic MIME-type that works for all files, I thought > application/octet-stream was it, but if IE has associated that with zip > (or any other filetype) in the past, then good luck. > > In other words, the MIME-type is more of an associative hint to the > browser-- if you use application/x-crystal-report, and instruct your > users to associate that with the proper application, then it will work > from there. If the reports are plain-text or html, then use the > appropriate mime type -- of course IE may act broken and try to suggest > a filename suffix that it will understand later when it doesn't have the > benefit of a content-type header to guide it. It's frustrating, but you > can see why they made it that way. I can? :) In my situation, the user won't have a registered application for the file they download, so my best bet will be to force a download. Oddly enough, I've found if you put application/lalala (gibberish) as the MIME sub-type, all browsers will download it. So, by default, not design - ahh, good ol' MIME Thanks, H From ejp at well.com Wed Jul 9 15:31:58 2003 From: ejp at well.com (Edward Potter) Date: Wed, 9 Jul 2003 15:31:58 -0400 Subject: [nycphp-talk] Compressing PDF's In-Reply-To: <3F0C6BA0.1040302@nyphp.org> Message-ID: <018C08F1-B244-11D7-AAA6-000393BE4E42@well.com> Hmmm, I would suspect that Adobe has compressed their PDF's as far as possible? Kinda of like trying to compress an .mp3? Of course I could be totally wrong, since I have not tried. -e On Wednesday, July 9, 2003, at 03:23 PM, Hans Zaunere wrote: > > Hey Jerry, > > Jerry Kapron wrote: >> Does anyone know of a way to compress an *existing* raw PDF (ascii) >> file in >> LAMP environment? > > Since PDF is just text, why not gzip, bzip2 or even zip? For example, > > $compressed = `/usr/bin/gzip -c something.pdf`; > > [those are backticks] > > And I think newer versions of PHP support this type of thing > internally via http://us2.php.net/zlib > > H > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jeffknight at mac.com Wed Jul 9 16:02:19 2003 From: jeffknight at mac.com (Jeff Knight) Date: Wed, 9 Jul 2003 16:02:19 -0400 Subject: [nycphp-talk] Compressing PDF's In-Reply-To: <018C08F1-B244-11D7-AAA6-000393BE4E42@well.com> Message-ID: <3EF2CD4E-B248-11D7-8A1E-000393B9FB36@mac.com> I was able to .zip my printer manual from 3.33MB to 2.33. On Wednesday, July 9, 2003, at 03:31 PM, Edward Potter wrote: > Hmmm, I would suspect that Adobe has compressed their PDF's as far as > possible? > > Kinda of like trying to compress an .mp3? Of course I could be totally > wrong, since I have not tried. > > -e > > > > On Wednesday, July 9, 2003, at 03:23 PM, Hans Zaunere wrote: > >> >> Hey Jerry, >> >> Jerry Kapron wrote: >>> Does anyone know of a way to compress an *existing* raw PDF (ascii) >>> file in >>> LAMP environment? >> >> Since PDF is just text, why not gzip, bzip2 or even zip? For example, >> >> $compressed = `/usr/bin/gzip -c something.pdf`; >> >> [those are backticks] >> >> And I think newer versions of PHP support this type of thing >> internally via http://us2.php.net/zlib >> >> H >> >> >> >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk >> > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > Jeff Knight jeff at lushmedia.com 212/213-6558 x 203 888/852-8508 LUSH media 110 W 40th St #1502 New York, NY 10018 From nyphp at NewAgeWeb.com Thu Jul 10 04:26:30 2003 From: nyphp at NewAgeWeb.com (Jerry Kapron) Date: Thu, 10 Jul 2003 04:26:30 -0400 Subject: [nycphp-talk] Compressing PDF's Message-ID: <003501c346bc$f7883280$de01a8c0@duron.lan.newageweb.com> >Hans Zaunere wrote: >Since PDF is just text, why not gzip, bzip2 or even zip? I know I wasn't specific enough, when I said "compress". Raw PDF format is just text. However contents of a PDF file can be optimized (compressed). I'm not looking to create a .zip or .gz file (that would be a nobrainer). I want to compress the PDF file "internally". Most PDF's created with Acrobat/Distiller are already compressed. If you download this PDF: http://www.tax.state.ny.us/pdf/2000/wt/nys45mn_100.pdf and open it in a text editor, you'll see that some parts are binary. Those are FlateCoded content streams. The file I'm working with was created with Adobe Illustrator and saved as raw PDF (text only). I need raw PDF to use it as a template (by preg_replacing some "variable text"). The problem is that the file is 700Kb (way too big for this web app). When I open it and save optimized in Adobe Distiller, the size is reduced to 195Kb, but the compressed file can not be used directly as a template anymore. I could take two different routes: 1) use the raw PDF file as a template > preg_replace some text > compress the new PDF > send it to the client 2) use an already compressed PDF file as a template > fetch and uncompress the FlateCoded streams > preg_replace some text > recompress the modified content > send the new PDF to the client. I know I could also use PDF4PHP to create a compressed PDF file from scratch but for performance reasons I really wanted to stick to using a template file. I searched the web but could not find any ready code specifically for what I want to do. I'm looking under the hood of the PDF4PHP class (it support FlateDecode compression) to get an idea how to uncompress the compressed streams. Any suggestions, pointers or code would be greatly appreciated. Cheers, Jerry -------------- next part -------------- An HTML attachment was scrubbed... URL: From joehark at earthlink.net Thu Jul 10 06:20:57 2003 From: joehark at earthlink.net (joe) Date: Thu, 10 Jul 2003 06:20:57 -0400 Subject: [nycphp-talk] embedding one web page in another In-Reply-To: <003501c346bc$f7883280$de01a8c0@duron.lan.newageweb.com> Message-ID: <5.0.0.25.2.20030710062016.0194e370@earthlink.net> Total newbie question. I'm trying to create a web page that will include a complete secure page from page from a site where I am an affiliate. My goal, eventually, is to put this secure page in a table on one of my pages. As the first step, I've learned to embed using Yahoo as an example. But when I change the URL from Yahoo to the secure page, I'm getting error messages. The example below (url_test04.php) substitutes XXXs for the affilaite ID code but in reality I'm using the right code and it opens normally in my browser. here's what works: QUOTE END QUOTE But when I change to: $theurl='https://secure.onlineaccess.net/cart/manage.php?ID= XXXXXXXXXX' ; I get the following errors: Warning: Unable to access https://secure.onlineaccess.net/cart/manage.php?ID=XXXXXXXXXXXXX in /home/virtual/site1/fst/var/www/html/url_test04.php on line 13 Warning: fopen("https://secure.onlineaccess.net/cart/manage.php?ID=XXXXXXXXXXX", "r") - No such file or directory in /home/virtual/site1/fst/var/www/html/url_test04.php on line 13 Could not open URL Suggestions greatly appreciated regarding what I'm overlooking. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mwithington at PLMresearch.com Thu Jul 10 07:36:27 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Thu, 10 Jul 2003 07:36:27 -0400 Subject: [nycphp-talk] embedding one web page in another Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3586A6290@network.PLMresearch.com> I presume you realize that the manage.php script/page must be on a machine that's set up to handle SSL? From the error message being thrown it appears this might not be the case. Hope this helps -------------------------- 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 joe Sent: Thursday, July 10, 2003 6:21 AM To: NYPHP Talk Subject: [nycphp-talk] embedding one web page in another Total newbie question. I'm trying to create a web page that will include a complete secure page from page from a site where I am an affiliate. My goal, eventually, is to put this secure page in a table on one of my pages. As the first step, I've learned to embed using Yahoo as an example. But when I change the URL from Yahoo to the secure page, I'm getting error messages. The example below (url_test04.php) substitutes XXXs for the affilaite ID code but in reality I'm using the right code and it opens normally in my browser. here's what works: QUOTE END QUOTE But when I change to: $theurl='https://secure.onlineaccess.net/cart/manage.php?ID= XXXXXXXXXX' ; I get the following errors: Warning: Unable to access https://secure.onlineaccess.net/cart/manage.php?ID=XXXXXXXXXXXXX in /home/virtual/site1/fst/var/www/html/url_test04.php on line 13 Warning: fopen("https://secure.onlineaccess.net/cart/manage.php?ID=XXXXXXXXXXX ", "r") - No such file or directory in /home/virtual/site1/fst/var/www/html/url_test04.php on line 13 Could not open URL Suggestions greatly appreciated regarding what I'm overlooking. -------------- next part -------------- An HTML attachment was scrubbed... URL: From joehark at earthlink.net Thu Jul 10 10:04:38 2003 From: joehark at earthlink.net (joe) Date: Thu, 10 Jul 2003 10:04:38 -0400 Subject: [nycphp-talk] embedding one web page in another In-Reply-To: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3586A6290@network.PLMresearch .com> Message-ID: <5.0.0.25.2.20030710095923.00c07d48@earthlink.net> At 07:36 AM 7/10/2003 -0400, you wrote: >I presume you realize that the manage.php script/page must be on a machine >that's set up to handle SSL? From the error message being thrown it >appears this might not be the case. Thanks for the response and I apologize for yet another newbie question. What does "manage.php script/page" mean? I'm still learning the terminology. Is it a way of saying that the secure page I'm trying to reach must be on my server? From bpang at bpang.com Thu Jul 10 10:33:25 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 10 Jul 2003 10:33:25 -0400 Subject: [nycphp-talk] embedding one web page in another Message-ID: I'm not sure if it's such a newbie question as it's not something I've ever tried. Anyone else? How about you, Hans? You seem to have been through a lot. :) Wouldn't you be creating an insecure page by attempting to embed an SSL page into a non-SSL page (assuming url_test04.php is in a non-secure location)? Are you certain that you compiled php with OpenSSL? > > Total newbie question. I'm trying to create a web page that will include a > complete secure page from page from a site where I am an affiliate. My > goal, eventually, is to put this secure page in a table on one of my pages. > As the first step, I've learned to embed using Yahoo as an example. But > when I change the URL from Yahoo to the secure page, I'm getting error > messages. > > The example below (url_test04.php) substitutes XXXs for the affilaite ID > code but in reality I'm using the right code and it opens normally in my > browser. > > here's what works: > > QUOTE > > > > > > > > > > > $theurl='http://www.yahoo.com'; > > if (!($fp = fopen($theurl, 'r'))) { echo 'Could not open URL'; exit; } > $contents = fread($fp, 1000000); > > echo $contents; > > ?> > > > > > > END QUOTE > > But when I change to: > > $theurl='https://secure.onlineaccess.net/cart/manage.php?ID= XXXXXXXXXX' ; > > I get the following errors: > > Warning: Unable to access > https://secure.onlineaccess.net/cart/manage.php?ID=XXXXXXXXXXXXX in > /home/virtual/site1/fst/var/www/html/url_test04.php on line 13 > > Warning: > fopen("https://secure.onlineaccess.net/cart/manage.php?ID=XXXXXXXXXXX", > "r") - No such file or directory in > /home/virtual/site1/fst/var/www/html/url_test04.php on line 13 > Could not open URL > > Suggestions greatly appreciated regarding what I'm overlooking. > > From joehark at earthlink.net Thu Jul 10 11:24:24 2003 From: joehark at earthlink.net (joe) Date: Thu, 10 Jul 2003 11:24:24 -0400 Subject: [nycphp-talk] embedding one web page in another In-Reply-To: Message-ID: <5.0.0.25.2.20030710111826.00c07e90@earthlink.net> At 10:33 AM 7/10/2003 -0400, you wrote: >Are you certain that you compiled php with OpenSSL? Sorry, that's still terminology beyond my expertise. All I can tell you is that I created a page that calls up Yahoo. Then I put in on the server and it worked. When I created and installed another page, identical to the first except for an HTTPS URL, it returned errors saying the secure page couldn't be found. Yet entering the identical secure URL into the browser's address field bring up that page. I'm sure there's a logic for it but it escapes me. I truly appreciate the help here. Thanks again . . . From bpang at bpang.com Thu Jul 10 11:29:57 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 10 Jul 2003 11:29:57 -0400 Subject: [nycphp-talk] embedding one web page in another Message-ID: Do you know about phpinfo()? create a page called info.php with the contents of view the page... it should have some mention of OpenSSL being enabled, etc. as others here may advise, don't leave that page up and open to the public. > At 10:33 AM 7/10/2003 -0400, you wrote: > >Are you certain that you compiled php with OpenSSL? > > Sorry, that's still terminology beyond my expertise. > > All I can tell you is that I created a page that calls up Yahoo. Then I put > in on the server and it worked. When I created and installed another page, > identical to the first except for an HTTPS URL, it returned errors saying > the secure page couldn't be found. > > Yet entering the identical secure URL into the browser's address field > bring up that page. > > I'm sure there's a logic for it but it escapes me. > > I truly appreciate the help here. > > Thanks again . . . > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From wfan at encogent.com Thu Jul 10 11:34:31 2003 From: wfan at encogent.com (Wellington Fan) Date: Thu, 10 Jul 2003 11:34:31 -0400 Subject: [nycphp-talk] embedding one web page in another In-Reply-To: <5.0.0.25.2.20030710111826.00c07e90@earthlink.net> Message-ID: Joe, You use this line of code: if (!($fp = fopen($theurl, 'r'))) { echo 'Could not open URL'; exit; } $contents = fread($fp, 1000000); According to the manual, (http://www.php.net/manual/en/wrappers.php), with regards to the fopen() and other simialr functions: Note: HTTPS is supported starting from PHP 4.3.0, if you have compiled in support for OpenSSL. So....sure you can get to https:/somepage in your browser, BUT in PHP, you need to have OpenSSL support enabled in order to use https in an fopen() call. You might not know what OpenSSL support means, just know that everyone's PHP engine can be different, and you need this OpenSSL component to do what you want to do. HTH -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of joe Sent: Thursday, July 10, 2003 11:24 AM To: NYPHP Talk Subject: Re: [nycphp-talk] embedding one web page in another At 10:33 AM 7/10/2003 -0400, you wrote: >Are you certain that you compiled php with OpenSSL? Sorry, that's still terminology beyond my expertise. All I can tell you is that I created a page that calls up Yahoo. Then I put in on the server and it worked. When I created and installed another page, identical to the first except for an HTTPS URL, it returned errors saying the secure page couldn't be found. Yet entering the identical secure URL into the browser's address field bring up that page. I'm sure there's a logic for it but it escapes me. I truly appreciate the help here. Thanks again . . . _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From joehark at earthlink.net Thu Jul 10 11:45:16 2003 From: joehark at earthlink.net (joe) Date: Thu, 10 Jul 2003 11:45:16 -0400 Subject: [nycphp-talk] embedding one web page in another In-Reply-To: Message-ID: <5.0.0.25.2.20030710114205.01960e80@earthlink.net> > >view the page... it should have some mention of OpenSSL being enabled, etc. Yes it's there and I'm using PHP 4.2.2 QUOTE openssl OpenSSL supportenabled OpenSSL VersionOpenSSL 0.9.6b [engine] 9 Jul 2001 END QUOTE -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpang at bpang.com Thu Jul 10 11:47:41 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 10 Jul 2003 11:47:41 -0400 Subject: [nycphp-talk] embedding one web page in another Message-ID: needs to be at least php 4.3 I think you should upgrade for security purposes as well. Right, fellas? > > > > > >view the page... it should have some mention of OpenSSL being enabled, etc. > > Yes it's there and I'm using PHP 4.2.2 > > QUOTE > > openssl > OpenSSL supportenabled > OpenSSL VersionOpenSSL 0.9.6b [engine] 9 Jul 2001 > > END QUOTE > From joehark at earthlink.net Thu Jul 10 11:52:52 2003 From: joehark at earthlink.net (joe) Date: Thu, 10 Jul 2003 11:52:52 -0400 Subject: [nycphp-talk] embedding one web page in another In-Reply-To: References: <5.0.0.25.2.20030710111826.00c07e90@earthlink.net> Message-ID: <5.0.0.25.2.20030710114552.01960e80@earthlink.net> At 11:34 AM 7/10/2003 -0400, you wrote: >You use this line of code: > > if (!($fp = fopen($theurl, 'r'))) { echo 'Could not open URL'; exit; } >$contents = fread($fp, 1000000); > >According to the manual, (http://www.php.net/manual/en/wrappers.php), with >regards to the fopen() and other simialr functions: I lifted that code and modified slightly the example from Chapter and illustration 17.1 of "PHP and MySQL Web Development" by Like Welling and Laura Thomson, second edition. I gather from the explanation in the text that this is required to define how much content the page may display. > >Note: HTTPS is supported starting from PHP 4.3.0, if you have compiled in >support for OpenSSL. > I'm using 4.4.2 and OpenSSL appears to be enabled. >So....sure you can get to https:/somepage in your browser, BUT in PHP, you >need to have OpenSSL support enabled in order to use https in an fopen() call. > >You might not know what OpenSSL support means, just know that everyone's PHP >engine can be different, and you need this OpenSSL component to do what you >want to do. So far, I seem to be doing that and I seem to be compliant in all respects. Further advice will be greatly appreciated. From wfan at encogent.com Thu Jul 10 11:58:46 2003 From: wfan at encogent.com (Wellington Fan) Date: Thu, 10 Jul 2003 11:58:46 -0400 Subject: [nycphp-talk] embedding one web page in another In-Reply-To: <5.0.0.25.2.20030710114552.01960e80@earthlink.net> Message-ID: Joe, You said in an earlier post that you were using 4.2.2 -- which would not be sufficient. --------------------- >Yes it's there and I'm using PHP 4.2.2 --------------------- >I'm using 4.4.2 and OpenSSL appears to be enabled. --------------------- From joehark at earthlink.net Thu Jul 10 12:00:17 2003 From: joehark at earthlink.net (joe) Date: Thu, 10 Jul 2003 12:00:17 -0400 Subject: [nycphp-talk] embedding one web page in another In-Reply-To: <5.0.0.25.2.20030710114552.01960e80@earthlink.net> References: <5.0.0.25.2.20030710111826.00c07e90@earthlink.net> Message-ID: <5.0.0.25.2.20030710115505.01960e80@earthlink.net> OOPPS - I transposed the version. I wrote 4.4.2 at one point and then did the right way later. Sory about that. I am definitely running 4.2.2. But the point is, do you think if I upgrade to 4.3 that will resolve the problem? I run the site on a Rackshack dedicated server that I manage. Is upgrading as simple as uploading and overwriting the older PHP with the latest version or is this going to get hairy and play havoc with the sites I'm hosting that are built with 4..2.2? TIA From bpang at bpang.com Thu Jul 10 12:00:40 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 10 Jul 2003 12:00:40 -0400 Subject: [nycphp-talk] embedding one web page in another Message-ID: Joe, you are not "compliant" you need to upgrade php to 4.3 > At 11:34 AM 7/10/2003 -0400, you wrote: > > >You use this line of code: > > > > if (!($fp = fopen($theurl, 'r'))) { echo 'Could not open URL'; exit; } > >$contents = fread($fp, 1000000); > > > >According to the manual, (http://www.php.net/manual/en/wrappers.php), with > >regards to the fopen() and other simialr functions: > > I lifted that code and modified slightly the example from Chapter and > illustration 17.1 of "PHP and MySQL Web Development" by Like Welling and > Laura Thomson, second edition. I gather from the explanation in the text > that this is required to define how much content the page may display. > > > > >Note: HTTPS is supported starting from PHP 4.3.0, if you have compiled in > >support for OpenSSL. > > > > I'm using 4.4.2 and OpenSSL appears to be enabled. > > >So....sure you can get to https:/somepage in your browser, BUT in PHP, you > >need to have OpenSSL support enabled in order to use https in an fopen() call. > > > >You might not know what OpenSSL support means, just know that everyone's PHP > >engine can be different, and you need this OpenSSL component to do what you > >want to do. > > So far, I seem to be doing that and I seem to be compliant in all respects. > Further advice will be greatly appreciated. > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From joehark at earthlink.net Thu Jul 10 12:12:19 2003 From: joehark at earthlink.net (joe) Date: Thu, 10 Jul 2003 12:12:19 -0400 Subject: [nycphp-talk] upgrading PHP In-Reply-To: Message-ID: <5.0.0.25.2.20030710120443.00c07e90@earthlink.net> Let me revise my question. I note that 4.3.3RC1 has been out for more than 3 weeks and PHP 5.0.0 beta 1 has been available for a bout two weeks. Should I upgrade to just 4.3 or the RC or the 5 beta? Or maybe wait for the full 5 release? Any idea when that's due? Same questions stand about how daunting and risky a task it is likely to be for me to try my own upgrade. Thanks From David.SextonJr at ubs.com Thu Jul 10 12:19:56 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Thu, 10 Jul 2003 12:19:56 -0400 Subject: [nycphp-talk] embedding one web page in another Message-ID: <18D7B8CAA5284F478470828806DB124603789ECE@psle01.xchg.pwj.com> Is upgrading as simple as uploading and overwriting the older PHP with the latest version or is this going to get hairy and play havoc with the sites I'm hosting that are built with 4..2.2? ======================================= Yes, it is that easy to upgrade, but make sure you test everything first. We ran into an issue with 4.3.1's mssql_bind function not working properly, but it was fixed in 4.3.2. Just make sure you have a plan to revert in case things don't go as expected. I'm not sure which version started defaulting to register_globals being OFF, but if things do not work properly, you can try turning them on in the .ini file as a temporary solution (that's if your sites do not all use superglobal references). Just note that having them on is less secure, and you should eventually try to clean up any existing code to use the new method. If there are a number of people publishing to this box, there is a good chance some sites are using the old, ugly method. Something to keep in mind... -----Original Message----- From: joe [mailto:joehark at earthlink.net] Sent: Thursday, July 10, 2003 12:00 PM To: NYPHP Talk Subject: RE: [nycphp-talk] embedding one web page in another OOPPS - I transposed the version. I wrote 4.4.2 at one point and then did the right way later. Sory about that. I am definitely running 4.2.2. But the point is, do you think if I upgrade to 4.3 that will resolve the problem? I run the site on a Rackshack dedicated server that I manage. Is upgrading as simple as uploading and overwriting the older PHP with the latest version or is this going to get hairy and play havoc with the sites I'm hosting that are built with 4..2.2? TIA _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. From keithjr at war3.com Thu Jul 10 13:21:37 2003 From: keithjr at war3.com (keithjr at war3.com) Date: Thu, 10 Jul 2003 12:21:37 -0500 (CDT) Subject: [nycphp-talk] embedding one web page in another In-Reply-To: References: Message-ID: <14333.204.69.151.229.1057857697.squirrel@www.war3.com> Well for upgrading PHP I would say that you should go to the stable release if it is on a production server. If it is something that you dont care if it goes up and down, then I wouldnt use it. (like 5.0 beta:D) Another thing is that if you fopen a php script, does it open up the source, or the compiled html? If it opens the source, than that would not work properly, at least i think... :D Keith Richardson keithjr at war3.com www.war3.com From nyphp at NewAgeWeb.com Thu Jul 10 13:53:53 2003 From: nyphp at NewAgeWeb.com (Jerry Kapron) Date: Thu, 10 Jul 2003 13:53:53 -0400 Subject: [nycphp-talk] embedding one web page in another Message-ID: <006601c3470c$3a992300$de01a8c0@duron.lan.newageweb.com> Keith, >Keith Richardson wrote: >Another thing is that if you fopen a php script, does it open up the >source, or the compiled html? If it opens the source, than that would not >work properly, at least i think... :D If you are talking about opening a remote url with fopen, It works the same as if you opened the url in web your browser. You get whatever the remote web server sends you in response to your HTTP(S) request. Jerry -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Thu Jul 10 14:21:43 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 10 Jul 2003 14:21:43 -0400 Subject: [nycphp-talk] upgrading PHP In-Reply-To: <5.0.0.25.2.20030710120443.00c07e90@earthlink.net> References: <5.0.0.25.2.20030710120443.00c07e90@earthlink.net> Message-ID: <3F0DAEB7.1030205@nyphp.org> Hey Joe, joe wrote: > Let me revise my question. > > I note that 4.3.3RC1 has been out for more than 3 weeks and PHP 5.0.0 > beta 1 has been available for a bout two weeks. Should I upgrade to just > 4.3 or the RC or the 5 beta? Negative on going with the 5 beta, unless you want to develop/test it. Go with 4.3.2 to get things off the ground, and then hit 4.3.3 when it's released. > Or maybe wait for the full 5 release? Any idea when that's due? Months... > Same questions stand about how daunting and risky a task it is likely to > be for me to try my own upgrade. The server fairy tells me that you're probably using the Ensim control panel, and making your own upgrade *might* be problematic, especially if you haven't done it before. It's unfortuneate, since 4.3.x is very nice, but depending on your environment (the level of mission criticalness/time you can spend on it/) swaping in a non-Ensim component may cause you grief. Simply, HTTPS is a very differant animal than HTTP, and using curl in this case may be your best bet: http://us2.php.net/curl Which, after a check of your phpinfo() output, should show that it's SSL enabled. HTH, H From hans at nyphp.org Thu Jul 10 14:26:33 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 10 Jul 2003 14:26:33 -0400 Subject: [nycphp-talk] Compressing PDF's In-Reply-To: <003501c346bc$f7883280$de01a8c0@duron.lan.newageweb.com> References: <003501c346bc$f7883280$de01a8c0@duron.lan.newageweb.com> Message-ID: <3F0DAFD9.7090909@nyphp.org> Jerry Kapron wrote: > >Hans Zaunere wrote: > >Since PDF is just text, why not gzip, bzip2 or even zip? > > I know I wasn't specific enough, when I said "compress". > Raw PDF format is just text. However contents of a PDF file can be > optimized (compressed). I'm not looking to create a .zip or .gz file > (that would be a nobrainer). I want to compress the PDF file > "internally". Most PDF's created with Acrobat/Distiller are already > compressed. > If you download this PDF: > http://www.tax.state.ny.us/pdf/2000/wt/nys45mn_100.pdf > and open it in a text editor, you'll see that some parts are binary. > Those are FlateCoded content streams. > > The file I'm working with was created with Adobe Illustrator and saved > as raw PDF (text only). I need raw PDF to use it as a template (by > preg_replacing some "variable text"). The problem is that the file is > 700Kb (way too big for this web app). When I open it and save optimized > in Adobe Distiller, the size is reduced to 195Kb, but the compressed > file can not be used directly as a template anymore. > I could take two different routes: > 1) use the raw PDF file as a template > preg_replace some text > > compress the new PDF > send it to the client > > 2) use an already compressed PDF file as a template > fetch and > uncompress the FlateCoded streams > preg_replace some text > recompress > the modified content > send the new PDF to the client. > > I know I could also use PDF4PHP to create a compressed PDF file from > scratch but for performance reasons I really wanted to stick to using a > template file. I searched the web but could not find any ready code > specifically for what I want to do. I'm looking under the hood of the > PDF4PHP class (it support FlateDecode compression) to get an idea how to > uncompress the compressed streams. Any suggestions, pointers or code > would be greatly appreciated. Ahh, I knew it seemed too easy. I'm sure you've been over http://us2.php.net/pdf Wish I could help more; to me, it's better to receive a PDF :) H From nyphp at NewAgeWeb.com Thu Jul 10 14:27:54 2003 From: nyphp at NewAgeWeb.com (Jerry Kapron) Date: Thu, 10 Jul 2003 14:27:54 -0400 Subject: [nycphp-talk] upgrading PHP Message-ID: <007701c34710$fb366240$de01a8c0@duron.lan.newageweb.com> Joe, While you need at least PHP 4.3.0 to make https requests using the fopen() function, you may use the CURL functions to open https urls in PHP 4.0.2 and newer. Just look for --with-curl in your phpinfo() output, and if it's there, you're all set. Go to http://us3.php.net/manual/en/ref.curl.php to learn how to use the CURL functions. cheers, Jerry -- 42.7% of all statistics are made up on the spot. -----Original Message----- From: joe To: NYPHP Talk Date: Thursday, July 10, 2003 12:12 PM Subject: [nycphp-talk] upgrading PHP >Let me revise my question. > >I note that 4.3.3RC1 has been out for more than 3 weeks and PHP 5.0.0 beta >1 has been available for a bout two weeks. Should I upgrade to just 4.3 or >the RC or the 5 beta? > >Or maybe wait for the full 5 release? Any idea when that's due? > >Same questions stand about how daunting and risky a task it is likely to be >for me to try my own upgrade. > >Thanks > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmintz at panix.com Thu Jul 10 18:14:55 2003 From: dmintz at panix.com (David Mintz) Date: Thu, 10 Jul 2003 18:14:55 -0400 (EDT) Subject: [nycphp-talk] class design question In-Reply-To: <5.0.0.25.2.20030710111826.00c07e90@earthlink.net> References: <5.0.0.25.2.20030710111826.00c07e90@earthlink.net> Message-ID: I'm rewriting my PHP/MySQL application that manages the scheduling of court interpreters (for our office here in the federal court downtown). It's hideous spaghetti and I want to do it over with Smarty and Pear and OOP. There are entities like Judge and User and Event and Interpreter that will merit their own objects and be persisted in the database. Suppose you have a class User. Would you give it a save() method that writes its state to the database? And if so, do you pass this method a Pear $db object as argument, or does it already possess its own $db object (which perhaps you handed it at instantiation time)? ... OR ... Would you have write a separate DB class -- one that extends the Pear DB perhaps -- with methods like saveXXX() for each of your classes? I hope this is clear. These may seem naive questions to you old pros. I'm one of those self-taught lightweight dudes and I'd love to get it more nearly right this time around. Thanks. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "You want me to pour the beer, Frank?" From keithjr at war3.com Thu Jul 10 19:08:32 2003 From: keithjr at war3.com (Keith Richardson) Date: Thu, 10 Jul 2003 19:08:32 -0400 Subject: [nycphp-talk] class design question In-Reply-To: Message-ID: <6CE8D1C5-B32B-11D7-A379-0003931CBF84@war3.com> If you wanted to do it with classes, you could have some options for the saving. The user could have a save method, that would either look like $user->save($dbsae); and that would save to the database, or you could not have a link identifier and just do $user->save(); - or you could have it write to the database every time it does anything, but that would be kinda useless. If you were going to have it the most "robust" code then I would say have a save method, and send it the dbase link identifier. If you wanted to have the database a class, you just send it the database class variable, say $SQLdb, and inside the save(); method, do something like $saveresult = $SQLdb->Query($savequery); so that you can have your own error checking/etc.. VBulletin (www.vbulletin.com) uses a database class variable to do queries and everything so if you get a chance to look at the source, that would probabally be most helpful. Good luck! Keith Richardson keithjr at war3.com www.war3.com On Thursday, July 10, 2003, at 06:14 PM, David Mintz wrote: > > I'm rewriting my PHP/MySQL application that manages the scheduling of > court interpreters (for our office here in the federal court downtown). > It's hideous spaghetti and I want to do it over with Smarty and Pear > and > OOP. > > There are entities like Judge and User and Event and Interpreter that > will > merit their own objects and be persisted in the database. > > Suppose you have a class User. Would you give it a save() method that > writes its state to the database? And if so, do you pass this method a > Pear $db object as argument, or does it already possess its own $db > object > (which perhaps you handed it at instantiation time)? > > ... OR ... > > Would you have write a separate DB class -- one that extends the Pear > DB > perhaps -- with methods like saveXXX() for each of your classes? > > I hope this is clear. These may seem naive questions to you old pros. > I'm > one of those self-taught lightweight dudes and I'd love to get it more > nearly right this time around. Thanks. > > > > > > --- > David Mintz > http://davidmintz.org/ > Email: See http://dmintzweb.com/whitelist.php first! > > "You want me to pour the beer, Frank?" > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From chendry at nyc.rr.com Thu Jul 10 23:34:44 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Thu, 10 Jul 2003 23:34:44 -0400 Subject: [nycphp-talk] innoDB? In-Reply-To: <6CE8D1C5-B32B-11D7-A379-0003931CBF84@war3.com> Message-ID: Recently ran across innoDB for mySQL...looks to be pretty powerful and claims to benchmark faster than MyISAM tables - anyone have any experience with this and can educate me on the advantages, disadvantages? Thanks, Chris From betenoir at echonyc.com Fri Jul 11 02:20:21 2003 From: betenoir at echonyc.com (betenoir at echonyc.com) Date: Fri, 11 Jul 2003 02:20:21 -0400 Subject: [nycphp-talk] $MyVAR vs. $_POST checkbox problems In-Reply-To: References: <6CE8D1C5-B32B-11D7-A379-0003931CBF84@war3.com> Message-ID: I'm passing form data from one page to another. On the first page I session_start(); session_destroy(); session_unset(); session_unregister('MyVAR'); session_register('MyVAR'); To initialize my variables. The input type for MyVAR is a checkbox. The problem is that it seems to "stick'. Even though I run a javascript routine onSubmit to set and test the value of the MyVAR on the subsequent page I get the "on" value. On the second page I session_register('MyVAR'); extract($_POST); and set a cookie. Then I test for the value of $MyVAR and print " $MyVAR"; and the result is as if the checkbox were checked -- even when it's not. This is making me crazy. Suggestions? Clyde From soazine at erols.com Fri Jul 11 14:21:42 2003 From: soazine at erols.com (Phil Powell) Date: Fri, 11 Jul 2003 14:21:42 -0400 Subject: [nycphp-talk] Mind exploded on this one! Message-ID: <0dc801c347d9$47728a30$31996244@scandinawa1bo6> $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonbaer at jonbaer.net Fri Jul 11 15:23:09 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Fri, 11 Jul 2003 12:23:09 -0700 Subject: [nycphp-talk] Mind exploded on this one! References: <0dc801c347d9$47728a30$31996244@scandinawa1bo6> Message-ID: <003601c347e1$dd4f47c0$6600a8c0@THINKPAD> echo $booleanNonFormVars['hasSelectedLetter']; echo $profileNonFormVarArray['letter']; - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: Phil Powell To: talk at lists.nyphp.org ; php-general at lists.php.net Sent: Friday, July 11, 2003 11:21 AM Subject: [nycphp-talk] Mind exploded on this one! $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From enunez at tiaa-cref.org Fri Jul 11 15:27:41 2003 From: enunez at tiaa-cref.org (Nunez, Eddy) Date: Fri, 11 Jul 2003 15:27:41 -0400 Subject: [nycphp-talk] Mind exploded on this one! Message-ID: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9CF6@msxnyusr01.msx.ops.tiaa-cref.org> Not sure of the context of the question but here's my 2 cents... By showing us these different arrays, I will assume you want to use the arrays as reference points to the variable names stored as elements. We could have some fun with this... -------------------------------- $hasSelectedLetter = 'this letter'; $letter = 'not that but this letter!'; print $x = $arrayListArray[0]; print $x = eval("return \$$x"."[0];"); print $$x; print $y = $arrayListArray[3]; print $y = eval("return \$$y"."[1];"); print $$y; Output: booleanNonFormVars hasSelectedLetter this letter profileNonFormVarArray letter not that but this letter! ----------------------------------- I wish there was something syntactically correct yet intuitive to allow us to use something like: $hasSelectedLetter value ~~ $$($$($$arrayListArray[0])[0]) $letter value ~~ $$($$($$arrayListArray[3])[0]) Looks very PERLsh, iick. Oh well, the PHP parser would choke on this instantly. Hope this turns on a light bulb or two. -Eddy -----Original Message----- From: Phil Powell [mailto:soazine at erols.com] Sent: Friday, July 11, 2003 2:22 PM To: talk at lists.nyphp.org; php-general at lists.php.net Subject: [nycphp-talk] Mind exploded on this one! $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil ************************************************************** 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 hans at nyphp.org Fri Jul 11 15:28:11 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 11 Jul 2003 15:28:11 -0400 Subject: [nycphp-talk] class design question In-Reply-To: References: <5.0.0.25.2.20030710111826.00c07e90@earthlink.net> Message-ID: <3F0F0FCB.10506@nyphp.org> David Mintz wrote: > I'm rewriting my PHP/MySQL application that manages the scheduling of > court interpreters (for our office here in the federal court downtown). > It's hideous spaghetti and I want to do it over with Smarty and Pear and > OOP. > > There are entities like Judge and User and Event and Interpreter that will > merit their own objects and be persisted in the database. > > Suppose you have a class User. Would you give it a save() method that > writes its state to the database? And if so, do you pass this method a > Pear $db object as argument, or does it already possess its own $db object > (which perhaps you handed it at instantiation time)? Yeah; I did something similar to this for auditing - I had an Expose method that would return a neat array of sorts that I could then save to file, db etc. I typically have each class or base class make a db connection in the constructor. I've found it convienent for the class to expect a named db link in the global space and use that. If it doesn't find it, it'll do some predictable action, ie fail or create it. > ... OR ... > > Would you have write a separate DB class -- one that extends the Pear DB > perhaps -- with methods like saveXXX() for each of your classes? Ehh, that feels clunky IMHO. H From soazine at erols.com Fri Jul 11 15:26:51 2003 From: soazine at erols.com (Phil Powell) Date: Fri, 11 Jul 2003 15:26:51 -0400 Subject: [nycphp-talk] Mind exploded on this one! References: <0dc801c347d9$47728a30$31996244@scandinawa1bo6> <003601c347e1$dd4f47c0$6600a8c0@THINKPAD> Message-ID: <0e8601c347e2$612f32d0$31996244@scandinawa1bo6> I got it, but I bet you guys will slam this one :( $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = compact('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); foreach ($arrayListArray as $key => $val) { for ($j = 0; $j < sizeOf(${$key}); $j++) { if (preg_match('/^boolean/', $key) && strlen(${${$key}[$j]}) == 0) ${${$key}[$j]} = 0; if (!preg_match('/^boolean/', $key) && strlen(${${$key}[$j]}) == 0) ${${$key}[$j]} = ''; } } Sorry, it's the best I could do Phil ----- Original Message ----- From: Jon Baer To: NYPHP Talk Sent: Friday, July 11, 2003 3:23 PM Subject: Re: [nycphp-talk] Mind exploded on this one! echo $booleanNonFormVars['hasSelectedLetter']; echo $profileNonFormVarArray['letter']; - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: Phil Powell To: talk at lists.nyphp.org ; php-general at lists.php.net Sent: Friday, July 11, 2003 11:21 AM Subject: [nycphp-talk] Mind exploded on this one! $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil ---------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Fri Jul 11 15:33:10 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 11 Jul 2003 15:33:10 -0400 Subject: [nycphp-talk] innoDB? In-Reply-To: References: Message-ID: <3F0F10F6.9010505@nyphp.org> Christopher Hendry wrote: > Recently ran across innoDB for mySQL...looks to be pretty powerful and > claims to benchmark faster than MyISAM tables - anyone have any experience > with this and can educate me on the advantages, disadvantages? I've looked at using innoDB several times, but always fell back to MyISAM. I guess the biggest advantage would be considered transactions (so MySQL does have transactions!) and foreign key constraints. IIRC, the reason performance can be seen as better than MyISAM is because of locking - innoDB does row locking and MyISAM does table locking. Both I suppose have some pros and cons. That said, I commonly hear that major MySQL implementations use innoDB. http://innodb.com, H From enunez at tiaa-cref.org Fri Jul 11 15:33:32 2003 From: enunez at tiaa-cref.org (Nunez, Eddy) Date: Fri, 11 Jul 2003 15:33:32 -0400 Subject: [nycphp-talk] Mind exploded on this one! Message-ID: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9CF7@msxnyusr01.msx.ops.tiaa-cref.org> Sorry but... this won't work because 'hasSelectedLetter' and 'letter' aren't array keys they're just values in the arrays. -Eddy -----Original Message----- From: Jon Baer [mailto:jonbaer at jonbaer.net] Sent: Friday, July 11, 2003 3:23 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Mind exploded on this one! echo $booleanNonFormVars['hasSelectedLetter']; echo $profileNonFormVarArray['letter']; - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: Phil Powell To: talk at lists.nyphp.org ; php-general at lists.php.net Sent: Friday, July 11, 2003 11:21 AM Subject: [nycphp-talk] Mind exploded on this one! $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil _____ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Fri Jul 11 15:37:06 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 11 Jul 2003 15:37:06 -0400 Subject: [nycphp-talk] $MyVAR vs. $_POST checkbox problems In-Reply-To: References: <6CE8D1C5-B32B-11D7-A379-0003931CBF84@war3.com> Message-ID: <3F0F11E2.2050604@nyphp.org> betenoir at echonyc.com wrote: > I'm passing form data from one page to another. > > On the first page I > > session_start(); > session_destroy(); > session_unset(); > > session_unregister('MyVAR'); > session_register('MyVAR'); > > To initialize my variables. > > The input type for MyVAR is a checkbox. The problem is that it seems to > "stick'. Even though I run a javascript routine onSubmit to set and test > the value of the MyVAR on the subsequent page I get the "on" value. > > On the second page I > > session_register('MyVAR'); > extract($_POST); > > and set a cookie. With modern versions of PHP, just use the $_SESSION array directly. page1.php session_start(); $_SESSION['MyVAR'] = 'Hans'; page2.php session_start(); echo $_SESSION['MyVAR']; > Then I test for the value of $MyVAR and > > print " $MyVAR"; > > and the result is as if the checkbox were checked -- even when it's not. Hmm, not too sure. Double check that the javascript isn't doing anything wacky, because a hidden input can't be checked. H From soazine at erols.com Fri Jul 11 15:36:23 2003 From: soazine at erols.com (Phil Powell) Date: Fri, 11 Jul 2003 15:36:23 -0400 Subject: [nycphp-talk] Mind exploded on this one! References: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9CF7@msxnyusr01.msx.ops.tiaa-cref.org> Message-ID: <0ed301c347e3$b66de6f0$31996244@scandinawa1bo6> IN that case, Eddy, how about this, THIS works: $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); // COMPACT ARRAYS INTO 2-DIMENSIONAL ARRAY arrayListArray $arrayListArray = compact('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); // I COULD NOT POSSIBLY EVER EXPLAIN THIS.. ASK HANS ZAUNERE OF NY PHP TO EXPLAIN IT FOR YOU foreach ($arrayListArray as $key => $val) { for ($j = 0; $j < sizeOf($val); $j++) { if (preg_match('/^boolean/', $key) && strlen(${$val[$j]}) == 0) ${$val[$j]} = 0; if (!preg_match('/^boolean/', $key) && strlen(${$val[$j]}) == 0) ${$val[$j]} = ''; } } Phil ----- Original Message ----- From: Nunez, Eddy To: 'NYPHP Talk' Sent: Friday, July 11, 2003 3:33 PM Subject: RE: [nycphp-talk] Mind exploded on this one! Sorry but... this won't work because 'hasSelectedLetter' and 'letter' aren't array keys they're just values in the arrays. -Eddy -----Original Message----- From: Jon Baer [mailto:jonbaer at jonbaer.net] Sent: Friday, July 11, 2003 3:23 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Mind exploded on this one! echo $booleanNonFormVars['hasSelectedLetter']; echo $profileNonFormVarArray['letter']; - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: Phil Powell To: talk at lists.nyphp.org ; php-general at lists.php.net Sent: Friday, July 11, 2003 11:21 AM Subject: [nycphp-talk] Mind exploded on this one! $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil -------------------------------------------------------------------------- _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeffknight at mac.com Fri Jul 11 15:55:05 2003 From: jeffknight at mac.com (Jeff Knight) Date: Fri, 11 Jul 2003 15:55:05 -0400 Subject: [nycphp-talk] Mind exploded on this one! In-Reply-To: <0ed301c347e3$b66de6f0$31996244@scandinawa1bo6> Message-ID: <90E7588E-B3D9-11D7-82C0-000393B9FB36@mac.com> On Friday, July 11, 2003, at 03:36 PM, Phil Powell wrote: > ? > ?// I COULD NOT POSSIBLY EVER EXPLAIN THIS.. ASK HANS ZAUNERE OF NY > PHP TO EXPLAIN IT FOR YOU > Hmmm... maybe I'll just use that little gem for all my comments in all of my code from now on, sure would save save time on documentation, feeing it up for beer! Jeff Knight jeff at lushmedia.com 212/213-6558 x 203 888/852-8508 LUSH media 110 W 40th St #1502 New York, NY 10018 From soazine at erols.com Fri Jul 11 15:58:21 2003 From: soazine at erols.com (Phil Powell) Date: Fri, 11 Jul 2003 15:58:21 -0400 Subject: [nycphp-talk] Mind exploded on this one! References: <90E7588E-B3D9-11D7-82C0-000393B9FB36@mac.com> Message-ID: <0f0d01c347e6$c8303ac0$31996244@scandinawa1bo6> Now if only I could use it and bill a client for beer, even better! Phil ----- Original Message ----- From: "Jeff Knight" To: "NYPHP Talk" Sent: Friday, July 11, 2003 3:55 PM Subject: Re: [nycphp-talk] Mind exploded on this one! On Friday, July 11, 2003, at 03:36 PM, Phil Powell wrote: > > // I COULD NOT POSSIBLY EVER EXPLAIN THIS.. ASK HANS ZAUNERE OF NY > PHP TO EXPLAIN IT FOR YOU > Hmmm... maybe I'll just use that little gem for all my comments in all of my code from now on, sure would save save time on documentation, feeing it up for beer! Jeff Knight jeff at lushmedia.com 212/213-6558 x 203 888/852-8508 LUSH media 110 W 40th St #1502 New York, NY 10018 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From enunez at tiaa-cref.org Fri Jul 11 16:02:23 2003 From: enunez at tiaa-cref.org (Nunez, Eddy) Date: Fri, 11 Jul 2003 14:02:23 -0600 Subject: [nycphp-talk] Mind exploded on this one! Message-ID: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9CF8@msxnyusr01.msx.ops.tiaa-cref.org> I didn't think of using compact() ... cool function!! ---------------------------------------- Use compact() on ALL your arrays and you can do this: print $arrayListArray['booleanNonFormVars']['hasSelectedLetter']; print $arrayListArray['profileNonFormVarArray']['letter']; not sure if that's what you really want, but it's as clean as you're going to get. Huh? I didn't try but this can't possibly be valid PHP: ${$val[$j]} = 0; -Eddy -----Original Message----- From: Phil Powell [mailto:soazine at erols.com] Sent: Friday, July 11, 2003 3:36 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Mind exploded on this one! IN that case, Eddy, how about this, THIS works: $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); // COMPACT ARRAYS INTO 2-DIMENSIONAL ARRAY arrayListArray $arrayListArray = compact('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); // I COULD NOT POSSIBLY EVER EXPLAIN THIS.. ASK HANS ZAUNERE OF NY PHP TO EXPLAIN IT FOR YOU foreach ($arrayListArray as $key => $val) { for ($j = 0; $j < sizeOf($val); $j++) { if (preg_match('/^boolean/', $key) && strlen(${$val[$j]}) == 0) ${$val[$j]} = 0; if (!preg_match('/^boolean/', $key) && strlen(${$val[$j]}) == 0) ${$val[$j]} = ''; } } Phil ----- Original Message ----- From: Nunez, Eddy To: 'NYPHP Talk' Sent: Friday, July 11, 2003 3:33 PM Subject: RE: [nycphp-talk] Mind exploded on this one! Sorry but... this won't work because 'hasSelectedLetter' and 'letter' aren't array keys they're just values in the arrays. -Eddy -----Original Message----- From: Jon Baer [mailto:jonbaer at jonbaer.net] Sent: Friday, July 11, 2003 3:23 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Mind exploded on this one! echo $booleanNonFormVars['hasSelectedLetter']; echo $profileNonFormVarArray['letter']; - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: Phil Powell To: talk at lists.nyphp.org ; php-general at lists.php.net Sent: Friday, July 11, 2003 11:21 AM Subject: [nycphp-talk] Mind exploded on this one! $booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile', 'hasSelectedProfile', 'hasEditedProfile', 'hasDeletedProfile', 'willDeleteProfile', 'willDeletePic'); $booleanVars = array('profileID', 'showemail', 'showbirthday', 'season', 'profilememberid'); $profileVarArray = array('firstname', 'lastname', 'city', 'state', 'country', 'favebands', 'faveconcert', 'favescandinavia', 'faveviking', 'favemeat', 'freetime', 'thingslove', 'thingshate', 'favebibleverse', 'changeonething', 'maritalstatus', 'birthday', 'favemovie', 'faveplace', 'favetv', 'imgpath', 'imgext'); $profileNonFormVarArray = array('profileName', 'letter', 'name'); $arrayListArray = array('booleanNonFormVars', 'booleanVars', 'profileVarArray', 'profileNonFormVarArray'); Bluntly put, I need to get: $hasSelectedLetter $letter Etc.. I have absolutely NO idea how to do this, help! Phil _____ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** _____ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Fri Jul 11 16:04:12 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 11 Jul 2003 16:04:12 -0400 Subject: [nycphp-talk] Mind exploded on this one! In-Reply-To: <90E7588E-B3D9-11D7-82C0-000393B9FB36@mac.com> References: <90E7588E-B3D9-11D7-82C0-000393B9FB36@mac.com> Message-ID: <3F0F183C.8010808@nyphp.org> Jeff Knight wrote: > > On Friday, July 11, 2003, at 03:36 PM, Phil Powell wrote: > >> >> // I COULD NOT POSSIBLY EVER EXPLAIN THIS.. ASK HANS ZAUNERE OF NY >> PHP TO EXPLAIN IT FOR YOU >> > > Hmmm... maybe I'll just use that little gem for all my comments in all > of my code from now on, sure would save save time on documentation, > feeing it up for beer! if( OBFUSCATED ) require('http://hans.zaunere.com'); Ahh, geek humor :) H From hans at nyphp.org Fri Jul 11 16:34:05 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 11 Jul 2003 16:34:05 -0400 Subject: [nycphp-talk] Re: [liphp] userfriendly.org In-Reply-To: <1057895915.8371.31.camel@spock> References: <1e2.d10045b.2c3f6506@aol.com> <1057894683.8374.14.camel@spock> <1057895915.8371.31.camel@spock> Message-ID: <3F0F1F3D.2000403@nyphp.org> Aram Mirzadeh wrote: > Well I found a LWP/Perl program at: http://develooper.com/code/ufget/ > But no PHP version, I would need to run this in cron during the morning > to cache it locally. I was hoping to be able to do it dynamically with > php. > > Well if anyone finds one let me know, otherwise I'll try to write one in > the next couple of days. Not the prettiest, easily fooled and generally ugly... but it seems to work for now: function getuflatest() { $ufpage = implode('',file('http://www.userfriendly.org')); $latestpos = strpos($ufpage,'Latest Strip'); $uforgpos = strpos($ufpage,'http://www.userfriendly.org/',$latestpos); $gifpos = strpos($ufpage,'.gif"',$uforgpos); $uflatest = substr($ufpage,$uforgpos,$gifpos-$uforgpos+4); return $uflatest; } H From jonbaer at jonbaer.net Fri Jul 11 21:47:20 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Fri, 11 Jul 2003 18:47:20 -0700 Subject: [nycphp-talk] sqlite/php5 Message-ID: <002f01c34817$88bcd430$0100007f@THINKPAD> does anyone have opinions on the embedded db that comes w/ php 5? im still trying to understand the rift on why mysql was unbundled for it but im finding sqlite to be a pretty cool nifty little app ... http://www.hwaci.com/sw/sqlite/index.html it has claims of being up to 2x faster than mysql for common procedures ... - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From rainman at deroo.net Fri Jul 11 22:02:06 2003 From: rainman at deroo.net (The Rain Maker) Date: Fri, 11 Jul 2003 22:02:06 -0400 Subject: [nycphp-talk] sqlite/php5 In-Reply-To: <002f01c34817$88bcd430$0100007f@THINKPAD> Message-ID: Jon-- > does anyone have opinions on the embedded db that comes w/ php 5? I haven't used php5 yet (other than to say "yup, I got it complied and running") so I'd love to hear you comments on it as you play with it more. > im still trying to understand the rift on why mysql was unbundled for > it but No "rift" per se. MySQL has changed it's license for the 4.x and 5.x code bases. As such it is no longer compatible with PHP license. Hence it is no longer included. > it has claims of being up to 2x faster than mysql for common > procedures ... MySQL was the fastest kid on the block, when it did a whole lot less than what it does today. Not advocating, just remember the MySQL vs Postgres wars of old (well... and still current day :) .r From nyphp at websapp.com Fri Jul 11 22:54:16 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Fri, 11 Jul 2003 22:54:16 -0400 Subject: [nycphp-talk] Re: [liphp] userfriendly.org In-Reply-To: <3F0F1F3D.2000403@nyphp.org> Message-ID: Hans, You know that I believe that regex's save the world :) Here's a little something from me: function getLatestCartoon() { preg_match("~ALT=\"?Latest Strip\"?.*SRC=\"?([^\"]+)\"?~i", file_get_contents('http://www.userfriendly.org/'), $arr); return $arr[1]; } echo getLatestCartoon(); --Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere > Sent: Friday, July 11, 2003 4:34 PM > To: liphp at liphp.org > Cc: talk at lists.nyphp.org > Subject: [nycphp-talk] Re: [liphp] userfriendly.org > > > > > Aram Mirzadeh wrote: > > > Well I found a LWP/Perl program at: http://develooper.com/code/ufget/ > > But no PHP version, I would need to run this in cron during the morning > > to cache it locally. I was hoping to be able to do it dynamically with > > php. > > > > Well if anyone finds one let me know, otherwise I'll try to write one in > > the next couple of days. > > Not the prettiest, easily fooled and generally ugly... but it > seems to work for now: > > > function getuflatest() { > $ufpage = implode('',file('http://www.userfriendly.org')); > $latestpos = strpos($ufpage,'Latest Strip'); > $uforgpos = strpos($ufpage,'http://www.userfriendly.org/',$latestpos); > $gifpos = strpos($ufpage,'.gif"',$uforgpos); > $uflatest = substr($ufpage,$uforgpos,$gifpos-$uforgpos+4); > > return $uflatest; > } > > > H > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From georgenatalino at yahoo.com Sat Jul 12 00:12:56 2003 From: georgenatalino at yahoo.com (George Natalino) Date: Sat, 12 Jul 2003 00:12:56 -0400 Subject: [nycphp-talk] Monday, July 21, 2003 >> NYSIA Open Source SIG Message-ID: <3F0F8AC8.1020201@yahoo.com> http://www.nysia.org/events/eve200307.cfm#21 Monday, July 21, 2003 NYSIA Open Source SIG Time: 6:00 PM - 8:00 PM Location: IBM 590 Madison @ 57th Street, Room 975 Directions: 4, 5, 6, N or R to 57th Street Admission: Free to NYSIA members, $20 for nonmembers Registration: You must pre-register using our online form, no walk-ins allowed at this event), or by calling us at (212) 475-4503. Registration closes: July 21st, 12PM From jonbaer at jonbaer.net Sun Jul 13 21:06:41 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Sun, 13 Jul 2003 18:06:41 -0700 Subject: [nycphp-talk] sqlite/php5/mysqli References: Message-ID: <003301c349a4$2f998400$6600a8c0@THINKPAD> well im really waiting for php5 more for cli stuff but what's is (or seems) more confusing is that you have mysqli stuff ... http://us3.php.net/manual/en/ref.mysqli.php which primarily states that the functions are meant for mysql 4.1+ which means eventually when u do upgrade ur mysql packages that u would need to recode according to this new api or would it become dissolved altogether since php+mysql is no more ... is it kinda like code w/ mysql @ ur own risk since its extension is built in, then vice versa, then have a new api. it does not really matter to me @ the moment, its just a general question about the php language. - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: "The Rain Maker" To: "NYPHP Talk" Sent: Friday, July 11, 2003 7:02 PM Subject: Re: [nycphp-talk] sqlite/php5 > Jon-- > > > does anyone have opinions on the embedded db that comes w/ php 5? > > I haven't used php5 yet (other than to say "yup, I got it complied and > running") so I'd love to hear you comments on it as you play with it > more. > > > im still trying to understand the rift on why mysql was unbundled for > > it but > > No "rift" per se. MySQL has changed it's license for the 4.x and 5.x > code bases. As such it is no longer compatible with PHP license. Hence > it is no longer included. > > > it has claims of being up to 2x faster than mysql for common > > procedures ... > > MySQL was the fastest kid on the block, when it did a whole lot less > than what it does today. Not advocating, just remember the MySQL vs > Postgres wars of old (well... and still current day :) > > .r > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From winston at xylophage.com Sun Jul 13 23:33:00 2003 From: winston at xylophage.com (Winston Churchill-Joell) Date: Sun, 13 Jul 2003 23:33:00 -0400 Subject: [nycphp-talk] Way to simulate slow connection on localhost? Message-ID: Hi guys, This may be in danger of going OT, but I'm looking for a possible PHP solution to a frustration I run across when developing in Flash. Without going into a long and drawn out tirade about the shortcomings of Flash's testing environment, what I'm looking for is a more authentic simulation of making an HTTP request to the server. And of course, what better way to do this than on my local apache server? Of course, in order to properly test preloaders and whatnot I need to simulate a slow connection, like 56k dialup, for instance. So, is there a way to use PHP to slow down the execution of a specific page on my local machine? For those of you familiar with Flash, I am aware of Flash's capability of doing this, but the testing environment does not support bandwidth simulation for externally loaded movies, which is why I'm looking for a different solution. I'm running Apache 1.3.26 and PHP 4.2.3 on Jaguar (Mac OS 10.2.6) Thanks in advance for any advice, Winston From markert at optonline.net Sun Jul 13 23:45:18 2003 From: markert at optonline.net (John W. Markert) Date: Sun, 13 Jul 2003 23:45:18 -0400 Subject: [nycphp-talk] Way to simulate slow connection on localhost? References: Message-ID: <007c01c349ba$584530a0$0400a8c0@dads> Winston... I don't have any experience with the following, but I remembered reading about it. Perhaps you can confibure your server to simulate a slow connection. http://www.linux-mag.com/2003-02/lamp_01.html John ----- Original Message ----- From: "Winston Churchill-Joell" To: "NYPHP Talk" Sent: Sunday, July 13, 2003 11:33 PM Subject: [nycphp-talk] Way to simulate slow connection on localhost? > Hi guys, > > This may be in danger of going OT, but I'm looking for a possible PHP > solution to a frustration I run across when developing in Flash. > Without going into a long and drawn out tirade about the shortcomings > of Flash's testing environment, what I'm looking for is a more > authentic simulation of making an HTTP request to the server. And of > course, what better way to do this than on my local apache server? Of > course, in order to properly test preloaders and whatnot I need to > simulate a slow connection, like 56k dialup, for instance. > > So, is there a way to use PHP to slow down the execution of a specific > page on my local machine? For those of you familiar with Flash, I am > aware of Flash's capability of doing this, but the testing environment > does not support bandwidth simulation for externally loaded movies, > which is why I'm looking for a different solution. > > I'm running Apache 1.3.26 and PHP 4.2.3 on Jaguar (Mac OS 10.2.6) > > Thanks in advance for any advice, > Winston > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From keithjr at war3.com Mon Jul 14 10:46:33 2003 From: keithjr at war3.com (Keith Richardson) Date: Mon, 14 Jul 2003 10:46:33 -0400 (EDT) Subject: [nycphp-talk] Way to simulate slow connection on localhost? In-Reply-To: <007c01c349ba$584530a0$0400a8c0@dads> References: <007c01c349ba$584530a0$0400a8c0@dads> Message-ID: <13395.204.69.151.229.1058193993.squirrel@www.war3.com> Yeah, that is a good mod to install :D It does say that you can throttle the bandwidth down to say 10kb/second, or 5kb/second, to simulate dial-up. I have jaguar 10.2.6 also, and It would be nice to throttle my bandwidth down so that people dont kill my internet connection while im on battle.net... :) -- Keith Richardson keithjr at war3.com www.war3.com > Winston... > > I don't have any experience with the following, but I remembered reading > about it. Perhaps you can confibure your server to simulate a slow > connection. > > http://www.linux-mag.com/2003-02/lamp_01.html > > John > ----- Original Message ----- > From: "Winston Churchill-Joell" > To: "NYPHP Talk" > Sent: Sunday, July 13, 2003 11:33 PM > Subject: [nycphp-talk] Way to simulate slow connection on localhost? > > >> Hi guys, >> >> This may be in danger of going OT, but I'm looking for a possible PHP >> solution to a frustration I run across when developing in Flash. >> Without going into a long and drawn out tirade about the shortcomings >> of Flash's testing environment, what I'm looking for is a more >> authentic simulation of making an HTTP request to the server. And of >> course, what better way to do this than on my local apache server? Of >> course, in order to properly test preloaders and whatnot I need to >> simulate a slow connection, like 56k dialup, for instance. >> >> So, is there a way to use PHP to slow down the execution of a specific >> page on my local machine? For those of you familiar with Flash, I am >> aware of Flash's capability of doing this, but the testing environment >> does not support bandwidth simulation for externally loaded movies, >> which is why I'm looking for a different solution. >> >> I'm running Apache 1.3.26 and PHP 4.2.3 on Jaguar (Mac OS 10.2.6) >> >> Thanks in advance for any advice, >> Winston >> >> _______________________________________________ >> 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 winston at xylophage.com Mon Jul 14 10:57:09 2003 From: winston at xylophage.com (Winston Churchill-Joell) Date: Mon, 14 Jul 2003 10:57:09 -0400 Subject: [nycphp-talk] Way to simulate slow connection on localhost? In-Reply-To: <007c01c349ba$584530a0$0400a8c0@dads> Message-ID: <717F8EA0-B60B-11D7-90F0-003065569500@xylophage.com> Thanks, John -- this looks like it might do it. Best, Winston On Sunday, July 13, 2003, at 11:45 PM, John W. Markert wrote: > Winston... > > I don't have any experience with the following, but I remembered > reading > about it. Perhaps you can confibure your server to simulate a slow > connection. > > http://www.linux-mag.com/2003-02/lamp_01.html > > John > ----- Original Message ----- > From: "Winston Churchill-Joell" > To: "NYPHP Talk" > Sent: Sunday, July 13, 2003 11:33 PM > Subject: [nycphp-talk] Way to simulate slow connection on localhost? > > >> Hi guys, >> >> This may be in danger of going OT, but I'm looking for a possible PHP >> solution to a frustration I run across when developing in Flash. >> Without going into a long and drawn out tirade about the shortcomings >> of Flash's testing environment, what I'm looking for is a more >> authentic simulation of making an HTTP request to the server. And of >> course, what better way to do this than on my local apache server? Of >> course, in order to properly test preloaders and whatnot I need to >> simulate a slow connection, like 56k dialup, for instance. >> >> So, is there a way to use PHP to slow down the execution of a specific >> page on my local machine? For those of you familiar with Flash, I am >> aware of Flash's capability of doing this, but the testing environment >> does not support bandwidth simulation for externally loaded movies, >> which is why I'm looking for a different solution. >> >> I'm running Apache 1.3.26 and PHP 4.2.3 on Jaguar (Mac OS 10.2.6) >> >> Thanks in advance for any advice, >> Winston >> >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From dmintz at panix.com Mon Jul 14 16:12:01 2003 From: dmintz at panix.com (David Mintz) Date: Mon, 14 Jul 2003 16:12:01 -0400 (EDT) Subject: [nycphp-talk] class design question In-Reply-To: <6CE8D1C5-B32B-11D7-A379-0003931CBF84@war3.com> References: <6CE8D1C5-B32B-11D7-A379-0003931CBF84@war3.com> Message-ID: Thanks to all for the two centses. It's been helpful. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "You want me to pour the beer, Frank?" From betenoir at echonyc.com Mon Jul 14 16:45:25 2003 From: betenoir at echonyc.com (betenoir at echonyc.com) Date: Mon, 14 Jul 2003 16:45:25 -0400 Subject: [nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript history object Message-ID: I'm trying to determine whether the user is coming to a given page (call it pageB.php) from the previous page in the sequence (pageA.php) or off-site. While I can access window.history.length, i cannot access a given key in that array: "Error: uncaught exception: Permission denied to get property History.previous" or "Error: uncaught exception: Permission denied to call method History.item" FWIW I'm using php and while I can determine the $_SERVER['REQUEST_METHOD'] this technique is not infallible. Apparently when you hit "back" (or select from the "Go" menu) some browsers use the cached version of page -- which means they return pageA.php and not pageX.html Aaaaarrrrgggghhhh!!!!! Suggestions? Clyde -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 733 bytes Desc: not available URL: From soazine at erols.com Mon Jul 14 16:48:56 2003 From: soazine at erols.com (Phil Powell) Date: Mon, 14 Jul 2003 16:48:56 -0400 Subject: [nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript historyobject References: Message-ID: <286e01c34a49$58530650$31996244@scandinawa1bo6> Will the previous page have any form elements? If so, within a form within pageA.php you can have this: > Calling this form variable in pageB.php would ensure that they came from pageA.php You can also do this in a query string, however, a better solution would be some kind of unique key, such as pageB.php?var1=blah&var2=foo&...&uniqueKey=ICameFromPageA.php&... That way you look for some unique string that could only have come from pageA.php. HTH Phil ----- Original Message ----- From: betenoir at echonyc.com To: itp-alumni at forums.nyu.edu ; talk at lists.nyphp.org Sent: Monday, July 14, 2003 4:45 PM Subject: [nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript historyobject I'm trying to determine whether the user is coming to a given page (call it pageB.php) from the previous page in the sequence (pageA.php) or off-site. While I can access window.history.length, i cannot access a given key in that array: "Error: uncaught exception: Permission denied to get property History.previous" or "Error: uncaught exception: Permission denied to call method History.item" FWIW I'm using php and while I can determine the $_SERVER['REQUEST_METHOD'] this technique is not infallible. Apparently when you hit "back" (or select from the "Go" menu) some browsers use the cached version of page -- which means they return pageA.php and not pageX.html Aaaaarrrrgggghhhh!!!!! Suggestions? Clyde ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike at dbeat.com Mon Jul 14 17:30:13 2003 From: mike at dbeat.com (Mike Biamonte) Date: Mon, 14 Jul 2003 17:30:13 -0400 Subject: [nycphp-talk] 3-6 Month Project Work Available.. Message-ID: Hello, NYPHP-TALK, I'm looking for a *SMART* & experienced person to help out with a summer/fall work over-load here in NYC. This would be 3-6 months of FULL TIME work (40-50+ hrs/wk) paid on a contract basis starting ASAP. At the end of that time, it MAY transition to a full time job. (Depends on business factors + right person.) Work consists of PHP/Postgres, projects include: - integrating role-based secured access to existing web-based system, with new tools to administer users, permissions, etc. - lots and lots of QA / repairs. - enhancements to web-based CRM tools - relatively complicated reports (eg: must grasp business side of things.) Great opportunity in fast-paced shop for the right person who can COMMIT for the next 3-6 months. Interested? Email phone number/resume to mbiamonte at affinitysolutions.com Thanks - Mike Biamonte From Thomas.Freedman at ubs.com Mon Jul 14 17:33:11 2003 From: Thomas.Freedman at ubs.com (Freedman, Tom S.) Date: Mon, 14 Jul 2003 17:33:11 -0400 Subject: [nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript histor yobject Message-ID: I can't improve on Phil's solution options, but I did want to comment that the JavaScript history object is locked for security reasons... imagine if any site you visited could see everywhere you've been on the web since you started up your browser, and log that information. It would be a huge privacy breech. So they locked it up, and will let you move the user forwards and back, but not actually see where they've been. As they say, it's not a bug, it's a feature! :-) -Tom -----Original Message----- From: Phil Powell [mailto:soazine at erols.com] Sent: Monday, July 14, 2003 4:49 PM To: NYPHP Talk Subject: Re: [nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript historyobject Will the previous page have any form elements? If so, within a form within pageA.php you can have this: > Calling this form variable in pageB.php would ensure that they came from pageA.php You can also do this in a query string, however, a better solution would be some kind of unique key, such as pageB.php?var1=blah&var2=foo&...&uniqueKey=ICameFromPageA.php&... That way you look for some unique string that could only have come from pageA.php. HTH Phil ----- Original Message ----- From: betenoir at echonyc.com To: itp-alumni at forums.nyu.edu ; talk at lists.nyphp.org Sent: Monday, July 14, 2003 4:45 PM Subject: [nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript historyobject I'm trying to determine whether the user is coming to a given page (call it pageB.php) from the previous page in the sequence (pageA.php) or off-site. While I can access window.history.length, i cannot access a given key in that array: "Error: uncaught exception: Permission denied to get property History.previous" or "Error: uncaught exception: Permission denied to call method History.item" FWIW I'm using php and while I can determine the $_SERVER['REQUEST_METHOD'] this technique is not infallible. Apparently when you hit "back" (or select from the "Go" menu) some browsers use the cached version of page -- which means they return pageA.php and not pageX.html Aaaaarrrrgggghhhh!!!!! Suggestions? Clyde _____ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. From betenoir at echonyc.com Mon Jul 14 17:33:06 2003 From: betenoir at echonyc.com (betenoir at echonyc.com) Date: Mon, 14 Jul 2003 17:33:06 -0400 Subject: [nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript historyobject In-Reply-To: <286e01c34a49$58530650$31996244@scandinawa1bo6> References: Message-ID: >Will the previous page have any form elements? If so, within a form within >pageA.php you can have this: > Yes, I'm passing form data from page to page and then to a third party off-site. >Calling this form variable in pageB.php would ensure that they came from >pageA.php Except I'm not sure this will address the cache-ing problem. But5 you have given me something to think about. >You can also do this in a query string, however, a better solution would >be some kind of unique key, such as pageB.php?var1=blah&var2=foo&...&uniqueKey=ICameFromPageA.php&... >That way you look for some unique string that could only have come from >pageA.php. Hmmm. The O'Reilly BlueJay book mentions URL rewriting but I didn't see any examples. Cam you point me to any resources? And just to complicate matters I'm also frames Thanks for your help. Clyde -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 932 bytes Desc: not available URL: From hans at nyphp.org Mon Jul 14 17:37:31 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 14 Jul 2003 17:37:31 -0400 Subject: [nycphp-talk] 3-6 Month Project Work Available.. In-Reply-To: References: Message-ID: <3F13229B.2080706@nyphp.org> Hi Mike, Please also post job offers to the NYPHP-Jobs list (jobs at lists.nyphp.org), since many are subscribed to that list, and not to Talk. Thanks, H Mike Biamonte wrote: > Hello, NYPHP-TALK, > > I'm looking for a *SMART* & experienced person to help out > with a summer/fall work over-load here in NYC. > > This would be 3-6 months of FULL TIME work > (40-50+ hrs/wk) paid on a contract basis starting ASAP. > > At the end of that time, it MAY transition to a full > time job. (Depends on business factors + right person.) > > Work consists of PHP/Postgres, projects include: > > - integrating role-based secured access to existing > web-based system, with new tools to administer > users, permissions, etc. > > - lots and lots of QA / repairs. > > - enhancements to web-based CRM tools > > - relatively complicated reports (eg: must grasp > business side of things.) > > Great opportunity in fast-paced shop for the right > person who can COMMIT for the next 3-6 months. > > Interested? Email phone number/resume to mbiamonte at affinitysolutions.com > > Thanks > > - Mike Biamonte > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Mon Jul 14 18:42:19 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 14 Jul 2003 18:42:19 -0400 Subject: [nycphp-talk] sqlite/php5/mysqli In-Reply-To: <003301c349a4$2f998400$6600a8c0@THINKPAD> References: <003301c349a4$2f998400$6600a8c0@THINKPAD> Message-ID: <3F1331CB.4040303@nyphp.org> Jon Baer wrote: > well im really waiting for php5 more for cli stuff but what's is (or seems) > more confusing is that you have mysqli stuff ... > http://us3.php.net/manual/en/ref.mysqli.php I've been using CLI PHP for over a year and it's worked essentially flawless; especially since 4.3.x, CLI has really come together. > which primarily states that the functions are meant for mysql 4.1+ which > means eventually when u do upgrade ur mysql packages that u would need to > recode according to this new api or would it become dissolved altogether > since php+mysql is no more ... is it kinda like code w/ mysql @ ur own risk > since its extension is built in, then vice versa, then have a new api. Unless I'm misunderstanding, I've been hearing a lot of concern regarding the decoupling of php and mysql. While the MySQL client libs have been bundled, it's always been recommended to link against the "real" clients libs from MySQL, especially for critical systems. There are a number of reasons for this, but IMHO the unbundling of MySQL is actually a good thing, in the true sense of making php lighterweight and moving extensions to PECL. Quite honestly, I'm not very hot on bundling sql-lite, though. mysqli is also a good thing, when it matures. It'll enable many of the features and flexibility only found in those "other guy's" DBs. After working with OCI8, and taking into account some of the major additions to MySQL in the near future, mysqli will become a nessecity, and a benefit. H From hans at nyphp.org Mon Jul 14 18:48:13 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 14 Jul 2003 18:48:13 -0400 Subject: [nycphp-talk] Way to simulate slow connection on localhost? In-Reply-To: <717F8EA0-B60B-11D7-90F0-003065569500@xylophage.com> References: <717F8EA0-B60B-11D7-90F0-003065569500@xylophage.com> Message-ID: <3F13332D.1040402@nyphp.org> Winston Churchill-Joell wrote: > Thanks, John -- this looks like it might do it. > > Best, > Winston > > > On Sunday, July 13, 2003, at 11:45 PM, John W. Markert wrote: > >> Winston... >> >> I don't have any experience with the following, but I remembered reading >> about it. Perhaps you can confibure your server to simulate a slow >> connection. >> >> http://www.linux-mag.com/2003-02/lamp_01.html Something else you may also look at is using some of the available firewalling tools, which essentially drops packets on purpose. Although I don't know exactly what's available under Jaguar, under FreeBSD there's dummynet (I think other's, but they escape me at the moment) and Linux has a flavor-of-the-month solution *duck* :) http://project.honeynet.de/papers/honeynet/dc.html H From hans at nyphp.org Mon Jul 14 18:55:40 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 14 Jul 2003 18:55:40 -0400 Subject: [nycphp-talk] $_SERVER['REQUEST_METHOD'] and Javascript history object In-Reply-To: References: Message-ID: <3F1334EC.6090104@nyphp.org> betenoir at echonyc.com wrote: > I'm trying to determine whether the user is coming to a given page (call > it pageB.php) from the previous page in the sequence (pageA.php) or > off-site. If you need to do this for security/integrity reasons, you'll need to do it server-side. I've used one-time keys with success, either via a cookie, POST or GET. H From ttoomey at ydnt.com Tue Jul 15 12:13:08 2003 From: ttoomey at ydnt.com (Tim Toomey) Date: Tue, 15 Jul 2003 11:13:08 -0500 Subject: [nycphp-talk] Echoes in Javascript Message-ID: <004e01c34aeb$fe4f3680$8b00a8c0@timmerslaptop> I have a simple javascript preloader script that I want to use to show the progress of an image upload on a page, and the script looks like it would work perfectly. You do your image defines in the javascript and this is where I run into a problem. I haven't tested this or tried it but I was wondering if you can have an image upload form that would then point to the page where the preloader javascript is....and somehow show the preloading status bar as the image is being uploaded. I would have to execute php within the preloader script somehow to echo out the name of the image being uploaded and I just wasn't sure if this would work or not. Kinkos has an uploader application on their site that shows the status of the upload and I am trying to achieve something similiar to that. Any help is appreciated! -Timmy -------------- next part -------------- An HTML attachment was scrubbed... URL: From dkrook at hotmail.com Tue Jul 15 12:36:39 2003 From: dkrook at hotmail.com (D C Krook) Date: Tue, 15 Jul 2003 12:36:39 -0400 Subject: [nycphp-talk] Echoes in Javascript (PHP Progress Bar) Message-ID: Timmy, I just happen to glance over the PHP Classes mailing this morning and noticed this. It may be what you're looking for: Class: ProgressBar http://phpclasses.mirrors.nyphp.org/browse.html/package/1222.html ========================================== Daniel Christer Krook http://krook.net/ || http://krook.info/ http://civet.net/ || http://dev.krook.org/ >I have a simple javascript preloader script that I want to use to show the >progress of an image upload on a page, and the script looks like it would >work perfectly. You do your image defines in the javascript and this is >where I run into a problem. I haven't tested this or tried it but I was >wondering if you can have an image upload form that would then point to the >page where the preloader javascript is....and somehow show the preloading >status bar as the image is being uploaded. > >I would have to execute php within the preloader script somehow to echo out >the name of the image being uploaded and I just wasn't sure if this would >work or not. Kinkos has an uploader application on their site that shows >the status of the upload and I am trying to achieve something similiar to >that. > >Any help is appreciated! > >-Timmy _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From ttoomey at ydnt.com Tue Jul 15 12:51:17 2003 From: ttoomey at ydnt.com (Tim Toomey) Date: Tue, 15 Jul 2003 11:51:17 -0500 Subject: [nycphp-talk] Echoes in Javascript (PHP Progress Bar) References: Message-ID: <008c01c34af1$528c0e30$8b00a8c0@timmerslaptop> This works, saves me alot of time too. Thanks! -Timmy ----- Original Message ----- From: "D C Krook" To: Sent: Tuesday, July 15, 2003 11:36 AM Subject: Re: [nycphp-talk] Echoes in Javascript (PHP Progress Bar) > Timmy, > > I just happen to glance over the PHP Classes mailing this morning and > noticed this. It may be what you're looking for: > > Class: ProgressBar > http://phpclasses.mirrors.nyphp.org/browse.html/package/1222.html > > > > > ========================================== > Daniel Christer Krook > http://krook.net/ || http://krook.info/ > http://civet.net/ || http://dev.krook.org/ > > > >I have a simple javascript preloader script that I want to use to show the > >progress of an image upload on a page, and the script looks like it would > >work perfectly. You do your image defines in the javascript and this is > >where I run into a problem. I haven't tested this or tried it but I was > >wondering if you can have an image upload form that would then point to the > >page where the preloader javascript is....and somehow show the preloading > >status bar as the image is being uploaded. > > > >I would have to execute php within the preloader script somehow to echo out > >the name of the image being uploaded and I just wasn't sure if this would > >work or not. Kinkos has an uploader application on their site that shows > >the status of the upload and I am trying to achieve something similiar to > >that. > > > >Any help is appreciated! > > > >-Timmy > > _________________________________________________________________ > MSN 8 helps eliminate e-mail viruses. Get 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 markert at optonline.net Tue Jul 15 18:39:55 2003 From: markert at optonline.net (John W. Markert) Date: Tue, 15 Jul 2003 18:39:55 -0400 Subject: [nycphp-talk] Loading CVS files Message-ID: <00dd01c34b22$03f958f0$0400a8c0@dads> Hi... I am looking for a program that will read CVS files exported by Excel record by record and insert them into mysql. I need to modify the program to manipulate some of the fields during import...so a mysql utility probably will not do. Any suggstions? Thanks. John ___________________________________________ John W. Markert 14 Joanna Way Kinnelon, NJ 07405 Phone: (973)838-8956 Cell: (201)788-1740 Fax: (973)838-4561 email: markert at optonline.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From fb at intldef.org Tue Jul 15 18:47:58 2003 From: fb at intldef.org (FB`) Date: Tue, 15 Jul 2003 18:47:58 -0400 Subject: [nycphp-talk] Loading CVS files References: <00dd01c34b22$03f958f0$0400a8c0@dads> Message-ID: <016e01c34b23$236e8510$1901a8c0@ybsweb> Look at the code that allows phpmyadmin to do this - it works very nicely, and should be somewhat well ironed out. FB` ----- Original Message ----- From: "John W. Markert" To: Sent: Tuesday, July 15, 2003 6:39 PM Subject: [nycphp-talk] Loading CVS files > Hi... > > I am looking for a program that will read CVS files exported by Excel record by record and insert them into mysql. I need to modify the program to manipulate some of the fields during import...so a mysql utility probably will not do. Any suggstions? Thanks. > > John > ___________________________________________ > > John W. Markert > 14 Joanna Way > Kinnelon, NJ 07405 > Phone: (973)838-8956 > Cell: (201)788-1740 > Fax: (973)838-4561 > email: markert at optonline.net > ---------------------------------------------------------------------------- ---- > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From henry at beewh.com Tue Jul 15 18:50:53 2003 From: henry at beewh.com (Henry Ponce) Date: Tue, 15 Jul 2003 19:50:53 -0300 Subject: [nycphp-talk] Loading CVS files In-Reply-To: <00dd01c34b22$03f958f0$0400a8c0@dads> References: <00dd01c34b22$03f958f0$0400a8c0@dads> Message-ID: <200307151950.53771.henry@beewh.com> Hello: you should check www.phpclasses.org they have things on CVS that you may use. hope it helps. Henry From rudy at taytek.com Wed Jul 16 07:20:25 2003 From: rudy at taytek.com (Rudy Gamberini) Date: Wed, 16 Jul 2003 07:20:25 -0400 Subject: [nycphp-talk] Loading CVS files In-Reply-To: <200307151950.53771.henry@beewh.com> Message-ID: Just a point of clarification here. Excel exports CSV files "Comma Separated Variables" Not CVS "Concurrent Versions System". Sorry for being a nit-picker on this but the phpclasses actually support both. Rudy -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Henry Ponce Sent: Tuesday, July 15, 2003 6:51 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Loading CVS files Hello: you should check www.phpclasses.org they have things on CVS that you may use. hope it helps. Henry _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.500 / Virus Database: 298 - Release Date: 7/10/03 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.500 / Virus Database: 298 - Release Date: 7/10/03 From keithjr at war3.com Wed Jul 16 10:46:21 2003 From: keithjr at war3.com (Keith Richardson) Date: Wed, 16 Jul 2003 10:46:21 -0400 (EDT) Subject: [nycphp-talk] IIS 5 and PHP with User Access Message-ID: <31051.204.69.151.229.1058366781.squirrel@www.war3.com> I've been having this problem forever on my browser. I am using Win2k with IE 6.0 at work. When I log into a NT domain authenticated page (say phpmyadmin) - forms do not submit correctly through the remainder of my page. Even if it is a different site, my forms do not pass the variables. I have a page for a conference room scheduling program that dis-allows anonymous access, so that you can hit the page, and it will log you in automatically, since the login cookie expires on closing the browser. It logs in fine, and redirects you to the index page with the correct cookies. I can then click on say, list a calendar. Then it displays all calendars that I have access to, and have buttons to submit forms to view them. When you click on them, you hit the same page, since that is what shows if no options of the form are submitted. All of my form headers are
as an example. Why are the variables not passing with IIS 5 NT Authentication turned on? Any help will be appreciated :) -- Keith Richardson keithjr at war3.com www.war3.com From danielc at analysisandsolutions.com Wed Jul 16 10:52:17 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 16 Jul 2003 10:52:17 -0400 Subject: [nycphp-talk] IIS 5 and PHP with User Access In-Reply-To: <31051.204.69.151.229.1058366781.squirrel@www.war3.com> References: <31051.204.69.151.229.1058366781.squirrel@www.war3.com> Message-ID: <20030716145217.GA11012@panix.com> Howdy: On Wed, Jul 16, 2003 at 10:46:21AM -0400, Keith Richardson wrote: > I've been having this problem forever on my browser. I am using Win2k with > IE 6.0 at work. When I log into a NT domain authenticated page (say > phpmyadmin) - forms do not submit correctly through the remainder of my > page. Even if it is a different site, my forms do not pass the variables. Perhaps the scripts are coded to directly access variables, such as $foo, rather than $_POST['foo'] in expectation of register_globals being on? --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From keithjr at war3.com Wed Jul 16 10:57:47 2003 From: keithjr at war3.com (Keith Richardson) Date: Wed, 16 Jul 2003 10:57:47 -0400 (EDT) Subject: [nycphp-talk] IIS 5 and PHP with User Access In-Reply-To: <20030716145217.GA11012@panix.com> References: <31051.204.69.151.229.1058366781.squirrel@www.war3.com> <20030716145217.GA11012@panix.com> Message-ID: <33187.204.69.151.229.1058367467.squirrel@www.war3.com> Say you click this form:
And in the top of the admin.editcal.php if (empty($_POST['method'])) $method = "index"; else $method = $_POST['method']; switch ($method) { case "index": // display code to show the list of calendars to edit break; case "edit": // edits 1 calendar break; case "save": // saves the calendar break; } and it goes to the index page when i click the forms. i changed it to accept not just the $_POST['method'] variable, but also $method, and then had a link saying Edit Calendar 12 and it would go into the edit form, but the form would not submit. All of the origional code works right, if you do not go to an authenticated page through IIS (right-click on page, properties, directory access, edit, disallow anonymous, integrate NT authentication) > Howdy: > > On Wed, Jul 16, 2003 at 10:46:21AM -0400, Keith Richardson wrote: >> I've been having this problem forever on my browser. I am using Win2k >> with IE 6.0 at work. When I log into a NT domain authenticated page >> (say phpmyadmin) - forms do not submit correctly through the remainder >> of my page. Even if it is a different site, my forms do not pass the >> variables. > > Perhaps the scripts are coded to directly access variables, such as > $foo, rather than $_POST['foo'] in expectation of register_globals being > on? > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk -- Keith Richardson keithjr at war3.com www.war3.com From dmintz at panix.com Wed Jul 16 13:46:30 2003 From: dmintz at panix.com (David Mintz) Date: Wed, 16 Jul 2003 13:46:30 -0400 (EDT) Subject: [nycphp-talk] pre MySQL upgrade sanity check In-Reply-To: References: Message-ID: stupid me, I think I accidentally sent this to an individual instead of to the list, it went something like this: Could somebody please correct me if I'm wrong about the proper steps to take to upgrade my MySQL from 3.32.56 to 4.0.13 on my RedHat 9 development box. I should note that I have Apache 1.3.27 with PHP 4.3.2 as a DSO. 1) shut down mysql and httpd 2) I have Mysql client and server installed as RedHat RPMs. Remove these with rpm --erase ... after backing up data. 3) install MySQL according to http://www.mysql.com/doc/en/Installing_binary.html including post-installation setup 4) rebuild PHP with ./configure --prefix=/usr/local --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql [--with-other-stuff etc] followed by make; make install 5) my httpd.conf has been working fine; leave it alone 6) restart httpd and mysql 7) crack open a beer Right? Gratefully, --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "You want me to pour the beer, Frank?" From hans at nyphp.org Wed Jul 16 14:32:42 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 16 Jul 2003 14:32:42 -0400 Subject: [nycphp-talk] pre MySQL upgrade sanity check In-Reply-To: References: Message-ID: <1058380362.3f159a4a29559@www.acedsl.com> As I sit at an IIS training course... > 1) shut down mysql and httpd > > 2) I have Mysql client and server installed as RedHat RPMs. Remove these > with rpm --erase ... after backing up data. > > 3) install MySQL according to > http://www.mysql.com/doc/en/Installing_binary.html including > post-installation setup > > 4) rebuild PHP with ./configure --prefix=/usr/local > --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql > [--with-other-stuff etc] I always install php into /usr/local/php which can be handy if you have multiple installs (for instance, I have distinct DSO and CLI compiles) but this is of course just a preferance. I also like to use the php.ini-recommended file, so: cp PHPSRC/php.ini- recommended /where/you/installed/to/php/lib/php.ini (or something like that) > followed by make; make install > > 5) my httpd.conf has been working fine; leave it alone > > 6) restart httpd and mysql > > 7) crack open a beer Yes, #7 is vital. Something else you may want to consider: since it's a "considerable" upgrade from MySQL 3.x to 4.x, I'm always most comfortable rebuilding the databases/tables in 4.x (especially if they aren't that big). This may just be paranoia, but at a minimum you'll get slightly optimized tables. There are a couple ways of doing this; here's one that I liked: mysqldump -u 'theuser' -p 'thepassword' --quick --allow-keywords -h thehost.com db1 table1 | mysql -u 'root' -p 'passwd' --database=db1new There are of course variations on the theme, from doing multiple DBs, to tables, users, etc. H From willie at pdfsystems.com Wed Jul 16 14:44:37 2003 From: willie at pdfsystems.com (Willliam Klein) Date: Wed, 16 Jul 2003 14:44:37 -0400 Subject: [nycphp-talk] Date Check In-Reply-To: <23AA728CBA918941834ADDDFAD7FA85C0D76A8@sag.pdfsystems.com> Message-ID: <23AA728CBA918941834ADDDFAD7FA85C0E7290@sag.pdfsystems.com> Hi All; Does anyone know of a date validation routine for php? I have a form with users submitting a date and I want to be sure they put in a valid date. Thanks willie -------------- next part -------------- An HTML attachment was scrubbed... URL: From henry at beewh.com Wed Jul 16 14:47:58 2003 From: henry at beewh.com (Henry Ponce) Date: Wed, 16 Jul 2003 15:47:58 -0300 Subject: [nycphp-talk] Date Check In-Reply-To: <23AA728CBA918941834ADDDFAD7FA85C0E7290@sag.pdfsystems.com> References: <23AA728CBA918941834ADDDFAD7FA85C0E7290@sag.pdfsystems.com> Message-ID: <200307161547.58009.henry@beewh.com> check in phpclasses.org Henry On Wednesday 16 July 2003 15:44, Willliam Klein wrote: > Hi All; > > Does anyone know of a date validation routine for php? > > I have a form with users submitting a date and I want to be sure they put > in a valid date. > > Thanks > > willie -- An. Henry Ponce Linux Registered User # 303567 Mar del Plata, Argentina Planeta Tierra From agfische at email.smith.edu Wed Jul 16 14:49:46 2003 From: agfische at email.smith.edu (Aaron Fischer) Date: Wed, 16 Jul 2003 14:49:46 -0400 Subject: [nycphp-talk] Date Check In-Reply-To: <23AA728CBA918941834ADDDFAD7FA85C0E7290@sag.pdfsystems.com> Message-ID: <457A0B92-B7BE-11D7-B826-0003930D07F2@email.smith.edu> You can save them the trouble by creating a date variable in your form processing script: $date=date("d-m-Y"); Then there isn't a need to have a field in the form requesting the user to enter the date. Aaron On Wednesday, Jul 16, 2003, at 14:44 US/Eastern, Willliam Klein wrote: > Hi All; > > Does anyone know of a date validation routine for php? > > I have a form with users submitting a date and I want to be sure they > put in a valid date. > > Thanks > > willie > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 718 bytes Desc: not available URL: From crisscott at netzero.com Wed Jul 16 15:08:25 2003 From: crisscott at netzero.com (crisscott at netzero.com) Date: Wed, 16 Jul 2003 19:08:25 GMT Subject: [nycphp-talk] Date Check Message-ID: <20030716.120832.754.330767@webmail06.lax.untd.com> I assume you are trying to check the number of days in the month so you don't end up with 2-31-2003. It depends on how you are collecting the information. If you are having them fill in three different fields you could try something like this... if($_POST['day'] > date('t', mktime(0,0,0,$_POST['month'],1,$_POST['year'])) { // Too many days } Scott From danielc at analysisandsolutions.com Wed Jul 16 15:22:25 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 16 Jul 2003 15:22:25 -0400 Subject: [nycphp-talk] Date Check In-Reply-To: <23AA728CBA918941834ADDDFAD7FA85C0E7290@sag.pdfsystems.com> References: <23AA728CBA918941834ADDDFAD7FA85C0D76A8@sag.pdfsystems.com> <23AA728CBA918941834ADDDFAD7FA85C0E7290@sag.pdfsystems.com> Message-ID: <20030716192225.GA15695@panix.com> Howdy: On Wed, Jul 16, 2003 at 02:44:37PM -0400, Willliam Klein wrote: > > Does anyone know of a date validation routine for php? You might find checkdate() handy. See http://us2.php.net/manual/en/function.checkdate.php --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From dmintz at panix.com Wed Jul 16 15:34:58 2003 From: dmintz at panix.com (David Mintz) Date: Wed, 16 Jul 2003 15:34:58 -0400 (EDT) Subject: [nycphp-talk] pre MySQL upgrade sanity check In-Reply-To: <1058380362.3f159a4a29559@www.acedsl.com> References: <1058380362.3f159a4a29559@www.acedsl.com> Message-ID: Thanks Hans for your unfailing helpfulness (perhaps combined with a self-interested quest for entertainment to ease the boredom of your training course (-: ?) I can feel my heart rate picking up, that surely means I'm gonna do it. Who needs hard drugs when we have this stuff? Woo hoooo! David On Wed, 16 Jul 2003, Hans Zaunere wrote: > > As I sit at an IIS training course... > > > 1) shut down mysql and httpd > > > > 2) I have Mysql client and server installed as RedHat RPMs. Remove these > > with rpm --erase ... after backing up data. > > > > 3) install MySQL according to > > http://www.mysql.com/doc/en/Installing_binary.html including > > post-installation setup > > > > 4) rebuild PHP with ./configure --prefix=/usr/local > > --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql > > [--with-other-stuff etc] > > I always install php into /usr/local/php which can be handy if you have > multiple installs (for instance, I have distinct DSO and CLI compiles) but this > is of course just a preferance. I also like to use the php.ini-recommended > file, so: cp PHPSRC/php.ini- > recommended /where/you/installed/to/php/lib/php.ini (or something like that) > > > followed by make; make install > > > > 5) my httpd.conf has been working fine; leave it alone > > > > 6) restart httpd and mysql > > > > 7) crack open a beer > > Yes, #7 is vital. Something else you may want to consider: since it's > a "considerable" upgrade from MySQL 3.x to 4.x, I'm always most comfortable > rebuilding the databases/tables in 4.x (especially if they aren't that big). > This may just be paranoia, but at a minimum you'll get slightly optimized > tables. There are a couple ways of doing this; here's one that I liked: > > mysqldump -u 'theuser' -p 'thepassword' --quick --allow-keywords -h thehost.com > db1 table1 | mysql -u 'root' -p 'passwd' --database=db1new > > There are of course variations on the theme, from doing multiple DBs, to > tables, users, etc. > --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "You want me to pour the beer, Frank?" From dmintz at panix.com Wed Jul 16 15:37:27 2003 From: dmintz at panix.com (David Mintz) Date: Wed, 16 Jul 2003 15:37:27 -0400 (EDT) Subject: [nycphp-talk] Date Check In-Reply-To: <23AA728CBA918941834ADDDFAD7FA85C0E7290@sag.pdfsystems.com> References: <23AA728CBA918941834ADDDFAD7FA85C0E7290@sag.pdfsystems.com> Message-ID: How about checkdate()? http://www.php.net/manual/en/function.checkdate.php On Wed, 16 Jul 2003, Willliam Klein wrote: > Hi All; > > Does anyone know of a date validation routine for php? > > I have a form with users submitting a date and I want to be sure they put in > a valid date. > > Thanks > > willie > --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "You want me to pour the beer, Frank?" From willie at pdfsystems.com Wed Jul 16 15:37:46 2003 From: willie at pdfsystems.com (Willliam Klein) Date: Wed, 16 Jul 2003 15:37:46 -0400 Subject: [php] Re: [nycphp-talk] Date Check In-Reply-To: <23AA728CBA918941834ADDDFAD7FA85C0D76B4@sag.pdfsystems.com> Message-ID: <23AA728CBA918941834ADDDFAD7FA85C0E7292@sag.pdfsystems.com> Cool, a native php funtion and I thought I RTFM. Thanks to all for your replies willie > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Analysis & Solutions > Sent: Wednesday, July 16, 2003 3:22 PM > To: NYPHP Talk > Subject: [php] Re: [nycphp-talk] Date Check > > > Howdy: > > On Wed, Jul 16, 2003 at 02:44:37PM -0400, Willliam Klein wrote: > > > > Does anyone know of a date validation routine for php? > > You might find checkdate() handy. See > http://us2.php.net/manual/en/function.checkdate.php > > --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 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From markert at optonline.net Wed Jul 16 17:55:29 2003 From: markert at optonline.net (John W. Markert) Date: Wed, 16 Jul 2003 17:55:29 -0400 Subject: [nycphp-talk] Loading CVS files References: <00dd01c34b22$03f958f0$0400a8c0@dads> Message-ID: <007001c34be4$fa5643d0$0400a8c0@dads> Thanks to all that responded. In the suggestions, I found several interesting pieces of code. At the time I made this request, I was unaware of fgetcsv. This is a wonderful tool if you need to manipulate csv files. John ----- Original Message ----- From: John W. Markert To: talk at lists.nyphp.org Sent: Tuesday, July 15, 2003 6:39 PM Subject: [nycphp-talk] Loading CVS files Hi... I am looking for a program that will read CVS files exported by Excel record by record and insert them into mysql. I need to modify the program to manipulate some of the fields during import...so a mysql utility probably will not do. Any suggstions? Thanks. John ___________________________________________ John W. Markert 14 Joanna Way Kinnelon, NJ 07405 Phone: (973)838-8956 Cell: (201)788-1740 Fax: (973)838-4561 email: markert at optonline.net ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From ttoomey at ydnt.com Wed Jul 16 18:05:54 2003 From: ttoomey at ydnt.com (Tim Toomey) Date: Wed, 16 Jul 2003 17:05:54 -0500 Subject: [nycphp-talk] limit file types on image uploads? Message-ID: <00b301c34be6$7053fea0$8b00a8c0@timmerslaptop> What's the easiest way to limit what types of files people are allowed to upload on an image upload script? -Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From wheelie at acedsl.com Wed Jul 16 18:16:59 2003 From: wheelie at acedsl.com (Joshua Glenn) Date: Wed, 16 Jul 2003 18:16:59 -0400 Subject: [nycphp-talk] limit file types on image uploads? In-Reply-To: <00b301c34be6$7053fea0$8b00a8c0@timmerslaptop> Message-ID: i've used getimagesize(), which will give you an array with one of the array elements saying what kind of image it is. -josh -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Tim Toomey Sent: Wednesday, July 16, 2003 6:06 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] limit file types on image uploads? What's the easiest way to limit what types of files people are allowed to upload on an image upload script? -Tim -------------- next part -------------- An HTML attachment was scrubbed... URL: From keithjr at war3.com Wed Jul 16 19:11:46 2003 From: keithjr at war3.com (Keith Richardson) Date: Wed, 16 Jul 2003 19:11:46 -0400 Subject: [nycphp-talk] limit file types on image uploads? In-Reply-To: <00b301c34be6$7053fea0$8b00a8c0@timmerslaptop> Message-ID: $fileparts = explode(".",$filename); $extention = $fileparts[sizeof($fileparts)-1]; that will give you the extention of the file, if the $filename var is the filename of the file that was uploaded. -Keith Richardson On Wednesday, July 16, 2003, at 06:05 PM, Tim Toomey wrote: > What's the easiest way to limit what types of files people are allowed > to upload on an image upload script? > ? > -Tim > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 686 bytes Desc: not available URL: From hans at nyphp.org Wed Jul 16 20:42:59 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 16 Jul 2003 20:42:59 -0400 Subject: [nycphp-talk] limit file types on image uploads? In-Reply-To: References: Message-ID: <3F15F113.4020305@nyphp.org> Joshua Glenn wrote: > i've used getimagesize(), which will give you an array with one of the > array elements saying what kind of image it is. In late versions of PHP there's http://us2.php.net/mime_magic which may be handy (although finiky at times). Also, offtopic, phpclasses has been a hot item today: don't forget the NYPHP mirror: http://mirrors.nyphp.org/ H From hans at nyphp.org Wed Jul 16 20:53:03 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 16 Jul 2003 20:53:03 -0400 Subject: [nycphp-talk] IIS 5 and PHP with User Access In-Reply-To: <33187.204.69.151.229.1058367467.squirrel@www.war3.com> References: <31051.204.69.151.229.1058366781.squirrel@www.war3.com> <20030716145217.GA11012@panix.com> <33187.204.69.151.229.1058367467.squirrel@www.war3.com> Message-ID: <3F15F36F.7010908@nyphp.org> Keith Richardson wrote: > Say you click this form: > >
> > > >
> > And in the top of the admin.editcal.php > > if (empty($_POST['method'])) > $method = "index"; > else > $method = $_POST['method']; > > switch ($method) > { > case "index": > // display code to show the list of calendars to edit > break; > case "edit": > // edits 1 calendar > break; > case "save": > // saves the calendar > break; > } > > and it goes to the index page when i click the forms. > > i changed it to accept not just the $_POST['method'] variable, but also > $method, and then had a link saying href="admin.editcal.php?method=edit&calid=12">Edit Calendar 12 and it > would go into the edit form, but the form would not submit. I completed a day of IIS training so I should be an expert (the instructor said that we'll learn in this 3 day course what it'd take a college course to teach for Apache - I'm not so sure yet :) Anywhooo, for testing, what if you set the form's method to GET ? Any differance? Using the latest version of PHP? As ISAPI or CGI? Just some food for thought; maybe I'll get back to you in another couple of days :) H From keithjr at war3.com Wed Jul 16 21:03:58 2003 From: keithjr at war3.com (Keith Richardson) Date: Wed, 16 Jul 2003 21:03:58 -0400 Subject: [nycphp-talk] IIS 5 and PHP with User Access In-Reply-To: <3F15F36F.7010908@nyphp.org> Message-ID: <8BF3DC92-B7F2-11D7-969E-0003931CBF84@war3.com> ISAPI dll's, get variables work, but the problem is that they arent hidden.. one thing i noticed is that if the directory disallows anonymous access along with the one file, it works, but you cant have anonymous and restricted access int he same browser "session" it seems.... i wonder why they dont say anything about that anywhere on php.net... On Wednesday, July 16, 2003, at 08:53 PM, Hans Zaunere wrote: > > > Keith Richardson wrote: > >> Say you click this form: >>
>> >> >> >>
>> And in the top of the admin.editcal.php >> if (empty($_POST['method'])) >> $method = "index"; >> else >> $method = $_POST['method']; >> switch ($method) >> { >> case "index": >> // display code to show the list of calendars to edit >> break; >> case "edit": >> // edits 1 calendar >> break; >> case "save": >> // saves the calendar >> break; >> } >> and it goes to the index page when i click the forms. >> i changed it to accept not just the $_POST['method'] variable, but >> also >> $method, and then had a link saying > href="admin.editcal.php?method=edit&calid=12">Edit Calendar 12 >> and it >> would go into the edit form, but the form would not submit. > > I completed a day of IIS training so I should be an expert (the > instructor said that we'll learn in this 3 day course what it'd take a > college course to teach for Apache - I'm not so sure yet :) > > Anywhooo, for testing, what if you set the form's method to GET ? Any > differance? Using the latest version of PHP? As ISAPI or CGI? > > Just some food for thought; maybe I'll get back to you in another > couple of days :) > > H > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Wed Jul 16 21:25:56 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 16 Jul 2003 21:25:56 -0400 Subject: [nycphp-talk] IIS 5 and PHP with User Access In-Reply-To: <8BF3DC92-B7F2-11D7-969E-0003931CBF84@war3.com> References: <8BF3DC92-B7F2-11D7-969E-0003931CBF84@war3.com> Message-ID: <3F15FB24.9000306@nyphp.org> Keith Richardson wrote: > ISAPI dll's, get variables work, but the problem is that they arent > hidden.. > > one thing i noticed is that if the directory disallows anonymous access > along with the one file, it works, but you cant have anonymous and > restricted access int he same browser "session" it seems.... > > > i wonder why they dont say anything about that anywhere on php.net... I honestly don't know if this is expected behavior of IIS, or a bug of PHP. Does a CGI version have the same issues? Maybe http://bugs.php.net has something, too. H From danielc at analysisandsolutions.com Thu Jul 17 01:28:05 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 17 Jul 2003 01:28:05 -0400 Subject: [nycphp-talk] limit file types on image uploads? In-Reply-To: References: <00b301c34be6$7053fea0$8b00a8c0@timmerslaptop> Message-ID: <20030717052805.GA3731@panix.com> Hi Folks: On Wed, Jul 16, 2003 at 07:11:46PM -0400, Keith Richardson wrote: > $fileparts = explode(".",$filename); > $extention = $fileparts[sizeof($fileparts)-1]; This process is completely insecure. I can put up anything as long as I give it an acceptable extension. As mentioned by others earlier, use getimagesize(). Here's some code from a project of mine: if ( !$Info = getimagesize($_FILES['Photo']['tmp_name']) ) { $Prob[] = 'File isn\'t an image'; } if ($Info[2] != 2) { $Prob[] = 'Image is not in JPEG format'; } DON'T use this, becasuse submissions from AOL users choke due to their browser not sending a proper mime type, if one at all: if ($_FILES['Photo']['type'] != 'image/jpeg') { $Prob[] = 'File is not in JPEG format'; } --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 Jul 17 08:50:29 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 17 Jul 2003 08:50:29 -0400 Subject: [nycphp-talk] limit file types on image uploads? Message-ID: I use $_FILES['nameOfFileFieldInForm']['type'] I think this reads the info out of the file's header. > > > Joshua Glenn wrote: > > > i've used getimagesize(), which will give you an array with one of the > > array elements saying what kind of image it is. > > In late versions of PHP there's http://us2.php.net/mime_magic which may be handy (although finiky at times). > > > Also, offtopic, phpclasses has been a hot item today: don't forget the NYPHP mirror: http://mirrors.nyphp.org/ > > H > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From nyphp at enobrev.com Thu Jul 17 09:44:49 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Thu, 17 Jul 2003 09:44:49 -0400 Subject: [nycphp-talk] limit file types on image uploads? In-Reply-To: <20030717052805.GA3731@panix.com> Message-ID: <009701c34c69$9ae48350$e1951d18@enobrev> >>DON'T use this, becasuse submissions from AOL users choke due to their browser not sending a proper mime type, AOL doesn't send a MIME type?!? I've been using this in my upload class for quite some time now without much (any?) issue: switch ($_FILES[$this->field_name]["type"]) { case 'application/octet-stream': default: // Unfamiliar extension (includes fla) must find extension otherwise $file_array = explode('.', $this->file_name); $this->extension = end($file_array); break; case 'application/x-shockwave-flash'; $this->extension = 'swf'; break; case 'application/postscript'; // Should be ai ps or eps $file_array = explode('.', $this->file_name); $this->extension = $file_array[1]; break; case 'application/pdf'; $this->extension = 'pdf'; break; case 'audio/mpeg'; $this->extension = 'mp3'; break; case 'audio/x-ms-wma'; $this->extension = 'wma'; break; case 'audio/ogg'; $this->extension = 'ogg'; break; case 'audio/x-pn-realaudio'; $this->extension = 'ram'; break; case 'audio/x-aiff'; $this->extension = 'aiff'; break; case 'audio/wav'; $this->extension = 'wav'; break; case 'image/gif': $this->extension = 'gif'; break; case 'image/jpeg': case 'image/pjpeg': $this->extension = 'jpg'; break; case 'image/x-png': $this->extension = 'png'; break; case 'image/psd': $this->extension = 'psd'; break; case 'image/bmp': $this->extension = 'bmp'; break; } -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Analysis & Solutions Sent: Thursday, July 17, 2003 1:28 AM To: NYPHP Talk Subject: Re: [nycphp-talk] limit file types on image uploads? Hi Folks: On Wed, Jul 16, 2003 at 07:11:46PM -0400, Keith Richardson wrote: > $fileparts = explode(".",$filename); > $extention = $fileparts[sizeof($fileparts)-1]; This process is completely insecure. I can put up anything as long as I give it an acceptable extension. As mentioned by others earlier, use getimagesize(). Here's some code from a project of mine: if ( !$Info = getimagesize($_FILES['Photo']['tmp_name']) ) { $Prob[] = 'File isn\'t an image'; } if ($Info[2] != 2) { $Prob[] = 'Image is not in JPEG format'; } DON'T use this, becasuse submissions from AOL users choke due to their browser not sending a proper mime type, if one at all: if ($_FILES['Photo']['type'] != 'image/jpeg') { $Prob[] = 'File is not in JPEG format'; } --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 mjdewitt at alexcommgrp.com Thu Jul 17 10:43:50 2003 From: mjdewitt at alexcommgrp.com (DeWitt, Michael) Date: Thu, 17 Jul 2003 10:43:50 -0400 Subject: [nycphp-talk] Anyway to force a download of GIF file? Message-ID: I have been looking around for a way to get browsers to download rather than display a GIF file. I have tried playing with the TYPE attribute, but it seems to be ignored in favor of the file's actual extension. Yes, I could zip the file, but would rather avoid that as well, since my customers will find it confusing (believe me). Any ideas of how to structure a link to fool the browser into starting a download dialog? Thanks in advance. Mike From shiflett at php.net Thu Jul 17 10:55:20 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 17 Jul 2003 07:55:20 -0700 (PDT) Subject: [nycphp-talk] Anyway to force a download of GIF file? In-Reply-To: Message-ID: <20030717145520.54238.qmail@web14307.mail.yahoo.com> --- "DeWitt, Michael" wrote: > I have been looking around for a way to get browsers to download > rather than display a GIF file. Have you looked into the Content-Disposition header? With it you can specify a filename (convenient when the name of your PHP script isn't the name you want the browser to use), and you can indicate inline or attachment. You would want attachment. Double-check my syntax, but I think it would go something like this: header('Content-Disposition: attachment; filename=blah.gif'); Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From rudy at taytek.com Thu Jul 17 11:17:12 2003 From: rudy at taytek.com (Rudy Gamberini) Date: Thu, 17 Jul 2003 11:17:12 -0400 Subject: [nycphp-talk] Secure Data Message-ID: I need to collect sensitive information on one of my web pages. I have established a secure session https:// utilizing my hosting service's certificate. Now that the session is secure I need to be sure the collected data is secure. While I could encrypt the data before storing it in the MySQL database, I need to be able to decrypt it eventually to process the orders. I've used MD5 hash function to encrypt passwords I store in cookies but that approach would not work here. I need to hold the key locally, meaning on a machine outside the web-server that will be able to decrypt the information after retrieving it. I like the idea that the database only stores encrypted data that way should the database be compromised the information stored there will be of little value. I am very unsure about any security techniques that work best in this situation and just pointing me in the right directions would be greatly appreciated. Thanks, Rudy --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.500 / Virus Database: 298 - Release Date: 7/10/03 -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Thu Jul 17 11:39:43 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 17 Jul 2003 11:39:43 -0400 Subject: [nycphp-talk] Secure Data In-Reply-To: References: Message-ID: <20030717153943.GA14862@panix.com> Hi Rudy: On Thu, Jul 17, 2003 at 11:17:12AM -0400, Rudy Gamberini wrote: > I've used MD5 hash function to encrypt passwords I store in cookies This is a BAD idea for security. This permits hijacking through someone sneaking time at the person's computer, a cross-site scripting vulnerability or exploitation of browser bugs. > but that approach would not work here. I need to hold the key locally, > meaning on a machine outside the web-server that will be able to decrypt the > information after retrieving it. http://us3.php.net/manual/en/ref.mcrypt.php --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jsiegel1 at optonline.net Thu Jul 17 12:09:36 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 17 Jul 2003 12:09:36 -0400 Subject: [nycphp-talk] Https & IE & secure/insecure items Message-ID: <005c01c34c7d$d1e3dc20$6501a8c0@EZDSDELL> I believe there is a known bug in IE that, when using https, it has difficulty resolving objects (images, links) if they use relative paths so a user can sometimes see a message that says there are secure and insecure items on a page. The workaround, as I understand it, is to use a full path to the object(s). The question is, then, whether the path should be something like "/index.php" or does IE prefer "https://mydomain.com/index.php" ? Jeff P.S. Unfortunately I can't locate the MS Knowledgebase article dealing with this issue...maybe someone knows the URL? From nyphp at NewAgeWeb.com Thu Jul 17 12:11:37 2003 From: nyphp at NewAgeWeb.com (Jerry Kapron) Date: Thu, 17 Jul 2003 12:11:37 -0400 Subject: [nycphp-talk] Anyway to force a download of GIF file? Message-ID: <000a01c34c7e$19db5260$de01a8c0@duron.lan.newageweb.com> Mike, Try this: cheers, Jerry -- 42.7% of all statistics are made up on the spot. -----Original Message----- From: DeWitt, Michael To: NYPHP Talk Date: Thursday, July 17, 2003 10:44 AM Subject: [nycphp-talk] Anyway to force a download of GIF file? >I have been looking around for a way to get browsers to download rather than >display a GIF file. I have tried playing with the TYPE attribute, but it >seems to be ignored in favor of the file's actual extension. Yes, I could >zip the file, but would rather avoid that as well, since my customers will >find it confusing (believe me). > >Any ideas of how to structure a link to fool the browser into starting a >download dialog? > >Thanks in advance. > >Mike > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrick.fee at baesystems.com Thu Jul 17 12:10:59 2003 From: patrick.fee at baesystems.com (Fee, Patrick J) Date: Thu, 17 Jul 2003 12:10:59 -0400 Subject: [nycphp-talk] Anyway to force a download of GIF file? Message-ID: Chris, This is slightly off-topic, but do you have any idea how to do that in Cold Fusion? Patrick J. Fee Web & Database Group Manager BAE SYSTEMS 600 Maryland Ave. SW Suite 600 Washington D.C. 20024 Patrick.Fee at BAESYSTEMS.com Tel: (202) 548-3759 Fax: (202) 608-5970 -----Original Message----- From: Chris Shiflett [mailto:shiflett at php.net] Sent: Thursday, July 17, 2003 10:55 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Anyway to force a download of GIF file? --- "DeWitt, Michael" wrote: > I have been looking around for a way to get browsers to download > rather than display a GIF file. Have you looked into the Content-Disposition header? With it you can specify a filename (convenient when the name of your PHP script isn't the name you want the browser to use), and you can indicate inline or attachment. You would want attachment. Double-check my syntax, but I think it would go something like this: header('Content-Disposition: attachment; filename=blah.gif'); Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Thu Jul 17 13:40:40 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 17 Jul 2003 10:40:40 -0700 (PDT) Subject: [nycphp-talk] Anyway to force a download of GIF file? In-Reply-To: Message-ID: <20030717174040.80450.qmail@web14307.mail.yahoo.com> --- "Fee, Patrick J" wrote: > This is slightly off-topic, but do you have any idea how to do that > in Cold Fusion? An idea is about all I have. :-) Something like this I think: Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From mjdewitt at alexcommgrp.com Thu Jul 17 14:23:19 2003 From: mjdewitt at alexcommgrp.com (DeWitt, Michael) Date: Thu, 17 Jul 2003 14:23:19 -0400 Subject: [nycphp-talk] Anyway to force a download of GIF file? Message-ID: Chris/Jerry, Thank you both for your suggestions. Using headers is definitely the way to go. After some playing around and reading up on compatibility issues, here is what I am working with so far: The Pragma and cache-control seem to be needed by IE6 in order to work. the content type "image/gif" gave me some issues where the file was downloaded but corrupted. This stuff is completely ignored (broken) by IE on a Macintosh, It will always just display the file. Thanks a lot for your help. Mike > -----Original Message----- > From: Fee, Patrick J [SMTP:patrick.fee at baesystems.com] > Sent: Thursday, July 17, 2003 12:11 PM > To: 'shiflett at php.net'; 'NYPHP Talk' > Subject: RE: [nycphp-talk] Anyway to force a download of GIF file? > > Chris, > > This is slightly off-topic, but do you have any idea how to do that in > Cold > Fusion? > > Patrick J. Fee > Web & Database Group Manager > BAE SYSTEMS > 600 Maryland Ave. SW Suite 600 > Washington D.C. 20024 > Patrick.Fee at BAESYSTEMS.com > Tel: (202) 548-3759 > Fax: (202) 608-5970 > > > > -----Original Message----- > From: Chris Shiflett [mailto:shiflett at php.net] > Sent: Thursday, July 17, 2003 10:55 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Anyway to force a download of GIF file? > > > --- "DeWitt, Michael" wrote: > > I have been looking around for a way to get browsers to download > > rather than display a GIF file. > > Have you looked into the Content-Disposition header? With it you can > specify > a > filename (convenient when the name of your PHP script isn't the name you > want > the browser to use), and you can indicate inline or attachment. You would > want > attachment. > > Double-check my syntax, but I think it would go something like this: > > header('Content-Disposition: attachment; filename=blah.gif'); > > Hope that helps. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From nyphp at NewAgeWeb.com Thu Jul 17 15:41:02 2003 From: nyphp at NewAgeWeb.com (Jerry Kapron) Date: Thu, 17 Jul 2003 15:41:02 -0400 Subject: [nycphp-talk] Anyway to force a download of GIF file? Message-ID: <002b01c34c9b$5c362500$de01a8c0@duron.lan.newageweb.com> Mike, Change header("Content-type: 'application/octet-stream"); to header('Content-type: application/force-download'); It should fix the Mac problem. However IE on Mac seems to totally ignore the Content-disposition header and will prompt to save as a .php file. Jerry -----Original Message----- From: DeWitt, Michael To: 'NYPHP Talk' Date: Thursday, July 17, 2003 2:23 PM Subject: RE: [nycphp-talk] Anyway to force a download of GIF file? >Chris/Jerry, > >Thank you both for your suggestions. Using headers is definitely the way to >go. After some playing around and reading up on compatibility issues, here >is what I am working with so far: > > >header("Pragma: public"); >header('Cache-Control: public'); >header("Content-type: 'application/octet-stream"); >header("Content-Length: ".filesize($FILE_PATH.$file)); >header("Content-Disposition: attachment; filename=$file"); >//echo "\\n"; >readfile($FILE_PATH.$file); > >?> > >The Pragma and cache-control seem to be needed by IE6 in order to work. the >content type "image/gif" gave me some issues where the file was downloaded >but corrupted. This stuff is completely ignored (broken) by IE on a >Macintosh, It will always just display the file. > >Thanks a lot for your help. > >Mike > >> -----Original Message----- >> From: Fee, Patrick J [SMTP:patrick.fee at baesystems.com] >> Sent: Thursday, July 17, 2003 12:11 PM >> To: 'shiflett at php.net'; 'NYPHP Talk' >> Subject: RE: [nycphp-talk] Anyway to force a download of GIF file? >> >> Chris, >> >> This is slightly off-topic, but do you have any idea how to do that in >> Cold >> Fusion? >> >> Patrick J. Fee >> Web & Database Group Manager >> BAE SYSTEMS >> 600 Maryland Ave. SW Suite 600 >> Washington D.C. 20024 >> Patrick.Fee at BAESYSTEMS.com >> Tel: (202) 548-3759 >> Fax: (202) 608-5970 >> >> >> >> -----Original Message----- >> From: Chris Shiflett [mailto:shiflett at php.net] >> Sent: Thursday, July 17, 2003 10:55 AM >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] Anyway to force a download of GIF file? >> >> >> --- "DeWitt, Michael" wrote: >> > I have been looking around for a way to get browsers to download >> > rather than display a GIF file. >> >> Have you looked into the Content-Disposition header? With it you can >> specify >> a >> filename (convenient when the name of your PHP script isn't the name you >> want >> the browser to use), and you can indicate inline or attachment. You would >> want >> attachment. >> >> Double-check my syntax, but I think it would go something like this: >> >> header('Content-Disposition: attachment; filename=blah.gif'); >> >> Hope that helps. >> >> Chris >> >> ===== >> Become a better Web developer with the HTTP Developer's Handbook >> http://httphandbook.org/ >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org >> http://lists.nyphp.org/mailman/listinfo/talk >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjdewitt at alexcommgrp.com Thu Jul 17 15:46:23 2003 From: mjdewitt at alexcommgrp.com (DeWitt, Michael) Date: Thu, 17 Jul 2003 15:46:23 -0400 Subject: [nycphp-talk] Anyway to force a download of GIF file? Message-ID: Jerry, "force-download" seems to work fine on the PC. The Mac is still just displaying the image inline. Thanks for your help. Mike > -----Original Message----- > From: Jerry Kapron [SMTP:nyphp at NewAgeWeb.com] > Sent: Thursday, July 17, 2003 3:41 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Anyway to force a download of GIF file? > > Mike, > Change > header("Content-type: 'application/octet-stream"); > to > header('Content-type: application/force-download'); > It should fix the Mac problem. However IE on Mac seems to totally ignore > the Content-disposition header and will prompt to save as a .php file. > > Jerry > > From fb at intldef.org Thu Jul 17 16:46:26 2003 From: fb at intldef.org (FB`) Date: Thu, 17 Jul 2003 16:46:26 -0400 Subject: [nycphp-talk] Anyway to force a download of GIF file? References: <002b01c34c9b$5c362500$de01a8c0@duron.lan.newageweb.com> Message-ID: <00f401c34ca4$7de34620$1901a8c0@ybsweb> > However IE on Mac seems to totally ignore the Content-disposition header and will prompt to save as a .php file as a solution to a similar problem, we used a combination of a Files directive and $PATH_INFO - the php script would be, for ex site.com/download (no extension) with a Files directive like this in .htaccess: ForceType application/x-httpd-php Then, you pass it the desired image filename like this: site.com/download/gifname.gif the string gifname.gif would end up in var $PATH_INFO in the script named download then, you can fetch the file, etc etc, and push out the headers you want, as described previously, by others. you -could- do this with a script named something.gif, with the same Files directive, but you'd lose the ability to set the proper name for the file. hth FB` ----- Original Message ----- From: "Jerry Kapron" To: "NYPHP Talk" Sent: Thursday, July 17, 2003 3:41 PM Subject: Re: [nycphp-talk] Anyway to force a download of GIF file? > Mike, > Change > header("Content-type: 'application/octet-stream"); > to > header('Content-type: application/force-download'); > It should fix the Mac problem. However IE on Mac seems to totally ignore the Content-disposition header and will prompt to save as a .php file. > > Jerry > > -----Original Message----- > From: DeWitt, Michael > To: 'NYPHP Talk' > Date: Thursday, July 17, 2003 2:23 PM > Subject: RE: [nycphp-talk] Anyway to force a download of GIF file? > > > >Chris/Jerry, > > > >Thank you both for your suggestions. Using headers is definitely the way to > >go. After some playing around and reading up on compatibility issues, here > >is what I am working with so far: > > > > > > >header("Pragma: public"); > >header('Cache-Control: public'); > >header("Content-type: 'application/octet-stream"); > >header("Content-Length: ".filesize($FILE_PATH.$file)); > >header("Content-Disposition: attachment; filename=$file"); > >//echo "\\n"; > >readfile($FILE_PATH.$file); > > > >?> > > > >The Pragma and cache-control seem to be needed by IE6 in order to work. the > >content type "image/gif" gave me some issues where the file was downloaded > >but corrupted. This stuff is completely ignored (broken) by IE on a > >Macintosh, It will always just display the file. > > > >Thanks a lot for your help. > > > >Mike > > > >> -----Original Message----- > >> From: Fee, Patrick J [SMTP:patrick.fee at baesystems.com] > >> Sent: Thursday, July 17, 2003 12:11 PM > >> To: 'shiflett at php.net'; 'NYPHP Talk' > >> Subject: RE: [nycphp-talk] Anyway to force a download of GIF file? > >> > >> Chris, > >> > >> This is slightly off-topic, but do you have any idea how to do that in > >> Cold > >> Fusion? > >> > >> Patrick J. Fee > >> Web & Database Group Manager > >> BAE SYSTEMS > >> 600 Maryland Ave. SW Suite 600 > >> Washington D.C. 20024 > >> Patrick.Fee at BAESYSTEMS.com > >> Tel: (202) 548-3759 > >> Fax: (202) 608-5970 > >> > >> > >> > >> -----Original Message----- > >> From: Chris Shiflett [mailto:shiflett at php.net] > >> Sent: Thursday, July 17, 2003 10:55 AM > >> To: NYPHP Talk > >> Subject: Re: [nycphp-talk] Anyway to force a download of GIF file? > >> > >> > >> --- "DeWitt, Michael" wrote: > >> > I have been looking around for a way to get browsers to download > >> > rather than display a GIF file. > >> > >> Have you looked into the Content-Disposition header? With it you can > >> specify > >> a > >> filename (convenient when the name of your PHP script isn't the name you > >> want > >> the browser to use), and you can indicate inline or attachment. You would > >> want > >> attachment. > >> > >> Double-check my syntax, but I think it would go something like this: > >> > >> header('Content-Disposition: attachment; filename=blah.gif'); > >> > >> Hope that helps. > >> > >> Chris > >> > >> ===== > >> Become a better Web developer with the HTTP Developer's Handbook > >> http://httphandbook.org/ > >> _______________________________________________ > >> talk mailing list > >> talk at lists.nyphp.org > >> http://lists.nyphp.org/mailman/listinfo/talk > >> _______________________________________________ > >> talk mailing list > >> talk at lists.nyphp.org > >> http://lists.nyphp.org/mailman/listinfo/talk > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > > ---------------------------------------------------------------------------- ---- > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From shiflett at php.net Thu Jul 17 17:17:09 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 17 Jul 2003 14:17:09 -0700 (PDT) Subject: [nycphp-talk] Anyway to force a download of GIF file? In-Reply-To: <00f401c34ca4$7de34620$1901a8c0@ybsweb> Message-ID: <20030717211709.12159.qmail@web14307.mail.yahoo.com> --- FB` wrote: > as a solution to a similar problem, we used a combination of a Files > directive and $PATH_INFO - > > the php script would be, for ex site.com/download (no extension) > with a Files directive like this in .htaccess: > > > ForceType application/x-httpd-php > > > Then, you pass it the desired image filename like this: > > site.com/download/gifname.gif I think this trick still works even when the URL is something like: http://site.com/download.php/gifname.gif This would save having to use the ForceType directive. Another trick I have seen used (though I do not know how effective it is) is a URL like this: http://site.com/download.php?iesucks=gifname.gif I've never had to work around this particular problem, but those are the methods I have seen mentioned when this topic arises. Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From jonbaer at jonbaer.net Thu Jul 17 18:13:40 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Thu, 17 Jul 2003 15:13:40 -0700 Subject: [nycphp-talk] Secure Data References: Message-ID: <006901c34cb0$ada0fdb0$6500a8c0@THINKPAD> try to stunnel the entire connection ... http://www.stunnel.org/examples/mysql.html - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: Rudy Gamberini To: talk at lists.nyphp.org Sent: Thursday, July 17, 2003 8:17 AM Subject: [nycphp-talk] Secure Data I need to collect sensitive information on one of my web pages. I have established a secure session https:// utilizing my hosting service's certificate. Now that the session is secure I need to be sure the collected data is secure. While I could encrypt the data before storing it in the MySQL database, I need to be able to decrypt it eventually to process the orders. I've used MD5 hash function to encrypt passwords I store in cookies but that approach would not work here. I need to hold the key locally, meaning on a machine outside the web-server that will be able to decrypt the information after retrieving it. I like the idea that the database only stores encrypted data that way should the database be compromised the information stored there will be of little value. I am very unsure about any security techniques that work best in this situation and just pointing me in the right directions would be greatly appreciated. Thanks, Rudy ------------------------------------------------------------------------------ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Thu Jul 17 21:26:15 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 17 Jul 2003 21:26:15 -0400 Subject: [nycphp-talk] Https & IE & secure/insecure items In-Reply-To: <005c01c34c7d$d1e3dc20$6501a8c0@EZDSDELL> References: <005c01c34c7d$d1e3dc20$6501a8c0@EZDSDELL> Message-ID: <3F174CB7.2050104@nyphp.org> Jeff wrote: > I believe there is a known bug in IE that, when using https, it has > difficulty resolving objects (images, links) if they use relative paths > so a user can sometimes see a message that says there are secure and > insecure items on a page. The workaround, as I understand it, is to use > a full path to the object(s). The question is, then, whether the path > should be something like "/index.php" or does IE prefer > "https://mydomain.com/index.php" ? I have no idea whether this is the correct solution, but is the only one I've been able to find in the wide world of browsers. I had to hack https:// into a bunch of CF code (only for images, however) at one point, because of this. H From hans at nyphp.org Thu Jul 17 21:36:18 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 17 Jul 2003 21:36:18 -0400 Subject: [nycphp-talk] Secure Data In-Reply-To: References: Message-ID: <3F174F12.7010100@nyphp.org> Rudy Gamberini wrote: > I need to collect sensitive information on one of my web pages. I have > established a secure session https:// utilizing my hosting service's > certificate. Now that the session is secure I need to be sure the > collected data is secure. While I could encrypt the data before storing > it in the MySQL database, I need to be able to decrypt it eventually to > process the orders. I've used MD5 hash function to encrypt passwords I > store in cookies but that approach would not work here. Technically, MD5 isn't encryption - it's a one way digest, ie, you can't determine the original data from the digest. And as Dan pointed out, easily hijacked (but you're using SSL, so it's much better, but still suseptible to cookie browsing if someone has local machine access). > I need to hold > the key locally, meaning on a machine outside the web-server that will > be able to decrypt the information after retrieving it. > > I like the idea that the database only stores encrypted data that way > should the database be compromised the information stored there will be > of little value. MySQL 4.x series supports some things that may help: http://www.mysql.com/doc/en/Miscellaneous_functions.html (search for variations of 'encrypt') http://www.mysql.com/doc/en/Secure_connections.html But keep in mind; if the server on which the key resides is compromised, the game's over. Encryption like this is a vicious circle; just be sure your server isn't cracked :) H From danielc at analysisandsolutions.com Thu Jul 17 23:26:55 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 17 Jul 2003 23:26:55 -0400 Subject: [nycphp-talk] limit file types on image uploads? In-Reply-To: <009701c34c69$9ae48350$e1951d18@enobrev> References: <20030717052805.GA3731@panix.com> <009701c34c69$9ae48350$e1951d18@enobrev> Message-ID: <20030718032655.GA26955@panix.com> Hi Mark: On Thu, Jul 17, 2003 at 09:44:49AM -0400, Mark Armendariz wrote: > > AOL doesn't send a MIME type?!? At the time the problem arose, the quick fix was to remove this check, since the more accurate file type check was there also. Thanks for prodding me to poke around a bit more. I put in a debug step and asked the user with the problem to tell me what comes up. Turns out AOL is sending "image/pjpeg" as the MIME for .jpg files. 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 nyphp at enobrev.com Thu Jul 17 23:45:06 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Thu, 17 Jul 2003 23:45:06 -0400 Subject: [nycphp-talk] limit file types on image uploads? In-Reply-To: <20030718032655.GA26955@panix.com> Message-ID: <013901c34cde$fab9b0f0$e1951d18@enobrev> Ah .. Wasn't actaully poking, more surprise than anything. I've found that IE (5+?) also seems to use the same header (image/pjpeg) as well. Nonetheless, glad you found it. Mark From danielc at analysisandsolutions.com Fri Jul 18 00:00:53 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Fri, 18 Jul 2003 00:00:53 -0400 Subject: [nycphp-talk] Secure Data In-Reply-To: <3F174F12.7010100@nyphp.org> References: <3F174F12.7010100@nyphp.org> Message-ID: <20030718040053.GA28919@panix.com> Ladies (there are at least SOME women on the list, right?) & Gentlemen: On Thu, Jul 17, 2003 at 09:36:18PM -0400, Hans Zaunere wrote: > > But keep in mind; if the server on which the key resides is compromised, > the game's over. Hmm... This got me to thinking. It'd be nice to have GPG built into PHP to avoid use of program execution functions. In the mean time, proc_open() is handy. With GPG and PGP, you can encrypt stuff with a public key then decrypt it with the private key. The private key is password protected, but the public key isn't. So, an automated process can encrypt the stuff on the way in. To get stuff out, submit the password via a secure form. While this isn't the right process for all situations, it can be useful. 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 psaw at pswebcode.com Fri Jul 18 10:15:12 2003 From: psaw at pswebcode.com (pswebcode, nyc) Date: Fri, 18 Jul 2003 10:15:12 -0400 Subject: [nycphp-talk] deep dish 's/searchstr/replacestr/g' Message-ID: <000401c34d37$013eaa90$68e4a144@bronco> find . -type f -exec fgrep -li 'searchstr' {} > outputfile \; Search for searchstr in all files of type file Starts in dir where executed, recursively does all subdirs Writes all file names that contain searchstr into a file find . -name "*.htm" |xargs perl -i.bak -p -e 's/searchstr/replacestr/g'; Search and replace only in files of type specified Starts in dir where executed, recursively does all subdirs Before replace, backs up original file, appending extension .bak PERL edits in place, no file permission issues with newly modified file UNIX/PERL bits useful to me Maybe you too Your box === PERL installed Warmest regards, Peter Sawczynec, Technology Director PSWebcode -- Web Development and Site Architecture psaw at pswebcode.com www.pswebcode.com 718.543.3240 From hans at nyphp.org Fri Jul 18 10:56:42 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 18 Jul 2003 10:56:42 -0400 Subject: [nycphp-talk] Fwd: Apache HTTP Server 1.3.28 Released Message-ID: <1058540202.3f180aaac80ec@www.acedsl.com> Ahh, good old Apache... it's a beautiful thing. H ----- Forwarded message from Jim Jagielski ----- Date: Fri, 18 Jul 2003 09:29:39 -0400 From: Jim Jagielski Reply-To: Jim Jagielski Subject: Apache HTTP Server 1.3.28 Released To: announce at httpd.apache.org Apache HTTP Server 1.3.28 Released The Apache Software Foundation and The Apache Server Project are pleased to announce the release of version 1.3.28 of the Apache HTTP Server ("Apache"). This Announcement notes the significant changes in 1.3.28 as compared to 1.3.27. The Announcement is also available in German from http://www.apache.org/dist/httpd/Announcement.txt.de. This version of Apache is principally a bug and security fix release. A partial summary of the bug fixes is given at the end of this document. A full listing of changes can be found in the CHANGES file. Of particular note is that 1.3.28 addresses and fixes 3 potential security issues: o CAN-2003-0460 (cve.mitre.org): Fix the rotatelogs support program on Win32 and OS/2 to ignore special control characters received over the pipe. Previously such characters could cause it to quit logging and exit. We would like to thank the Hitachi Incident Response team for their responsible disclosure of this issue. o VU#379828 : The server could crash when going into an infinite loop due to too many subsequent internal redirects and nested subrequests. o Eliminated leaks of several file descriptors to child processes, such as CGI scripts. We consider Apache 1.3.28 to be the best version of Apache 1.3 available and we strongly recommend that users of older versions, especially of the 1.1.x and 1.2.x family, upgrade as soon as possible. No further releases will be made in the 1.2.x family. Apache 1.3.28 is available for download from http://httpd.apache.org/download.cgi - or - http://www.apache.org/dist/httpd/ Please see the CHANGES_1.3 file in the same directory for a full list of changes. Binary distributions are available from http://www.apache.org/dist/httpd/binaries/ The source and binary distributions are also available via any of the mirrors listed at http://www.apache.org/mirrors/ As of Apache 1.3.12 binary distributions contain all standard Apache modules as shared objects (if supported by the platform) and include full source code. Installation is easily done by executing the included install script. See the README.bindist and INSTALL.bindist files for a complete explanation. Please note that the binary distributions are only provided for your convenience and current distributions for specific platforms are not always available. Win32 binary distributions are based on the Microsoft Installer (.MSI) technology. While development continues to make this installation method more robust, questions should be directed to the news:comp.infosystems.www.servers.ms-windows newsgroup. For an overview of new features introduced after 1.2 please see http://httpd.apache.org/docs/new_features_1_3.html In general, Apache 1.3 offers several substantial improvements over version 1.2, including better performance, reliability and a wider range of supported platforms, including Windows NT and 2000 (which fall under the "Win32" label), OS2, Netware, and TPE threaded platforms. Apache is the most popular web server in the known universe; over half of the servers on the Internet are running Apache or one of its variants. IMPORTANT NOTE FOR APACHE USERS: Apache 1.3 was designed for Unix OS variants. While the ports to non-Unix platforms (such as Win32, Netware or OS2) are of an acceptable quality, Apache 1.3 is not optimized for these platforms. Security, stability, or performance issues on these non-Unix ports do not generally apply to the Unix version, due to software's Unix origin. Apache 2.0 has been structured for multiple operating systems from its inception, by introducing the Apache Portability Library and MPM modules. Users on non-Unix platforms are strongly encouraged to move up to Apache 2.0 for better performance, stability and security on their platforms. Apache 1.3.28 Major changes Security vulnerabilities * CAN-2003-0460 (cve.mitre.org): Fix the rotatelogs support program on Win32 and OS/2 to ignore special control characters received over the pipe. Previously such characters could cause it to quit logging and exit. We would like to thank the Hitachi Incident Response team for their responsible disclosure of this issue. * VU#379828 : The server could crash when going into an infinite loop due to too many subsequent internal redirects and nested subrequests. * Eliminated leaks of several file descriptors to child processes, such as CGI scripts. New features The main new features in 1.3.28 (compared to 1.3.27) are: * Added new ap_register_cleanup_ex() API function which allows for a "magic" cleanup function to be run at register time rather than at cleanup time. * Improvements to mod_usertrack that allows for a regular (verbose) as well as "compact" version of the tracking cookie (the new 'CookieFormat' directive), and the ability to prepend a string to the cookie via the 'CookiePrefix' directive. New features that relate to specific platforms: * Introduce Win32 .pdb diagnostic symbols into the Apache 1.3 build (as created in Apache 2.0.45 and later.) which makes debugging and analysis of crash dumps and Dr. Watson logs trivial. * AIX: Change the default accept mutex mechanism from pthread back to fcntl. Bugs fixed The following noteworthy bugs were found in Apache 1.3.27 (or earlier) and have been fixed in Apache 1.3.28: * Make sure the accept mutex is released before calling child exit hooks and cleanups. * Fix mod_rewrite's handling of absolute URIs. The escaping routines now work scheme dependent and the query string will only be appended if supported by the particular scheme. * Prevent obscenely large values of precision in ap_vformatter from clobbering a buffer. * Update timeout algorithm in free_proc_chain. If a subprocess did not exit immediately, the thread would sleep for 3 seconds before checking the subprocess exit status again. In a very common case when the subprocess was an HTTP server CGI script, the CGI script actually exited a fraction of a second into the 3 second sleep, which effectively limited the server to serving one CGI request every 3 seconds across a persistent connection. -- ======================================================================= Jim Jagielski [|] jim at jaguNET.com [|] http://www.jaguNET.com/ "A society that will trade a little liberty for a little order will lose both and deserve neither" - T.Jefferson --------------------------------------------------------------------- To unsubscribe, e-mail: announce-unsubscribe at httpd.apache.org For additional commands, e-mail: announce-help at httpd.apache.org ----- End forwarded message ----- From jonbaer at jonbaer.net Fri Jul 18 13:42:07 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Fri, 18 Jul 2003 10:42:07 -0700 Subject: [nycphp-talk] Secure Data References: <3F174F12.7010100@nyphp.org> <20030718040053.GA28919@panix.com> Message-ID: <002301c34d53$e8fd3b00$6500a8c0@THINKPAD> i personally find the open_ssl stuff easy to work with after u figure it out ... http://us4.php.net/manual/en/ref.openssl.php it is pretty much the same thing, look @ seal + open. - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Thursday, July 17, 2003 9:00 PM Subject: Re: [nycphp-talk] Secure Data > Ladies (there are at least SOME women on the list, right?) & Gentlemen: > > On Thu, Jul 17, 2003 at 09:36:18PM -0400, Hans Zaunere wrote: > > > > But keep in mind; if the server on which the key resides is compromised, > > the game's over. > > Hmm... This got me to thinking. It'd be nice to have GPG built into PHP > to avoid use of program execution functions. In the mean time, > proc_open() is handy. > > With GPG and PGP, you can encrypt stuff with a public key then decrypt it > with the private key. The private key is password protected, but the > public key isn't. So, an automated process can encrypt the stuff on the > way in. To get stuff out, submit the password via a secure form. > > While this isn't the right process for all situations, it can be useful. > > Enjoy, > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From dmintz at panix.com Fri Jul 18 14:53:35 2003 From: dmintz at panix.com (David Mintz) Date: Fri, 18 Jul 2003 14:53:35 -0400 (EDT) Subject: [nycphp-talk] to rewrite or not to rewrite URLs... In-Reply-To: <002301c34d53$e8fd3b00$6500a8c0@THINKPAD> References: <3F174F12.7010100@nyphp.org> <20030718040053.GA28919@panix.com> <002301c34d53$e8fd3b00$6500a8c0@THINKPAD> Message-ID: Do you guys use URL rewriting to ensure that the session id is propagated from page to page even if the user refuses your cookie? I've read somewhere that it can cause 'confusion' or 'problems' if the user bookmarks a URL with a session id in the query string, and tries to access the page after the session is over, but those readings did not say whether you should really worry about it or what the worst case scenario is. I've been to sites that say "you must accept a cookie..." but that seems kind of authoritarian, not to mention geeky (-: If you are POSTing, you can stash the session id in a hidden field, which would seem to solve the issue, but you what about when you GET. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "You want me to pour the beer, Frank?" From undo at archeopterix.com Sun Jul 20 17:24:52 2003 From: undo at archeopterix.com (Andu) Date: Sun, 20 Jul 2003 17:24:52 -0400 Subject: [nycphp-talk] new member Message-ID: <14870000.1058736292@localhost> Just joined the list Regards, Andu Novac From psaw at pswebcode.com Mon Jul 21 17:31:58 2003 From: psaw at pswebcode.com (pswebcode, nyc) Date: Mon, 21 Jul 2003 17:31:58 -0400 Subject: [nycphp-talk] Secure Data In-Reply-To: <3F174F12.7010100@nyphp.org> Message-ID: <000d01c34fcf$85b608f0$68e4a144@bronco> /* encryption decryption technique. must have libmcrypt installed. store these two functions in a *.php include file. the key value is used to seed the encryption and is needed during encryption and decryption. the key is stored in the key file. store key file as ingeniously and safely as you may improvise. */ function getKey(){ //DEFINE ("key_contents","7TrLMB5" ); // for testing process $key_loc = "\"; $keyread = fopen ($key_loc, "r"); $key_contents = fread($keyread, filesize($key_loc)); fclose($keyread); return trim($key_contents); } function enc($text, $cryp) { //encrypted data is base64_encoded before storing in the mysql db //to prevent mysql from possibly mangling unorthodox characters created by encryption $key = getKey(); if ($cryp == 'encryp') { return base64_encode(mcrypt_cbc(MCRYPT_TripleDES, ($key), $text, MCRYPT_ENCRYPT)); } elseif($cryp == 'decryp') { return mcrypt_cbc(MCRYPT_TripleDES, ($key), base64_decode($text), MCRYPT_DECRYPT); } else { err_msg(); } } $test_data = "&%45the"; //encrypt $encrdata = enc($test_data, 'encryp'); //decrypt $decrdata = enc($encrdata, 'decryp'); MD5 is a one-way hash suitable for passwords. Above is a decent encryption approach for when you must encrypt and decrypt the stored value. Hope this helps. PSaw -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Hans Zaunere Sent: Thursday, July 17, 2003 9:36 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Secure Data Rudy Gamberini wrote: > I need to collect sensitive information on one of my web pages. I > have > established a secure session https:// utilizing my hosting service's > certificate. Now that the session is secure I need to be sure the > collected data is secure. While I could encrypt the data before storing > it in the MySQL database, I need to be able to decrypt it eventually to > process the orders. I've used MD5 hash function to encrypt passwords I > store in cookies but that approach would not work here. Technically, MD5 isn't encryption - it's a one way digest, ie, you can't determine the original data from the digest. And as Dan pointed out, easily hijacked (but you're using SSL, so it's much better, but still suseptible to cookie browsing if someone has local machine access). > I need to hold > the key locally, meaning on a machine outside the web-server that will > be able to decrypt the information after retrieving it. > > I like the idea that the database only stores encrypted data that way > should the database be compromised the information stored there will be > of little value. MySQL 4.x series supports some things that may help: http://www.mysql.com/doc/en/Miscellaneous_functions.html (search for variations of 'encrypt') http://www.mysql.com/doc/en/Secure_connections.html But keep in mind; if the server on which the key resides is compromised, the game's over. Encryption like this is a vicious circle; just be sure your server isn't cracked :) H _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jonbaer at jonbaer.net Mon Jul 21 20:48:04 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Mon, 21 Jul 2003 17:48:04 -0700 Subject: [nycphp-talk] sorting multi-dimesional arrays ... Message-ID: <000501c34fea$e9744a80$6500a8c0@THINKPAD> ok, not the greatest code in the world but it did what i needed :-) ... basically i have around 3500+ access points logged and wanted to do some stats, but could not think of a better way to sort via a 2d array on the 2nd element, im just looking to shorten up the code (by just using an array method of some kind - array_multisort?)... example output: Indexing 3388 access points ... SSID: "linksys" : 620 (18.30%) SSID: "default" : 192 (5.67%) SSID: "Wireless" : 167 (4.93%) SSID: "wireless" : 58 (1.71%) SSID: "WLAN" : 44 (1.30%) SSID: "Verizon Wi-Fi" : 43 (1.27%) - 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 Jul 21 21:41:32 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 21 Jul 2003 21:41:32 -0400 Subject: [nycphp-talk] PHP stuff in SecurityFocus Newsletter #206 Message-ID: <20030722014132.GA26205@panix.com> Highlights from SecurityFocus Newsletter #206 W-Agora Multiple Vulnerabilities http://www.securityfocus.com/bid/8164 Invision Power Board Multiple Vulnerabilities http://www.securityfocus.com/bid/8165 HTMLToNuke Cross-Site Scripting Vulnerabilty http://www.securityfocus.com/bid/8174 BlazeBoard Information Disclosure Vulnerability http://www.securityfocus.com/bid/8188 EJ3 BlackBook [multiple vulnerabilities] http://www.securityfocus.com/bid/8185 http://www.securityfocus.com/bid/8187 http://www.securityfocus.com/bid/8189 http://www.securityfocus.com/bid/8190 Splatt Forum Post Icon HTML Injection Vulnerability http://www.securityfocus.com/bid/8198 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 tech_learner at yahoo.com Tue Jul 22 00:53:15 2003 From: tech_learner at yahoo.com (Tracy) Date: Mon, 21 Jul 2003 21:53:15 -0700 (PDT) Subject: [nycphp-talk] Way to simulate slow connection on localhost? In-Reply-To: <3F13332D.1040402@nyphp.org> Message-ID: <20030722045315.69110.qmail@web14307.mail.yahoo.com> Hi NYPHPers, would this help? http://perl.apache.org/docs/1.0/guide/performance.html especially the tools section? Tracy Hans Zaunere wrote: Winston Churchill-Joell wrote: > Thanks, John -- this looks like it might do it. > > Best, > Winston > > > On Sunday, July 13, 2003, at 11:45 PM, John W. Markert wrote: > >> Winston... >> >> I don't have any experience with the following, but I remembered reading >> about it. Perhaps you can confibure your server to simulate a slow >> connection. >> >> http://www.linux-mag.com/2003-02/lamp_01.html Something else you may also look at is using some of the available firewalling tools, which essentially drops packets on purpose. Although I don't know exactly what's available under Jaguar, under FreeBSD there's dummynet (I think other's, but they escape me at the moment) and Linux has a flavor-of-the-month solution *duck* :) http://project.honeynet.de/papers/honeynet/dc.html H _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Coming together is a beginning... keeping together is progress... working together is success !!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software -------------- next part -------------- An HTML attachment was scrubbed... URL: From nyphp at websapp.com Tue Jul 22 09:26:50 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Tue, 22 Jul 2003 09:26:50 -0400 Subject: [nycphp-talk] Are you using PHP 5 Message-ID: Hi people, If you, or anybody you know, are using PHP 5 not an independant worker, but in a company of some form or another please contact me off list: daniel at websapp.com (see you this evening: http://nyphp.org/content/calendar/view_entry.php?id=29&date=20030722) Best, Daniel From crisscott at netzero.com Tue Jul 22 10:41:24 2003 From: crisscott at netzero.com (crisscott at netzero.com) Date: Tue, 22 Jul 2003 14:41:24 GMT Subject: [nycphp-talk] sorting multi-dimesional arrays ... Message-ID: <20030722.074218.490.150402@webmail15.lax.untd.com> I haven't had to do any complex sorting on the second element but when I do I use usort(). Something like this... usort(two_d_array, 'second_element_sort'); function second_element_sort($a, $b) { if($a[0] == $b[0]) return 0; return ($a[0] > $b[0]) ? -1 : 1; } The arguments passed to second_element_sort are two_d_array[n] and two_d_array[n+1]. From jonbaer at jonbaer.net Tue Jul 22 12:04:46 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Tue, 22 Jul 2003 09:04:46 -0700 Subject: [nycphp-talk] sorting multi-dimesional arrays ... References: <20030722.074218.490.150402@webmail15.lax.untd.com> Message-ID: <008501c3506a$f8de4ea0$6400a8c0@THINKPAD> the functon array_count_values was actually what i was looking for, but in the test below the key values are not retained ... im still trying to figure it out ... $a = array("Cisco","Cisco","Intel","Apple", "Apple", "Apple", "Speedstream", "Apple"); $b = array_count_values ($a); print_r($b); rsort($b); print_r($b); - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: To: Sent: Tuesday, July 22, 2003 7:41 AM Subject: Re: [nycphp-talk] sorting multi-dimesional arrays ... > > I haven't had to do any complex sorting on the second element but when I do I use usort(). Something like this... > > usort(two_d_array, 'second_element_sort'); > > function second_element_sort($a, $b) { > if($a[0] == $b[0]) return 0; > return ($a[0] > $b[0]) ? -1 : 1; > } > > The arguments passed to second_element_sort are two_d_array[n] and two_d_array[n+1]. > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From willie at pdfsystems.com Wed Jul 23 15:28:34 2003 From: willie at pdfsystems.com (Willliam Klein) Date: Wed, 23 Jul 2003 15:28:34 -0400 Subject: [nycphp-talk] object buffering In-Reply-To: <23AA728CBA918941834ADDDFAD7FA85C0EC53E@sag.pdfsystems.com> Message-ID: <23AA728CBA918941834ADDDFAD7FA85C9B3D@sag.pdfsystems.com> Hi All; Is there a way to store the entire output os a php page to be emailed later? I was thinkingsomething like: op_start("showOPA.php"); $blah=op_get_content(); echo $blah; but it's not doing anything. Is there another function I should be using? thanks willie -------------- next part -------------- An HTML attachment was scrubbed... URL: From dj at waletzky.com Wed Jul 23 15:39:18 2003 From: dj at waletzky.com (D. J. Waletzky) Date: Wed, 23 Jul 2003 19:39:18 -0000 Subject: [nycphp-talk] PHP and PayPal In-Reply-To: <20030722014132.GA26205@panix.com> References: <20030722014132.GA26205@panix.com> Message-ID: <1058989185.2968.3.camel@pete> Hi all- I'm doing a small e-commerce site, and was thinking about setting up a PHP shopping cart system to integrate with PayPal. Does anyone have any experience with the PayPal system and an open-source shopping cart package? Any recommendations? Or should I just roll my own? -- D. J. Waletzky dj at waletzky.com "Non sunt multiplicanda entia praeter necessitam." -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 232 bytes Desc: This is a digitally signed message part URL: From chendry at nyc.rr.com Wed Jul 23 15:50:40 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Wed, 23 Jul 2003 15:50:40 -0400 Subject: [nycphp-talk] object buffering In-Reply-To: <23AA728CBA918941834ADDDFAD7FA85C9B3D@sag.pdfsystems.com> Message-ID: object bufferingI may be wrong, but doesn't ob_start either just turn on output buffering, or takes a callback function as a paramater. So instead maybe: ob_start(); include('showOPA.php'); $blah=ob_get_contents(); ob_end_clean(); echo $blah; Maybe? Not sure of the include, you may need to print the contents of the file...but I think this should work. C -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Willliam Klein Sent: Wednesday, July 23, 2003 3:29 PM To: 'NYPHP Talk' Subject: [nycphp-talk] object buffering Hi All; Is there a way to store the entire output os a php page to be emailed later? I was thinkingsomething like: op_start("showOPA.php"); $blah=op_get_content(); echo $blah; but it's not doing anything. Is there another function I should be using? thanks willie -------------- next part -------------- An HTML attachment was scrubbed... URL: From mwithington at PLMresearch.com Wed Jul 23 16:01:15 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Wed, 23 Jul 2003 16:01:15 -0400 Subject: [nycphp-talk] PHP and PayPal Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3586A62D5@network.PLMresearch.com> osCommerce http://www.oscommerce.org Have fun. -------------------------- 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 D. J. Waletzky Sent: Wednesday, July 23, 2003 3:40 PM To: NYPHP Talk Subject: [nycphp-talk] PHP and PayPal Hi all- I'm doing a small e-commerce site, and was thinking about setting up a PHP shopping cart system to integrate with PayPal. Does anyone have any experience with the PayPal system and an open-source shopping cart package? Any recommendations? Or should I just roll my own? -- D. J. Waletzky dj at waletzky.com "Non sunt multiplicanda entia praeter necessitam." From shiflett at php.net Wed Jul 23 16:03:11 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 23 Jul 2003 13:03:11 -0700 (PDT) Subject: [nycphp-talk] object buffering In-Reply-To: <23AA728CBA918941834ADDDFAD7FA85C9B3D@sag.pdfsystems.com> Message-ID: <20030723200311.46392.qmail@web14303.mail.yahoo.com> --- Willliam Klein wrote: > Is there a way to store the entire output os a php page to be > emailed later? Sure. > I was thinkingsomething like: > > op_start("showOPA.php"); > $blah=op_get_content(); > echo $blah; The functions are ob_start() and ob_get_content(). Note the ob (for output buffering) rather than op. Also, to start buffering, just do this: ob_start(); I'm guessing you just meant to include showOPA.php or something. Otherwise, your example will work up to the point where the output is stored in $blah. You can then write that to a file, email it, or whatever. Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From willie at pdfsystems.com Wed Jul 23 16:12:59 2003 From: willie at pdfsystems.com (Willliam Klein) Date: Wed, 23 Jul 2003 16:12:59 -0400 Subject: [php] Re: [nycphp-talk] object buffering In-Reply-To: <23AA728CBA918941834ADDDFAD7FA85C0EC619@sag.pdfsystems.com> Message-ID: <23AA728CBA918941834ADDDFAD7FA85C0E72A0@sag.pdfsystems.com> Thanks Sorry about the op typos. Yes that works great using the include. I've been staring at this for hours and the answer is so simple. Thank to all willie > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Shiflett > Sent: Wednesday, July 23, 2003 4:03 PM > To: NYPHP Talk > Subject: [php] Re: [nycphp-talk] object buffering > > > --- Willliam Klein wrote: > > Is there a way to store the entire output os a php page to be > > emailed later? > > Sure. > > > I was thinkingsomething like: > > > > op_start("showOPA.php"); > > $blah=op_get_content(); > > echo $blah; > > The functions are ob_start() and ob_get_content(). Note the > ob (for output > buffering) rather than op. > > Also, to start buffering, just do this: > > ob_start(); > > I'm guessing you just meant to include showOPA.php or > something. Otherwise, > your example will work up to the point where the output is > stored in $blah. You > can then write that to a file, email it, or whatever. > > Hope that helps. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at mx2pro.com Wed Jul 23 16:18:17 2003 From: dan at mx2pro.com (Dan Horning) Date: Wed, 23 Jul 2003 16:18:17 -0400 Subject: [nycphp-talk] PHP and PayPal In-Reply-To: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3586A62D5@network.PLMresearch.com> Message-ID: <001801c35157$8f7cef00$6a63ca42@dwchome> > osCommerce http://www.oscommerce.org > > Have fun. > Mark L. Withington > Subject: [nycphp-talk] PHP and PayPal > > > Hi all- > > I'm doing a small e-commerce site, and was thinking about > setting up a PHP > shopping cart system to integrate with PayPal. Does anyone have any > experience with the PayPal system and an open-source shopping > cart package? > Any recommendations? Or should I just roll my own? > > -- > D. J. Waletzky > dj at waletzky.com If you're going to rollout your own ... You should make sure to read the Paypal-IPN manual also .. Which will help you to understand the processes involved in verifying the orders - Dan Horning ------------------------------------------------------------------------ ------------ AIM: mx2pro / dsoundmn MSN: dan at mx2pro.com From jonbaer at jonbaer.net Wed Jul 23 17:12:34 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Wed, 23 Jul 2003 14:12:34 -0700 Subject: [nycphp-talk] Last nite slides available? References: <001801c35157$8f7cef00$6a63ca42@dwchome> Message-ID: <006d01c3515f$23018130$6400a8c0@THINKPAD> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 i unfortunatley missed the meeting last night and was lookin forward to learning re: php/xml/sax/xpath/code stuff, r there any slides or info available? - - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 -----BEGIN PGP SIGNATURE----- Version: PGP 8.0 iQA/AwUBPx76QEHb24uaDK9HEQJCIACeJSLuEp0Z3/7T0NgzLuyIx9EXSa8An0e0 w2ZJ6oOmmIh1ih+WyYG2nA0e =91sa -----END PGP SIGNATURE----- From kenrbnsn at rbnsn.com Wed Jul 23 17:30:12 2003 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Wed, 23 Jul 2003 17:30:12 -0400 Subject: [nycphp-talk] Last nite slides available? In-Reply-To: <006d01c3515f$23018130$6400a8c0@THINKPAD> References: <001801c35157$8f7cef00$6a63ca42@dwchome> Message-ID: <5.2.1.1.2.20030723172917.034a3130@mail.rbnsn.com> At 02:12 PM 7/23/2003 -0700, you wrote: >i unfortunatley missed the meeting last night and was lookin forward to >learning re: php/xml/sax/xpath/code stuff, r there any slides or info >available? Unfortunately, the scheduled speaker also missed the meeting... so no slides or talk... Ken Robinson From shiflett at php.net Wed Jul 23 17:59:00 2003 From: shiflett at php.net (Chris Shiflett) Date: Wed, 23 Jul 2003 14:59:00 -0700 (PDT) Subject: [nycphp-talk] Last nite slides available? In-Reply-To: <5.2.1.1.2.20030723172917.034a3130@mail.rbnsn.com> Message-ID: <20030723215900.61782.qmail@web14303.mail.yahoo.com> That's the slide. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From hans at nyphp.org Wed Jul 23 19:10:09 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 23 Jul 2003 19:10:09 -0400 Subject: [nycphp-talk] sorting multi-dimesional arrays ... In-Reply-To: <008501c3506a$f8de4ea0$6400a8c0@THINKPAD> References: <20030722.074218.490.150402@webmail15.lax.untd.com> <008501c3506a$f8de4ea0$6400a8c0@THINKPAD> Message-ID: <3F1F15D1.20906@nyphp.org> Jon Baer wrote: > the functon array_count_values was actually what i was looking for, but in > the test below the key values are not retained ... im still trying to figure > it out ... I'm blindly jumping into a thread here, but perhaps http://us4.php.net/manual/en/function.arsort.php ? Otherwise, play with array_multisort(); specifying the various array levels as arguments. H From hans at nyphp.org Wed Jul 23 19:52:20 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 23 Jul 2003 19:52:20 -0400 Subject: [nycphp-talk] to rewrite or not to rewrite URLs... In-Reply-To: References: <3F174F12.7010100@nyphp.org> <20030718040053.GA28919@panix.com> <002301c34d53$e8fd3b00$6500a8c0@THINKPAD> Message-ID: <3F1F1FB4.8010608@nyphp.org> David Mintz wrote: > Do you guys use URL rewriting to ensure that the session id is propagated > from page to page even if the user refuses your cookie? Although probably not very popular, if I need sessions I use cookies. If I detect the user doesn't have cookies enabled, I present a pleasant notice saying so :) > I've read somewhere that it can cause 'confusion' or 'problems' if the > user bookmarks a URL with a session id in the query string, and tries to > access the page after the session is over, but those readings did not say > whether you should really worry about it or what the worst case scenario > is. Sure, this could happen; the impact on your site's data is dependant on the backend logic, though. If someone bookmarks, or send a URL to a friend, they are effectively using the same session. > I've been to sites that say "you must accept a cookie..." but that seems > kind of authoritarian, not to mention geeky (-: :) H From MLynn at exchange.ml.com Wed Jul 23 21:17:04 2003 From: MLynn at exchange.ml.com (Lynn, Michael (IDS DM&DS)) Date: Wed, 23 Jul 2003 21:17:04 -0400 Subject: [nycphp-talk] PHP and PayPal Message-ID: <8FA07D8665A9D511B80E00B0D068A15105D2150A@ehope16.hew.us.ml.com> I wrote something called phpaypal - it's rough but does the job... http://sf.net/projects/phpaypal Mike -----Original Message----- From: D. J. Waletzky [mailto:dj at waletzky.com] Sent: Wednesday, July 23, 2003 3:40 PM To: NYPHP Talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From cmerlo at matcmp.ncc.edu Thu Jul 24 02:58:42 2003 From: cmerlo at matcmp.ncc.edu (Christopher R. Merlo) Date: Thu, 24 Jul 2003 02:58:42 -0400 Subject: [nycphp-talk] sorting multi-dimesional arrays ... In-Reply-To: <000501c34fea$e9744a80$6500a8c0@THINKPAD> References: <000501c34fea$e9744a80$6500a8c0@THINKPAD> Message-ID: <20030724065842.GB1104@turing.matcmp.ncc.edu> On 2003-07-21 17:48 -0700, Jon Baer wrote: | basically i have around 3500+ access points logged and wanted to do some | stats, but could not think of a better way to sort via a 2d array on the 2nd | element, im just looking to shorten up the code (by just using an array | method of some kind - array_multisort?)... why not just do: $sql = "select * from table order by column2"; -c -- cmerlo at matcmp.ncc.edu http://turing.matcmp.ncc.edu/~cmerlo Windows: You'll wish we were kidding. From jonbaer at jonbaer.net Thu Jul 24 11:30:54 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Thu, 24 Jul 2003 08:30:54 -0700 Subject: [nycphp-talk] sorting multi-dimesional arrays ... References: <000501c34fea$e9744a80$6500a8c0@THINKPAD> <20030724065842.GB1104@turing.matcmp.ncc.edu> Message-ID: <001901c351f8$92668f40$6400a8c0@THINKPAD> the names/ssids are not unique in that it pertains to its mac address ... another method was "select count(ssid) where ssid = 'linksys'" looping through the names, stuffing it into an array and then sorting. the question still remains how to perform array_count_values, sort it, and still be able to retain original key values (as they get indexed instead), seems 2 arrays must be used ... - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: "Christopher R. Merlo" To: "NYPHP Talk" Sent: Wednesday, July 23, 2003 11:58 PM Subject: Re: [nycphp-talk] sorting multi-dimesional arrays ... > On 2003-07-21 17:48 -0700, Jon Baer wrote: > > | basically i have around 3500+ access points logged and wanted to do some > | stats, but could not think of a better way to sort via a 2d array on the 2nd > | element, im just looking to shorten up the code (by just using an array > | method of some kind - array_multisort?)... > > why not just do: > > $sql = "select * from table order by column2"; > > -c > > -- > cmerlo at matcmp.ncc.edu http://turing.matcmp.ncc.edu/~cmerlo > > Windows: You'll wish we were kidding. > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From jonbaer at jonbaer.net Thu Jul 24 11:32:28 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Thu, 24 Jul 2003 08:32:28 -0700 Subject: [nycphp-talk] Last nite slides available? References: <001801c35157$8f7cef00$6a63ca42@dwchome> <5.2.1.1.2.20030723172917.034a3130@mail.rbnsn.com> Message-ID: <002501c351f8$ca701c30$6400a8c0@THINKPAD> will it be rescheduled? pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: "Ken Robinson" To: "NYPHP Talk" Sent: Wednesday, July 23, 2003 2:30 PM Subject: Re: [nycphp-talk] Last nite slides available? > At 02:12 PM 7/23/2003 -0700, you wrote: > >i unfortunatley missed the meeting last night and was lookin forward to > >learning re: php/xml/sax/xpath/code stuff, r there any slides or info > >available? > > Unfortunately, the scheduled speaker also missed the meeting... so no > slides or talk... > > Ken Robinson > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From hans at nyphp.org Thu Jul 24 08:28:52 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 24 Jul 2003 08:28:52 -0400 Subject: [nycphp-talk] Last nite slides available? In-Reply-To: <002501c351f8$ca701c30$6400a8c0@THINKPAD> References: <001801c35157$8f7cef00$6a63ca42@dwchome> <5.2.1.1.2.20030723172917.034a3130@mail.rbnsn.com> <002501c351f8$ca701c30$6400a8c0@THINKPAD> Message-ID: <3F1FD104.6080502@nyphp.org> Jon Baer wrote: > will it be rescheduled? Yes, we're looking at having Dan give his presentation at the August meeting. H From mz34 at nyu.edu Thu Jul 24 10:12:15 2003 From: mz34 at nyu.edu (Matthew Zimmerman) Date: Thu, 24 Jul 2003 10:12:15 -0400 Subject: [nycphp-talk] XSLT extension (compiling and installing PHP 4) In-Reply-To: <001901c351f8$92668f40$6400a8c0@THINKPAD> Message-ID: Hi, Wondering if anyone on here has compiled and installed PHP with the XSLT extensions. I know the process involves installing Expat and Sablotron and then compiling PHP with "--enable-xslt --with-xslt-sablot" The compiling works fine for me. But at "make" I get an error /usr/local/lib/libsablot.so: undefined reference to `operator new[](unsigned)' /usr/local/lib/libsablot.so: undefined reference to `vtable for __cxxabiv1::__si_class_type_info' /usr/local/lib/libsablot.so: undefined reference to `operator delete(void*)' /usr/local/lib/libsablot.so: undefined reference to `__gxx_personality_v0' /usr/local/lib/libsablot.so: undefined reference to `__cxa_pure_virtual' /usr/local/lib/libsablot.so: undefined reference to `vtable for __cxxabiv1::__class_type_info' /usr/local/lib/libsablot.so: undefined reference to `operator delete[](void*)' /usr/local/lib/libsablot.so: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info' /usr/local/lib/libsablot.so: undefined reference to `operator new(unsigned)' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 This is my first time compiling and installing PHP from source. I always used packages before. Not sure if my problem is in the Expat install, Sablotron install but they seemed to go ok. There is a paragraph on php.net that says "Make sure you have the same libraries linked to the Sablotron library as those, which are linked with PHP. The configuration options: --with-expat-dir=DIR --with-iconv-dir=DIR are there to help you specify them." But I wasn't sure what to do with that. I am running: Red Hat 8 Apache 1.3.28 Expat 1.94 Sablotron 1.0 Compiling and installing: php 4.3.2 Thanks for any help, Matt From jsiegel1 at optonline.net Thu Jul 24 11:23:10 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 24 Jul 2003 11:23:10 -0400 Subject: [nycphp-talk] Botched email header Message-ID: <007401c351f7$7e44b5b0$6501a8c0@EZDSDELL> Below is the header from a "botched" email (see the "FROM" line) and below that is a snippet of code used to generate the header. Notice that the second part of the "From" in the header has the correct email address as does the Reply-To section of the header. It's probably the apostrophe that's messing things up but I'm wondering what's the best way to handle this. It should be noted (in case it is relevant to the solution) that: a. magic_quotes is on (yes...I'm aware of the problems it causes). b. the headers (along with the message body) get "bundled" into an array, then get serialized and sent to another function which shoots out the email. c. The FROM line *should* have said "From: Jay's Auto Wrecking " -Jeff ======================================================================== "ABNORMAL" headers: From: Jay's.Auto.Wrecking at server1.uneedapart.com, "Inc." Reply-To: X-Sender: X-Mailer: PHP4 X-Priority: 1 Status: MIME-Version: 1.0 Code Snippet: $sHeaders = "From: $sCompanyName <{$_SESSION['srDU_sLoginEMailAddr']}>\n" ."Reply-To: <{$_SESSION['srDU_sLoginEMailAddr']}>\n" ."X-Sender: <{$_SESSION['srDU_sLoginEMailAddr']}>\n" ."X-Mailer: PHP4\n" ."X-Priority: 1\n" ."Return-Path: <{$_SESSION['srDU_sLoginEMailAddr']}>\n"; From evcoen at earthlink.net Thu Jul 24 11:44:23 2003 From: evcoen at earthlink.net (evcoen at earthlink.net) Date: Thu, 24 Jul 2003 11:44:23 -0400 Subject: [nycphp-talk] Botched email header Message-ID: <114780-220037424154423670@M2W089.mail2web.com> I believe this will always happen with the code you list, if there's an apostrophe in the company name. Before assigning a value to $companyName you might try parsing the string: either stripping apostrophes or by marking them as literal text. -evc Original Message: ----------------- From: Jeff jsiegel1 at optonline.net Date: Thu, 24 Jul 2003 11:23:10 -0400 To: talk at lists.nyphp.org Subject: [nycphp-talk] Botched email header Below is the header from a "botched" email (see the "FROM" line) and below that is a snippet of code used to generate the header. Notice that the second part of the "From" in the header has the correct email address as does the Reply-To section of the header. It's probably the apostrophe that's messing things up but I'm wondering what's the best way to handle this. It should be noted (in case it is relevant to the solution) that: a. magic_quotes is on (yes...I'm aware of the problems it causes). b. the headers (along with the message body) get "bundled" into an array, then get serialized and sent to another function which shoots out the email. c. The FROM line *should* have said "From: Jay's Auto Wrecking " -Jeff ======================================================================== "ABNORMAL" headers: From: Jay's.Auto.Wrecking at server1.uneedapart.com, "Inc." Reply-To: X-Sender: X-Mailer: PHP4 X-Priority: 1 Status: MIME-Version: 1.0 Code Snippet: $sHeaders = "From: $sCompanyName <{$_SESSION['srDU_sLoginEMailAddr']}>\n" ."Reply-To: <{$_SESSION['srDU_sLoginEMailAddr']}>\n" ."X-Sender: <{$_SESSION['srDU_sLoginEMailAddr']}>\n" ."X-Mailer: PHP4\n" ."X-Priority: 1\n" ."Return-Path: <{$_SESSION['srDU_sLoginEMailAddr']}>\n"; _______________________________________________ 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 shiflett at php.net Thu Jul 24 12:07:44 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 24 Jul 2003 09:07:44 -0700 (PDT) Subject: [nycphp-talk] Botched email header In-Reply-To: <007401c351f7$7e44b5b0$6501a8c0@EZDSDELL> Message-ID: <20030724160744.80882.qmail@web14311.mail.yahoo.com> --- Jeff wrote: > "ABNORMAL" headers: > From: Jay's.Auto.Wrecking at server1.uneedapart.com, "Inc." > Wouldn't this be fine if you put the entire name in quotes instead of just "Inc.", or is that the question? :-) From: "Jay's.Auto.Wrecking at server1.uneedapart.com, Inc." Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From jsiegel1 at optonline.net Thu Jul 24 12:32:01 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 24 Jul 2003 12:32:01 -0400 Subject: [nycphp-talk] Botched email header In-Reply-To: <114780-220037424154423670@M2W089.mail2web.com> Message-ID: <007d01c35201$1c97a110$6501a8c0@EZDSDELL> Someone suggested the possibility of using "addslashes" but I wouldn't want the email header to say "Jay\'s Auto Wrecking." Stripping out the apostrophe leaves us with "Jays Auto Wrecking" which isn't the company name. I thought of, perhaps, htmlspecialchars but I'm not sure if that will introduce more problems for if the email header has a problem with ' representing an apostrophe/single quote. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of evcoen at earthlink.net Sent: Thursday, July 24, 2003 10:44 AM To: talk at lists.nyphp.org Subject: RE: [nycphp-talk] Botched email header I believe this will always happen with the code you list, if there's an apostrophe in the company name. Before assigning a value to $companyName you might try parsing the string: either stripping apostrophes or by marking them as literal text. -evc Original Message: ----------------- From: Jeff jsiegel1 at optonline.net Date: Thu, 24 Jul 2003 11:23:10 -0400 To: talk at lists.nyphp.org Subject: [nycphp-talk] Botched email header Below is the header from a "botched" email (see the "FROM" line) and below that is a snippet of code used to generate the header. Notice that the second part of the "From" in the header has the correct email address as does the Reply-To section of the header. It's probably the apostrophe that's messing things up but I'm wondering what's the best way to handle this. It should be noted (in case it is relevant to the solution) that: a. magic_quotes is on (yes...I'm aware of the problems it causes). b. the headers (along with the message body) get "bundled" into an array, then get serialized and sent to another function which shoots out the email. c. The FROM line *should* have said "From: Jay's Auto Wrecking " -Jeff ======================================================================== "ABNORMAL" headers: From: Jay's.Auto.Wrecking at server1.uneedapart.com, "Inc." Reply-To: X-Sender: X-Mailer: PHP4 X-Priority: 1 Status: MIME-Version: 1.0 Code Snippet: $sHeaders = "From: $sCompanyName <{$_SESSION['srDU_sLoginEMailAddr']}>\n" ."Reply-To: <{$_SESSION['srDU_sLoginEMailAddr']}>\n" ."X-Sender: <{$_SESSION['srDU_sLoginEMailAddr']}>\n" ."X-Mailer: PHP4\n" ."X-Priority: 1\n" ."Return-Path: <{$_SESSION['srDU_sLoginEMailAddr']}>\n"; _______________________________________________ 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 jsiegel1 at optonline.net Thu Jul 24 12:32:01 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 24 Jul 2003 12:32:01 -0400 Subject: [nycphp-talk] Botched email header In-Reply-To: <20030724160744.80882.qmail@web14311.mail.yahoo.com> Message-ID: <007e01c35201$1ecca980$6501a8c0@EZDSDELL> I didn't put in quotes...but it came out that way. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Shiflett Sent: Thursday, July 24, 2003 11:08 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Botched email header --- Jeff wrote: > "ABNORMAL" headers: > From: Jay's.Auto.Wrecking at server1.uneedapart.com, "Inc." > Wouldn't this be fine if you put the entire name in quotes instead of just "Inc.", or is that the question? :-) From: "Jay's.Auto.Wrecking at server1.uneedapart.com, Inc." Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Thu Jul 24 12:49:32 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 24 Jul 2003 09:49:32 -0700 (PDT) Subject: [nycphp-talk] Botched email header In-Reply-To: <007d01c35201$1c97a110$6501a8c0@EZDSDELL> Message-ID: <20030724164932.89634.qmail@web14310.mail.yahoo.com> > $sHeaders = "From: $sCompanyName > <{$_SESSION['srDU_sLoginEMailAddr']}>\n" How about this: $sHeaders = "From: \"$sCompanyName\" <{$_SESSION['srDU_sLoginEMailAddr']}>\n"; Also, what are the values of $sCompanyName and $_SESSION['srDU_sLoginEMailAddr'] exactly? Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From jsiegel1 at optonline.net Thu Jul 24 13:02:00 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 24 Jul 2003 13:02:00 -0400 Subject: [nycphp-talk] Botched email header In-Reply-To: <20030724164932.89634.qmail@web14310.mail.yahoo.com> Message-ID: <008001c35205$4d34b5c0$6501a8c0@EZDSDELL> I take it this would be, in a sense, a "global" change you're suggesting. But wouldn't the "FROM" address come out as "Jay's Auto Wrecking" (that is, with the double quotes around it)? And the values are: $sCompanyName is the name of the company sending the email, the session variable is their email address. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Shiflett Sent: Thursday, July 24, 2003 11:50 AM To: NYPHP Talk; evcoen at earthlink.net Subject: RE: [nycphp-talk] Botched email header > $sHeaders = "From: $sCompanyName > <{$_SESSION['srDU_sLoginEMailAddr']}>\n" How about this: $sHeaders = "From: \"$sCompanyName\" <{$_SESSION['srDU_sLoginEMailAddr']}>\n"; Also, what are the values of $sCompanyName and $_SESSION['srDU_sLoginEMailAddr'] exactly? Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From hans at nyphp.org Thu Jul 24 13:58:49 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 24 Jul 2003 13:58:49 -0400 Subject: [nycphp-talk] XSLT extension (compiling and installing PHP 4) In-Reply-To: References: Message-ID: <3F201E59.8000402@nyphp.org> Matthew Zimmerman wrote: > Hi, > > Wondering if anyone on here has compiled and installed PHP with the XSLT > extensions. I know the process involves installing Expat and Sablotron > and then compiling PHP with "--enable-xslt --with-xslt-sablot" > > The compiling works fine for me. But at "make" I get an error > > /usr/local/lib/libsablot.so: undefined reference to `operator > new[](unsigned)' > /usr/local/lib/libsablot.so: undefined reference to `vtable for > __cxxabiv1::__si_class_type_info' > /usr/local/lib/libsablot.so: undefined reference to `operator > delete(void*)' > /usr/local/lib/libsablot.so: undefined reference to `__gxx_personality_v0' > /usr/local/lib/libsablot.so: undefined reference to `__cxa_pure_virtual' > /usr/local/lib/libsablot.so: undefined reference to `vtable for > __cxxabiv1::__class_type_info' > /usr/local/lib/libsablot.so: undefined reference to `operator > delete[](void*)' > /usr/local/lib/libsablot.so: undefined reference to `vtable for > __cxxabiv1::__vmi_class_type_info' > /usr/local/lib/libsablot.so: undefined reference to `operator > new(unsigned)' > collect2: ld returned 1 exit status > make: *** [sapi/cli/php] Error 1 Looks like libsablot has some unresolved symbols. Try running ldconfig and then do the make again. And/or, supply the base directory where libsablot and libexpat are installed, during the ./configure of php. > This is my first time compiling and installing PHP from source. I always > used packages before. Not sure if my problem is in the Expat install, > Sablotron install but they seemed to go ok. > > There is a paragraph on php.net that says > > "Make sure you have the same libraries linked to the Sablotron library > as those, which are linked with PHP. The configuration options: > --with-expat-dir=DIR --with-iconv-dir=DIR are there to help you specify > them." This will explicitly tell gcc and friends where to find the required libs and header files. If you installed things in the default location, trying using /usr or /usr/local H From shiflett at php.net Thu Jul 24 14:14:14 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 24 Jul 2003 11:14:14 -0700 (PDT) Subject: [nycphp-talk] Botched email header In-Reply-To: <008001c35205$4d34b5c0$6501a8c0@EZDSDELL> Message-ID: <20030724181414.2578.qmail@web14310.mail.yahoo.com> --- Jeff wrote: > I take it this would be, in a sense, a "global" change you're > suggesting. But wouldn't the "FROM" address come out as "Jay's > Auto Wrecking" (that is, with the double quotes around it)? It should, which is exactly what you want. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From carlos at sprout.net Thu Jul 24 14:21:42 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Thu, 24 Jul 2003 14:21:42 -0400 Subject: [nycphp-talk] PHP Editor Message-ID: <49A9DEB886049242BA28C484A36C03F12CB955@email.sprout.net> Hi , I am sure this has come up plenty of times, but sorry I did not go to school that day! I am using PHPEdit as my editor right now. I used to use TextPad which was pretty good. Anything better that anyone can recommend? Thanks, Carlos From undo at archeopterix.com Thu Jul 24 14:42:42 2003 From: undo at archeopterix.com (Andu) Date: Thu, 24 Jul 2003 14:42:42 -0400 Subject: [nycphp-talk] PHP Editor In-Reply-To: <49A9DEB886049242BA28C484A36C03F12CB955@email.sprout.net> References: <49A9DEB886049242BA28C484A36C03F12CB955@email.sprout.net> Message-ID: <2720000.1059072162@localhost> --On Thursday, July 24, 2003 14:21:42 -0400 "Carlos G. Chiossone" wrote: > Hi , I am sure this has come up plenty of times, but sorry I did not go > to school that day! I am using PHPEdit as my editor right now. I used to > use TextPad which was pretty good. Anything better that anyone can > recommend? I use Nedit and I'm very happy with it specially due to the macros. That's on Linux. > > Thanks, > Carlos > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > > Regards, Andu Novac From henry at beewh.com Thu Jul 24 15:01:18 2003 From: henry at beewh.com (Henry Ponce) Date: Thu, 24 Jul 2003 16:01:18 -0300 Subject: [nycphp-talk] PHP Editor In-Reply-To: <49A9DEB886049242BA28C484A36C03F12CB955@email.sprout.net> References: <49A9DEB886049242BA28C484A36C03F12CB955@email.sprout.net> Message-ID: <200307241601.19163.henry@beewh.com> On Thursday 24 July 2003 15:21, Carlos G. Chiossone wrote: > Hi , I am sure this has come up plenty of times, but sorry I did not go to > school that day! I am using PHPEdit as my editor right now. I used to use > TextPad which was pretty good. Anything better that anyone can recommend? > > Thanks, > Carlos > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk I've also used TextPad which is pretty good. I've tried Bluefish too. But I currently use Kate on Linux. I like it. -- An. Henry Ponce Linux Registered User # 303567 Mar del Plata, Argentina From shiflett at php.net Thu Jul 24 15:12:00 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 24 Jul 2003 12:12:00 -0700 (PDT) Subject: [nycphp-talk] PHP Editor In-Reply-To: <49A9DEB886049242BA28C484A36C03F12CB955@email.sprout.net> Message-ID: <20030724191200.28503.qmail@web14305.mail.yahoo.com> --- "Carlos G. Chiossone" wrote: > Hi , I am sure this has come up plenty of times Yes, but like most religious wars, everyone loves disclosing their opinion. :-) Mine is: Windows: UltraEdit Other: vim Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From nyphp at websapp.com Thu Jul 24 15:12:11 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Thu, 24 Jul 2003 15:12:11 -0400 Subject: [nycphp-talk] PHP Editor In-Reply-To: <20030724191200.28503.qmail@web14305.mail.yahoo.com> Message-ID: Chris, you've asked for it: Zend Studio rules.... --Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Shiflett > Sent: Thursday, July 24, 2003 3:12 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PHP Editor > > > --- "Carlos G. Chiossone" wrote: > > Hi , I am sure this has come up plenty of times > > Yes, but like most religious wars, everyone loves disclosing > their opinion. :-) > > Mine is: > > Windows: UltraEdit > Other: vim > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From FWoolsey at ltk.com Thu Jul 24 15:15:24 2003 From: FWoolsey at ltk.com (Woolsey, Fred) Date: Thu, 24 Jul 2003 15:15:24 -0400 Subject: [nycphp-talk] PHP Editor Message-ID: <49C27D5DC02B03409C25B3039719955DFA1892@exambler.ltk.com> Komodo fer me.... Fred Woolsey Senior Consultant LTK Engineering Services 100 West Butler Avenue Ambler, PA 19002 Tel: 215-641-8865 Fax: 215-654-9370 fwoolsey at ltk.com -----Original Message----- From: Daniel Kushner [mailto:nyphp at websapp.com] Sent: Thursday, July 24, 2003 3:12 PM To: NYPHP Talk Subject: RE: [nycphp-talk] PHP Editor Chris, you've asked for it: Zend Studio rules.... --Daniel > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Chris Shiflett > Sent: Thursday, July 24, 2003 3:12 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] PHP Editor > > > --- "Carlos G. Chiossone" wrote: > > Hi , I am sure this has come up plenty of times > > Yes, but like most religious wars, everyone loves disclosing > their opinion. :-) > > Mine is: > > Windows: UltraEdit > Other: vim > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From info at oscartrelles.com Thu Jul 24 15:17:37 2003 From: info at oscartrelles.com (Oscar Trelles) Date: Thu, 24 Jul 2003 15:17:37 -0400 Subject: [nycphp-talk] PHP Editor References: <20030724191200.28503.qmail@web14305.mail.yahoo.com> Message-ID: <014501c35218$3e8a9c70$6701a8c0@SuperServer> I got used to Dreamweaver, when using Windows. In any other case, I just use vim. I too might get some useful info from this thread :) Oscar Trelles http://www.oscartrelles.com/blog ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Thursday, July 24, 2003 3:12 PM Subject: Re: [nycphp-talk] PHP Editor > --- "Carlos G. Chiossone" wrote: > > Hi , I am sure this has come up plenty of times > > Yes, but like most religious wars, everyone loves disclosing their opinion. :-) > > Mine is: > > Windows: UltraEdit > Other: vim > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From kenrbnsn at rbnsn.com Thu Jul 24 15:20:49 2003 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Thu, 24 Jul 2003 15:20:49 -0400 Subject: [nycphp-talk] PHP Editor In-Reply-To: References: <20030724191200.28503.qmail@web14305.mail.yahoo.com> Message-ID: <5.2.1.1.2.20030724151815.00b5d888@mail.rbnsn.com> At 03:12 PM 7/24/2003 -0400, you wrote: >Chris, you've asked for it: > >Zend Studio rules.... Yes, Zend Studio is excellent (with a great debugger) but it's way too expensive for the struggling web designer with no money flow to buy. I used the 3 week trial and got very used to it. Now, I'm using Homesite5 and TopStyle 3 (combination CSS editor and HTML/PHP editor written by the same person who originally wrote Homesite). Ken From jsiegel1 at optonline.net Thu Jul 24 15:42:18 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 24 Jul 2003 15:42:18 -0400 Subject: [nycphp-talk] Botched email header In-Reply-To: <20030724181414.2578.qmail@web14310.mail.yahoo.com> Message-ID: <000a01c3521b$b194f5f0$6501a8c0@EZDSDELL> After doing some additional research, it seems that the problem may not be the single quote that was botching up the header but the comma in the company name which Sendmail had interpreted as a delimiter and therefore it had assumed there were two different email addresses. I'm going to "test" that route by stripping out the "comma" to see if it fixes things. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Shiflett Sent: Thursday, July 24, 2003 1:14 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Botched email header --- Jeff wrote: > I take it this would be, in a sense, a "global" change you're > suggesting. But wouldn't the "FROM" address come out as "Jay's > Auto Wrecking" (that is, with the double quotes around it)? It should, which is exactly what you want. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Thu Jul 24 15:59:35 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 24 Jul 2003 12:59:35 -0700 (PDT) Subject: [nycphp-talk] Botched email header In-Reply-To: <000a01c3521b$b194f5f0$6501a8c0@EZDSDELL> Message-ID: <20030724195935.26446.qmail@web14301.mail.yahoo.com> --- Jeff wrote: > After doing some additional research, it seems that the problem > may not be the single quote that was botching up the header but > the comma in the company name which Sendmail had interpreted as > a delimiter and therefore it had assumed there were two different > email addresses. I'm going to "test" that route by stripping out > the "comma" to see if it fixes things. So when someone's name is: Shiflett, Chris you're going to change it to: Shiflett Chris That doesn't sound like a good solution. Why not just put the name in quotes like I suggested? That's what you're supposed to do anyway, and not doing so is probably what is confusing sendmail. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From danielc at analysisandsolutions.com Thu Jul 24 16:03:40 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 24 Jul 2003 16:03:40 -0400 Subject: [nycphp-talk] Last nite slides available? In-Reply-To: <20030723215900.61782.qmail@web14303.mail.yahoo.com> References: <5.2.1.1.2.20030723172917.034a3130@mail.rbnsn.com> <20030723215900.61782.qmail@web14303.mail.yahoo.com> Message-ID: <20030724200340.GA23251@panix.com> Hi Folks: On Wed, Jul 23, 2003 at 02:59:00PM -0700, Chris Shiflett wrote: > $month = mktime('0', '0', '0', date('m'), '0', date('y')); > $meeting = date('D, d M Y', strtotime('fourth tuesday', $month)); > > echo "This month's meeting is $meeting.\n"; > ?> > > That's the slide. :-) Yep! I apologize to everyone who attended, particularly those who came particularly because of the topic. I look forward to giving the presentation next month. --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 Thu Jul 24 16:14:51 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 24 Jul 2003 16:14:51 -0400 Subject: [nycphp-talk] Botched email header In-Reply-To: <000a01c3521b$b194f5f0$6501a8c0@EZDSDELL> References: <20030724181414.2578.qmail@web14310.mail.yahoo.com> <000a01c3521b$b194f5f0$6501a8c0@EZDSDELL> Message-ID: <20030724201451.GB23251@panix.com> Hey Jeff: On Thu, Jul 24, 2003 at 03:42:18PM -0400, Jeff wrote: > After doing some additional research, it seems that the problem may not > be the single quote that was botching up the header but the comma in the > company name which Sendmail had interpreted as a delimiter and therefore > it had assumed there were two different email addresses. Yep. > I'm going to > "test" that route by stripping out the "comma" to see if it fixes > things. Stripping commas will work. Also, I think Chris' suggestion of \"$sCompanyName\" will work also, though you'd likely need to make sure double quotes in $sCompanyName are stripped or escaped instead. 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 willie at pdfsystems.com Thu Jul 24 16:53:32 2003 From: willie at pdfsystems.com (Willliam Klein) Date: Thu, 24 Jul 2003 16:53:32 -0400 Subject: [nycphp-talk] mime mail In-Reply-To: <23AA728CBA918941834ADDDFAD7FA85C0EC72C@sag.pdfsystems.com> Message-ID: <23AA728CBA918941834ADDDFAD7FA85C9B3E@sag.pdfsystems.com> Hi All; I'm trying to use mime-mail from PEAR and I not succeeding. I get my mail but it all arrives as plain text. I've tried attaching a file and sending it in the body of the email. BTW I've looked at the php.pear.general newsgroup and the same problem is over there with no solution. the code: setTXTBody($text); $file = '/home/httpd/html/image/temp/'.$orderNumber . '.htm'; echo "file is $file"; $mime->addAttachment($file,'text/html'); $html = $blah; $mime->setHTMLBody($blah); $headers = $mime->headers($headers); $param["html_encoding"]="7bit"; $body = $mime->get($param); $message =& Mail::factory('mail'); $message->send($to, $headers, $body); Mail_mime::send(); ?> and I get plain text html and what looks like an encoded file as text in the body of the email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at mx2pro.com Thu Jul 24 17:06:34 2003 From: dan at mx2pro.com (Dan Horning) Date: Thu, 24 Jul 2003 17:06:34 -0400 Subject: [nycphp-talk] mime mail Message-ID: <000501c35227$797d41c0$5763ca42@dwchome> Ok I'll try to simplify this .. But .. Why do you need mime mail for what you're doing? You don't need to encode it unless you are attaching something to it(images files... Etc...) But to display an inline html doc as an email just view he source to the email i just sent you... and format it in that kind of fashion... need more help .. email me offlist and i'll give you the full rundown - Dan Horning ------------------------------------------------------------------------ ------------ AIM: mx2pro / dsoundmn MSN: dan at mx2pro.com Got an Emergency?? Email: alert-dan at mx2pro.com ------------------------------------------------------------------------ ------------ MX2 Productions, Media from concept to execution. Clifton Park Office: 1-(518)-253-7251 PO Box 160, Clifton Park, NY 12065-0160 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiegel1 at optonline.net Thu Jul 24 17:23:04 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 24 Jul 2003 17:23:04 -0400 Subject: [nycphp-talk] Botched email header In-Reply-To: <20030724201451.GB23251@panix.com> Message-ID: <002901c35229$c56fef90$6501a8c0@EZDSDELL> My concern is that I don't want the From address to have double-quotes around it. Of course I can't let the emails go out with botched up headers but I'm leaning in the direction of a solution that would clean up these anomalies (which are a handful of cases) and leave the other stuff alone. Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Analysis & Solutions Sent: Thursday, July 24, 2003 3:15 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Botched email header Hey Jeff: On Thu, Jul 24, 2003 at 03:42:18PM -0400, Jeff wrote: > After doing some additional research, it seems that the problem may not > be the single quote that was botching up the header but the comma in the > company name which Sendmail had interpreted as a delimiter and therefore > it had assumed there were two different email addresses. Yep. > I'm going to > "test" that route by stripping out the "comma" to see if it fixes > things. Stripping commas will work. Also, I think Chris' suggestion of \"$sCompanyName\" will work also, though you'd likely need to make sure double quotes in $sCompanyName are stripped or escaped instead. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From carlos at sprout.net Thu Jul 24 17:18:16 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Thu, 24 Jul 2003 17:18:16 -0400 Subject: [nycphp-talk] PHP Editor Message-ID: <49A9DEB886049242BA28C484A36C03F12CB95A@email.sprout.net> Man this is hard; I guess I'll keep this buggy phpEdit after all. Not 2 of you used the same :) c -----Original Message----- From: Ken Robinson [mailto:kenrbnsn at rbnsn.com] Sent: Thursday, July 24, 2003 3:21 PM To: NYPHP Talk Subject: RE: [nycphp-talk] PHP Editor At 03:12 PM 7/24/2003 -0400, you wrote: >Chris, you've asked for it: > >Zend Studio rules.... Yes, Zend Studio is excellent (with a great debugger) but it's way too expensive for the struggling web designer with no money flow to buy. I used the 3 week trial and got very used to it. Now, I'm using Homesite5 and TopStyle 3 (combination CSS editor and HTML/PHP editor written by the same person who originally wrote Homesite). Ken _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From psaw at pswebcode.com Thu Jul 24 17:37:35 2003 From: psaw at pswebcode.com (pswebcode, nyc) Date: Thu, 24 Jul 2003 17:37:35 -0400 Subject: [nycphp-talk] mime mail In-Reply-To: <000501c35227$797d41c0$5763ca42@dwchome> Message-ID: <000a01c3522b$ceb47470$68e4a144@bronco> Try this. Watch for bad line breaks or an accidental typo in var names PSaw //STEP 1 ************************************************ //SET UP XHTML VAR FOR BODY OF EMAIL USING A PHP 'HERE DOCUMENT' $XHTML_CONTENT.= <<< EOFSTR MY XHTML PAGE TITLE
my co alt txt
EOFSTR; //STEP 2 ************************************************ //SENDING XHTML EMAIL $Subj = "Message for Them"; $To = " them at theirco.com"; $headers = "From:you at yourco.com<> \n"; $headers .= "Reply-To:you at yourco.com\n"; $headers .= "MIME-Version: 1.0\n"; //unique boundary $boundary = uniqid("XHTMLEMAIL"); //tell e-mail client msg contains alternate versions $headers .= "Content-Type: multipart/alternative"."; boundary = $boundary \n\n"; //message to people with clients who don't understand MIME $headers .= "This is a MIME encoded message.\n\n"; //plain text version of message $headers .= "--$boundary \n"."Content-Type: text/plain; charset=ISO-8859-1\n"."Content-Transfer-Encoding: base64\n\n"; $headers .= chunk_split(base64_encode("ALTERNATIVE PLAIN TEXT MSG.")); //XHTML version of message $headers .= "--$boundary\n"."Content-Type: text/html;\n"."Content-Transfer-Encoding: base64\n\n"; $headers .= chunk_split(base64_encode($XHTML_CONTENT)); $emailResult = sendMsgwithMime($To, $Subj, "", $headers); //STEP 3 ************************************************ //this function used to report back friendly result of each email attempt function sendMsgwithMime($to, $subj, $str, $headers){ //mail func error handling suppressed if (@mail($to, $subj, "", $headers)){ $emailResultMsg="

Success on connection to: ".$to."
"; }else{ $emailResultMsg="

Sorry an error occurred while trying to process: ".$to."
"; } return $emailResultMsg; } -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Dan Horning Sent: Thursday, July 24, 2003 5:07 PM To: 'Willliam Klein'; talk at lists.nyphp.org Subject: [nycphp-talk] mime mail Ok I'll try to simplify this .. But .. Why do you need mime mail for what you're doing? You don't need to encode it unless you are attaching something to it(images files... Etc...) But to display an inline html doc as an email just view he source to the email i just sent you... and format it in that kind of fashion... need more help .. email me offlist and i'll give you the full rundown - Dan Horning ---------------------------------------------------------------------------- -------- AIM: mx2pro / dsoundmn MSN: dan at mx2pro.com Got an Emergency?? Email: alert-dan at mx2pro.com ---------------------------------------------------------------------------- -------- MX2 Productions, Media from concept to execution. Clifton Park Office: 1-(518)-253-7251 PO Box 160, Clifton Park, NY 12065-0160 -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Thu Jul 24 17:37:48 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 24 Jul 2003 14:37:48 -0700 (PDT) Subject: [nycphp-talk] Botched email header In-Reply-To: <002901c35229$c56fef90$6501a8c0@EZDSDELL> Message-ID: <20030724213748.39232.qmail@web14301.mail.yahoo.com> --- Jeff wrote: > My concern is that I don't want the From address to have > double-quotes around it. In your email, the following is the From header used: From: "Jeff" That is the format you want to achieve when you specify your own mail headers. It really doesn't matter whether you *want* the format to be this way, because that is not your decision. Does that make better sense now? > Of course I can't let the emails go out with botched up headers > but I'm leaning in the direction of a solution that would clean > up these anomalies (which are a handful of cases) and leave the > other stuff alone. These aren't anomalies. Commas are fairly common within the name part of a From header, and they don't require any special handling so long as you adhere to the proper format as I initially suggested. The only potential problem would be whether the name already contains a quotation mark (which is something you should filter prior to the code in question) or some other invalid character (\r\n would be bad, too). Along the same lines, you want to make sure the email address is a valid email address. Assuming you have properly filtered your data (which was my initial assumption), something as simple as this will work: $from_header = "From: \"$name\" <$email>\r\n"; Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From jlacey at ix.netcom.com Thu Jul 24 17:44:06 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Thu, 24 Jul 2003 15:44:06 -0600 Subject: [nycphp-talk] PHP Editor In-Reply-To: <49A9DEB886049242BA28C484A36C03F12CB95A@email.sprout.net> References: <49A9DEB886049242BA28C484A36C03F12CB95A@email.sprout.net> Message-ID: <3F205326.2000602@ix.netcom.com> my 2 cents: Arachnophilia is java based and runs on windows and linux, etc... http://www.arachnoid.com/arachnophilia/ I have to agree with the other posts re: Zend Studio rulz... John Carlos G. Chiossone wrote: >Man this is hard; I guess I'll keep this buggy phpEdit after all. Not 2 of you used the same :) > >c > >-----Original Message----- >From: Ken Robinson [mailto:kenrbnsn at rbnsn.com] >Sent: Thursday, July 24, 2003 3:21 PM >To: NYPHP Talk >Subject: RE: [nycphp-talk] PHP Editor > >At 03:12 PM 7/24/2003 -0400, you wrote: > > > >>Chris, you've asked for it: >> >>Zend Studio rules.... >> >> > >Yes, Zend Studio is excellent (with a great debugger) but it's way too >expensive for the struggling web designer with no money flow to buy. I used >the 3 week trial and got very used to it. > >Now, I'm using Homesite5 and TopStyle 3 (combination CSS editor and >HTML/PHP editor written by the same person who originally wrote Homesite). > >Ken > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiegel1 at optonline.net Thu Jul 24 17:44:47 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 24 Jul 2003 17:44:47 -0400 Subject: [nycphp-talk] Botched email header In-Reply-To: <20030724213748.39232.qmail@web14301.mail.yahoo.com> Message-ID: <003601c3522c$ce96bdd0$6501a8c0@EZDSDELL> You got me...I'm convinced. (No sarcasm intended.) Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Shiflett Sent: Thursday, July 24, 2003 4:38 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Botched email header --- Jeff wrote: > My concern is that I don't want the From address to have > double-quotes around it. In your email, the following is the From header used: From: "Jeff" That is the format you want to achieve when you specify your own mail headers. It really doesn't matter whether you *want* the format to be this way, because that is not your decision. Does that make better sense now? > Of course I can't let the emails go out with botched up headers > but I'm leaning in the direction of a solution that would clean > up these anomalies (which are a handful of cases) and leave the > other stuff alone. These aren't anomalies. Commas are fairly common within the name part of a From header, and they don't require any special handling so long as you adhere to the proper format as I initially suggested. The only potential problem would be whether the name already contains a quotation mark (which is something you should filter prior to the code in question) or some other invalid character (\r\n would be bad, too). Along the same lines, you want to make sure the email address is a valid email address. Assuming you have properly filtered your data (which was my initial assumption), something as simple as this will work: $from_header = "From: \"$name\" <$email>\r\n"; Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From undo at archeopterix.com Thu Jul 24 17:50:35 2003 From: undo at archeopterix.com (Andu) Date: Thu, 24 Jul 2003 17:50:35 -0400 Subject: [nycphp-talk] PHP Editor In-Reply-To: <49A9DEB886049242BA28C484A36C03F12CB95A@email.sprout.net> References: <49A9DEB886049242BA28C484A36C03F12CB95A@email.sprout.net> Message-ID: <1720000.1059083435@localhost> --On Thursday, July 24, 2003 17:18:16 -0400 "Carlos G. Chiossone" wrote: > Man this is hard; I guess I'll keep this buggy phpEdit after all. Not 2 > of you used the same :) Depends on what you're after; Nedit gives me syntax hiliting, line numbers, I can run the php script for debugging, I can also run the script in a browser if the file is on my local server (where it should be). You can record macros and play them via a menu (i.e. insert if, switch, etc. statements). For me that's plenty for a fast free product. > > c > > -----Original Message----- > From: Ken Robinson [mailto:kenrbnsn at rbnsn.com] > Sent: Thursday, July 24, 2003 3:21 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] PHP Editor > > At 03:12 PM 7/24/2003 -0400, you wrote: > >> Chris, you've asked for it: >> >> Zend Studio rules.... > > Yes, Zend Studio is excellent (with a great debugger) but it's way too > expensive for the struggling web designer with no money flow to buy. I > used the 3 week trial and got very used to it. > > Now, I'm using Homesite5 and TopStyle 3 (combination CSS editor and > HTML/PHP editor written by the same person who originally wrote Homesite). > > Ken > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > > Regards, Andu Novac From hans at nyphp.org Thu Jul 24 18:20:32 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 24 Jul 2003 18:20:32 -0400 Subject: [nycphp-talk] PHP Editor In-Reply-To: <49A9DEB886049242BA28C484A36C03F12CB95A@email.sprout.net> References: <49A9DEB886049242BA28C484A36C03F12CB95A@email.sprout.net> Message-ID: <3F205BB0.6020805@nyphp.org> Carlos G. Chiossone wrote: > Man this is hard; I guess I'll keep this buggy phpEdit after all. Not 2 of you used the same :) Editor: UltraEdit PHP IDE/Debugger: Zend I also use UltraEdit for almost every task except reading/sending mail (but I do edit mail in it :) H From anthony at tanzola.com Thu Jul 24 22:02:42 2003 From: anthony at tanzola.com (Anthony Tanzola) Date: Thu, 24 Jul 2003 19:02:42 -0700 Subject: [nycphp-talk] PHP Editor In-Reply-To: <3F205BB0.6020805@nyphp.org> Message-ID: I love Zend! >-----Original Message----- >From: talk-bounces at lists.nyphp.org >[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere >Sent: Thursday, July 24, 2003 3:21 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] PHP Editor > > > > >Carlos G. Chiossone wrote: >> Man this is hard; I guess I'll keep this buggy phpEdit after >all. Not 2 of you used the same :) > >Editor: UltraEdit >PHP IDE/Debugger: Zend > >I also use UltraEdit for almost every task except reading/sending >mail (but I do edit mail in it :) > >H > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From mwithington at PLMresearch.com Thu Jul 24 22:00:45 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Thu, 24 Jul 2003 22:00:45 -0400 Subject: [nycphp-talk] PHP Editor Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3586A62E1@network.PLMresearch.com> Ditto. The ZDE (w/debugger) is worth the money. -------------------------- 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 Anthony Tanzola Sent: Thursday, July 24, 2003 10:03 PM To: NYPHP Talk Subject: RE: [nycphp-talk] PHP Editor I love Zend! >-----Original Message----- >From: talk-bounces at lists.nyphp.org >[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere >Sent: Thursday, July 24, 2003 3:21 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] PHP Editor > > > > >Carlos G. Chiossone wrote: >> Man this is hard; I guess I'll keep this buggy phpEdit after >all. Not 2 of you used the same :) > >Editor: UltraEdit >PHP IDE/Debugger: Zend > >I also use UltraEdit for almost every task except reading/sending >mail (but I do edit mail in it :) > >H > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From jsiegel1 at optonline.net Fri Jul 25 00:40:47 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 25 Jul 2003 00:40:47 -0400 Subject: [nycphp-talk] Botched email header In-Reply-To: <20030724213748.39232.qmail@web14301.mail.yahoo.com> Message-ID: <000001c35266$eb3a6380$6501a8c0@EZDSDELL> The double quotes did the trick!!! Thanks! Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Shiflett Sent: Thursday, July 24, 2003 4:38 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Botched email header --- Jeff wrote: > My concern is that I don't want the From address to have > double-quotes around it. In your email, the following is the From header used: From: "Jeff" That is the format you want to achieve when you specify your own mail headers. It really doesn't matter whether you *want* the format to be this way, because that is not your decision. Does that make better sense now? > Of course I can't let the emails go out with botched up headers > but I'm leaning in the direction of a solution that would clean > up these anomalies (which are a handful of cases) and leave the > other stuff alone. These aren't anomalies. Commas are fairly common within the name part of a From header, and they don't require any special handling so long as you adhere to the proper format as I initially suggested. The only potential problem would be whether the name already contains a quotation mark (which is something you should filter prior to the code in question) or some other invalid character (\r\n would be bad, too). Along the same lines, you want to make sure the email address is a valid email address. Assuming you have properly filtered your data (which was my initial assumption), something as simple as this will work: $from_header = "From: \"$name\" <$email>\r\n"; Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Fri Jul 25 01:14:55 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 24 Jul 2003 22:14:55 -0700 (PDT) Subject: [nycphp-talk] Botched email header In-Reply-To: <000001c35266$eb3a6380$6501a8c0@EZDSDELL> Message-ID: <20030725051455.84804.qmail@web14304.mail.yahoo.com> --- Jeff wrote: > The double quotes did the trick!!! Woo hoo! I was hoping my persistence would pay off. :-) > Thanks! You're very welcome. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From rinaudomatteo at msn.com Fri Jul 25 07:34:25 2003 From: rinaudomatteo at msn.com (Matteo Rinaudo) Date: Fri, 25 Jul 2003 13:34:25 +0200 Subject: R: [nycphp-talk] PHP Editor In-Reply-To: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3586A62E1@network.PLMresearch.com> Message-ID: <000001c352a0$b34c8f90$6f00a8c0@osiris> I use quanta plus on linux, EditPlus on Windows. I think EditPlus is ok. -----Messaggio originale----- Da: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] Per conto di Mark Withington Inviato: venerd? 25 luglio 2003 4.01 A: 'NYPHP Talk' Oggetto: RE: [nycphp-talk] PHP Editor Ditto. The ZDE (w/debugger) is worth the money. -------------------------- 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 Anthony Tanzola Sent: Thursday, July 24, 2003 10:03 PM To: NYPHP Talk Subject: RE: [nycphp-talk] PHP Editor I love Zend! >-----Original Message----- >From: talk-bounces at lists.nyphp.org >[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere >Sent: Thursday, July 24, 2003 3:21 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] PHP Editor > > > > >Carlos G. Chiossone wrote: >> Man this is hard; I guess I'll keep this buggy phpEdit after >all. Not 2 of you used the same :) > >Editor: UltraEdit >PHP IDE/Debugger: Zend > >I also use UltraEdit for almost every task except reading/sending >mail (but I do edit mail in it :) > >H > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From southwell at dneba.com Fri Jul 25 16:20:20 2003 From: southwell at dneba.com (Michael Southwell) Date: Fri, 25 Jul 2003 16:20:20 -0400 Subject: [nycphp-talk] walking through a multi-dimensional array Message-ID: <5.1.0.14.2.20030725161510.00b21898@mail.optonline.net> The following code successfully walks through a 3-element array: for ($i=1;$i<=$articlecount;++$i){ echo "".$articles[$i][1].": ".$articles[$i][2]."
"; } I was also trying to do it with while-list-each but this doesn't work: while (list($key,$value)=each($articles)){ while (list($key2,$url,$date,$title)=each($value)){ echo "".$date.": ".$title."
"; } } At this point I think the for-loop is best but for the sake of general knowledge, how do I do it the other way? TIA. 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 jadair at adairservices.net Fri Jul 25 16:22:54 2003 From: jadair at adairservices.net (John Adair) Date: Fri, 25 Jul 2003 16:22:54 -0400 Subject: [nycphp-talk] PHP Editor In-Reply-To: <000001c352a0$b34c8f90$6f00a8c0@osiris> Message-ID: I had major install problems with ZDE on Windows. In short, I don't use it. I've decided that I need to find another computer to code on (preferably a Linux system.) And I'm not a Linux guy. I'm a Win guy. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Matteo Rinaudo Sent: Friday, July 25, 2003 7:34 AM To: 'NYPHP Talk' Subject: R: [nycphp-talk] PHP Editor I use quanta plus on linux, EditPlus on Windows. I think EditPlus is ok. -----Messaggio originale----- Da: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] Per conto di Mark Withington Inviato: venerd? 25 luglio 2003 4.01 A: 'NYPHP Talk' Oggetto: RE: [nycphp-talk] PHP Editor Ditto. The ZDE (w/debugger) is worth the money. -------------------------- 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 Anthony Tanzola Sent: Thursday, July 24, 2003 10:03 PM To: NYPHP Talk Subject: RE: [nycphp-talk] PHP Editor I love Zend! >-----Original Message----- >From: talk-bounces at lists.nyphp.org >[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere >Sent: Thursday, July 24, 2003 3:21 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] PHP Editor > > > > >Carlos G. Chiossone wrote: >> Man this is hard; I guess I'll keep this buggy phpEdit after >all. Not 2 of you used the same :) > >Editor: UltraEdit >PHP IDE/Debugger: Zend > >I also use UltraEdit for almost every task except reading/sending >mail (but I do edit mail in it :) > >H > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From willie at pdfsystems.com Fri Jul 25 16:42:37 2003 From: willie at pdfsystems.com (Willliam Klein) Date: Fri, 25 Jul 2003 16:42:37 -0400 Subject: [nycphp-talk] mime mail In-Reply-To: <23AA728CBA918941834ADDDFAD7FA85C0EC73A@sag.pdfsystems.com> Message-ID: <23AA728CBA918941834ADDDFAD7FA85C0E72A9@sag.pdfsystems.com> HI All; In case anyones wondering I never could get PEARs mime mail to work right. As I said people on the php.pear.general list don't have an answer either. But the htmlMimeMail class at phpguru.org works first time no muss no fuss. :) willie -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Willliam Klein Sent: Thursday, July 24, 2003 4:54 PM To: 'NYPHP Talk' Subject: [spam] [nycphp-talk] mime mail Hi All; I'm trying to use mime-mail from PEAR and I not succeeding. I get my mail but it all arrives as plain text. I've tried attaching a file and sending it in the body of the email. BTW I've looked at the php.pear.general newsgroup and the same problem is over there with no solution. the code: setTXTBody($text); $file = '/home/httpd/html/image/temp/'.$orderNumber . '.htm'; echo "file is $file"; $mime->addAttachment($file,'text/html'); $html = $blah; $mime->setHTMLBody($blah); $headers = $mime->headers($headers); $param["html_encoding"]="7bit"; $body = $mime->get($param); $message =& Mail::factory('mail'); $message->send($to, $headers, $body); Mail_mime::send(); ?> and I get plain text html and what looks like an encoded file as text in the body of the email. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jlacey at ix.netcom.com Fri Jul 25 16:51:45 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Fri, 25 Jul 2003 14:51:45 -0600 Subject: [nycphp-talk] apache 2.0.x and prefork Message-ID: <3F219861.2070006@ix.netcom.com> Hi Am looking for input on whether you folks think running apache 2.0.x with the prefork mpm is safe with regard to PHP I realize that if I run 1.3.x I'll be golden, but am curious if anyone's had problems with 2.0 in 'prefork mode' tia John From jsiegel1 at optonline.net Fri Jul 25 17:03:30 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 25 Jul 2003 17:03:30 -0400 Subject: [nycphp-talk] PHP Editor In-Reply-To: Message-ID: <00b901c352f0$34b4d200$6501a8c0@EZDSDELL> I must have done something wrong. ;) Loaded ZDE in WinXP and it works fine. (But your experience is not unusual...I've heard of others having problems loading it on Windoze.) Jeff -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of John Adair Sent: Friday, July 25, 2003 3:23 PM To: NYPHP Talk Subject: RE: [nycphp-talk] PHP Editor I had major install problems with ZDE on Windows. In short, I don't use it. I've decided that I need to find another computer to code on (preferably a Linux system.) And I'm not a Linux guy. I'm a Win guy. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Matteo Rinaudo Sent: Friday, July 25, 2003 7:34 AM To: 'NYPHP Talk' Subject: R: [nycphp-talk] PHP Editor I use quanta plus on linux, EditPlus on Windows. I think EditPlus is ok. -----Messaggio originale----- Da: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] Per conto di Mark Withington Inviato: venerd? 25 luglio 2003 4.01 A: 'NYPHP Talk' Oggetto: RE: [nycphp-talk] PHP Editor Ditto. The ZDE (w/debugger) is worth the money. -------------------------- 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 Anthony Tanzola Sent: Thursday, July 24, 2003 10:03 PM To: NYPHP Talk Subject: RE: [nycphp-talk] PHP Editor I love Zend! >-----Original Message----- >From: talk-bounces at lists.nyphp.org >[mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere >Sent: Thursday, July 24, 2003 3:21 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] PHP Editor > > > > >Carlos G. Chiossone wrote: >> Man this is hard; I guess I'll keep this buggy phpEdit after >all. Not 2 of you used the same :) > >Editor: UltraEdit >PHP IDE/Debugger: Zend > >I also use UltraEdit for almost every task except reading/sending >mail (but I do edit mail in it :) > >H > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk _______________________________________________ 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 melissa at inexact.info Fri Jul 25 18:22:21 2003 From: melissa at inexact.info (Melissa Pott) Date: Fri, 25 Jul 2003 18:22:21 -0400 Subject: [nycphp-talk] PHP Editor In-Reply-To: <00b901c352f0$34b4d200$6501a8c0@EZDSDELL> References: <00b901c352f0$34b4d200$6501a8c0@EZDSDELL> Message-ID: <1059172093.25EFB6A3@w5.dngr.org> I had no problem loading Zend trial version in win xp, and I love it, but it crashes hard every time I exit. Guess it could be worse. On Fri, 25 Jul 2003 5:49PM -0500, Jeff wrote: > I must have done something wrong. ;) > Loaded ZDE in WinXP and it works fine. (But your experience is not > unusual...I've heard of others having problems loading it on Windoze.) > > Jeff > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of John Adair > Sent: Friday, July 25, 2003 3:23 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] PHP Editor > > > I had major install problems with ZDE on Windows. In short, I don't > use > it. > I've decided that I need to find another computer to code on > (preferably > a > Linux system.) And I'm not a Linux guy. I'm a Win guy. > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Matteo Rinaudo > Sent: Friday, July 25, 2003 7:34 AM > To: 'NYPHP Talk' > Subject: R: [nycphp-talk] PHP Editor > > > I use quanta plus on linux, EditPlus on Windows. > I think EditPlus is ok. > > > -----Messaggio originale----- > Da: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > Per > conto di Mark Withington > Inviato: venerd? 25 luglio 2003 4.01 > A: 'NYPHP Talk' > Oggetto: RE: [nycphp-talk] PHP Editor > > Ditto. The ZDE (w/debugger) is worth the money. > > -------------------------- > 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 Anthony Tanzola > Sent: Thursday, July 24, 2003 10:03 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] PHP Editor > > > I love Zend! > >> -----Original Message----- >> From: talk-bounces at lists.nyphp.org >> [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere >> Sent: Thursday, July 24, 2003 3:21 PM >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] PHP Editor >> >> >> >> >> Carlos G. Chiossone wrote: >>> Man this is hard; I guess I'll keep this buggy phpEdit after >> all. Not 2 of you used the same :) >> >> Editor: UltraEdit >> PHP IDE/Debugger: Zend >> >> I also use UltraEdit for almost every task except reading/sending >> mail (but I do edit mail in it :) >> >> H >> >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk >> >> > _______________________________________________ > talk mailing list > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ > 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 --melissa From hans at nyphp.org Fri Jul 25 19:25:56 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 25 Jul 2003 19:25:56 -0400 Subject: [nycphp-talk] walking through a multi-dimensional array In-Reply-To: <5.1.0.14.2.20030725161510.00b21898@mail.optonline.net> References: <5.1.0.14.2.20030725161510.00b21898@mail.optonline.net> Message-ID: <3F21BC84.9050301@nyphp.org> Michael Southwell wrote: > The following code successfully walks through a 3-element array: > > for ($i=1;$i<=$articlecount;++$i){ > echo " value=\"".$articles[$i][0]."\" />".$articles[$i][1].": > ".$articles[$i][2]."
"; > } As a [possibly] help tip, numerically indexed arrays always start at 0, so $i should be initialized to 0 above > I was also trying to do it with while-list-each but this doesn't work: > while (list($key,$value)=each($articles)){ > while (list($key2,$url,$date,$title)=each($value)){ > echo " />".$date.": ".$title."
"; > } > } The problem is each() only can return two variables; $key2 (the key) and, potentially, $value2 (an array, containing $url, $date, etc). The nested while() loops and the for() loop above do differant things. > At this point I think the for-loop is best but for the sake of general > knowledge, how do I do it the other way? TIA. I would highly recommend not using the series of while loops, even if done properly; foreach() could easily do what the while() loops do, albeit still differant from what the for() loop does. foreach( $articles as $key => $value ) { foreach( $value as $key2 => $value2 ) { echo "
$key2 => $value2"; } } H From hans at nyphp.org Fri Jul 25 19:29:41 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 25 Jul 2003 19:29:41 -0400 Subject: [nycphp-talk] apache 2.0.x and prefork In-Reply-To: <3F219861.2070006@ix.netcom.com> References: <3F219861.2070006@ix.netcom.com> Message-ID: <3F21BD65.1080504@nyphp.org> John Lacey wrote: > Hi > > Am looking for input on whether you folks think running apache 2.0.x > with the prefork mpm is safe with regard to PHP Safe... on Linux yes; FreeBSD, no. Production quality on either; no :) > I realize that if I run 1.3.x I'll be golden, but am curious if anyone's > had problems with 2.0 in 'prefork mode' Using a server (in near-production) with Apache2 in prefork on RedHat, things carried along well. There were, however, occasionly strange problems, and although I couldn't pin them down exactly, when we went to full-production, we haven't seen these issues at all with Apache 1.3.x. I know that's a weighted response, however, so the problems could have been due to a number of things that changed between the deployments. H From gw.nyphp at gwprogramming.com Fri Jul 25 20:11:17 2003 From: gw.nyphp at gwprogramming.com (George Webb) Date: Fri, 25 Jul 2003 20:11:17 -0400 (EDT) Subject: [nycphp-talk] @include() affects all error_reporting !?!? Message-ID: <200307260011.h6Q0BIRr024942@gw00.com> Good Evening! Having trouble understanding the @ operator, when used with include(), i.e. @include('file.php') . I *thought* that @include would simply suppress the warning generated if the included file is missing. However, what seems to happen is more complicated: @include('file.php') causes error_reporting to get turned completely OFF for the duration of the included file. Then, even worse, when the included file ends, error_reporting is restored to its previous state, from *before* the include was called. To illustrate: /*** start of file.php ***/ error_reporting(0); echo ini_get('error_reporting'); //prints 0 /*** end of file.php ***/ /*** start of script.php ***/ error_reporting(E_ALL); echo ini_get('error_reporting'); //prints 2047 @include('file.php'); // this should set error_reporting // to zero, but it doesn't echo ini_get('error_reporting'); //prints 2047 /*** end of script.php ***/ If you remove the leading '@' from '@include', the desired behavior occurs, which is that changes to error_reporting in the included file will take effect in the calling script. I have seen this behavior in PHP versions 4.0.8 through 4.3.2. Does anyone agree that this is a bug? In any case, how can we elegantly work-around it? I need to be able to control error reporting from the included file, which may or may not exist. Thanks! Best, George. George Webb gw.nyphp at gwprogramming.com From jsiegel1 at optonline.net Fri Jul 25 20:39:08 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 25 Jul 2003 20:39:08 -0400 Subject: [nycphp-talk] PHP Editor In-Reply-To: <1059172093.25EFB6A3@w5.dngr.org> Message-ID: <001801c3530e$55c09d80$6501a8c0@EZDSDELL> Don't think it could get worse. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Melissa Pott Sent: Friday, July 25, 2003 5:22 PM To: NYPHP Talk Subject: RE: [nycphp-talk] PHP Editor I had no problem loading Zend trial version in win xp, and I love it, but it crashes hard every time I exit. Guess it could be worse. On Fri, 25 Jul 2003 5:49PM -0500, Jeff wrote: > I must have done something wrong. ;) > Loaded ZDE in WinXP and it works fine. (But your experience is not > unusual...I've heard of others having problems loading it on Windoze.) > > Jeff > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] > On Behalf Of John Adair > Sent: Friday, July 25, 2003 3:23 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] PHP Editor > > > I had major install problems with ZDE on Windows. In short, I don't > use > it. > I've decided that I need to find another computer to code on > (preferably > a > Linux system.) And I'm not a Linux guy. I'm a Win guy. > > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Matteo Rinaudo > Sent: Friday, July 25, 2003 7:34 AM > To: 'NYPHP Talk' > Subject: R: [nycphp-talk] PHP Editor > > > I use quanta plus on linux, EditPlus on Windows. > I think EditPlus is ok. > > > -----Messaggio originale----- > Da: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] > Per > conto di Mark Withington > Inviato: venerd? 25 luglio 2003 4.01 > A: 'NYPHP Talk' > Oggetto: RE: [nycphp-talk] PHP Editor > > Ditto. The ZDE (w/debugger) is worth the money. > > -------------------------- > 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 Anthony Tanzola > Sent: Thursday, July 24, 2003 10:03 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] PHP Editor > > > I love Zend! > >> -----Original Message----- >> From: talk-bounces at lists.nyphp.org >> [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere >> Sent: Thursday, July 24, 2003 3:21 PM >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] PHP Editor >> >> >> >> >> Carlos G. Chiossone wrote: >>> Man this is hard; I guess I'll keep this buggy phpEdit after >> all. Not 2 of you used the same :) >> >> Editor: UltraEdit >> PHP IDE/Debugger: Zend >> >> I also use UltraEdit for almost every task except reading/sending >> mail (but I do edit mail in it :) >> >> H >> >> _______________________________________________ >> talk mailing list >> talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk >> >> > _______________________________________________ > talk mailing list > talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > _______________________________________________ > 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 --melissa _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Fri Jul 25 20:46:15 2003 From: shiflett at php.net (Chris Shiflett) Date: Fri, 25 Jul 2003 17:46:15 -0700 (PDT) Subject: [nycphp-talk] PHP Editor In-Reply-To: <001801c3530e$55c09d80$6501a8c0@EZDSDELL> Message-ID: <20030726004615.17703.qmail@web14311.mail.yahoo.com> --- Jeff wrote: > Don't think it could get worse. It could crash every time it starts. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From jsiegel1 at optonline.net Fri Jul 25 22:00:09 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 25 Jul 2003 22:00:09 -0400 Subject: [nycphp-talk] PHP Editor In-Reply-To: <20030726004615.17703.qmail@web14311.mail.yahoo.com> Message-ID: <002301c35319$a5006460$6501a8c0@EZDSDELL> You got me again. ;) -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Chris Shiflett Sent: Friday, July 25, 2003 7:46 PM To: NYPHP Talk; 'Melissa' Subject: RE: [nycphp-talk] PHP Editor --- Jeff wrote: > Don't think it could get worse. It could crash every time it starts. :-) Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From fields at surgam.net Fri Jul 25 22:46:05 2003 From: fields at surgam.net (Adam Fields) Date: Fri, 25 Jul 2003 22:46:05 -0400 Subject: [nycphp-talk] @include() affects all error_reporting !?!? In-Reply-To: <200307260011.h6Q0BIRr024942@gw00.com> References: <200307260011.h6Q0BIRr024942@gw00.com> Message-ID: <20030726024604.GA28203@eye.surgam.net> On Fri, Jul 25, 2003 at 08:11:17PM -0400, George Webb wrote: [...] > I have seen this behavior in PHP versions 4.0.8 through > 4.3.2. Does anyone agree that this is a bug? In any case, > how can we elegantly work-around it? I need to be able to control > error reporting from the included file, which may or may not exist. Bad Bad Bad! Please don't use the @ operator. An error means that >SOMETHING IS WRONG<, and you shouldn't just throw that information away. Test for the existence of the file and only include it if it exists. In PHP5, use exception handling. I recently installed GForge, and they use @ all over the place, particular in front of the database connection code. So if your database isn't working, you just get a blank html page. No errors, no error log, just... nothing. It's terribly irritating, and particularly bad coding form. Errors are your friend! -- - Adam ----- Adam Fields, Managing Partner, fields at surgam.net Surgam, Inc. is a technology consulting firm with strong background in delivering scalable and robust enterprise web and IT applications. http://www.adamfields.com From ruryj at vuser.vu.union.edu Fri Jul 25 22:50:17 2003 From: ruryj at vuser.vu.union.edu (Jonathan Rury) Date: Fri, 25 Jul 2003 22:50:17 -0400 Subject: [nycphp-talk] @include() affects all error_reporting !?!? References: <200307260011.h6Q0BIRr024942@gw00.com> <20030726024604.GA28203@eye.surgam.net> Message-ID: <001001c35320$a5d73830$ea35c318@xeno> Errors are your friend but there are often better ways to handle errors than just allowing PHP to dump its error message to the end-user, which often is confusing to the person unfamiliar with PHP. For instance, opening a database connection like this: @ $db = mysql_connect($HOST, $MYSQL_USER_NAME, $MYSQL_USER_PASSWORD); if (!$db) // error connecting to database { // inform user and provide solutions echo "Error: Could not connect to database. Please try again later. or contact help at blah.com;"; exit; } is much better than just saying $db = mysql_connect($HOST, $MYSQL_USER_NAME, $MYSQL_USER_PASSWORD); which will continue executing the script, and waste cycles, while dumping a much less meaningful error message. Good coding practice is not to ignore malformed input or errors BUT better coding is to respond intelligently to errors, rather than just dumping error messages. > I recently installed GForge, and they use @ all over the place, > particular in front of the database connection code. So if your > database isn't working, you just get a blank html page. No errors, no > error log, just... nothing. It's terribly irritating, and particularly > bad coding form. > > Errors are your friend! > > -- > - Adam > > ----- > Adam Fields, Managing Partner, fields at surgam.net > Surgam, Inc. is a technology consulting firm with strong background in > delivering scalable and robust enterprise web and IT applications. > http://www.adamfields.com > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From nyphp at websapp.com Fri Jul 25 23:07:34 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Fri, 25 Jul 2003 23:07:34 -0400 Subject: [nycphp-talk] @include() affects all error_reporting !?!? In-Reply-To: <001001c35320$a5d73830$ea35c318@xeno> Message-ID: I agree with Adam that errors are your friend and you should see all PHP generated errors. This, as Jonathan pointed out, is not suffice and you need to program some error handling on your own because your production server should NEVER display PHP generated errors. Best, Daniel Kushner > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Jonathan Rury > Sent: Friday, July 25, 2003 10:50 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] @include() affects all error_reporting !?!? > > > Errors are your friend but there are often better ways to handle > errors than > just allowing PHP to dump its error message to the end-user, > which often is > confusing to the person unfamiliar with PHP. > > For instance, opening a database connection like this: > @ $db = mysql_connect($HOST, $MYSQL_USER_NAME, $MYSQL_USER_PASSWORD); > if (!$db) // error connecting to database > { // inform user and provide solutions > echo "Error: Could not connect to database. Please try > again later. > or contact help at blah.com;"; > exit; > } > is much better than just saying > $db = mysql_connect($HOST, $MYSQL_USER_NAME, $MYSQL_USER_PASSWORD); > which will continue executing the script, and waste cycles, while > dumping a > much less meaningful error message. > > Good coding practice is not to ignore malformed input or errors BUT better > coding is to respond intelligently to errors, rather than just > dumping error > messages. > > > > I recently installed GForge, and they use @ all over the place, > > particular in front of the database connection code. So if your > > database isn't working, you just get a blank html page. No errors, no > > error log, just... nothing. It's terribly irritating, and particularly > > bad coding form. > > > > Errors are your friend! > > > > -- > > - Adam > > > > ----- > > Adam Fields, Managing Partner, fields at surgam.net > > Surgam, Inc. is a technology consulting firm with strong background in > > delivering scalable and robust enterprise web and IT applications. > > http://www.adamfields.com > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From fields at surgam.net Sat Jul 26 09:01:18 2003 From: fields at surgam.net (Adam Fields) Date: Sat, 26 Jul 2003 09:01:18 -0400 Subject: [nycphp-talk] @include() affects all error_reporting !?!? In-Reply-To: <001001c35320$a5d73830$ea35c318@xeno> References: <200307260011.h6Q0BIRr024942@gw00.com> <20030726024604.GA28203@eye.surgam.net> <001001c35320$a5d73830$ea35c318@xeno> Message-ID: <20030726130118.GE28203@eye.surgam.net> On Fri, Jul 25, 2003 at 10:50:17PM -0400, Jonathan Rury wrote: > Errors are your friend but there are often better ways to handle errors than > just allowing PHP to dump its error message to the end-user, which often is > confusing to the person unfamiliar with PHP. > > For instance, opening a database connection like this: > @ $db = mysql_connect($HOST, $MYSQL_USER_NAME, $MYSQL_USER_PASSWORD); > if (!$db) // error connecting to database > { // inform user and provide solutions > echo "Error: Could not connect to database. Please try again later. > or contact help at blah.com;"; > exit; > } > is much better than just saying > $db = mysql_connect($HOST, $MYSQL_USER_NAME, $MYSQL_USER_PASSWORD); > which will continue executing the script, and waste cycles, while dumping a > much less meaningful error message. This is not always true. In this particular case, the error was "invalid function: pg_pconnect" (I installed php from rpm, and hadn't realized that there was a separate rpm for the php-pgsql connector even though the rpm included the --with-pgsql flag). This is a fatal error, so the page stopped execution immediately at that line. The additional error-reporting code included after that (if there is any; in GForge, there isn't) never gets called. I'm reasonably familiar with PHP, and this was confusing to me. > Good coding practice is not to ignore malformed input or errors BUT better > coding is to respond intelligently to errors, rather than just dumping error > messages. Agreed, but general suppression of all error reporting is bad. PHP has a granular (but granted, not perfect) error reporting system: http://www.php.net/manual/en/function.error-reporting.php Also, PHP5 is moving towards exception handling, and it seems like a good time to bring up the distinction between exceptions and errors. Exceptions are not the same as errors. Exceptions are predictable boundary conditions that should be handled (file does not exist, database is unavailable, etc...) and recovered from if possible. Errors are typically unforeseen problems and should always be presented to the user, albeit in as friendly a way as possible. Typically, the right thing to do with an error is to apologize to the user and send a detailed error log to someone who can look at it and diagnose the problem. -- - Adam ----- Adam Fields, Managing Partner, fields at surgam.net Surgam, Inc. is a technology consulting firm with strong background in delivering scalable and robust enterprise web and IT applications. http://www.adamfields.com From fields at surgam.net Sat Jul 26 09:08:53 2003 From: fields at surgam.net (Adam Fields) Date: Sat, 26 Jul 2003 09:08:53 -0400 Subject: [nycphp-talk] @include() affects all error_reporting !?!? In-Reply-To: References: <001001c35320$a5d73830$ea35c318@xeno> Message-ID: <20030726130853.GF28203@eye.surgam.net> On Fri, Jul 25, 2003 at 11:07:34PM -0400, Daniel Kushner wrote: > I agree with Adam that errors are your friend and you should see all PHP > generated errors. This, as Jonathan pointed out, is not suffice and you need > to program some error handling on your own because your production server > should NEVER display PHP generated errors. On production servers, you should use set_error_handler to customize error messages. http://www.php.net/manual/en/function.set-error-handler.php Again, not completely perfect, but the right approach is to fix the underlying infrastructure instead of trick-coding around it. If you absolutely HAVE to have it a certain way, do it, but don't suffer from illusions that you're making things better by doing so. -- - Adam ----- Adam Fields, Managing Partner, fields at surgam.net Surgam, Inc. is a technology consulting firm with strong background in delivering scalable and robust enterprise web and IT applications. http://www.adamfields.com From gw.nyphp at gwprogramming.com Sat Jul 26 10:45:47 2003 From: gw.nyphp at gwprogramming.com (George Webb) Date: Sat, 26 Jul 2003 10:45:47 -0400 (EDT) Subject: [nycphp-talk] @include() affects all error_reporting !?!? Message-ID: <200307261445.h6QEjm7u030128@gw00.com> Good morning all. Sorry I crashed last night before this thread got under way. Anyway my problem remains with the behavior of the @ operator for the include() statement. The reason I am using the @ operator for include() is so that I can display my own error message, rather than the PHP's error message, if the file is unreadable. Also, the code needs to work in two different environments -- development and production. In development, I want the include()'d file to turn ON error_reporting, while in production, I want it to turn error_reporting OFF. The include()'d file is the "config" file, so that is the natural place to put the error_reporting switch. Unfortunately, I can't seem to call this config file with @include() and have the error_reporting change stick. So what I could do is to manually turn off error_reporting just before the include() call ... or else just deal with having PHP's ugly error message before my nice error message whenever the config file is missing. -OR- I could simply define another config parameter and manually set error_reporting to that. I actually have done the latter; here is the code: if ( ! @include ( 'StoreConfig.php' ) ) die ( 'Error: Store not configured (no StoreConfig.php file)' ); error_reporting ( ERROR_REPORTING ); //hack for error_reporting not working in @include'd file Of course I would have rather simply called error_reporting() directly in StoreConfig.php; then we wouldn't have needed this extra ERROR_REPORTING constant. Any further suggestions? Should I report this to bugs.php.net? Does anyone think the @include/error_reporting behavior is NOT a bug? Thanks again for your suggestions and good ideas about error reporting in general. Best, George. George Webb gw.nyphp at gwprogramming.com From jonbaer at jonbaer.net Sat Jul 26 13:53:18 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Sat, 26 Jul 2003 10:53:18 -0700 Subject: [nycphp-talk] Re: sorting multi-dimesional arrays ... Message-ID: <001401c3539e$cc2809a0$6500a8c0@THINKPAD> ok ... just as a follow up to my own question as i figured out how to do it with hardly no PHP. echo "select ssid, count(*) as points from aps group by ssid order by points desc \G" | mysql warbike > ssid_report.txt - jon (feeling dumb) pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: "Jon Baer" To: Sent: Monday, July 21, 2003 5:48 PM Subject: sorting multi-dimesional arrays ... > ok, not the greatest code in the world but it did what i needed :-) ... > > basically i have around 3500+ access points logged and wanted to do some > stats, but could not think of a better way to sort via a 2d array on the 2nd > element, im just looking to shorten up the code (by just using an array > method of some kind - array_multisort?)... > > example output: > > Indexing 3388 access points ... > SSID: "linksys" : 620 (18.30%) > SSID: "default" : 192 (5.67%) > SSID: "Wireless" : 167 (4.93%) > SSID: "wireless" : 58 (1.71%) > SSID: "WLAN" : 44 (1.30%) > SSID: "Verizon Wi-Fi" : 43 (1.27%) > > - jon > > > $con = mysql_connect("localhost","ap_user","ap_pass"); > mysql_select_db("ap_db"); > > $sql = "select * from aps"; > $result = mysql_query($sql); > > $total_ap = mysql_num_rows($result); > > echo ("Indexing " . $total_ap . " access points ...\n\n"); > > > //////////////////////////////////////////////////////////////////////////// > ////////////// > > $ssidArray = array(); > $ssidNameArray = array(); > > while($row = mysql_fetch_assoc($result)) { > > // ssid stats > $ssid_name = $row['ssid']; > $ssidNameArray[] = $ssid_name; > if (array_key_exists($ssid_name, $ssidArray)) { > $ssidArray[$ssid_name]['count'] = $ssidArray[$ssid_name]['count'] + 1; > } else { > $ssidArray[$ssid_name]['count'] = 1; > } > > } > > $ssidUnique = array_unique($ssidNameArray); > sort($ssidUnique); > > for ($x = 0; $x < count($ssidUnique); $x++) { > if ($ssidUnique[$x] == "") next; > $countArray[$x] = array($ssidUnique[$x], > $ssidArray[$ssidUnique[$x]]['count']); > } > > array_multisort($countArray[1]); > > mysql_query("delete from ssid_count"); > > foreach($countArray as $ap) { > $insert = "insert into ssid_count values ('".$ap[0]."',".$ap[1].")"; > mysql_query($insert); > // echo $ap[0].$ap[1]."\n"; > } > > $query = "select * from ssid_count order by count desc limit 25"; > $result = mysql_query($query); > while ($row = mysql_fetch_assoc($result)) { > $percent = sprintf("%01.2f", $row['count']/$total_ap * 100); > echo "SSID: \"". $row['name'] . "\" : " . $row['count']." > (".$percent."%)\n"; > } > > mysql_close($con); > > ?> > > pgp key: http://www.jonbaer.net/jonbaer.asc > fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 > > From fields at surgam.net Sat Jul 26 11:23:25 2003 From: fields at surgam.net (Adam Fields) Date: Sat, 26 Jul 2003 11:23:25 -0400 Subject: [nycphp-talk] @include() affects all error_reporting !?!? In-Reply-To: <200307261445.h6QEjm7u030128@gw00.com> References: <200307261445.h6QEjm7u030128@gw00.com> Message-ID: <20030726152325.GH28203@eye.surgam.net> On Sat, Jul 26, 2003 at 10:45:47AM -0400, George Webb wrote: > Anyway my problem remains with the behavior of > the @ operator for the include() statement. The reason I > am using the @ operator for include() is so that I can display > my own error message, rather than the PHP's error message, > if the file is unreadable. As pointed out in the docs about error reporting, this behavior is known, and the "right" way to approach this is to test for the existence of the file and only include it if it exists: if (is_file("nosuchfile.php")) { include_once("nosuchfile.php"); } > Also, the code needs to work in two different > environments -- development and production. In development, > I want the include()'d file to turn ON error_reporting, > while in production, I want it to turn error_reporting OFF. > The include()'d file is the "config" file, so that is the > natural place to put the error_reporting switch. This is a slightly separate problem, which you should probably address by using a custom error handler, then switching on hostname (or even better, setting a flag based on hostname, then switching on the flag) to tell if you should be generating production or development messages. -- - Adam ----- Adam Fields, Managing Partner, fields at surgam.net Surgam, Inc. is a technology consulting firm with strong background in delivering scalable and robust enterprise web and IT applications. http://www.adamfields.com From jlacey at ix.netcom.com Sun Jul 27 23:38:09 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Sun, 27 Jul 2003 21:38:09 -0600 Subject: [nycphp-talk] apache 2.0.x and prefork In-Reply-To: <3F21BD65.1080504@nyphp.org> References: <3F219861.2070006@ix.netcom.com> <3F21BD65.1080504@nyphp.org> Message-ID: <3F249AA1.9050108@ix.netcom.com> thanks Hans.. that helps btw... I've been quite busy on a php training project and had to put *everything* on the back burner seems you've got the cutover to the new server and lots of other stuff humming along nicely... best, John > > > John Lacey wrote: > >> Hi >> >> Am looking for input on whether you folks think running apache 2.0.x >> with the prefork mpm is safe with regard to PHP > > > Safe... on Linux yes; FreeBSD, no. Production quality on either; no :) > >> I realize that if I run 1.3.x I'll be golden, but am curious if >> anyone's had problems with 2.0 in 'prefork mode' > > > Using a server (in near-production) with Apache2 in prefork on RedHat, > things carried along well. There were, however, occasionly strange > problems, and although I couldn't pin them down exactly, when we went > to full-production, we haven't seen these issues at all with Apache > 1.3.x. I know that's a weighted response, however, so the problems > could have been due to a number of things that changed between the > deployments. > > > H > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From hans at nyphp.org Mon Jul 28 09:14:46 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 28 Jul 2003 09:14:46 -0400 Subject: [nycphp-talk] FreeBSD resource (mailing list search) Message-ID: <3F2521C6.6010803@nyphp.org> Good morning, I realize this isn't a FreeBSD list (although probably close at times :) but this is a great new resource; for anything *nix really: http://freebsd.rambler.ru/ Best, H From hans at nyphp.org Mon Jul 28 09:18:52 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 28 Jul 2003 09:18:52 -0400 Subject: [nycphp-talk] apache 2.0.x and prefork In-Reply-To: <3F249AA1.9050108@ix.netcom.com> References: <3F219861.2070006@ix.netcom.com> <3F21BD65.1080504@nyphp.org> <3F249AA1.9050108@ix.netcom.com> Message-ID: <3F2522BC.9040609@nyphp.org> Hey John, John Lacey wrote: > thanks Hans.. that helps > btw... I've been quite busy on a php training project and had to put > *everything* on the back burner Great; the more education about PHP, the better. > seems you've got the cutover to the new server and lots of other stuff > humming along nicely... Yes, it's on it's way, certainly. I put a CVS server online over the weekend (http://cvs.nyphp.org) which should be nice to have, too. H From hans at nyphp.org Mon Jul 28 10:16:12 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 28 Jul 2003 10:16:12 -0400 Subject: [nycphp-talk] Food for thought: Zend Survey Results Available Message-ID: <3F25302C.9020806@nyphp.org> http://www.zend.com/zend/php_survey_results.php From dmintz at panix.com Mon Jul 28 12:21:35 2003 From: dmintz at panix.com (David Mintz) Date: Mon, 28 Jul 2003 12:21:35 -0400 (EDT) Subject: [nycphp-talk] PHP Editor In-Reply-To: <002301c35319$a5006460$6501a8c0@EZDSDELL> References: <002301c35319$a5006460$6501a8c0@EZDSDELL> Message-ID: Can't resist putting my belated $.02 into this religious thread. On Windoze I've long used Homesite, but there's a tendency to stay with the first reasonable tool you learn to use. Maybe something else is better. But anything with a tough learning curve is a buzzkiller when you're busy. That's what's slowing me down with adopting vim on Linux. A good GUI is great but it's nice to be handy with a nonGUI editor for when you SSH into a machine where you don't have the luxury of X. So I keep trying. Meanwhile I've been playing with eclipse on both platforms -- yes it has a learning curve too, but it's got a lot of cool stuff going for it, and it's free. http://eclipse.org --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! Decibels of sound pressure employed by a new "thermoacoustic" refrigerator: 190 Decibels of sounds pressure sufficient to ignite a person's hair: 165 -- Harper's Index, February 2003 From jlacey at ix.netcom.com Mon Jul 28 13:09:30 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Mon, 28 Jul 2003 11:09:30 -0600 Subject: [nycphp-talk] PHP Editor In-Reply-To: References: <002301c35319$a5006460$6501a8c0@EZDSDELL> Message-ID: <3F2558CA.1070105@ix.netcom.com> ok, another 2 cents from me again (I'm working up to a nickel) -- in addition to Arachnophilia (cross platform), I've used Bluefish and Quanta which are both "homesitish" as I'm sure you've heard. So far as vi/vim is concerned, I use a really short 'subset' of functions when working remotely via ssh (I use putty on windows). I'm not keen on developing with vi/vim (although I use vim for windows for quick file reading and occasional editing). Of course, the "esc" key to get back into command mode and the "i" key to get into insert mode -- ":wq" to write and exit, ":q!" to exit without writing when I've made a changes I want to ignore, and every once in a while "/" for searching. That's it -- otherwise it's all GUI. John David Mintz wrote: >Can't resist putting my belated $.02 into this religious thread. > >On Windoze I've long used Homesite, but there's a tendency to stay with >the first reasonable tool you learn to use. Maybe something else is >better. But anything with a tough learning curve is a buzzkiller when >you're busy. That's what's slowing me down with adopting vim on Linux. A >good GUI is great but it's nice to be handy with a nonGUI editor for when >you SSH into a machine where you don't have the luxury of X. So I keep >trying. > >Meanwhile I've been playing with eclipse on both platforms -- yes it has a >learning curve too, but it's got a lot of cool stuff going for it, and >it's free. http://eclipse.org > >--- >David Mintz >http://davidmintz.org/ >Email: See http://dmintzweb.com/whitelist.php first! > >Decibels of sound pressure employed by a new "thermoacoustic" refrigerator: 190 >Decibels of sounds pressure sufficient to ignite a person's hair: 165 > > -- Harper's Index, February 2003 >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > > From dmintz at panix.com Mon Jul 28 14:27:18 2003 From: dmintz at panix.com (David Mintz) Date: Mon, 28 Jul 2003 14:27:18 -0400 (EDT) Subject: [nycphp-talk] PHP Editor In-Reply-To: <3F2558CA.1070105@ix.netcom.com> References: <002301c35319$a5006460$6501a8c0@EZDSDELL> <3F2558CA.1070105@ix.netcom.com> Message-ID: On Mon, 28 Jul 2003, John Lacey wrote: > > ok, another 2 cents from me again (I'm working up to a nickel) -- in > addition to Arachnophilia (cross platform), I've used Bluefish and > Quanta which are both "homesitish" as I'm sure you've heard. I've tried Bluefish and there are things I couldn't figure out and for which I couldn't find any documentation. I hear they need volunteers to write it. Talkabout a Catch 22. One of the things that irked me most was that I couldn't indent a block. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! Decibels of sound pressure employed by a new "thermoacoustic" refrigerator: 190 Decibels of sound pressure sufficient to ignite a person's hair: 165 -- Harper's Index, February 2003 From bpang at bpang.com Mon Jul 28 15:54:47 2003 From: bpang at bpang.com (Brian Pang) Date: Mon, 28 Jul 2003 15:54:47 -0400 Subject: [nycphp-talk] PHP Editor Message-ID: once you get accustomed to using visual blocks you'll realize that you don't need anything but vim for editing. then there's the whole issue of not having to ftp files back and forth with the server and getting confused on versioning. that's my 2 cents... that's 6 more cents than vim costs, btw :) > > ok, another 2 cents from me again (I'm working up to a nickel) -- in > addition to Arachnophilia (cross platform), I've used Bluefish and > Quanta which are both "homesitish" as I'm sure you've heard. > > So far as vi/vim is concerned, I use a really short 'subset' of > functions when working remotely via ssh (I use putty on windows). I'm > not keen on developing with vi/vim (although I use vim for windows for > quick file reading and occasional editing). Of course, the "esc" key to > get back into command mode and the "i" key to get into insert mode -- > ":wq" to write and exit, ":q!" to exit without writing when I've made a > changes I want to ignore, and every once in a while "/" for searching. > That's it -- otherwise it's all GUI. > > John > > > David Mintz wrote: > > >Can't resist putting my belated $.02 into this religious thread. > > > >On Windoze I've long used Homesite, but there's a tendency to stay with > >the first reasonable tool you learn to use. Maybe something else is > >better. But anything with a tough learning curve is a buzzkiller when > >you're busy. That's what's slowing me down with adopting vim on Linux. A > >good GUI is great but it's nice to be handy with a nonGUI editor for when > >you SSH into a machine where you don't have the luxury of X. So I keep > >trying. > > > >Meanwhile I've been playing with eclipse on both platforms -- yes it has a > >learning curve too, but it's got a lot of cool stuff going for it, and > >it's free. http://eclipse.org > > > >--- > >David Mintz > >http://davidmintz.org/ > >Email: See http://dmintzweb.com/whitelist.php first! > > > >Decibels of sound pressure employed by a new "thermoacoustic" refrigerator: 190 > >Decibels of sounds pressure sufficient to ignite a person's hair: 165 > > > > -- Harper's Index, February 2003 > >_______________________________________________ > >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 jimbishop.org Mon Jul 28 16:20:30 2003 From: nyphp at jimbishop.org (jim.bishop) Date: Mon, 28 Jul 2003 13:20:30 -0700 (PDT) Subject: [nycphp-talk] PHP Editor In-Reply-To: References: Message-ID: I'm a big fan of emacs in php-mode for PHP development. It lays things out nicely, and I can clean up other programmers inferior spacing preferences in a snap. More importantly, the idea of editing live files with vi/vim makes my stomach flip. I think any talk of using vim should be coupled with talk of production servers vs. development servers, CVS, and rsync. The cost of "not having to FTP files" is far outweighed by sloppy development standards. My 2 cents. jim.bishop > once you get accustomed to using visual blocks you'll realize that you > don't need anything but vim for editing. > > then there's the whole issue of not having to ftp files back and forth > with the server and getting confused on versioning. > > that's my 2 cents... that's 6 more cents than vim costs, btw :) > > > > > > ok, another 2 cents from me again (I'm working up to a nickel) -- in > > addition to Arachnophilia (cross platform), I've used Bluefish and > > Quanta which are both "homesitish" as I'm sure you've heard. > > > > So far as vi/vim is concerned, I use a really short 'subset' of > > functions when working remotely via ssh (I use putty on windows). I'm > > not keen on developing with vi/vim (although I use vim for windows for > > quick file reading and occasional editing). Of course, the "esc" key to > > get back into command mode and the "i" key to get into insert mode -- > > ":wq" to write and exit, ":q!" to exit without writing when I've made a > > changes I want to ignore, and every once in a while "/" for searching. > > That's it -- otherwise it's all GUI. > > > > John > > > > > > David Mintz wrote: > > > > >Can't resist putting my belated $.02 into this religious thread. > > > > > >On Windoze I've long used Homesite, but there's a tendency to stay with > > >the first reasonable tool you learn to use. Maybe something else is > > >better. But anything with a tough learning curve is a buzzkiller when > > >you're busy. That's what's slowing me down with adopting vim on Linux. A > > >good GUI is great but it's nice to be handy with a nonGUI editor for when > > >you SSH into a machine where you don't have the luxury of X. So I keep > > >trying. > > > > > >Meanwhile I've been playing with eclipse on both platforms -- yes it > has a > > >learning curve too, but it's got a lot of cool stuff going for it, and > > >it's free. http://eclipse.org > > > > > >--- > > >David Mintz > > >http://davidmintz.org/ > > >Email: See http://dmintzweb.com/whitelist.php first! > > > > > >Decibels of sound pressure employed by a new "thermoacoustic" > refrigerator: 190 > > >Decibels of sounds pressure sufficient to ignite a person's hair: 165 > > > > > > -- Harper's Index, February 2003 From csnyder at chxo.com Mon Jul 28 16:25:24 2003 From: csnyder at chxo.com (Chris Snyder) Date: Mon, 28 Jul 2003 16:25:24 -0400 Subject: [nycphp-talk] Apache doesn't like my c-client (php --with-imap) Message-ID: <3F2586B4.2090502@chxo.com> Someone jog my brain, please! On configuring Apache with mod_ssl, and php --with-imap --with-imap-ssl, I get the errors appended below.. Relevent details: - FreeBSD 4.8 with imap-uw installed from ports. - The c-client includes are all in /usr/local/include/c-client/ - libc-client4.a and libc-client4.so are both in /usr/local/lib What am I missing? ======== Error Output for sanity check ======== cd ..; gcc -funsigned-char -DMOD_SSL=208115 -DEAPI -DEAPI_MM -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci` -I./../../mm-1.3.0 -L/usr/lib -L./../../mm-1.3.0/.libs -o helpers/dummy helpers/dummy.c -R/usr/local/lib -rdynamic -L/usr/local/lib -Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4 -rdynamic -L/usr/local/lib -lcrypt -lc-client4 -lssl -lcrypto -lexpat -lcrypt -lhistory -lreadline -lncurses -lcrypt -lpam -lintl -lfreetype -lpng -lz -lz -lssl -lcrypto -lm -lcrypt -lcrypt -lcrypt -lssl -lcrypto -lmm /usr/local/lib/libc-client4.so: warning: tmpnam() possibly used unsafely; consider using mkstemp() /usr/local/lib/libc-client4.so: undefined reference to `mm_expunged' /usr/local/lib/libc-client4.so: undefined reference to `mm_diskerror' /usr/local/lib/libc-client4.so: undefined reference to `mm_lsub' /usr/local/lib/libc-client4.so: undefined reference to `mm_flags' /usr/local/lib/libc-client4.so: undefined reference to `mm_fatal' /usr/local/lib/libc-client4.so: undefined reference to `mm_nocritical' /usr/local/lib/libc-client4.so: undefined reference to `mm_notify' /usr/local/lib/libc-client4.so: undefined reference to `mm_searched' /usr/local/lib/libc-client4.so: undefined reference to `mm_status' /usr/local/lib/libc-client4.so: undefined reference to `mm_login' /usr/local/lib/libc-client4.so: undefined reference to `mm_list' /usr/local/lib/libc-client4.so: undefined reference to `mm_critical' /usr/local/lib/libc-client4.so: undefined reference to `mm_exists' /usr/local/lib/libc-client4.so: undefined reference to `mm_log' /usr/local/lib/libc-client4.so: undefined reference to `mm_dlog' *** Error code 1 Stop in /usr/local/src/apache_1.3.28/src/helpers. ============= End of Error Report ============= From bpang at bpang.com Mon Jul 28 16:26:58 2003 From: bpang at bpang.com (Brian Pang) Date: Mon, 28 Jul 2003 16:26:58 -0400 Subject: [nycphp-talk] PHP Editor Message-ID: 8 cents and counting :) yes, I was making the broad assumption that multiple environments existed with some form of archiving and the employment of other best practices (although, admittedly, on small sites, standards tend to slip) > > I'm a big fan of emacs in php-mode for PHP development. It lays things > out nicely, and I can clean up other programmers inferior spacing > preferences in a snap. > > More importantly, the idea of editing live files with vi/vim makes my > stomach flip. I think any talk of using vim should be coupled with talk > of production servers vs. development servers, CVS, and rsync. The cost > of "not having to FTP files" is far outweighed by sloppy development > standards. > > My 2 cents. > > jim.bishop > > > > once you get accustomed to using visual blocks you'll realize that you > > don't need anything but vim for editing. > > > > then there's the whole issue of not having to ftp files back and forth > > with the server and getting confused on versioning. > > > > that's my 2 cents... that's 6 more cents than vim costs, btw :) > > > > > > > > > > ok, another 2 cents from me again (I'm working up to a nickel) -- in > > > addition to Arachnophilia (cross platform), I've used Bluefish and > > > Quanta which are both "homesitish" as I'm sure you've heard. > > > > > > So far as vi/vim is concerned, I use a really short 'subset' of > > > functions when working remotely via ssh (I use putty on windows). I'm > > > not keen on developing with vi/vim (although I use vim for windows for > > > quick file reading and occasional editing). Of course, the "esc" key to > > > get back into command mode and the "i" key to get into insert mode -- > > > ":wq" to write and exit, ":q!" to exit without writing when I've made a > > > changes I want to ignore, and every once in a while "/" for searching. > > > That's it -- otherwise it's all GUI. > > > > > > John > > > > > > > > > David Mintz wrote: > > > > > > >Can't resist putting my belated $.02 into this religious thread. > > > > > > > >On Windoze I've long used Homesite, but there's a tendency to stay with > > > >the first reasonable tool you learn to use. Maybe something else is > > > >better. But anything with a tough learning curve is a buzzkiller when > > > >you're busy. That's what's slowing me down with adopting vim on Linux. A > > > >good GUI is great but it's nice to be handy with a nonGUI editor for when > > > >you SSH into a machine where you don't have the luxury of X. So I keep > > > >trying. > > > > > > > >Meanwhile I've been playing with eclipse on both platforms -- yes it > > has a > > > >learning curve too, but it's got a lot of cool stuff going for it, and > > > >it's free. http://eclipse.org > > > > > > > >--- > > > >David Mintz > > > >http://davidmintz.org/ > > > >Email: See http://dmintzweb.com/whitelist.php first! > > > > > > > >Decibels of sound pressure employed by a new "thermoacoustic" > > refrigerator: 190 > > > >Decibels of sounds pressure sufficient to ignite a person's hair: 165 > > > > > > > > -- Harper's Index, February 2003 > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From shiflett at php.net Mon Jul 28 16:44:54 2003 From: shiflett at php.net (Chris Shiflett) Date: Mon, 28 Jul 2003 13:44:54 -0700 (PDT) Subject: [nycphp-talk] PHP Editor In-Reply-To: Message-ID: <20030728204454.1302.qmail@web14306.mail.yahoo.com> --- "jim.bishop" wrote: > More importantly, the idea of editing live files with vi/vim makes > my stomach flip. I think any talk of using vim should be coupled > with talk of production servers vs. development servers, CVS, > and rsync. The cost of "not having to FTP files" is far outweighed > by sloppy development standards. Editing with vim versus editing with something else is a separate topic from whether you edit on the server or have to FTP files to the server. I think you are making some assumptions that may or may not be correct. I have heard many editor "holy war" arguments in my time, but never have I heard using vim likened to "sloppy development standards". :-) To give an example, I could just as easily assume that those who mention having to FTP their files to a remote server are doing so on production servers. I could go on to say that there is a greater chance of overwriting someone else's work when CVS is not mentioned, as there is typically a much larger period of limbo than when editing the files locally on the server (unless you're using something like UltraEdit with remote FTP capabilities, in which case it is equivalent to editing locally on the server). Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From danielc at analysisandsolutions.com Mon Jul 28 20:49:19 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 28 Jul 2003 20:49:19 -0400 Subject: [nycphp-talk] php in SecurityFocus Newsletter #207 Message-ID: <20030729004919.GA6817@panix.com> AtomicBoard Directory Traversal Vulnerability http://www.securityfocus.com/bid/8236 WebCalendar Local File Include Information Disclosure Vulnerability http://www.securityfocus.com/bid/8237 Ashnews Remote File Include Vulnerability http://www.securityfocus.com/bid/8241 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 hans at nyphp.org Tue Jul 29 10:45:49 2003 From: hans at nyphp.org (Hans Zaunere) Date: Tue, 29 Jul 2003 10:45:49 -0400 Subject: [nycphp-talk] Apache doesn't like my c-client (php --with-imap) In-Reply-To: <3F2586B4.2090502@chxo.com> References: <3F2586B4.2090502@chxo.com> Message-ID: <3F26889D.8080900@nyphp.org> Chris Snyder wrote: > Someone jog my brain, please! On configuring Apache with mod_ssl, and > php --with-imap --with-imap-ssl, I get the errors appended below.. > > Relevent details: > - FreeBSD 4.8 with imap-uw installed from ports. > - The c-client includes are all in /usr/local/include/c-client/ > - libc-client4.a and libc-client4.so are both in /usr/local/lib Hmm, not sure myself; installing from ports usually makes everything work :) Only thing I would try for trouble shooting purposes, would be to remove -DEAPI_MM and try to recompile. If that works, check to make sure the libmm (or whatever it is) is installed. And, run ldconfig a lot :) H From csnyder at chxo.com Tue Jul 29 23:29:41 2003 From: csnyder at chxo.com (Chris Snyder) Date: Tue, 29 Jul 2003 23:29:41 -0400 Subject: [nycphp-talk] Apache doesn't like my c-client (php --with-imap) In-Reply-To: <3F26889D.8080900@nyphp.org> References: <3F2586B4.2090502@chxo.com> <3F26889D.8080900@nyphp.org> Message-ID: <3F273BA5.6020405@chxo.com> Hans Zaunere wrote: > Hmm, not sure myself; installing from ports usually makes everything > work :) > > Only thing I would try for trouble shooting purposes, would be to > remove -DEAPI_MM and try to recompile. If that works, check to make > sure the libmm (or whatever it is) is installed. And, run ldconfig a > lot :) Yep, tried that, I was completely stumped. It has nothing to do with libmm. In the end, I backed out the ports version and installed imap myself from source -- worth a separate writeup if anyone wants it -- and everything worked fine from there. From hans at nyphp.org Wed Jul 30 14:34:46 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 30 Jul 2003 14:34:46 -0400 Subject: [nycphp-talk] NYPHP: Oracle Developer Days Message-ID: <3F280FC6.5000206@nyphp.org> Good day, As many have probably seen, New York PHP is organizing a day trip out to New Brunswick Hyatt (was: Edison) to attend Oracle Developer Days (ODD). I hope to cover some of the details of our plan, and hear any suggestions and ideas. First, what is ODD? http://nyphp.org/eodd redirects to Oracle's monsterous URL for complete details. Briefly, however, it's a series of workshops, focusing on Linux/RedHat, Java, Open Source, and ofcourse Oracle. And this year, PHP is included as a workshop. They're fairly technical, and it should be a very interesting series of programs. Registration is free, but they say that space is limited, so please register early if you plan on attending. As I've mentioned before, ODD happens 8/8/03 and is an all day event (8am-5pm). So far, our plan is take NJ Transit out to New Brunswick, from Penn Station, and walk to the Hyatt hotel, which is only a couple of blocks as I understand it. Briefly: -- Meet at Penn Station (exact location TBD) by 6:30am to catch the 7:03 train to New Brunswick (Northeast Corridor Line). -- [ ride on the train, walk to the Hyatt, attend the conference, walk back to the train station ] :) -- Meet at the Hyatt lobby by 6:00 to catch the 6:21pm train back to Penn Station. Of course, I don't get out to NJ too much, so people familiar with this commute are welcomed to streamline it and cover things I'm probably missing :) Useful NJ Transit links: http://www.njtransit.com/pdf/rail/r0070.pdf http://www.njtransit.com/pdf/Rail_Map_04_2003.pdf If you do plan on attending, and either meeting us there or commuting with us, let the list know. We will wait for people before heading out, or coming back, so please contact us if you have a change of plans at the last minute (cellphones work well for this). Maybe we should get name tags made? :) So, that's basically it. It should be a lot of fun, and since the conference is focused for developers, and not sales departments, I'm quite anxious to see what they have. Hans Zaunere President, New York PHP hans at nyphp.org From hans at nyphp.org Wed Jul 30 14:38:54 2003 From: hans at nyphp.org (Hans Zaunere) Date: Wed, 30 Jul 2003 14:38:54 -0400 Subject: [nycphp-talk] Apache doesn't like my c-client (php --with-imap) In-Reply-To: <3F273BA5.6020405@chxo.com> References: <3F2586B4.2090502@chxo.com> <3F26889D.8080900@nyphp.org> <3F273BA5.6020405@chxo.com> Message-ID: <3F2810BE.3040006@nyphp.org> Chris Snyder wrote: > Hans Zaunere wrote: > >> Hmm, not sure myself; installing from ports usually makes everything >> work :) >> >> Only thing I would try for trouble shooting purposes, would be to >> remove -DEAPI_MM and try to recompile. If that works, check to make >> sure the libmm (or whatever it is) is installed. And, run ldconfig a >> lot :) > > > Yep, tried that, I was completely stumped. It has nothing to do with libmm. > > In the end, I backed out the ports version and installed imap myself > from source -- worth a separate writeup if anyone wants it -- and > everything worked fine from there. If you get something written up, we'll certainly get it on the site somehow :) H From mikeh at dtev.com Wed Jul 30 14:50:44 2003 From: mikeh at dtev.com (Mike Hjorleifsson) Date: Wed, 30 Jul 2003 14:50:44 -0400 Subject: [nycphp-talk] PHP Commercial Apps Message-ID: is there a list of commercially available PHP applications ? From rolan at datawhorehouse.com Wed Jul 30 15:37:14 2003 From: rolan at datawhorehouse.com (Rolan) Date: Wed, 30 Jul 2003 15:37:14 -0400 Subject: [nycphp-talk] NYPHP: Oracle Developer Days In-Reply-To: <3F280FC6.5000206@nyphp.org> References: <3F280FC6.5000206@nyphp.org> Message-ID: <3F281E6A.9090902@datawhorehouse.com> There is a semi-famous restaurant 2 minutes from the New Brunswick train station on Easton Ave called "Cluck-U Chicken". They serve the tastiest hot wings with 10 levels of spiciness ranging from "sweet" to "911." I usually order the Thermonuclear. Buffalo wing aficionados should definitely stop by and maybe try the 911. I heard up at the West Orange Cluck-U you have to sign a waiver before hey sell you 911, but they don't at the one in New Brunswick. ~Rolan From tom at supertom.com Wed Jul 30 15:47:37 2003 From: tom at supertom.com (tom at supertom.com) Date: Wed, 30 Jul 2003 15:47:37 -0400 Subject: [nycphp-talk] NYPHP: Oracle Developer Days In-Reply-To: <3F281E6A.9090902@datawhorehouse.com> Message-ID: I consider myself a "Buffalo wing aficionado" and am considering going to ODD. Perhaps we can get a small group together and check it out! If I go, it's 911 for me! BTW, The LIPHP meeting is tonight! Complete with another of my favorite foods - Donuts! http://www.liphp.org 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 Rolan Sent: Wednesday, July 30, 2003 3:37 PM To: NYPHP Talk Subject: Re: [nycphp-talk] NYPHP: Oracle Developer Days There is a semi-famous restaurant 2 minutes from the New Brunswick train station on Easton Ave called "Cluck-U Chicken". They serve the tastiest hot wings with 10 levels of spiciness ranging from "sweet" to "911." I usually order the Thermonuclear. Buffalo wing aficionados should definitely stop by and maybe try the 911. I heard up at the West Orange Cluck-U you have to sign a waiver before hey sell you 911, but they don't at the one in New Brunswick. ~Rolan _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From dorgan at optonline.net Thu Jul 31 03:58:55 2003 From: dorgan at optonline.net (Donald J. Organ IV) Date: Thu, 31 Jul 2003 03:58:55 -0400 Subject: [nycphp-talk] Fw: [nycphp-dev] API's Message-ID: <000501c35739$9903eeb0$c801a8c0@dj> ----- Original Message ----- From: "Donald J. Organ IV" To: "NYPHP Development" Sent: Thursday, July 31, 2003 3:52 AM Subject: [nycphp-dev] API's > Does anyone know if there are any Monster.com API's and/or a hotjobs.com > API. I am looking to develop something for a client and would love to > include this. > > _______________________________________________ > dev mailing list > dev at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/dev From tom at supertom.com Thu Jul 31 09:32:01 2003 From: tom at supertom.com (tom at supertom.com) Date: Thu, 31 Jul 2003 09:32:01 -0400 Subject: [nycphp-talk] NYPHP: Oracle Developer Days In-Reply-To: <3F280FC6.5000206@nyphp.org> Message-ID: OK, I am registered and looking forward to it. Where is everyone going to meet? Tom -------------- www.liphp.org *************************************************** What's Tom listening to right now? Find out here: http://www.supertom.com/current_track.php -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Hans Zaunere Sent: Wednesday, July 30, 2003 2:35 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] NYPHP: Oracle Developer Days Good day, As many have probably seen, New York PHP is organizing a day trip out to New Brunswick Hyatt (was: Edison) to attend Oracle Developer Days (ODD). I hope to cover some of the details of our plan, and hear any suggestions and ideas. First, what is ODD? http://nyphp.org/eodd redirects to Oracle's monsterous URL for complete details. Briefly, however, it's a series of workshops, focusing on Linux/RedHat, Java, Open Source, and ofcourse Oracle. And this year, PHP is included as a workshop. They're fairly technical, and it should be a very interesting series of programs. Registration is free, but they say that space is limited, so please register early if you plan on attending. As I've mentioned before, ODD happens 8/8/03 and is an all day event (8am-5pm). So far, our plan is take NJ Transit out to New Brunswick, from Penn Station, and walk to the Hyatt hotel, which is only a couple of blocks as I understand it. Briefly: -- Meet at Penn Station (exact location TBD) by 6:30am to catch the 7:03 train to New Brunswick (Northeast Corridor Line). -- [ ride on the train, walk to the Hyatt, attend the conference, walk back to the train station ] :) -- Meet at the Hyatt lobby by 6:00 to catch the 6:21pm train back to Penn Station. Of course, I don't get out to NJ too much, so people familiar with this commute are welcomed to streamline it and cover things I'm probably missing :) Useful NJ Transit links: http://www.njtransit.com/pdf/rail/r0070.pdf http://www.njtransit.com/pdf/Rail_Map_04_2003.pdf If you do plan on attending, and either meeting us there or commuting with us, let the list know. We will wait for people before heading out, or coming back, so please contact us if you have a change of plans at the last minute (cellphones work well for this). Maybe we should get name tags made? :) So, that's basically it. It should be a lot of fun, and since the conference is focused for developers, and not sales departments, I'm quite anxious to see what they have. Hans Zaunere President, New York PHP hans at nyphp.org _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk From rdumas at cmj.com Thu Jul 31 12:17:53 2003 From: rdumas at cmj.com (Robert Dumas) Date: Thu, 31 Jul 2003 12:17:53 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/getting Message-ID: <2ADC7BED20C3D711BFF100508B8FA3E307FB70@webproxy.uat.dbinsight.com> Hi all: I'm new to the list and I have a question. I'm building a streaming media player that opens in a pop-up (a requested one, thank goodness) and I want to do it in PHP. Basically, I want the user to select their preferred media player -- Real (ugh) or WMP (double-ugh) -- and hit a link which saves their media player preference and pops open the player. Popping open the player is, of course, no problem; but retrieving their preference is kind of sticky. Does anyone know of a good example of a simple way to do this? Cheers Robert Dumas -------------- next part -------------- An HTML attachment was scrubbed... URL: From rolan at datawhorehouse.com Thu Jul 31 12:24:31 2003 From: rolan at datawhorehouse.com (Rolan) Date: Thu, 31 Jul 2003 12:24:31 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/getting In-Reply-To: <2ADC7BED20C3D711BFF100508B8FA3E307FB70@webproxy.uat.dbinsight.com> References: <2ADC7BED20C3D711BFF100508B8FA3E307FB70@webproxy.uat.dbinsight.com> Message-ID: <3F2942BF.1070905@datawhorehouse.com> cookies. http://www.php.net/manual/en/features.cookies.php Robert Dumas wrote: > Hi all: > > I'm new to the list and I have a question. > > I'm building a streaming media player that opens in a pop-up (a > requested one, thank goodness) and I want to do it in PHP. Basically, > I want the user to select their preferred media player -- Real (ugh) > or WMP (double-ugh) -- and hit a link which saves their media player > preference and pops open the player. Popping open the player is, of > course, no problem; but retrieving their preference is kind of sticky. > Does anyone know of a good example of a simple way to do this? > > Cheers > > Robert Dumas > >------------------------------------------------------------------------ > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From David.SextonJr at ubs.com Thu Jul 31 12:41:17 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Thu, 31 Jul 2003 12:41:17 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Message-ID: <18D7B8CAA5284F478470828806DB124603789EFA@psle01.xchg.pwj.com> ...or require them to register/login, which would be more reliable since you can store/retrieve the prefs server-side using sessions. Maybe you already have an existing login process, which would make it that much easier to implement. -----Original Message----- From: Rolan [mailto:rolan at datawhorehouse.com] Sent: Thursday, July 31, 2003 12:25 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Simple form-based selection and cookie-setting/getting cookies. http://www.php.net/manual/en/features.cookies.php Robert Dumas wrote: > Hi all: > > I'm new to the list and I have a question. > > I'm building a streaming media player that opens in a pop-up (a > requested one, thank goodness) and I want to do it in PHP. Basically, > I want the user to select their preferred media player -- Real (ugh) > or WMP (double-ugh) -- and hit a link which saves their media player > preference and pops open the player. Popping open the player is, of > course, no problem; but retrieving their preference is kind of sticky. > Does anyone know of a good example of a simple way to do this? > > Cheers > > Robert Dumas > >------------------------------------------------------------------------ > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. From soazine at erols.com Thu Jul 31 12:52:14 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 31 Jul 2003 12:52:14 -0400 Subject: [nycphp-talk] problems with in_array References: <3F2586B4.2090502@chxo.com> <3F26889D.8080900@nyphp.org> <3F273BA5.6020405@chxo.com> Message-ID: <08b001c35784$185ccb60$67a76244@philofsoa> $cmaExceptionArray = array('hasPassedCookie', 'username', 'password', 'uniqueCMAKey', 'submit', 'errorMsg'); ... foreach ($HTTP_GET_VARS as $key => $val) { echo $key . " " . in_array($key, $cmaExceptionArray) . "
"; if (!in_array($key, $cmaExceptionArray)) { array_push($formQSDupArray, $key); // ADD HERE BEFORE YOU GO TO FORM PART echo "\n"; } } For some bizarre reason, if my query string has the key of "errorMsg", in spite of it being in cmaExceptionArray AND in spite of the fact that it does produce the correct in_array value of "1", it still does the "echo" portion when, in fact, it should not. If someone were to look at this and tell me what in blazes I did wrong, it escapes me. As it always does :( Phil From rolan at datawhorehouse.com Thu Jul 31 12:57:10 2003 From: rolan at datawhorehouse.com (Rolan) Date: Thu, 31 Jul 2003 12:57:10 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/g etting In-Reply-To: <18D7B8CAA5284F478470828806DB124603789EFA@psle01.xchg.pwj.com> References: <18D7B8CAA5284F478470828806DB124603789EFA@psle01.xchg.pwj.com> Message-ID: <3F294A66.50004@datawhorehouse.com> If client side cookies were enabled, you could set the expiration for 1 yr ahead or something. If the client did not accept cookies, then you'd have to go server-side of course. I'm not sure that requiring registration/logins is practical, since, if the client can not store cookies, the user would have to enter a login/password every time anyway. And in doing so, it is more cumbersome (more key taps and clicks) than clicking once to select the media player preference for the session. ~Rolan Sexton, David wrote: >...or require them to register/login, which would be more reliable since you >can store/retrieve the prefs server-side using sessions. Maybe you already >have an existing login process, which would make it that much easier to >implement. > > >-----Original Message----- >From: Rolan [mailto:rolan at datawhorehouse.com] >Sent: Thursday, July 31, 2003 12:25 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] Simple form-based selection and >cookie-setting/getting > > >cookies. >http://www.php.net/manual/en/features.cookies.php > >Robert Dumas wrote: > > > >>Hi all: >> >>I'm new to the list and I have a question. >> >>I'm building a streaming media player that opens in a pop-up (a >>requested one, thank goodness) and I want to do it in PHP. Basically, >>I want the user to select their preferred media player -- Real (ugh) >>or WMP (double-ugh) -- and hit a link which saves their media player >>preference and pops open the player. Popping open the player is, of >>course, no problem; but retrieving their preference is kind of sticky. >>Does anyone know of a good example of a simple way to do this? >> >>Cheers >> >>Robert Dumas >> >>------------------------------------------------------------------------ >> >>_______________________________________________ >>talk mailing list >>talk at lists.nyphp.org >>http://lists.nyphp.org/mailman/listinfo/talk >> >> >> >> > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > >Please do not transmit orders or instructions regarding a UBS account by >email. The information provided in this email or any attachments is not an >official transaction confirmation or account statement. For your protection, >do not include account numbers, Social Security numbers, credit card >numbers, passwords or other non-public information in your email. Because >the information contained in this message may be privileged, confidential, >proprietary or otherwise protected from disclosure, please notify us >immediately by replying to this message and deleting it from your computer >if you have received this communication in error. Thank you. > >UBS Financial Services Inc. >UBS International Inc. > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > > From rdumas at cmj.com Thu Jul 31 13:03:13 2003 From: rdumas at cmj.com (Robert Dumas) Date: Thu, 31 Jul 2003 13:03:13 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Message-ID: <2ADC7BED20C3D711BFF100508B8FA3E307FB73@webproxy.uat.dbinsight.com> register/login is way morethan i need here; a simple cookie with the stored preference will do. If they don't choose a preferred player, they don't get the player. Simple as that. --RD -----Original Message----- From: Sexton, David [mailto:David.SextonJr at ubs.com] Sent: Thursday, July 31, 2003 12:41 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting ...or require them to register/login, which would be more reliable since you can store/retrieve the prefs server-side using sessions. Maybe you already have an existing login process, which would make it that much easier to implement. -----Original Message----- From: Rolan [mailto:rolan at datawhorehouse.com] Sent: Thursday, July 31, 2003 12:25 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Simple form-based selection and cookie-setting/getting cookies. http://www.php.net/manual/en/features.cookies.php Robert Dumas wrote: > Hi all: > > I'm new to the list and I have a question. > > I'm building a streaming media player that opens in a pop-up (a > requested one, thank goodness) and I want to do it in PHP. Basically, > I want the user to select their preferred media player -- Real (ugh) > or WMP (double-ugh) -- and hit a link which saves their media player > preference and pops open the player. Popping open the player is, of > course, no problem; but retrieving their preference is kind of sticky. > Does anyone know of a good example of a simple way to do this? > > Cheers > > Robert Dumas > >------------------------------------------------------------------------ > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From shiflett at php.net Thu Jul 31 13:08:37 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 31 Jul 2003 10:08:37 -0700 (PDT) Subject: [nycphp-talk] problems with in_array In-Reply-To: <08b001c35784$185ccb60$67a76244@philofsoa> Message-ID: <20030731170837.17389.qmail@web14310.mail.yahoo.com> I hope you don't mind if I rewrite your code a little bit to simplify it and try to see if I understand the question correctly. $get_array = array('foo', 'bar'); foreach ($_GET as $get_name => $get_val) { $in_array = in_array($get_name, $get_array); echo "$get_name $in_array
"; if (!in_array($get_name, $get_array)) { $form_array[] = $get_name; echo "hidden form field for $get_name"; } } So, you are saying that when you pass a URL variable named foo, you will see output such as this: foo 1
hidden form field for foo Right? If so, you're right that it doesn't make any sense, but I might be misinterpreting your question. Chris From David.SextonJr at ubs.com Thu Jul 31 13:14:00 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Thu, 31 Jul 2003 13:14:00 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Message-ID: <18D7B8CAA5284F478470828806DB124603789EFB@psle01.xchg.pwj.com> Sounds like a plan... unless you foresee a use for maintaining state info down the line, and reliability isn't important (since clearing your cookies will wipe out your preference), then it's not worth the work, as Rolan suggested. Then again, if reliability isn't an issue, is it worth any effort at all in trying to retain the pref? That's your preference... :) -----Original Message----- From: Robert Dumas [mailto:rdumas at cmj.com] Sent: Thursday, July 31, 2003 1:03 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting register/login is way morethan i need here; a simple cookie with the stored preference will do. If they don't choose a preferred player, they don't get the player. Simple as that. --RD -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com ] Sent: Thursday, July 31, 2003 12:41 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting ...or require them to register/login, which would be more reliable since you can store/retrieve the prefs server-side using sessions. Maybe you already have an existing login process, which would make it that much easier to implement. -----Original Message----- From: Rolan [ mailto:rolan at datawhorehouse.com ] Sent: Thursday, July 31, 2003 12:25 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Simple form-based selection and cookie-setting/getting cookies. http://www.php.net/manual/en/features.cookies.php Robert Dumas wrote: > Hi all: > > I'm new to the list and I have a question. > > I'm building a streaming media player that opens in a pop-up (a > requested one, thank goodness) and I want to do it in PHP. Basically, > I want the user to select their preferred media player -- Real (ugh) > or WMP (double-ugh) -- and hit a link which saves their media player > preference and pops open the player. Popping open the player is, of > course, no problem; but retrieving their preference is kind of sticky. > Does anyone know of a good example of a simple way to do this? > > Cheers > > Robert Dumas > >------------------------------------------------------------------------ > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. From soazine at erols.com Thu Jul 31 13:14:17 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 31 Jul 2003 13:14:17 -0400 Subject: [nycphp-talk] problems with in_array References: <20030731170837.17389.qmail@web14310.mail.yahoo.com> Message-ID: <08cc01c35787$2ce432a0$67a76244@philofsoa> Yes, it works now, apparently there was some latent caching issues going on behind the scenes that I didn't catch. Phil ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Thursday, July 31, 2003 1:08 PM Subject: Re: [nycphp-talk] problems with in_array > I hope you don't mind if I rewrite your code a little bit to simplify it and > try to see if I understand the question correctly. > > $get_array = array('foo', 'bar'); > foreach ($_GET as $get_name => $get_val) > { > $in_array = in_array($get_name, $get_array); > echo "$get_name $in_array
"; > > if (!in_array($get_name, $get_array)) > { > $form_array[] = $get_name; > echo "hidden form field for $get_name"; > } > } > > So, you are saying that when you pass a URL variable named foo, you will see > output such as this: > > foo 1
> hidden form field for foo > > Right? If so, you're right that it doesn't make any sense, but I might be > misinterpreting your question. > > Chris > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From jonbaer at jonbaer.net Thu Jul 31 13:19:38 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Thu, 31 Jul 2003 10:19:38 -0700 Subject: [nycphp-talk] problems with in_array References: <3F2586B4.2090502@chxo.com> <3F26889D.8080900@nyphp.org><3F273BA5.6020405@chxo.com> <08b001c35784$185ccb60$67a76244@philofsoa> Message-ID: <003401c35787$ebf52960$6500a8c0@THINKPAD> seems to work fine if you do declare $formQSDupArray = array(); before the loop ... - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: "Phil Powell" To: "NYPHP Talk" Sent: Thursday, July 31, 2003 9:52 AM Subject: [nycphp-talk] problems with in_array > $cmaExceptionArray = array('hasPassedCookie', 'username', 'password', > 'uniqueCMAKey', 'submit', > 'errorMsg'); > ... > foreach ($HTTP_GET_VARS as $key => $val) { > echo $key . " " . in_array($key, $cmaExceptionArray) . "
"; > if (!in_array($key, $cmaExceptionArray)) { > array_push($formQSDupArray, $key); // ADD HERE BEFORE YOU GO TO FORM > PART > echo " "\">\n"; > } > } > > For some bizarre reason, if my query string has the key of "errorMsg", in > spite of it being in cmaExceptionArray AND in spite of the fact that it does > produce the correct in_array value of "1", it still does the "echo" portion > when, in fact, it should not. > > If someone were to look at this and tell me what in blazes I did wrong, it > escapes me. As it always does :( > > Phil > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > From soazine at erols.com Thu Jul 31 13:28:59 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 31 Jul 2003 13:28:59 -0400 Subject: [nycphp-talk] TCL, PHP and cookies - AUGH! References: <3F2586B4.2090502@chxo.com><3F26889D.8080900@nyphp.org><3F273BA5.6020405@chxo.com><08b001c35784$185ccb60$67a76244@philofsoa> <003401c35787$ebf52960$6500a8c0@THINKPAD> Message-ID: <090d01c35789$3a4b1100$67a76244@philofsoa> I have a TCL CGI script that has to verify if a cookie has been set. I have no idea how in TCL a cookie can be read (I don't think there is a native TCL process to do this), so I am trying to fudge it by scraping a PHP script I wrote that does just that: TCL: set hasFoundCMACookie 0 set hasFoundCMACookie [string trim [COMPACT_HTML [HTTP_GET $env(SERVER_NAME) 80 /cma/get_cookie.php?junk=[RAND_STRING] {} {}]]] PHP (get_cookie.php): The TCL proc I wrote, HTTP_GET, works, it gets the contents of get_cookie.php and returns them. However, it has constantly returned 0, even if the cookie is found. If I go directly to get_cookie.php, I get the correct value of 1 instead. I'm absolutely stumped as to what to do. This sounds like another caching issue on the part of get_cookie.php but I have no solution for it. Thanx Phil From csnyder at chxo.com Thu Jul 31 13:33:50 2003 From: csnyder at chxo.com (Chris Snyder) Date: Thu, 31 Jul 2003 13:33:50 -0400 Subject: [nycphp-talk] TCL, PHP and cookies - AUGH! In-Reply-To: <090d01c35789$3a4b1100$67a76244@philofsoa> References: <3F2586B4.2090502@chxo.com><3F26889D.8080900@nyphp.org><3F273BA5.6020405@chxo.com><08b001c35784$185ccb60$67a76244@philofsoa> <003401c35787$ebf52960$6500a8c0@THINKPAD> <090d01c35789$3a4b1100$67a76244@philofsoa> Message-ID: <3F2952FE.4050303@chxo.com> I think that because TCL is making the request to get_cookie.php, there is no cookie being passed. The cookie is only passed by the client broswer. The key to finding the cookie in TCL might be the $env list? chris. Phil Powell wrote: >TCL: >set hasFoundCMACookie 0 >set hasFoundCMACookie [string trim [COMPACT_HTML [HTTP_GET $env(SERVER_NAME) >80 /cma/get_cookie.php?junk=[RAND_STRING] {} {}]]] > >PHP (get_cookie.php): > > > > > > > if (strtolower($HTTP_COOKIE_VARS["username"]) === "admin") { > echo '1'; > } else { > echo '0'; > } > >?> > > > >The TCL proc I wrote, HTTP_GET, works, it gets the contents of >get_cookie.php and returns them. However, it has constantly returned 0, >even if the cookie is found. If I go directly to get_cookie.php, I get the >correct value of 1 instead. > >I'm absolutely stumped as to what to do. This sounds like another caching >issue on the part of get_cookie.php but I have no solution for it. > >Thanx >Phil > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk > > From csnyder at chxo.com Thu Jul 31 13:36:14 2003 From: csnyder at chxo.com (Chris Snyder) Date: Thu, 31 Jul 2003 13:36:14 -0400 Subject: [nycphp-talk] TCL, PHP and cookies - AUGH! In-Reply-To: <3F2952FE.4050303@chxo.com> References: <3F2586B4.2090502@chxo.com><3F26889D.8080900@nyphp.org><3F273BA5.6020405@chxo.com><08b001c35784$185ccb60$67a76244@philofsoa> <003401c35787$ebf52960$6500a8c0@THINKPAD> <090d01c35789$3a4b1100$67a76244@philofsoa> <3F2952FE.4050303@chxo.com> Message-ID: <3F29538E.6050103@chxo.com> In fact, if $env(SERVER_NAME) works, I'd try $env(HTTP_COOKIE) and see what it comes up with. Chris Snyder wrote: > The key to finding the cookie in TCL might be the $env list? > > From soazine at erols.com Thu Jul 31 13:41:05 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 31 Jul 2003 13:41:05 -0400 Subject: [nycphp-talk] TCL, PHP and cookies - AUGH! References: <3F2586B4.2090502@chxo.com><3F26889D.8080900@nyphp.org><3F273BA5.6020405@chxo.com><08b001c35784$185ccb60$67a76244@philofsoa> <003401c35787$ebf52960$6500a8c0@THINKPAD><090d01c35789$3a4b1100$67a76244@philofsoa> <3F2952FE.4050303@chxo.com> Message-ID: <091801c3578a$ead273f0$67a76244@philofsoa> It doesn't show up in the $env list (that is, 'username'), however 'valIdentifier', another cookie in the same domain, does show up in $env. I don't know the syntax for passing a cookie into my HTTP_GET TCL proc, does anyone? Phil ----- Original Message ----- From: "Chris Snyder" To: "NYPHP Talk" Sent: Thursday, July 31, 2003 1:33 PM Subject: Re: [nycphp-talk] TCL, PHP and cookies - AUGH! > I think that because TCL is making the request to get_cookie.php, there > is no cookie being passed. > The cookie is only passed by the client broswer. > > The key to finding the cookie in TCL might be the $env list? > > chris. > > Phil Powell wrote: > > >TCL: > >set hasFoundCMACookie 0 > >set hasFoundCMACookie [string trim [COMPACT_HTML [HTTP_GET $env(SERVER_NAME) > >80 /cma/get_cookie.php?junk=[RAND_STRING] {} {}]]] > > > >PHP (get_cookie.php): > > > > > > > > > > > > > > > if (strtolower($HTTP_COOKIE_VARS["username"]) === "admin") { > > echo '1'; > > } else { > > echo '0'; > > } > > > >?> > > > > > > > >The TCL proc I wrote, HTTP_GET, works, it gets the contents of > >get_cookie.php and returns them. However, it has constantly returned 0, > >even if the cookie is found. If I go directly to get_cookie.php, I get the > >correct value of 1 instead. > > > >I'm absolutely stumped as to what to do. This sounds like another caching > >issue on the part of get_cookie.php but I have no solution for it. > > > >Thanx > >Phil > > > >_______________________________________________ > >talk mailing list > >talk at lists.nyphp.org > >http://lists.nyphp.org/mailman/listinfo/talk > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From fields at surgam.net Thu Jul 31 13:46:41 2003 From: fields at surgam.net (Adam Fields) Date: Thu, 31 Jul 2003 13:46:41 -0400 Subject: [nycphp-talk] TCL, PHP and cookies - AUGH! In-Reply-To: <091801c3578a$ead273f0$67a76244@philofsoa> References: <3F2952FE.4050303@chxo.com> <091801c3578a$ead273f0$67a76244@philofsoa> Message-ID: <20030731174641.GB27670@eye.surgam.net> On Thu, Jul 31, 2003 at 01:41:05PM -0400, Phil Powell wrote: > It doesn't show up in the $env list (that is, 'username'), however > 'valIdentifier', another cookie in the same domain, does show up in $env. > > I don't know the syntax for passing a cookie into my HTTP_GET TCL proc, does > anyone? Is this a TCL CGI or some version of Vignette? -- - Adam ----- Adam Fields, Managing Partner, fields at surgam.net Surgam, Inc. is a technology consulting firm with strong background in delivering scalable and robust enterprise web and IT applications. http://www.adamfields.com From coling at macmicro.com Thu Jul 31 13:54:00 2003 From: coling at macmicro.com (Colin Goldberg) Date: Thu, 31 Jul 2003 13:54:00 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/getting In-Reply-To: <2ADC7BED20C3D711BFF100508B8FA3E307FB70@webproxy.uat.dbinsi ght.com> Message-ID: <5.2.1.1.0.20030731135035.023d41c0@mail.macmicro.com> Hi Robert I did this for a website with similar requirements - some years ago. Call me at 914 472-8292 for more detail. Colin Goldberg At 12:17 PM 7/31/03 -0400, you wrote: >Hi all: > >I'm new to the list and I have a question. > >I'm building a streaming media player that opens in a pop-up (a requested >one, thank goodness) and I want to do it in PHP. Basically, I want the >user to select their preferred media player -- Real (ugh) or WMP >(double-ugh) -- and hit a link which saves their media player preference >and pops open the player. Popping open the player is, of course, no >problem; but retrieving their preference is kind of sticky. Does anyone >know of a good example of a simple way to do this? > >Cheers > >Robert Dumas >_______________________________________________ >talk mailing list >talk at lists.nyphp.org >http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From rdumas at cmj.com Thu Jul 31 13:59:30 2003 From: rdumas at cmj.com (Robert Dumas) Date: Thu, 31 Jul 2003 13:59:30 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Message-ID: <2ADC7BED20C3D711BFF100508B8FA3E307FB74@webproxy.uat.dbinsight.com> There's really no need for me to save the user's state on the server side of things; all I need to do is set (and then, later, read) the cookie. I've read the feature on php.net about cookies, but it simply talks about creating them. What I'll need to do is have a PHP script in the popup player that reads the cookie and outputs the code for the correct media player. How do I do this? -----Original Message----- From: Sexton, David [mailto:David.SextonJr at ubs.com] Sent: Thursday, July 31, 2003 1:14 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Sounds like a plan... unless you foresee a use for maintaining state info down the line, and reliability isn't important (since clearing your cookies will wipe out your preference), then it's not worth the work, as Rolan suggested. Then again, if reliability isn't an issue, is it worth any effort at all in trying to retain the pref? That's your preference... :) -----Original Message----- From: Robert Dumas [mailto:rdumas at cmj.com] Sent: Thursday, July 31, 2003 1:03 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting register/login is way morethan i need here; a simple cookie with the stored preference will do. If they don't choose a preferred player, they don't get the player. Simple as that. --RD -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com ] Sent: Thursday, July 31, 2003 12:41 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting ...or require them to register/login, which would be more reliable since you can store/retrieve the prefs server-side using sessions. Maybe you already have an existing login process, which would make it that much easier to implement. -----Original Message----- From: Rolan [ mailto:rolan at datawhorehouse.com ] Sent: Thursday, July 31, 2003 12:25 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Simple form-based selection and cookie-setting/getting cookies. http://www.php.net/manual/en/features.cookies.php Robert Dumas wrote: > Hi all: > > I'm new to the list and I have a question. > > I'm building a streaming media player that opens in a pop-up (a > requested one, thank goodness) and I want to do it in PHP. Basically, > I want the user to select their preferred media player -- Real (ugh) > or WMP (double-ugh) -- and hit a link which saves their media player > preference and pops open the player. Popping open the player is, of > course, no problem; but retrieving their preference is kind of sticky. > Does anyone know of a good example of a simple way to do this? > > Cheers > > Robert Dumas > >------------------------------------------------------------------------ > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Thu Jul 31 13:58:14 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 31 Jul 2003 13:58:14 -0400 Subject: [nycphp-talk] TCL, PHP and cookies - AUGH! References: <3F2586B4.2090502@chxo.com><3F26889D.8080900@nyphp.org><3F273BA5.6020405@chxo.com><08b001c35784$185ccb60$67a76244@philofsoa> <003401c35787$ebf52960$6500a8c0@THINKPAD> <090d01c35789$3a4b1100$67a76244@philofsoa><3F2952FE.4050303@chxo.com> <3F29538E.6050103@chxo.com> Message-ID: <093d01c3578d$5096ef20$67a76244@philofsoa> Ok now it has turned to the bizarre. In /cma/index.php, which sets the cookie: setcookie('username', $username, time() + 600); ... header("Location..."); It redirects to the TCL CGI /cma_main.cgi which in turns does NOT see the cookie name "username" ever set. I go to my /Phil/Cookies folder for the cookie under the "valsignalandet.com" domain and, sure enough, "username" is not set. However, $HTTP_COOKIE_VARS["username"] DOES exist every time I go to /cma/index.php thereafter, in spite of nothing else showing a cookie exists. So, in short, "setcookie()" in PHP is setting a nonexistent cookie. Phil ----- Original Message ----- From: "Chris Snyder" To: "NYPHP Talk" Sent: Thursday, July 31, 2003 1:36 PM Subject: Re: [nycphp-talk] TCL, PHP and cookies - AUGH! > In fact, if $env(SERVER_NAME) works, I'd try $env(HTTP_COOKIE) and see > what it comes up with. > > Chris Snyder wrote: > > > The key to finding the cookie in TCL might be the $env list? > > > > > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From soazine at erols.com Thu Jul 31 14:16:50 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 31 Jul 2003 14:16:50 -0400 Subject: [nycphp-talk] TCL, PHP and cookies - AUGH! References: <3F2952FE.4050303@chxo.com><091801c3578a$ead273f0$67a76244@philofsoa> <20030731174641.GB27670@eye.surgam.net> Message-ID: <096501c3578f$e95b23f0$67a76244@philofsoa> This is pure TCL CGI, although very familiar with Vignette. Phil ----- Original Message ----- From: "Adam Fields" To: "NYPHP Talk" Sent: Thursday, July 31, 2003 1:46 PM Subject: Re: [nycphp-talk] TCL, PHP and cookies - AUGH! > On Thu, Jul 31, 2003 at 01:41:05PM -0400, Phil Powell wrote: > > It doesn't show up in the $env list (that is, 'username'), however > > 'valIdentifier', another cookie in the same domain, does show up in $env. > > > > I don't know the syntax for passing a cookie into my HTTP_GET TCL proc, does > > anyone? > > Is this a TCL CGI or some version of Vignette? > > > -- > - Adam > > ----- > Adam Fields, Managing Partner, fields at surgam.net > Surgam, Inc. is a technology consulting firm with strong background in > delivering scalable and robust enterprise web and IT applications. > http://www.adamfields.com > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From David.SextonJr at ubs.com Thu Jul 31 14:25:18 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Thu, 31 Jul 2003 14:25:18 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Message-ID: <18D7B8CAA5284F478470828806DB124603789EFC@psle01.xchg.pwj.com> Say you named a cookie 'player_type' in another script and assigned a value of 'real' or 'wmp' to it... Reading the value back would go something like this... if(isset($_COOKIE['player_type'])) { if($_COOKIE['player_type'] == "wmp") { //...statements/output for WMP } else { //...statements/output for REAL player } } else { // Cookie doesn't exist... do whatever... } -----Original Message----- From: Robert Dumas [mailto:rdumas at cmj.com] Sent: Thursday, July 31, 2003 2:00 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting There's really no need for me to save the user's state on the server side of things; all I need to do is set (and then, later, read) the cookie. I've read the feature on php.net about cookies, but it simply talks about creating them. What I'll need to do is have a PHP script in the popup player that reads the cookie and outputs the code for the correct media player. How do I do this? -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com ] Sent: Thursday, July 31, 2003 1:14 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Sounds like a plan... unless you foresee a use for maintaining state info down the line, and reliability isn't important (since clearing your cookies will wipe out your preference), then it's not worth the work, as Rolan suggested. Then again, if reliability isn't an issue, is it worth any effort at all in trying to retain the pref? That's your preference... :) -----Original Message----- From: Robert Dumas [ mailto:rdumas at cmj.com ] Sent: Thursday, July 31, 2003 1:03 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting register/login is way morethan i need here; a simple cookie with the stored preference will do. If they don't choose a preferred player, they don't get the player. Simple as that. --RD -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com < mailto:David.SextonJr at ubs.com > ] Sent: Thursday, July 31, 2003 12:41 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting ...or require them to register/login, which would be more reliable since you can store/retrieve the prefs server-side using sessions. Maybe you already have an existing login process, which would make it that much easier to implement. -----Original Message----- From: Rolan [ mailto:rolan at datawhorehouse.com < mailto:rolan at datawhorehouse.com > ] Sent: Thursday, July 31, 2003 12:25 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Simple form-based selection and cookie-setting/getting cookies. http://www.php.net/manual/en/features.cookies.php < http://www.php.net/manual/en/features.cookies.php > Robert Dumas wrote: > Hi all: > > I'm new to the list and I have a question. > > I'm building a streaming media player that opens in a pop-up (a > requested one, thank goodness) and I want to do it in PHP. Basically, > I want the user to select their preferred media player -- Real (ugh) > or WMP (double-ugh) -- and hit a link which saves their media player > preference and pops open the player. Popping open the player is, of > course, no problem; but retrieving their preference is kind of sticky. > Does anyone know of a good example of a simple way to do this? > > Cheers > > Robert Dumas > >------------------------------------------------------------------------ > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk < http://lists.nyphp.org/mailman/listinfo/talk > Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. From rdumas at cmj.com Thu Jul 31 14:42:55 2003 From: rdumas at cmj.com (Robert Dumas) Date: Thu, 31 Jul 2003 14:42:55 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Message-ID: <2ADC7BED20C3D711BFF100508B8FA3E307FB77@webproxy.uat.dbinsight.com> Okay, here's essentially what I have for the launcher.

Preferred Media Player:

So why doesn't it prompt me to save a cookie (i have "prompt for cookie" enabled in my browser) when i press the radio input? By the way, thanks for all the help. I appreciate it. --RD -----Original Message----- From: Sexton, David [mailto:David.SextonJr at ubs.com] Sent: Thursday, July 31, 2003 2:25 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Say you named a cookie 'player_type' in another script and assigned a value of 'real' or 'wmp' to it... Reading the value back would go something like this... if(isset($_COOKIE['player_type'])) { if($_COOKIE['player_type'] == "wmp") { //...statements/output for WMP } else { //...statements/output for REAL player } } else { // Cookie doesn't exist... do whatever... } -----Original Message----- From: Robert Dumas [mailto:rdumas at cmj.com] Sent: Thursday, July 31, 2003 2:00 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting There's really no need for me to save the user's state on the server side of things; all I need to do is set (and then, later, read) the cookie. I've read the feature on php.net about cookies, but it simply talks about creating them. What I'll need to do is have a PHP script in the popup player that reads the cookie and outputs the code for the correct media player. How do I do this? -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com ] Sent: Thursday, July 31, 2003 1:14 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Sounds like a plan... unless you foresee a use for maintaining state info down the line, and reliability isn't important (since clearing your cookies will wipe out your preference), then it's not worth the work, as Rolan suggested. Then again, if reliability isn't an issue, is it worth any effort at all in trying to retain the pref? That's your preference... :) -----Original Message----- From: Robert Dumas [ mailto:rdumas at cmj.com ] Sent: Thursday, July 31, 2003 1:03 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting register/login is way morethan i need here; a simple cookie with the stored preference will do. If they don't choose a preferred player, they don't get the player. Simple as that. --RD -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com < mailto:David.SextonJr at ubs.com > ] Sent: Thursday, July 31, 2003 12:41 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting ...or require them to register/login, which would be more reliable since you can store/retrieve the prefs server-side using sessions. Maybe you already have an existing login process, which would make it that much easier to implement. -----Original Message----- From: Rolan [ mailto:rolan at datawhorehouse.com < mailto:rolan at datawhorehouse.com > ] Sent: Thursday, July 31, 2003 12:25 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Simple form-based selection and cookie-setting/getting cookies. http://www.php.net/manual/en/features.cookies.php < http://www.php.net/manual/en/features.cookies.php > Robert Dumas wrote: > Hi all: > > I'm new to the list and I have a question. > > I'm building a streaming media player that opens in a pop-up (a > requested one, thank goodness) and I want to do it in PHP. Basically, > I want the user to select their preferred media player -- Real (ugh) > or WMP (double-ugh) -- and hit a link which saves their media player > preference and pops open the player. Popping open the player is, of > course, no problem; but retrieving their preference is kind of sticky. > Does anyone know of a good example of a simple way to do this? > > Cheers > > Robert Dumas > >------------------------------------------------------------------------ > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk < http://lists.nyphp.org/mailman/listinfo/talk > Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From chendry at nyc.rr.com Thu Jul 31 15:18:16 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Thu, 31 Jul 2003 15:18:16 -0400 Subject: [nycphp-talk] POST via PHP Message-ID: Ok. I'm sure this is possible, and it occurs to me that I've been pretty stupid up to now for not thinking this, but... I need to send some form data from one page, through a frameset and out to a third party (JAVA). At the moment, I'm switching the $_POST vars over to the $_SESSION vars (in the frameset), then populating a bunch of hidden form fields within one of the frames (from the session vars) and then submitting the request via javascript. It's gotta be possible to do all this with PHP and I'm sure it's easy. Can some kind soul give me the bit of knowledge I'm missing to make this happen. Thanks, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From csnyder at chxo.com Thu Jul 31 15:24:58 2003 From: csnyder at chxo.com (Chris Snyder) Date: Thu, 31 Jul 2003 15:24:58 -0400 Subject: [nycphp-talk] POST via PHP In-Reply-To: References: Message-ID: <3F296D0A.60102@chxo.com> One way to do this would be to craft an HTTP POST request and send it to port 80 via fsockopen() -- there's a lot of discussion about how to do it in the comments on this page: http://us2.php.net/manual/en/function.fsockopen.php chris Christopher Hendry wrote: > Ok. I'm sure this is possible, and it occurs to me that I've been > pretty stupid up to now for not thinking this, but... > > I need to send some form data from one page, through a frameset and > out to a third party (JAVA). At the moment, I'm switching the $_POST > vars over to the $_SESSION vars (in the frameset), then populating a > bunch of hidden form fields within one of the frames (from the session > vars) and then submitting the request via javascript. > From chendry at nyc.rr.com Thu Jul 31 15:27:19 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Thu, 31 Jul 2003 15:27:19 -0400 Subject: [nycphp-talk] POST via PHP In-Reply-To: Message-ID: ok, might my answer be cURL? -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]On Behalf Of Christopher Hendry Sent: Thursday, July 31, 2003 3:18 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] POST via PHP Ok. I'm sure this is possible, and it occurs to me that I've been pretty stupid up to now for not thinking this, but... I need to send some form data from one page, through a frameset and out to a third party (JAVA). At the moment, I'm switching the $_POST vars over to the $_SESSION vars (in the frameset), then populating a bunch of hidden form fields within one of the frames (from the session vars) and then submitting the request via javascript. It's gotta be possible to do all this with PHP and I'm sure it's easy. Can some kind soul give me the bit of knowledge I'm missing to make this happen. Thanks, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.SextonJr at ubs.com Thu Jul 31 15:39:05 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Thu, 31 Jul 2003 15:39:05 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Message-ID: <18D7B8CAA5284F478470828806DB124603789EFD@psle01.xchg.pwj.com> You are trying to execute PHP code on the client. What you would want to do is have Javascript submit the form (onClick="document.mediaplayerchoice.submit();"). Then have your setcookie call at the top of the processing page... like this: setcookie("preferredmediaplayer", $_POST['preferredmediaplayer'],time()+60*60*24*30,"/player/","cmj.com",0); Basically, if you view the source of the web page after it loads as it is now, there will be no code for the onClick event since the PHP code is parsed beforehand and does not output anything. What you will have is the cookie value always set to 'wmp' since you are overwriting it each time a user hits this form. HTH... let me know if it's still unclear. -----Original Message----- From: Robert Dumas [mailto:rdumas at cmj.com] Sent: Thursday, July 31, 2003 2:43 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Okay, here's essentially what I have for the launcher.
Preferred Media Player:

So why doesn't it prompt me to save a cookie (i have "prompt for cookie" enabled in my browser) when i press the radio input? By the way, thanks for all the help. I appreciate it. --RD -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com ] Sent: Thursday, July 31, 2003 2:25 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Say you named a cookie 'player_type' in another script and assigned a value of 'real' or 'wmp' to it... Reading the value back would go something like this... if(isset($_COOKIE['player_type'])) { if($_COOKIE['player_type'] == "wmp") { //...statements/output for WMP } else { //...statements/output for REAL player } } else { // Cookie doesn't exist... do whatever... } -----Original Message----- From: Robert Dumas [ mailto:rdumas at cmj.com ] Sent: Thursday, July 31, 2003 2:00 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting There's really no need for me to save the user's state on the server side of things; all I need to do is set (and then, later, read) the cookie. I've read the feature on php.net about cookies, but it simply talks about creating them. What I'll need to do is have a PHP script in the popup player that reads the cookie and outputs the code for the correct media player. How do I do this? -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com < mailto:David.SextonJr at ubs.com > ] Sent: Thursday, July 31, 2003 1:14 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Sounds like a plan... unless you foresee a use for maintaining state info down the line, and reliability isn't important (since clearing your cookies will wipe out your preference), then it's not worth the work, as Rolan suggested. Then again, if reliability isn't an issue, is it worth any effort at all in trying to retain the pref? That's your preference... :) -----Original Message----- From: Robert Dumas [ mailto:rdumas at cmj.com < mailto:rdumas at cmj.com > ] Sent: Thursday, July 31, 2003 1:03 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting register/login is way morethan i need here; a simple cookie with the stored preference will do. If they don't choose a preferred player, they don't get the player. Simple as that. --RD -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com < mailto:David.SextonJr at ubs.com > < mailto:David.SextonJr at ubs.com < mailto:David.SextonJr at ubs.com > > ] Sent: Thursday, July 31, 2003 12:41 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting ...or require them to register/login, which would be more reliable since you can store/retrieve the prefs server-side using sessions. Maybe you already have an existing login process, which would make it that much easier to implement. -----Original Message----- From: Rolan [ mailto:rolan at datawhorehouse.com < mailto:rolan at datawhorehouse.com > < mailto:rolan at datawhorehouse.com < mailto:rolan at datawhorehouse.com > > ] Sent: Thursday, July 31, 2003 12:25 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Simple form-based selection and cookie-setting/getting cookies. http://www.php.net/manual/en/features.cookies.php < http://www.php.net/manual/en/features.cookies.php > < http://www.php.net/manual/en/features.cookies.php < http://www.php.net/manual/en/features.cookies.php > > Robert Dumas wrote: > Hi all: > > I'm new to the list and I have a question. > > I'm building a streaming media player that opens in a pop-up (a > requested one, thank goodness) and I want to do it in PHP. Basically, > I want the user to select their preferred media player -- Real (ugh) > or WMP (double-ugh) -- and hit a link which saves their media player > preference and pops open the player. Popping open the player is, of > course, no problem; but retrieving their preference is kind of sticky. > Does anyone know of a good example of a simple way to do this? > > Cheers > > Robert Dumas > >------------------------------------------------------------------------ > >_______________________________________________ >talk mailing list >talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk < http://lists.nyphp.org/mailman/listinfo/talk > < http://lists.nyphp.org/mailman/listinfo/talk < http://lists.nyphp.org/mailman/listinfo/talk > > Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk < http://lists.nyphp.org/mailman/listinfo/talk > Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. From enunez at tiaa-cref.org Thu Jul 31 15:52:41 2003 From: enunez at tiaa-cref.org (Nunez, Eddy) Date: Thu, 31 Jul 2003 15:52:41 -0400 Subject: [nycphp-talk] Who include()'d me? Message-ID: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9D1F@msxnyusr01.msx.ops.tiaa-cref.org> Quick question: Anyone know if there is a constant or something that contains the name of the file that "I" was included into. e.g. includer.php: codefile.inc: I know about _FILE_, if I use it, it'll just return who the current file is ... and no I don't want to pass it as an argument. Looking for something more elegant. Let me know if I am not making sense. Thanks. -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 rdumas at cmj.com Thu Jul 31 15:56:12 2003 From: rdumas at cmj.com (Robert Dumas) Date: Thu, 31 Jul 2003 15:56:12 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Message-ID: <2ADC7BED20C3D711BFF100508B8FA3E307FB78@webproxy.uat.dbinsight.com> so if I'm reading this right, I want to do something like this?
Preferred Media Player:


... and that will cause the form to submit the VALUE of whatever radio input is clicked? --RD -----Original Message----- From: Sexton, David [mailto:David.SextonJr at ubs.com] Sent: Thursday, July 31, 2003 3:39 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting You are trying to execute PHP code on the client. What you would want to do is have Javascript submit the form (onClick="document.mediaplayerchoice.submit();"). Then have your setcookie call at the top of the processing page... like this: setcookie("preferredmediaplayer", $_POST['preferredmediaplayer'],time()+60*60*24*30,"/player/","cmj.com",0); Basically, if you view the source of the web page after it loads as it is now, there will be no code for the onClick event since the PHP code is parsed beforehand and does not output anything. What you will have is the cookie value always set to 'wmp' since you are overwriting it each time a user hits this form. HTH... let me know if it's still unclear. -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.SextonJr at ubs.com Thu Jul 31 15:57:35 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Thu, 31 Jul 2003 15:57:35 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Message-ID: <18D7B8CAA5284F478470828806DB124603789F00@psle01.xchg.pwj.com> Exactly. Then you would set the cookie in the script designated by the form's action attribute. -----Original Message----- From: Robert Dumas [mailto:rdumas at cmj.com] Sent: Thursday, July 31, 2003 3:56 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting so if I'm reading this right, I want to do something like this?
Preferred Media Player:


... and that will cause the form to submit the VALUE of whatever radio input is clicked? --RD -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com ] Sent: Thursday, July 31, 2003 3:39 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting You are trying to execute PHP code on the client. What you would want to do is have Javascript submit the form (onClick="document.mediaplayerchoice.submit();"). Then have your setcookie call at the top of the processing page... like this: setcookie("preferredmediaplayer", $_POST['preferredmediaplayer'],time()+60*60*24*30,"/player/","cmj.com",0); Basically, if you view the source of the web page after it loads as it is now, there will be no code for the onClick event since the PHP code is parsed beforehand and does not output anything. What you will have is the cookie value always set to 'wmp' since you are overwriting it each time a user hits this form. HTH... let me know if it's still unclear. 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 David.SextonJr at ubs.com Thu Jul 31 15:59:24 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Thu, 31 Jul 2003 15:59:24 -0400 Subject: [nycphp-talk] Who include()'d me? Message-ID: <18D7B8CAA5284F478470828806DB124603789F01@psle01.xchg.pwj.com> I believe you can use $_SERVER['PHP_SELF'] within the included file and it will return the path/name of the includer file. -----Original Message----- From: Nunez, Eddy [mailto:enunez at tiaa-cref.org] Sent: Thursday, July 31, 2003 3:53 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] Who include()'d me? Quick question: Anyone know if there is a constant or something that contains the name of the file that "I" was included into. e.g. includer.php: codefile.inc: I know about _FILE_, if I use it, it'll just return who the current file is ... and no I don't want to pass it as an argument. Looking for something more elegant. Let me know if I am not making sense. Thanks. -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 ************************************************************** 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 rdumas at cmj.com Thu Jul 31 16:02:36 2003 From: rdumas at cmj.com (Robert Dumas) Date: Thu, 31 Jul 2003 16:02:36 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Message-ID: <2ADC7BED20C3D711BFF100508B8FA3E307FB79@webproxy.uat.dbinsight.com> ah-ha... so my FORM element should look something like...
where SetPlayer reads like this: function SetPlayer(player) { document.setcookie("preferredmediaplayer",player,time()+60*60*24*30,"/player /","cmj.com",0); } ...correct? --RD -----Original Message----- From: Sexton, David [mailto:David.SextonJr at ubs.com] Sent: Thursday, July 31, 2003 3:58 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Exactly. Then you would set the cookie in the script designated by the form's action attribute. -----Original Message----- From: Robert Dumas [mailto:rdumas at cmj.com] Sent: Thursday, July 31, 2003 3:56 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting so if I'm reading this right, I want to do something like this? Preferred Media Player:


... and that will cause the form to submit the VALUE of whatever radio input is clicked? --RD -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com ] Sent: Thursday, July 31, 2003 3:39 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting You are trying to execute PHP code on the client. What you would want to do is have Javascript submit the form (onClick="document.mediaplayerchoice.submit();"). Then have your setcookie call at the top of the processing page... like this: setcookie("preferredmediaplayer", $_POST['preferredmediaplayer'],time()+60*60*24*30,"/player/","cmj.com",0); Basically, if you view the source of the web page after it loads as it is now, there will be no code for the onClick event since the PHP code is parsed beforehand and does not output anything. What you will have is the cookie value always set to 'wmp' since you are overwriting it each time a user hits this form. HTH... let me know if it's still unclear. 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. _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.SextonJr at ubs.com Thu Jul 31 16:10:41 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Thu, 31 Jul 2003 16:10:41 -0400 Subject: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Message-ID: <18D7B8CAA5284F478470828806DB124603789F02@psle01.xchg.pwj.com> Sure, you could do it all client-side too... would actually be faster. I've never done it that way, so I don't know what other pros/cons may exist other than the user disabling scripting (obviously a con). If you wanted to avoid relying on Javascript in addition to cookies, you could have a standard submit button and a javascript-free HTML form that posts to itself or another page... and let PHP handle the cookie creation. -----Original Message----- From: Robert Dumas [mailto:rdumas at cmj.com] Sent: Thursday, July 31, 2003 4:03 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting ah-ha... so my FORM element should look something like...
where SetPlayer reads like this: function SetPlayer(player) { document.setcookie("preferredmediaplayer",player,time()+60*60*24*30,"/player /","cmj.com",0); } ...correct? --RD -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com ] Sent: Thursday, July 31, 2003 3:58 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting Exactly. Then you would set the cookie in the script designated by the form's action attribute. -----Original Message----- From: Robert Dumas [ mailto:rdumas at cmj.com ] Sent: Thursday, July 31, 2003 3:56 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting so if I'm reading this right, I want to do something like this? Preferred Media Player:


... and that will cause the form to submit the VALUE of whatever radio input is clicked? --RD -----Original Message----- From: Sexton, David [ mailto:David.SextonJr at ubs.com < mailto:David.SextonJr at ubs.com > ] Sent: Thursday, July 31, 2003 3:39 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Simple form-based selection and cookie-setting/g etting You are trying to execute PHP code on the client. What you would want to do is have Javascript submit the form (onClick="document.mediaplayerchoice.submit();"). Then have your setcookie call at the top of the processing page... like this: setcookie("preferredmediaplayer", $_POST['preferredmediaplayer'],time()+60*60*24*30,"/player/","cmj.com",0); Basically, if you view the source of the web page after it loads as it is now, there will be no code for the onClick event since the PHP code is parsed beforehand and does not output anything. What you will have is the cookie value always set to 'wmp' since you are overwriting it each time a user hits this form. HTH... let me know if it's still unclear. 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. _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. From enunez at tiaa-cref.org Thu Jul 31 16:14:38 2003 From: enunez at tiaa-cref.org (Nunez, Eddy) Date: Thu, 31 Jul 2003 14:14:38 -0600 Subject: [nycphp-talk] Who include()'d me? Message-ID: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9D20@msxnyusr01.msx.ops.tiaa-cref.org> Thanks! Should have thought of that... I've used $PHP_SELF countless of times before. I noticed I could also use $_SERVER[SCRIPT_NAME] for absolute path to the "includer". -Eddy -----Original Message----- From: Sexton, David [mailto:David.SextonJr at ubs.com] Sent: Thursday, July 31, 2003 3:59 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Who include()'d me? I believe you can use $_SERVER['PHP_SELF'] within the included file and it will return the path/name of the includer file. -----Original Message----- From: Nunez, Eddy [mailto:enunez at tiaa-cref.org] Sent: Thursday, July 31, 2003 3:53 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] Who include()'d me? Quick question: Anyone know if there is a constant or something that contains the name of the file that "I" was included into. e.g. includer.php: codefile.inc: I know about _FILE_, if I use it, it'll just return who the current file is ... and no I don't want to pass it as an argument. Looking for something more elegant. Let me know if I am not making sense. Thanks. -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 ************************************************************** 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. _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** From enunez at tiaa-cref.org Thu Jul 31 16:16:10 2003 From: enunez at tiaa-cref.org (Nunez, Eddy) Date: Thu, 31 Jul 2003 16:16:10 -0400 Subject: [nycphp-talk] Who include()'d me? Message-ID: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9D21@msxnyusr01.msx.ops.tiaa-cref.org> Err...Correction: $_SERVER[SCRIPT_FILENAME] -----Original Message----- From: Nunez, Eddy Sent: Thursday, July 31, 2003 4:15 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Who include()'d me? Thanks! Should have thought of that... I've used $PHP_SELF countless of times before. I noticed I could also use $_SERVER[SCRIPT_NAME] for absolute path to the "includer". -Eddy -----Original Message----- From: Sexton, David [mailto:David.SextonJr at ubs.com] Sent: Thursday, July 31, 2003 3:59 PM To: 'NYPHP Talk' Subject: RE: [nycphp-talk] Who include()'d me? I believe you can use $_SERVER['PHP_SELF'] within the included file and it will return the path/name of the includer file. -----Original Message----- From: Nunez, Eddy [mailto:enunez at tiaa-cref.org] Sent: Thursday, July 31, 2003 3:53 PM To: talk at lists.nyphp.org Subject: [nycphp-talk] Who include()'d me? Quick question: Anyone know if there is a constant or something that contains the name of the file that "I" was included into. e.g. includer.php: codefile.inc: I know about _FILE_, if I use it, it'll just return who the current file is ... and no I don't want to pass it as an argument. Looking for something more elegant. Let me know if I am not making sense. Thanks. -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 ************************************************************** 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. _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** _______________________________________________ talk mailing list talk at lists.nyphp.org http://lists.nyphp.org/mailman/listinfo/talk ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** From shiflett at php.net Thu Jul 31 16:23:16 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 31 Jul 2003 13:23:16 -0700 (PDT) Subject: [nycphp-talk] Who include()'d me? In-Reply-To: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9D20@msxnyusr01.msx.ops.tiaa-cref.org> Message-ID: <20030731202316.64160.qmail@web14308.mail.yahoo.com> --- "Nunez, Eddy" wrote: > I've used $PHP_SELF countless of times before. > I noticed I could also use $_SERVER[SCRIPT_NAME] for > absolute path to the "includer". Just keep in mind that these values represent the resource that the client requested: http://example.org/blah.php In this example, blah.php would be the resource, even if it includes foo.inc which includes bar.inc. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From soazine at erols.com Thu Jul 31 17:39:58 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 31 Jul 2003 17:39:58 -0400 Subject: [nycphp-talk] Simple htmlspecialchars - stripslashes problem that I can't fix References: <20030731202316.64160.qmail@web14308.mail.yahoo.com> Message-ID: <0a4d01c357ac$4a1334f0$67a76244@philofsoa> If $val is the following: ...Just revamped the site's Content Management Application I built.. so do bear in mind.. sorry! Phil stripslashes(htmlspecialchars($val)) should produce the following, or so I thought: Instead, I get: What combo of stripslashes() and htmlspecialchars() do I use to ensure I get a single-line entity from an HTML textarea value that could have anything in it, plain and simple? Phil From shiflett at php.net Thu Jul 31 17:58:59 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 31 Jul 2003 14:58:59 -0700 (PDT) Subject: [nycphp-talk] Simple htmlspecialchars - stripslashes problem that I can't fix In-Reply-To: <0a4d01c357ac$4a1334f0$67a76244@philofsoa> Message-ID: <20030731215859.84538.qmail@web14301.mail.yahoo.com> --- Phil Powell wrote: > What combo of stripslashes() and htmlspecialchars() do I use > to ensure I get a single-line entity from an HTML textarea I think something like this will work, assuming $textarea is set to the original value sent from the client: if (get_magic_quotes_gpc()) { $textarea = stripslashes($textarea); } $textarea = htmlspecialchars($textarea); Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From soazine at erols.com Thu Jul 31 18:02:56 2003 From: soazine at erols.com (Phil Powell) Date: Thu, 31 Jul 2003 18:02:56 -0400 Subject: [nycphp-talk] Simple htmlspecialchars - stripslashes problem thatI can't fix References: <20030731215859.84538.qmail@web14301.mail.yahoo.com> Message-ID: <0a8d01c357af$7f5fe470$67a76244@philofsoa> Chris, this is what I have now: echo "\n"; Based on your idea. However, the results are still the same: I am still getting improperly formatted values of $val inside Phil ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Thursday, July 31, 2003 5:58 PM Subject: Re: [nycphp-talk] Simple htmlspecialchars - stripslashes problem thatI can't fix > --- Phil Powell wrote: > > What combo of stripslashes() and htmlspecialchars() do I use > > to ensure I get a single-line entity from an HTML textarea > > I think something like this will work, assuming $textarea is set to the > original value sent from the client: > > if (get_magic_quotes_gpc()) > { > $textarea = stripslashes($textarea); > } > $textarea = htmlspecialchars($textarea); > > Hope that helps. > > Chris > > ===== > Become a better Web developer with the HTTP Developer's Handbook > http://httphandbook.org/ > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk From shiflett at php.net Thu Jul 31 18:26:18 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 31 Jul 2003 15:26:18 -0700 (PDT) Subject: [nycphp-talk] Simple htmlspecialchars - stripslashes problem thatI can't fix In-Reply-To: <0a8d01c357af$7f5fe470$67a76244@philofsoa> Message-ID: <20030731222618.88674.qmail@web14301.mail.yahoo.com> --- Phil Powell wrote: > echo " if (get_magic_quotes_gpc()) $val = stripslashes($val); > $val = htmlspecialchars($val); > echo "\">\n"; OK, this can't be your code, unless I'm missing something. This doesn't output anything for the value attribute of your input tag. Try this: $val is [] Hope that helps. Chris ===== Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ From fields at surgam.net Thu Jul 31 18:38:19 2003 From: fields at surgam.net (Adam Fields) Date: Thu, 31 Jul 2003 18:38:19 -0400 Subject: [nycphp-talk] TCL, PHP and cookies - AUGH! In-Reply-To: <096501c3578f$e95b23f0$67a76244@philofsoa> References: <20030731174641.GB27670@eye.surgam.net> <096501c3578f$e95b23f0$67a76244@philofsoa> Message-ID: <20030731223818.GH27670@eye.surgam.net> On Thu, Jul 31, 2003 at 02:16:50PM -0400, Phil Powell wrote: > This is pure TCL CGI, although very familiar with Vignette. Typically, the way this works is that whatever is providing the "CGI" part of this for you will munge the cookies as returned in the header into some form you can use. If not, it should be in the HTTP_COOKIE environment variable, in the form described in the latter two links below: http://hoohoo.ncsa.uiuc.edu/cgi/env.html http://www.cookiecentral.com/faq/#3.2 http://wp.netscape.com/newsref/std/cookie_spec.html > Phil > ----- Original Message ----- > From: "Adam Fields" > To: "NYPHP Talk" > Sent: Thursday, July 31, 2003 1:46 PM > Subject: Re: [nycphp-talk] TCL, PHP and cookies - AUGH! > > > > On Thu, Jul 31, 2003 at 01:41:05PM -0400, Phil Powell wrote: > > > It doesn't show up in the $env list (that is, 'username'), however > > > 'valIdentifier', another cookie in the same domain, does show up in > $env. > > > > > > I don't know the syntax for passing a cookie into my HTTP_GET TCL proc, > does > > > anyone? > > > > Is this a TCL CGI or some version of Vignette? > > > > > > -- > > - Adam > > > > ----- > > Adam Fields, Managing Partner, fields at surgam.net > > Surgam, Inc. is a technology consulting firm with strong background in > > delivering scalable and robust enterprise web and IT applications. > > http://www.adamfields.com > > _______________________________________________ > > talk mailing list > > talk at lists.nyphp.org > > http://lists.nyphp.org/mailman/listinfo/talk > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > -- - Adam ----- Adam Fields, Managing Partner, fields at surgam.net Surgam, Inc. is a technology consulting firm with strong background in delivering scalable and robust enterprise web and IT applications. http://www.adamfields.com From danielc at analysisandsolutions.com Thu Jul 31 22:55:32 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 31 Jul 2003 22:55:32 -0400 Subject: [nycphp-talk] Who include()'d me? In-Reply-To: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9D21@msxnyusr01.msx.ops.tiaa-cref.org> References: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9D21@msxnyusr01.msx.ops.tiaa-cref.org> Message-ID: <20030801025532.GB28066@panix.com> Hi Eddy: On Thu, Jul 31, 2003 at 04:16:10PM -0400, Nunez, Eddy wrote: > > Err...Correction: $_SERVER[SCRIPT_FILENAME] Guess you have notices turned off. Quotes are needed around array key strings so they don't get interpreted as constants. So, that's really $_SERVER['SCRIPT_FILENAME'] Enjoy, --Dan ... snip ... -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From danielc at analysisandsolutions.com Thu Jul 31 22:59:43 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 31 Jul 2003 22:59:43 -0400 Subject: [nycphp-talk] POST via PHP In-Reply-To: References: Message-ID: <20030801025943.GC28066@panix.com> Hi Christopher: Try the post to host scripts here: http://www.php-faq.com/postToHost.html http://dodds.net/~cardinal/sendtohost.txt 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 lss1 at netzero.net Mon Jul 28 09:50:13 2003 From: lss1 at netzero.net (LS) Date: Mon, 28 Jul 2003 09:50:13 -0400 Subject: [nycphp-talk] please unsubscribe me Message-ID: <000201c35832$81da91e0$86a4b8cd@user> hi; I have sent you the request for unsubcribing from your mailing list, and I received an confirmation and I answered it, but still you keep me on your mailing list Leon -------------- next part -------------- An HTML attachment was scrubbed... URL: From hans at nyphp.org Sun Jul 6 14:12:34 2003 From: hans at nyphp.org (Hans Zaunere) Date: Sun, 06 Jul 2003 18:12:34 -0000 Subject: [nycphp-talk] Speed/Bandwidth Tests? In-Reply-To: <02a601c34193$e12bd510$e400fa0a@synacor.com> References: <02a601c34193$e12bd510$e400fa0a@synacor.com> Message-ID: <3F08668B.1020208@nyphp.org> Jay wrote: > Anyone here have any experience with bandwidth testing? Basically, I'm > looking to determine a website visitor's connection speed so I can direct > them to an appropriate media stream. I've done bandwidth testing, but not between a user's browser and the server - typically it's between two servers :) I'm not sure if there is a good way of doing this, though; if there was, the major sites like cnn.com and so forth wouldn't ask you to select the stream's speed. Maybe there's a way to talk directly to a particular plugin and ask it what kind of internet connection it's owner configured it for, but it's probably not a good idea to saturate the client's internet link. I suppose you could traceroute them and possibly determine from that what kind of link they're on, but I would think that's very unreliable and complex. H From nsr81 at ny-tech.net Sun Jul 6 19:41:22 2003 From: nsr81 at ny-tech.net (Nasir Zubair) Date: Sun, 06 Jul 2003 23:41:22 -0000 Subject: [nycphp-talk] OT: Need some advice on Grad. Studies in Comp. Sci. Message-ID: <000001c34417$59fcc460$6501a8c0@main> Hi all, This is a bit off topic, so feel free to ignore. I graduated recently from college with major in Computer and Info. Science. At this time, I'm looking into attending a graduate school to pursue an M.S. I've looked at a few programs at different schools in NY area, including CUNY and I'm not sure what I'm going to do yet. Fairly confused LOL. For now I'm going to be preparing for General GREs. One thing that concerns me is that I was a little weak at math and calculus during college. How bad you ask? Well, I got Cs in 3 calculus courses I took. Other than Mathematics, I did pretty good in almost every course, mostly Bs and some As. Can anyone tell me how will that affect me as far as my pursuit of an M.S. degree is concerned, in general? I'd also appreciate if you can give any advice at all on the subject. Regards, Nasir Zubair From cmerlo at turing.matcmp.ncc.edu Mon Jul 7 09:05:13 2003 From: cmerlo at turing.matcmp.ncc.edu (Christopher R. Merlo) Date: Mon, 07 Jul 2003 13:05:13 -0000 Subject: [nycphp-talk] OT: Need some advice on Grad. Studies in Comp. Sci. In-Reply-To: <000001c34417$59fcc460$6501a8c0@main>; from nsr81@ny-tech.net on Sun, Jul 06, 2003 at 07:41:20PM -0400 References: <000001c34417$59fcc460$6501a8c0@main> Message-ID: <20030707090511.G13966@turing.matcmp.ncc.edu> On 2003-07-06 19:41 -0400, Nasir Zubair wrote: > I got Cs in 3 calculus courses I took. That's not necessarily the end of the world. After all, you passed Calculus. As long as Math was not a major or a minor, I wouldn't be real concerned about that. > Other than Mathematics, I did pretty good in almost every course, > mostly Bs and some As. Can anyone tell me how will that affect me as far as > my pursuit of an M.S. degree is concerned, in general? I'd also appreciate > if you can give any advice at all on the subject. Grad programs are mostly going to be looking for your ability, or perceived ability, to do research. A lot of that comes from your grades in your major, and a lot comes from any projects you may have done in undergrad. They also look at the GREs (I got my grad school assistantships based almost solely on the GREs) and how much of a work load you can handle, by looking at majors, minors, jobs, activities, etc. Grad school is probably the toughest thing you'll ever tackle, and if you don't marry it, you'll never get through. (Hence why I stopped after the MS.) The reason you take Calculus is that it helps you learn to think logically and efficiently. Those skills, along with your coding skills, will get you through most, if not all, of your classwork at the grad level. The research part is a little more personal, and so the best advice I can give you is to look up the faculty at 5 or so schools you're considering. If any of the listed faculty are studying anything interesting, send them an e-mail and ask about it. You want your research advisor to be communicative, and to have a common interest with you. Don't pick a school for the nightlife, or the surfing, or whatever, because you're not going to have time to enjoy it much, anyway. But if you pick by researchers, well, now you're on the right track. Good luck! -c -- cmerlo at turing.matcmp.ncc.edu http://turing.matcmp.ncc.edu/~cmerlo This e-mail message contains 80% recycled electrons. From bpang at bpang.com Mon Jul 7 09:50:53 2003 From: bpang at bpang.com (Brian Pang) Date: Mon, 07 Jul 2003 13:50:53 -0000 Subject: [nycphp-talk] Speed/Bandwidth Tests? Message-ID: set a timestamp variable with javascript send (in comments if you don't want it to show) 100K of text data set a second timestamp variable using javascript determine elapsed time between the two timestamps... (seconds/100)*1.024 = Kbps I recommend using a large chunk of data because something small, like 1k, has the potential to burst through at a significantly higher rate than you would anticipate. I usually run two tests and then get the mean of both results. http://www.bpang.com/speed/ bear in mind that the advertised speeds of modems, etc, is in k, not K > > > Jay wrote: > > > Anyone here have any experience with bandwidth testing? Basically, I'm > > looking to determine a website visitor's connection speed so I can direct > > them to an appropriate media stream. > > I've done bandwidth testing, but not between a user's browser and the server - typically it's between two servers :) > > I'm not sure if there is a good way of doing this, though; if there was, the major sites like cnn.com and so forth wouldn't ask you to select the stream's speed. Maybe there's a way to talk directly to a particular plugin and ask it what kind of internet connection it's owner configured it for, but it's probably not a good idea to saturate the client's internet link. I suppose you could traceroute them and possibly determine from that what kind of link they're on, but I would think that's very unreliable and complex. > > H > > _______________________________________________ > talk mailing list > talk at lists.nyphp.org > http://lists.nyphp.org/mailman/listinfo/talk > > From bpang at bpang.com Mon Jul 7 14:13:59 2003 From: bpang at bpang.com (Brian Pang) Date: Mon, 07 Jul 2003 18:13:59 -0000 Subject: [nycphp-talk] Re: php setTimeout ? Message-ID: I'll go ahead and answer my own question here before it even makes it to the list in the event that it edifies others. The sleep() and usleep() functions [whole seconds and 1/1,000,000 second increments, respectively] provide this ability, and they're better than setTimeout() because they work inline, rather than having to make calls to another function. Now you, too, can slow your applications down to 1994 speeds and earlier! FUN! Or, Jay, you could possibly use this to simulate a slow connection or really screw up the speed test results. > > Hi Brian, > > Please repost to talk at lists.nyphp.org > > Sorry for the trouble, > > NYPHP > > > > Brian Pang wrote: > > > Is there a php equivalent of javascript's setTimeout method? > > > > or some other way to slow down a script? > > > > I'm sure I could kludge some inefficient loop and wait for it to finish > > before proceeding, but that would just be dumb. > > > > Looking for something that is actually measurable/adjustable and that > > doesn't create undue load on the server. > > > > thanks > > > > > > > From nyphp at websapp.com Mon Jul 7 15:03:11 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Mon, 07 Jul 2003 19:03:11 -0000 Subject: [nycphp-talk] Job Offer Message-ID: Hi NYPHP, I came across this offer that I would like to pass on to the group. For more details please contact David Schiffer at david at dlsdesign.com. Mention that you came from NYPHP Mini desciption: The client has many local organizations (up to a few hundred) who might want small web sites of their own. We are discussing designing a template to hand off to their members, who could then modify and save as their own web site. But most of the members aren't technically proficient to work in Dreamweaver or a similar app. Best, Daniel Kushner Vice President, New York PHP http://nyphp.org/ daniel at nyphp.org From nyphp at websapp.com Mon Jul 7 15:35:52 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Mon, 07 Jul 2003 19:35:52 -0000 Subject: [nycphp-talk] Job Offer (continued) Message-ID: As a followup from my previous post, here is some more information from the client. Please reply to david at dlsdesign.com. --Daniel The client has many local organizations (up to a few hundred) who might want small web sites of their own. We are discussing designing a template to hand off to their members, who could then modify and save as their own web site. But most of the members aren't technically proficient to work in Dreamweaver or a similar app. We'd like to discuss a system where members could work from templates through a web browser. They'd enter information in fields and press a submit button to create the content of a web page, and then upload. Of course the pages would follow a main template, and the goal is not to make original design but just to publish. Can this be designed and implemented using php? What would the general costs be? _____________________________ David Schiffer DLS Design Award-winning design of corporate web sites and graphics. www.dlsdesign.com 212-255-3464 From hans at nyphp.org Mon Jul 7 19:26:27 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 07 Jul 2003 23:26:27 -0000 Subject: [nycphp-talk] That's A Wrap Message-ID: <3F0A019C.8020208@nyphp.org> http://www.computerworld.com/securitytopics/security/story/0,10801,82811,00.html?nas=PM-82811 "The attack, which downed Zone-h's Web site with 900Mbit/sec. of sustained traffic, came from a group of Brazilian hackers unhappy about the contest, Preatoni said." ... "However, others expressed skepticism about any connection between prior warnings of the contest and the lack of major defacements, saying that security vendors and the media hyped a low-level threat." H