From agolory at email.it Wed Oct 16 14:51:09 2002 From: agolory at email.it (lory : :) Date: Wed, 16 Oct 2002 20:51:09 +0200 Subject: find php script In-Reply-To: <200209091933.g89JXxZr008412@parsec.nyphp.org> Message-ID: <5.0.0.25.1.20021016204614.009ddd70@popmail.email.it> I've need of a php form that allow me to insert a FILE(zip), IMAGE, TITLE, SUBTITLE, DESCRIPTION and DATE.. and that make the webpage with all. (ok also with mysql). Where i can find a similar project? tnx lory : : -- Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f Sponsor: Fatti del male. Lascia perdere www.gratis.it. Clicca qui: http://adv2.email.it/cgi-bin/foclick.cgi?mid=725&d=9-9 From agolory at email.it Wed Oct 16 15:27:16 2002 From: agolory at email.it (lory : :) Date: Wed, 16 Oct 2002 21:27:16 +0200 Subject: [nycphp-talk] find php script In-Reply-To: <200209091955.g89JtMZr008480@parsec.nyphp.org> Message-ID: <5.0.0.25.1.20021016211124.009dc6b0@popmail.email.it> From: lory : : [mailto:agolory at email.it] >>> I've need of a php form that allow me to insert a FILE(zip), IMAGE, >>> TITLE, >>> SUBTITLE, DESCRIPTION and DATE.. >>> and that make the webpage with all. >>> (ok also with mysql). >>> >>> Where i can find a similar project? >> >> Insert a file into what? Please provide an exmple of what you want, >> this description doesn't make much sense?: sorry 4 english Adam :) I would insert the files in a folder (like 'images') so i can download the file from a link that i write into php form... ok? from the phpFORM: i want insert into a webpage: *IMAGE* *TITLE* *SUBTITLE* *DESCRIPTION* *DATE* *LINK* to file *FILE* into folder IMAGE lory : : -- Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f Sponsor: Telefonini a partire da 50?: Trovali su eBay! Clicca qui: http://adv2.email.it/cgi-bin/foclick.cgi?mid=531&d=9-9 From nyphp at websapp.com Tue Oct 1 21:10:51 2002 From: nyphp at websapp.com (Daniel Kushner) Date: Tue, 1 Oct 2002 21:10:51 -0400 Subject: PHP Job In-Reply-To: <200210010325.g913Pv4M013097@parsec.nyphp.org> Message-ID: <000001c269b0$8cbe7d90$7560c118@blackjack> Hi PHPers, Once in a while I need some help on some projects I receive and use sub contractors. One of my programmers, who has been doing a great job, unfortunately needs to leave the city for a while. I am in search of a replacement. If you are interested, please bring your resume over to the PHP Meetup (http://php.meetup.com/) and we'll chat over some beer. Please don't send resumes to my email. Regards, Daniel Kushner From patterson at computer.org Tue Oct 1 22:30:11 2002 From: patterson at computer.org (Bill Patterson) Date: Tue, 1 Oct 2002 22:30:11 -0400 Subject: [nycphp-talk] PHP Job References: <200210020106.g9216q4M014618@parsec.nyphp.org> Message-ID: <006901c269bb$a27d0ba0$6401a8c0@audubn01.nj.comcast.net> You've seen my code. I am available now. Should we talk? (I don't expect to be at the meetup in NYC.) Bill Patterson ----- Original Message ----- From: "Daniel Kushner" To: "NYPHP Talk" Sent: Tuesday, October 01, 2002 9:06 PM Subject: [nycphp-talk] PHP Job > Hi PHPers, > > Once in a while I need some help on some projects I receive and use sub > contractors. One of my programmers, who has been doing a great job, > unfortunately needs to leave the city for a while. I am in search of a > replacement. If you are interested, please bring your resume over to the > PHP Meetup (http://php.meetup.com/) and we'll chat over some beer. > Please don't send resumes to my email. > > > Regards, > Daniel Kushner > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > From jonbaer at jonbaer.net Wed Oct 2 00:59:56 2002 From: jonbaer at jonbaer.net (Jon Baer) Date: Wed, 02 Oct 2002 00:59:56 -0400 Subject: PHP/XML/RELAX NG verifier References: <200210020106.g9216q4M014618@parsec.nyphp.org> Message-ID: <3D9A7D4C.2080803@jonbaer.net> Anyone know a good/or has developed a good library for Relax NG verification on an XML document? I googled for it and found mostly all written in Java and would like to see if anyone was doing related stuff before I tried writing my own. Thanks. - Jon From jonbaer at jonbaer.net Wed Oct 2 01:14:37 2002 From: jonbaer at jonbaer.net (Jon Baer) Date: Wed, 02 Oct 2002 01:14:37 -0400 Subject: ADODB vs. X/Y/Z References: <200210020506.g925624M014865@parsec.nyphp.org> Message-ID: <3D9A80BD.1000208@jonbaer.net> I am assuming that while in the midst of starting a new project from absolute scratch it would be 100x better to use ADODB vs. any other code and have not seen any reason to doubt using it, are there any drawbacks before starting? Anyone had bad experience with using it for all ur DB use? Thanks. - Jon From babacar at omnet.sn Wed Oct 2 05:27:06 2002 From: babacar at omnet.sn (Babacar Mbaye) Date: Wed, 2 Oct 2002 09:27:06 +0000 Subject: [nycphp-talk] ADODB vs. X/Y/Z In-Reply-To: <200210020520.g925Kl4M014936@parsec.nyphp.org> References: <200210020520.g925Kl4M014936@parsec.nyphp.org> Message-ID: <1033550826.3d9abbeae9260@www.omnet.sn> I used ADODB for Oracle and MySQL database (http://www.sentoo.sn) but I prefere PEAR which is developped and maintained by the PHP Group. Best regards! Babacar Surlignage Jon Baer : > I am assuming that while in the midst of starting a new project from > absolute scratch it would be 100x better to use ADODB vs. any other code > and have not seen any reason to doubt using it, are there any drawbacks > before starting? Anyone had bad experience with using it for all ur DB > use? > > Thanks. > > - Jon > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > -- Babacar Mbaye --------------------------------------------------------------------- OMNET NetWork, the Net that sucks less. You deserve a FREE Network with vanishing to zero downtime, just ask! From georgenatalino at yahoo.com Wed Oct 2 12:08:42 2002 From: georgenatalino at yahoo.com (George Natalino) Date: Wed, 2 Oct 2002 09:08:42 -0700 (PDT) Subject: Fwd: [nylug-announce] [nylug-talk] Wednesday 2 October 2002 WWWAC: Elmo's Free Software: Lessons Learned in Migrating Sesame Workshop from Vignette Story Server (fwd) Message-ID: <20021002160842.7334.qmail@web11404.mail.yahoo.com> Note: forwarded message attached. ================================================ Regards George Natalino georgenatalino at yahoo.com VoiceMail/Fax: (212) 894-3714 x1001 --------------------------------- Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded message was scrubbed... From: Subject: [nylug-announce] [nylug-talk] Wednesday 2 October 2002 WWWAC: Elmo's Free Software: Lessons Learned in Migrating Sesame Workshop from Vignette Story Server (fwd) Date: Wed, 2 Oct 2002 08:15:48 -0400 (EDT) Size: 4292 URL: From bruce at mtiglobal.com Thu Oct 3 05:59:12 2002 From: bruce at mtiglobal.com (bruce at mtiglobal.com) Date: Thu, 3 Oct 2002 01:59:12 -0800 (CST) Subject: [nycphp-talk] Internationaliz/sation - JSP vs. PHP In-Reply-To: <200209302056.g8UKur4M012580@parsec.nyphp.org> References: <200209302056.g8UKur4M012580@parsec.nyphp.org> Message-ID: <8721.65.112.109.66.1033581552.squirrel@taipei.mtiglobal.com> I'll probably be using MySQL -- Oracle is expensive and my friend's company is not that big yet. As for unicode, the servers are physically located in Taiwan and much of the translation work deals with Chinese, so dealing with unicode won't be too much of a problem. I'm sure most of the problems one runs into dealing with unicode have already been dealt with. > > I wrote my opnion before, but I think it lost in the talk at nyphp.org. I > use oracle as the backend dabase, but charset has to be set to utf8 > when you create a databse, you can use this charset for all languages in > oracle. There are two ways to process mitiple languages in php, one is > you have two sest of codes put into two different directories. another > is you can use a very very long arrary to hold all languages, then print > them out depened on the "locale" variable. > > Joseph Annino wrote:I've had some luck with PHP and unicode, even > without explicit support for > it in the language. I used mysql as the database backend, and used vlib > template to generate all my pages. Unicode text would pass through all > of these unharmed, and you could even do searches containing unicode > characters. Using a template system like vlib template, creating > versions of the site for different languages is as simple as using a > different template file. Just make sure you put a tag in the head > section of the HTML template to set the encoding appropriately, and use > some GET or session variable to specify the language. > > Depending on what level of internationalization support you need, this > may be enough. You can get data in and out regardless of encoding so > long as you maintain consistent throughout. > > On 9/26/02 10:42 AM, "Hans Zaunere" wrote: > >> >> --- bruce at mtiglobal.com wrote: >>> I'm going to work on a site for a friend's translation company. His >>> company translates technical documents in 30+ asian/european >>> languages. >>> The site will be to market his company in different countries as well >>> as >>> have services for his translators. >>> >>> I've just begun to look through the tutorial on internationalization >>> at >>> java.sun.com as I begin thinking on the architecture of this site. Is >>> there any similar documentation/tutorial online for php? >> >> There's a mailing list dedicated for the project: >> http://www.php.net/mailing-lists.php >> >> And the project itself: >> http://sourceforge.net/projects/php-i18n/ >> >>> Do any of you have experience developing multilingual web sites? If >>> yes, have you used JSP, PHP, or any other technology for this? >> >> I haven't done this sort of thing on this scale, but I have played >> around with the php.net/recode functions a bit and some of the >> different encodings. I know that there's a few people on this list >> that have used the internationalization before, too. >> >> H >> >> >> __________________________________________________ >> Do you Yahoo!? >> New DSL Internet Access from SBC & Yahoo! >> http://sbc.yahoo.com >> >> >> >> >> > > > > > > > > Regards > > Mark Jia > > > --------------------------------- > Do you Yahoo!? > New DSL Internet Access from SBC & Yahoo! > > > --- Unsubscribe at http://nyphp.org/list --- From jannino at jannino.com Wed Oct 2 15:59:28 2002 From: jannino at jannino.com (Joseph Annino) Date: Wed, 02 Oct 2002 15:59:28 -0400 Subject: [nycphp-talk] Internationaliz/sation - JSP vs. PHP In-Reply-To: <200210021759.g92HxO4M016128@parsec.nyphp.org> Message-ID: The MySQL docs have a whole chapter about these issues: http://www.mysql.com/doc/en/Character_sets.html I think MySQL handles these things in a simpler manner than Oracle. On 10/2/02 1:59 PM, "bruce at mtiglobal.com" wrote: > I'll probably be using MySQL -- Oracle is expensive and my friend's > company is not that big yet. As for unicode, the servers are physically > located in Taiwan and much of the translation work deals with Chinese, so > dealing with unicode won't be too much of a problem. I'm sure most of the > problems one runs into dealing with unicode have already been dealt with. > > >> >> I wrote my opnion before, but I think it lost in the talk at nyphp.org. I >> use oracle as the backend dabase, but charset has to be set to utf8 >> when you create a databse, you can use this charset for all languages in >> oracle. There are two ways to process mitiple languages in php, one is >> you have two sest of codes put into two different directories. another >> is you can use a very very long arrary to hold all languages, then print >> them out depened on the "locale" variable. >> >> Joseph Annino wrote:I've had some luck with PHP and unicode, even >> without explicit support for >> it in the language. I used mysql as the database backend, and used vlib >> template to generate all my pages. Unicode text would pass through all >> of these unharmed, and you could even do searches containing unicode >> characters. Using a template system like vlib template, creating >> versions of the site for different languages is as simple as using a >> different template file. Just make sure you put a tag in the head >> section of the HTML template to set the encoding appropriately, and use >> some GET or session variable to specify the language. >> >> Depending on what level of internationalization support you need, this >> may be enough. You can get data in and out regardless of encoding so >> long as you maintain consistent throughout. >> >> On 9/26/02 10:42 AM, "Hans Zaunere" wrote: >> >>> >>> --- bruce at mtiglobal.com wrote: >>>> I'm going to work on a site for a friend's translation company. His >>>> company translates technical documents in 30+ asian/european >>>> languages. >>>> The site will be to market his company in different countries as well >>>> as >>>> have services for his translators. >>>> >>>> I've just begun to look through the tutorial on internationalization >>>> at >>>> java.sun.com as I begin thinking on the architecture of this site. Is >>>> there any similar documentation/tutorial online for php? >>> >>> There's a mailing list dedicated for the project: >>> http://www.php.net/mailing-lists.php >>> >>> And the project itself: >>> http://sourceforge.net/projects/php-i18n/ >>> >>>> Do any of you have experience developing multilingual web sites? If >>>> yes, have you used JSP, PHP, or any other technology for this? >>> >>> I haven't done this sort of thing on this scale, but I have played >>> around with the php.net/recode functions a bit and some of the >>> different encodings. I know that there's a few people on this list >>> that have used the internationalization before, too. >>> >>> H >>> >>> >>> __________________________________________________ >>> Do you Yahoo!? >>> New DSL Internet Access from SBC & Yahoo! >>> http://sbc.yahoo.com >>> >>> >>> >>> >>> >> >> >> >> >> >> >> >> Regards >> >> Mark Jia >> >> >> --------------------------------- >> Do you Yahoo!? >> New DSL Internet Access from SBC & Yahoo! >> >> >> > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From cahoyos at us.ibm.com Wed Oct 2 16:24:45 2002 From: cahoyos at us.ibm.com (Carlos A Hoyos) Date: Wed, 2 Oct 2002 16:24:45 -0400 Subject: mysql design tools Message-ID: As much as I enjoy typing "create table...", "show index...", in mysql, when big projects come, I wish I had something similar to (CA's) ERwin, that allows you to create and maintain your db out of data diagrams (pretty handy when you have multiple developers. Just print an oversized copy and paste it to the wall in front of you). Being an industrial tool (and industrially priced), CA didn't even bother making drivers for a "free db" like mysql. So, my question is, does anybody know any data model design/management tool with mysql (or postgresql) support ? (I'm looking for some graphical ide to separate logical from physical models, and not an admin tool like phpmyadmin) btw... if anybody's going to the php meetup for the first time, here are some pictures of the place/last meeting http://www.remotelounge.com/consolePhotos/index.php?directoryOfChoice=09-05-2002&month=9&year=2002 not everybody featured is a php programmer... just some of channels 4 and 6 From markjia at yahoo.com Wed Oct 2 16:35:42 2002 From: markjia at yahoo.com (Mark Jia) Date: Wed, 2 Oct 2002 13:35:42 -0700 (PDT) Subject: [nycphp-talk] Internationaliz/sation - JSP vs. PHP In-Reply-To: <200210022000.g92K0S4M016279@parsec.nyphp.org> Message-ID: <20021002203542.18792.qmail@web20421.mail.yahoo.com> yes, I use mysql as well. it is better than oracle to handle mutiple languages from some point. Mysql is a databse that whatever you put in, you can get exactly the same out. you don't need to warry about charsets. If you will do some thing on Chinese and Japanese, it will have some troubles: Chinese has two charsets: GB2312 and Big5. Japanese also has more charsets. maybe you need two open source programs: recode and jcode to do the convert. Joseph Annino wrote:The MySQL docs have a whole chapter about these issues: http://www.mysql.com/doc/en/Character_sets.html I think MySQL handles these things in a simpler manner than Oracle. On 10/2/02 1:59 PM, "bruce at mtiglobal.com" wrote: > I'll probably be using MySQL -- Oracle is expensive and my friend's > company is not that big yet. As for unicode, the servers are physically > located in Taiwan and much of the translation work deals with Chinese, so > dealing with unicode won't be too much of a problem. I'm sure most of the > problems one runs into dealing with unicode have already been dealt with. > > >> >> I wrote my opnion before, but I think it lost in the talk at nyphp.org. I >> use oracle as the backend dabase, but charset has to be set to utf8 >> when you create a databse, you can use this charset for all languages in >> oracle. There are two ways to process mitiple languages in php, one is >> you have two sest of codes put into two different directories. another >> is you can use a very very long arrary to hold all languages, then print >> them out depened on the "locale" variable. >> >> Joseph Annino wrote:I've had some luck with PHP and unicode, even >> without explicit support for >> it in the language. I used mysql as the database backend, and used vlib >> template to generate all my pages. Unicode text would pass through all >> of these unharmed, and you could even do searches containing unicode >> characters. Using a template system like vlib template, creating >> versions of the site for different languages is as simple as using a >> different template file. Just make sure you put a tag in the head >> section of the HTML template to set the encoding appropriately, and use >> some GET or session variable to specify the language. >> >> Depending on what level of internationalization support you need, this >> may be enough. You can get data in and out regardless of encoding so >> long as you maintain consistent throughout. >> >> On 9/26/02 10:42 AM, "Hans Zaunere" wrote: >> >>> >>> --- bruce at mtiglobal.com wrote: >>>> I'm going to work on a site for a friend's translation company. His >>>> company translates technical documents in 30+ asian/european >>>> languages. >>>> The site will be to market his company in different countries as well >>>> as >>>> have services for his translators. >>>> >>>> I've just begun to look through the tutorial on internationalization >>>> at >>>> java.sun.com as I begin thinking on the architecture of this site. Is >>>> there any similar documentation/tutorial online for php? >>> >>> There's a mailing list dedicated for the project: >>> http://www.php.net/mailing-lists.php >>> >>> And the project itself: >>> http://sourceforge.net/projects/php-i18n/ >>> >>>> Do any of you have experience developing multilingual web sites? If >>>> yes, have you used JSP, PHP, or any other technology for this? >>> >>> I haven't done this sort of thing on this scale, but I have played >>> around with the php.net/recode functions a bit and some of the >>> different encodings. I know that there's a few people on this list >>> that have used the internationalization before, too. >>> >>> H >>> >>> >>> __________________________________________________ >>> Do you Yahoo!? >>> New DSL Internet Access from SBC & Yahoo! >>> http://sbc.yahoo.com >>> >>> >>> >>> >>> >> >> >> >> >> >> >> >> Regards >> >> Mark Jia >> >> >> --------------------------------- >> Do you Yahoo!? >> New DSL Internet Access from SBC & Yahoo! >> >> >> > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- Regards Mark Jia --------------------------------- Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! -------------- next part -------------- An HTML attachment was scrubbed... URL: From zaunere at yahoo.com Wed Oct 2 19:33:38 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 2 Oct 2002 16:33:38 -0700 (PDT) Subject: [nycphp-talk] mysql design tools In-Reply-To: <200210022025.g92KPC4M016320@parsec.nyphp.org> Message-ID: <20021002233338.13983.qmail@web12804.mail.yahoo.com> > Being an industrial tool (and industrially priced), CA didn't even > bother making drivers for a "free db" like mysql. ODBC probably isn't complete enough, if even supported? > So, my question is, does anybody know any data model design/management > tool with mysql (or postgresql) support ? (I'm looking for some > graphical ide to separate logical from physical models, and not an > admin tool like phpmyadmin) Maybe something like: http://www.mysql.com/portal/development/html/development_comments-48.html http://www.mysqlstudio.com/detail.php3 http://cbbrowne.com/info/rdbmstools.html possibly for PG. > btw... if anybody's going to the php meetup for the first time, here > are some pictures of the place/last meeting > http://www.remotelounge.com/consolePhotos/index.php?directoryOfChoice=09-05-2002&month=9&year=2002 Yes, see yall there H __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From soazine at erols.com Thu Oct 3 00:24:51 2002 From: soazine at erols.com (Phil Powell) Date: Thu, 3 Oct 2002 00:24:51 -0400 Subject: How do you strip Header Info from displaying on your browser? Message-ID: <012b01c26a94$d2117a20$dcbe6444@scandinawa1bo6> If you go to http://valsignalandet.com/feedback.php you can get a clearer indication of what I am trying to get rid of. Following is my function using to produce the stuff up there, which I don't want, instead, I either want cookie-driven information or nothing (if no cookie is set): function WebGet($address, $port = 80, $url = '/', $post = false, $cookie = false) { // Use fsockopen to catch the URL $fp = fsockopen ( $address, $port); // Zero Fill $ret = ''; if ($fp) { // Success. Now check to see the type of request if ($post) { $request = "POST $url HTTP/1.1\ "; $request .= "Host: $address\ "; $request .= "Content-Length: " . strlen( $post ). "\ "; $request .= "Content-Type: application/x-www-form-urlencoded\ "; if ($cookie) $request .= "Cookie: $cookie\ "; $request .= "Connection: Close\ \ "; $request .= $post; } else { $request = "GET $url HTTP/1.1\ "; $request .= "Host: $address\ "; $request .= "Content-Type: text/html\ "; if ($cookie) $request .= "Cookie: $cookie\ "; $request .= "Connection: Close\ \ "; } $ret = ''; // Write the Request fputs ($fp, $request); // Get the response while (!feof($fp)) $ret .= fgets ( $fp, 128 ); // close the connection fclose ($fp); } return $ret; } I do not want to change WebGet as I wish to keep it a universal function that can be used for cookies or not. So, how can I get rid of the trash on my page? Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From babacar at omnet.sn Thu Oct 3 08:33:45 2002 From: babacar at omnet.sn (Babacar Mbaye) Date: Thu, 3 Oct 2002 12:33:45 +0000 Subject: [nycphp-talk] mysql design tools In-Reply-To: <200210022025.g92KPC4M016320@parsec.nyphp.org> References: <200210022025.g92KPC4M016320@parsec.nyphp.org> Message-ID: <1033648425.3d9c3929ac1ce@www.omnet.sn> You can try PowerAMC or PowerDesigner (the recent version of AMCDesigner), I used to design mysql and oracle database. you can get the try version at sybase (http://www.sybase.com/products/enterprisemodeling) Surlignage Carlos A Hoyos : > > As much as I enjoy typing "create table...", "show index...", in mysql, > when big projects come, I wish I had something similar to (CA's) ERwin, > that allows you to create and maintain your db out of data diagrams (pretty > handy when you have multiple developers. Just print an oversized copy and > paste it to the wall in front of you). > > Being an industrial tool (and industrially priced), CA didn't even bother > making drivers for a "free db" like mysql. > > So, my question is, does anybody know any data model design/management > tool with mysql (or postgresql) support ? > (I'm looking for some graphical ide to separate logical from physical > models, and not an admin tool like phpmyadmin) > > > > btw... if anybody's going to the php meetup for the first time, here are > some pictures of the place/last meeting > http://www.remotelounge.com/consolePhotos/index.php?directoryOfChoice=09-05- 2002&month=9&year=2002 > not everybody featured is a php programmer... just some of channels 4 and 6 > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > -- Babacar Mbaye --------------------------------------------------------------------- OMNET NetWork, the Net that sucks less. You deserve a FREE Network with vanishing to zero downtime, just ask! From zaunere at yahoo.com Thu Oct 3 10:57:13 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Thu, 3 Oct 2002 07:57:13 -0700 (PDT) Subject: PHP Meetup Tonight Message-ID: <20021003145713.43335.qmail@web12804.mail.yahoo.com> Just a quick reminder that tonight is the PHP Meetup at the Remote Lounge. Details at http://php.meetup.com. H __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From sklar at sklar.com Thu Oct 3 11:41:13 2002 From: sklar at sklar.com (David Sklar) Date: Thu, 3 Oct 2002 11:41:13 -0400 Subject: [nycphp-talk] How do you strip Header Info from displaying on your browser? In-Reply-To: <200210030427.g934R34M016932@parsec.nyphp.org> Message-ID: If you *must* continue to use this WebGet() function, process the return value like this: $r = WebGet('www.sklar.com'); list($headers,$body) = explode("\\r\ \\r\ ",$r); print $body; Each header ends with "\\r\ " and the headers and the body are separated with a blank line, so "\\r\ \\r\ " delimits the headers and the body. If you can use the Curl extension, try that, it's much easier: $c = curl_init('http://www.sklar.com/'); curl_setopt($c, CURLOPT_RETURNTRANSFER); $body = curl_exec($c); curl_close($c); Or you can use the HTTP_Request PEAR module, available at: --> http://pear.php.net/package-info.php?pacid=33 -dave > -----Original Message----- > From: Phil Powell [mailto:soazine at erols.com] > Sent: Thursday, October 03, 2002 12:27 AM > To: NYPHP Talk > Subject: [nycphp-talk] How do you strip Header Info from displaying on > your browser? > > > If you go to http://valsignalandet.com/feedback.php you can get a > clearer indication of what I am trying to get rid of. Following > is my function using to produce the stuff up there, which I don't > want, instead, I either want cookie-driven information or nothing > (if no cookie is set): > > function WebGet($address, $port = 80, $url = '/', $post = false, > $cookie = false) { > // Use fsockopen to catch the URL > $fp = fsockopen ( $address, $port); > > // Zero Fill > $ret = ''; > > if ($fp) { > // Success. Now check to see the type of request > if ($post) { > $request = "POST $url HTTP/1.1\ "; > $request .= "Host: $address\ "; > $request .= "Content-Length: " . strlen( $post ). "\ "; > $request .= "Content-Type: application/x-www-form-urlencoded\ "; > > if ($cookie) $request .= "Cookie: $cookie\ "; > > $request .= "Connection: Close\ \ "; > $request .= $post; > } else { > $request = "GET $url HTTP/1.1\ "; > $request .= "Host: $address\ "; > $request .= "Content-Type: text/html\ "; > > if ($cookie) $request .= "Cookie: $cookie\ "; > > $request .= "Connection: Close\ \ "; > } > > $ret = ''; > > // Write the Request > fputs ($fp, $request); > > // Get the response > while (!feof($fp)) $ret .= fgets ( $fp, 128 ); > > // close the connection > fclose ($fp); > } > > return $ret; > > } > > I do not want to change WebGet as I wish to keep it a universal > function that can be used for cookies or not. > > So, how can I get rid of the trash on my page? > > Thanx > Phil > > > > --- Unsubscribe at http://nyphp.org/list --- > From nyphp at altunergil.com Thu Oct 3 12:29:05 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Thu, 3 Oct 2002 12:29:05 -0400 Subject: Part time Job Opportunity Message-ID: <20021003122905.0f93eb0a.nyphp@altunergil.com> Passing along this opportunity that I was presented with... I've posted in on jobs.nylug.org for your convenience :) http://jobs.nylug.org/jobdetail.msn?mode=detail&id=31 Oktay From zaunere at yahoo.com Fri Oct 4 11:00:33 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Fri, 4 Oct 2002 08:00:33 -0700 (PDT) Subject: New Apache Releases - Security Related Message-ID: <20021004150033.61039.qmail@web12801.mail.yahoo.com> There's a couple new versions of Apache out this morning, which fix some security issues: http://www.apache.org/dist/httpd/Announcement.html http://www.apache.org/dist/httpd/Announcement2.html ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com From beef at interport.net Fri Oct 4 13:00:01 2002 From: beef at interport.net (Wellington Fan) Date: Fri, 4 Oct 2002 13:00:01 -0400 Subject: LinkPoint PHP Wrappers & CC processing -- Any Comments? In-Reply-To: <200210041500.g94F0e4M037381@parsec.nyphp.org> Message-ID: Hello All, Has anyone used the LinkPoint PHP Wrappers? What do you think? http://www.linkpoint.com/product_solutions/internet/inet_index.html How about: Verisign's Commerce Site Pro (Includes Site Cert for SSL) iTransact's RediCharge iBill's Processing Plus Gateway I'm building an online store w/ CC processing, and need a lot of control over the transcation so I can update the inventory db, etc. For my part, I want as little development hassle as possible -- of course, I have to balance that against my client wanting to pay as little as possible. Something that makes a feature/$ comparison even more difficult is the difference in the pricing structure for these services: Verisign - $1395/year iTransact - $295/setup + $300/year (+ Thawte Site Cert for $150/year) iBill - $0.25/Transaction (~$900/year?) (+ Thawte Site Cert for $150/year) I'd guesstimate about 300 transactions/month, which would make iBill $900/year Anyway, any thoughts about any of these services in terms of ease of development would be appreciated. Please post to the list. TIA! -- Wellington Fan From adam at ecamp.net Fri Oct 4 13:34:42 2002 From: adam at ecamp.net (adam) Date: Fri, 4 Oct 2002 13:34:42 -0400 Subject: [nycphp-talk] LinkPoint PHP Wrappers & CC processing -- Any Comments? In-Reply-To: <200210041659.g94Gxe4M040612@parsec.nyphp.org> Message-ID: I've used both. Card Services and Link point suck. Their CS is super poor. In fact, my company hasn't used them in 2 years, and we still pay them $ every month because you can only cancel during certain time frame windows, and they make it very difficult. They follow a NETSOL or AOL type CS philosophy. Verisign works quite nicely with PHP. My favorite, and cheapest if you do lots of transactions is MCVE (www.mcve.com) You need to purchase the daemon, but then you talk directly to the bank cutting out the middleman. Software is around 1000 perpetual license. Support for one year. There is a PHP module to compile in (--with-mcve) and it works quite smoothly. -----Original Message----- From: Wellington Fan [mailto:beef at interport.net] Sent: Friday, October 04, 2002 1:00 PM To: NYPHP Talk Subject: [nycphp-talk] LinkPoint PHP Wrappers & CC processing -- Any Comments? Hello All, Has anyone used the LinkPoint PHP Wrappers? What do you think? http://www.linkpoint.com/product_solutions/internet/inet_index.html How about: Verisign's Commerce Site Pro (Includes Site Cert for SSL) iTransact's RediCharge iBill's Processing Plus Gateway I'm building an online store w/ CC processing, and need a lot of control over the transcation so I can update the inventory db, etc. For my part, I want as little development hassle as possible -- of course, I have to balance that against my client wanting to pay as little as possible. Something that makes a feature/$ comparison even more difficult is the difference in the pricing structure for these services: Verisign - $1395/year iTransact - $295/setup + $300/year (+ Thawte Site Cert for $150/year) iBill - $0.25/Transaction (~$900/year?) (+ Thawte Site Cert for $150/year) I'd guesstimate about 300 transactions/month, which would make iBill $900/year Anyway, any thoughts about any of these services in terms of ease of development would be appreciated. Please post to the list. TIA! -- Wellington Fan --- Unsubscribe at http://nyphp.org/list --- From patterson at computer.org Fri Oct 4 14:13:11 2002 From: patterson at computer.org (Bill Patterson) Date: Fri, 4 Oct 2002 14:13:11 -0400 Subject: [nycphp-talk] LinkPoint PHP Wrappers & CC processing -- Any Comments? References: <200210041659.g94Gxe4M040612@parsec.nyphp.org> Message-ID: <004a01c26bd1$b3455ec0$6401a8c0@audubn01.nj.comcast.net> I worked with Authorize.net last year, have you checked them out? Bill ----- Original Message ----- From: "Wellington Fan" To: "NYPHP Talk" Sent: Friday, October 04, 2002 12:59 PM Subject: [nycphp-talk] LinkPoint PHP Wrappers & CC processing -- Any Comments? > Hello All, > > Has anyone used the LinkPoint PHP Wrappers? What do you think? > http://www.linkpoint.com/product_solutions/internet/inet_index.html > > How about: > Verisign's Commerce Site Pro (Includes Site Cert for SSL) > iTransact's RediCharge > iBill's Processing Plus Gateway > > I'm building an online store w/ CC processing, and need a lot of control > over the transcation so I can update the inventory db, etc. For my part, I > want as little development hassle as possible -- of course, I have to > balance that against my client wanting to pay as little as possible. > > Something that makes a feature/$ comparison even more difficult is the > difference in the pricing structure for these services: > Verisign - $1395/year > iTransact - $295/setup + $300/year (+ Thawte Site Cert for $150/year) > iBill - $0.25/Transaction (~$900/year?) (+ Thawte Site Cert for $150/year) > > I'd guesstimate about 300 transactions/month, which would make iBill > $900/year > > Anyway, any thoughts about any of these services in terms of ease of > development would be appreciated. Please post to the list. > > TIA! > > -- > Wellington Fan > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > From talk at nyphp.org Fri Oct 4 13:58:49 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Fri, 4 Oct 2002 13:58:49 -0400 (EDT) Subject: Out of the office Message-ID: <103375432601@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From talk at nyphp.org Fri Oct 4 14:05:58 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Fri, 4 Oct 2002 14:05:58 -0400 (EDT) Subject: Out of the office Message-ID: <103375475501@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From zaunere at yahoo.com Mon Oct 7 09:40:20 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Mon, 7 Oct 2002 06:40:20 -0700 (PDT) Subject: XML and PHP and Week 106 Message-ID: <20021007134020.83095.qmail@web12806.mail.yahoo.com> As it does every week, the Zend Weekly Summary has come out: http://www.zend.com/zend/week/week106.php The Embedded PHP topic makes me drool, but probably more importantly is the future of PHP and XML. Some great thoughts and resources: http://www.bumblebury.com/phptodo/xmsl.html Have a good week! H ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From talk at nyphp.org Mon Oct 7 10:12:30 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Mon, 7 Oct 2002 10:12:30 -0400 (EDT) Subject: Out of the office Message-ID: <103399994201@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From max at idsociety.com Mon Oct 7 11:06:56 2002 From: max at idsociety.com (max goldberg) Date: Mon, 07 Oct 2002 11:06:56 -0400 Subject: Looking for a Technical Manager... Message-ID: <3DA1A310.7070809@idsociety.com> Hello all, I'm new to the nyphp users group so I'm not sure how to go about this. Anyway the company I work for is looking for a technical director, almost a lead developer. Posting on craigslit got us a lot of people who weren't really focused on php, and seeing as it is our main technology I was hoping there might be some skilled people here. If you can give me any other ideas where to look or have any questions, please feel free to shoot me an email. The url is http://newyork.craigslist.org/nyc/eng/5928180.html Thanks, -Max From talk at nyphp.org Mon Oct 7 11:30:21 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Mon, 7 Oct 2002 11:30:21 -0400 (EDT) Subject: Out of the office Message-ID: <103400462101@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From zaunere at yahoo.com Mon Oct 7 12:16:24 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Mon, 7 Oct 2002 09:16:24 -0700 (PDT) Subject: [nycphp-talk] Looking for a Technical Manager... In-Reply-To: <200210071506.g97F6cix048640@parsec.nyphp.org> Message-ID: <20021007161624.37315.qmail@web12803.mail.yahoo.com> Hey Max et al, Until we get a job board online (any takers on doing this?) posting to this mailing list is the best thing to do for position offers. Hopefully, some lucky individual will see this one. H --- max goldberg wrote: > Hello all, I'm new to the nyphp users group so I'm not sure how to go > > about this. Anyway the company I work for is looking for a technical > director, almost a lead developer. Posting on craigslit got us a lot > of > people who weren't really focused on php, and seeing as it is our > main > technology I was hoping there might be some skilled people here. If > you > can give me any other ideas where to look or have any questions, > please > feel free to shoot me an email. > > The url is http://newyork.craigslist.org/nyc/eng/5928180.html > > Thanks, > -Max > > > > --- Unsubscribe at http://nyphp.org/list --- > > ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From talk at nyphp.org Mon Oct 7 12:33:53 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Mon, 7 Oct 2002 12:33:53 -0400 (EDT) Subject: Out of the office Message-ID: <103400843101@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From brian at artizendesign.com Mon Oct 7 12:37:57 2002 From: brian at artizendesign.com (Brian Preston-Campbell) Date: Mon, 7 Oct 2002 12:37:57 -0400 Subject: [nycphp-talk] Looking for a Technical Manager... References: <200210071616.g97GGUix048894@parsec.nyphp.org> Message-ID: <00a001c26e1f$e5521ac0$a77cfea9@brian> I would but like being solo and don't have 4 (?!) solid years in PHP. Don't know many who do for that matter. What version were they on five years ago? Wasn't it still known as [P]ersonal [H]ome [P]age then? Old days. Brian ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Monday, October 07, 2002 12:16 PM Subject: Re: [nycphp-talk] Looking for a Technical Manager... > > Hey Max et al, > > Until we get a job board online (any takers on doing this?) posting to > this mailing list is the best thing to do for position offers. > > Hopefully, some lucky individual will see this one. > > H > > --- max goldberg wrote: > > Hello all, I'm new to the nyphp users group so I'm not sure how to go > > > > about this. Anyway the company I work for is looking for a technical > > director, almost a lead developer. Posting on craigslit got us a lot > > of > > people who weren't really focused on php, and seeing as it is our > > main > > technology I was hoping there might be some skilled people here. If > > you > > can give me any other ideas where to look or have any questions, > > please > > feel free to shoot me an email. > > > > The url is http://newyork.craigslist.org/nyc/eng/5928180.html > > > > Thanks, > > -Max > > > > > > > > > > > > > > > ===== > Hans Zaunere > New York PHP > http://nyphp.org > hans at nyphp.org > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > > --- Unsubscribe at http://nyphp.org/list --- > > > > From fields at surgam.net Tue Oct 8 00:52:02 2002 From: fields at surgam.net (Adam Fields) Date: Mon, 7 Oct 2002 23:52:02 -0500 Subject: Templating and authentication Message-ID: <20021008045202.GJ24558@eye.surgam.net> I just joined this list, although I've been coding in PHP for a while now. It was good to meet some of you at the meetup last week! I'm working on a dynamic configuration-driven autogenerated CMS in PHP, and I'm looking for a templating system to hook into it for the display side. I'm thinking something along the lines of velocity - ideally even something that can read velocity templates (since I hope to also port the system to java at some point). Any suggestions? (Also, Hans - please get in touch with me about your authentication system, since I didn't get your email address.) -- - 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 talk at nyphp.org Tue Oct 8 01:08:03 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Tue, 8 Oct 2002 01:08:03 -0400 (EDT) Subject: Out of the office Message-ID: <103405368101@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From jannino at jannino.com Tue Oct 8 01:48:33 2002 From: jannino at jannino.com (Joseph Annino) Date: Tue, 8 Oct 2002 01:48:33 -0400 Subject: [nycphp-talk] Templating and authentication In-Reply-To: <200210080452.g984qGix049802@parsec.nyphp.org> Message-ID: <94CDAD2A-DA81-11D6-869D-003065DA3B30@jannino.com> I like vlib template: http://vlib.activefish.com/ There is a java library for reading the same template format: http://html-tmpl-java.sourceforge.net/ And this template format was originally part of Perl's HTML::Template http://html-template.sourceforge.net/ The way it works is using object methods, or arrays, or both, you push your variables into the template object. It supports simple scalars, if then statements, loops, and a few automatic variables. The template syntax is designed to be HTMLish and has a limited set of commands to keep it simple and keep design and logic separate. It also has a nice command to take an SQL result and make it into a loop variable, making putting most database results into a template a one liner. I really like it and use one of the above on all my projects. There are slight differences between the libraries, so just be aware of them if you want to write cross language templates. It does appear to be a bit different in approach than velocity though. On Tuesday, October 8, 2002, at 12:52 AM, Adam Fields wrote: > I just joined this list, although I've been coding in PHP for a while > now. It was good to meet some of you at the meetup last week! > > I'm working on a dynamic configuration-driven autogenerated CMS in > PHP, and I'm looking for a templating system to hook into it for the > display side. I'm thinking something along the lines of velocity - > ideally even something that can read velocity templates (since I hope > to also port the system to java at some point). > > Any suggestions? > > (Also, Hans - please get in touch with me about your authentication > system, since I didn't get your email address.) > > -- > - 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 > > > --- Unsubscribe at http://nyphp.org/list --- > > From talk at nyphp.org Tue Oct 8 02:02:04 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Tue, 8 Oct 2002 02:02:04 -0400 (EDT) Subject: Out of the office Message-ID: <103405692201@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From fields at surgam.net Tue Oct 8 10:18:37 2002 From: fields at surgam.net (Adam Fields) Date: Tue, 8 Oct 2002 09:18:37 -0500 Subject: [nycphp-talk] Templating and authentication In-Reply-To: <200210080549.g985njix049881@parsec.nyphp.org> References: <200210080549.g985njix049881@parsec.nyphp.org> Message-ID: <20021008141837.GK24558@eye.surgam.net> On Tue, Oct 08, 2002 at 01:49:45AM -0400, Joseph Annino wrote: > I like vlib template: > http://vlib.activefish.com/ > > There is a java library for reading the same template format: > http://html-tmpl-java.sourceforge.net/ > > And this template format was originally part of Perl's HTML::Template > http://html-template.sourceforge.net/ This looks like it should do nicely. Thanks! > The way it works is using object methods, or arrays, or both, you push > your variables into the template object. It supports simple scalars, > if then statements, loops, and a few automatic variables. The template > syntax is designed to be HTMLish and has a limited set of commands to > keep it simple and keep design and logic separate. It also has a nice > command to take an SQL result and make it into a loop variable, making > putting most database results into a template a one liner. I really > like it and use one of the above on all my projects. There are slight > differences between the libraries, so just be aware of them if you want > to write cross language templates. It does appear to be a bit > different in approach than velocity though. Although the template language is different, this seems to be the ame basic approach as velocity - instantiate a template parser, choose a template, pack some substitution variables, and then parse the output. > On Tuesday, October 8, 2002, at 12:52 AM, Adam Fields wrote: > > > I just joined this list, although I've been coding in PHP for a while > > now. It was good to meet some of you at the meetup last week! > > > > I'm working on a dynamic configuration-driven autogenerated CMS in > > PHP, and I'm looking for a templating system to hook into it for the > > display side. I'm thinking something along the lines of velocity - > > ideally even something that can read velocity templates (since I hope > > to also port the system to java at some point). > > > > Any suggestions? > > > > (Also, Hans - please get in touch with me about your authentication > > system, since I didn't get your email address.) > > > > -- > > - 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 > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > -- - 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 talk at nyphp.org Tue Oct 8 10:39:32 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Tue, 8 Oct 2002 10:39:32 -0400 (EDT) Subject: Out of the office Message-ID: <103408796501@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From max at idsociety.com Tue Oct 8 11:39:43 2002 From: max at idsociety.com (max goldberg) Date: Tue, 08 Oct 2002 11:39:43 -0400 Subject: [nycphp-talk] Templating and authentication References: <200210080452.g984qGix049802@parsec.nyphp.org> Message-ID: <3DA2FC3F.6020302@idsociety.com> I've been involved in the same type of projects before and been in the same situations. Although I decided at the time that creating static versions of the content each time a user updated it in the CMS, I have had a good amount of experience with template systems. The majority of template engines written solely in PHP seem to have the downfall of using eregs which on a high load can produce a good amount of latency. Another option is to exec a process which does the templating, which also has a decent amount of latency, but when replacing a very large amount of variables may be a viable solution. Such an outside solution may also be good if you are in need of the use of templates outside of your project, such as external scripts in Java or Perl, etc. ClearSilver (www.clearsilver.net) may be a good example of this, and I think there is an apache module for it too (a friend of mine started work on a PHP module to replace the exec call, but never finished it if I recall correctly). The best solution I've seen to date is FastTemplate (http://www.thewebmasters.net/php/FastTemplate.phtml) modified to use a custom template php module. The module was not very near to being done and was written by a past employer of mine, basically taking out the PHP call to ereg and replacing it with a finite state machine. I'm not really sure why no one has put a suitable amount of time into a similar module for PHP as I think it would be widely used. Regardless, depending on your needs you have a few choices. -Max Adam Fields wrote: > I just joined this list, although I've been coding in PHP for a while > now. It was good to meet some of you at the meetup last week! > > I'm working on a dynamic configuration-driven autogenerated CMS in > PHP, and I'm looking for a templating system to hook into it for the > display side. I'm thinking something along the lines of velocity - > ideally even something that can read velocity templates (since I hope > to also port the system to java at some point). > > Any suggestions? > > (Also, Hans - please get in touch with me about your authentication > system, since I didn't get your email address.) > From talk at nyphp.org Tue Oct 8 11:52:28 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Tue, 8 Oct 2002 11:52:28 -0400 (EDT) Subject: Out of the office Message-ID: <103409234602@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From fields at surgam.net Tue Oct 8 12:33:55 2002 From: fields at surgam.net (Adam Fields) Date: Tue, 8 Oct 2002 11:33:55 -0500 Subject: [nycphp-talk] Templating and authentication In-Reply-To: <200210081539.g98FdCix050737@parsec.nyphp.org> References: <200210081539.g98FdCix050737@parsec.nyphp.org> Message-ID: <20021008163355.GE29982@eye.surgam.net> On Tue, Oct 08, 2002 at 11:39:12AM -0400, max goldberg wrote: > I've been involved in the same type of projects before and been in the > same situations. Although I decided at the time that creating static > versions of the content each time a user updated it in the CMS, I have > had a good amount of experience with template systems. The majority of > template engines written solely in PHP seem to have the downfall of > using eregs which on a high load can produce a good amount of latency. Well, ideally, for any kind of traffic, the templating system should be combined with caching (I've done a lot of work building Vignette systems, and the caching is one of the few things I really like about their system). However, I'm not there yet. I've heard reasonably good things about squid to that effect, but have yet to explore how (well) it works with php. > Another option is to exec a process which does the templating, which > also has a decent amount of latency, but when replacing a very large > amount of variables may be a viable solution. Such an outside solution > may also be good if you are in need of the use of templates outside of > your project, such as external scripts in Java or Perl, etc. ClearSilver > (www.clearsilver.net) may be a good example of this, and I think there > is an apache module for it too (a friend of mine started work on a PHP > module to replace the exec call, but never finished it if I recall > correctly). > > The best solution I've seen to date is FastTemplate > (http://www.thewebmasters.net/php/FastTemplate.phtml) modified to use a > custom template php module. The module was not very near to being done > and was written by a past employer of mine, basically taking out the PHP > call to ereg and replacing it with a finite state machine. I'm not > really sure why no one has put a suitable amount of time into a similar > module for PHP as I think it would be widely used. > > Regardless, depending on your needs you have a few choices. > > -Max > > > Adam Fields wrote: > > I just joined this list, although I've been coding in PHP for a while > > now. It was good to meet some of you at the meetup last week! > > > > I'm working on a dynamic configuration-driven autogenerated CMS in > > PHP, and I'm looking for a templating system to hook into it for the > > display side. I'm thinking something along the lines of velocity - > > ideally even something that can read velocity templates (since I hope > > to also port the system to java at some point). > > > > Any suggestions? > > > > (Also, Hans - please get in touch with me about your authentication > > system, since I didn't get your email address.) > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > -- - 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 talk at nyphp.org Tue Oct 8 12:51:57 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Tue, 8 Oct 2002 12:51:57 -0400 (EDT) Subject: Out of the office Message-ID: <103409591601@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From jannino at jannino.com Tue Oct 8 13:35:34 2002 From: jannino at jannino.com (Joseph Annino) Date: Tue, 8 Oct 2002 13:35:34 -0400 Subject: [nycphp-talk] Templating and authentication In-Reply-To: <200210081634.g98GY2ix050812@parsec.nyphp.org> Message-ID: <59CBB2DE-DAE4-11D6-A56C-003065DA3B30@jannino.com> Vlib template can store parsed versions of the template files, in order to speed things up, and remove the eregs from each request. It will just load the "compiled" template and insert the variables and spit it out. I've used HTML::Template in perl to save its results to static files. I've used that for product catalogs, because they only change at known times and involve most of the clicking on a commerce site. On Tuesday, October 8, 2002, at 12:34 PM, Adam Fields wrote: > On Tue, Oct 08, 2002 at 11:39:12AM -0400, max goldberg wrote: >> I've been involved in the same type of projects before and been in >> the >> same situations. Although I decided at the time that creating static >> versions of the content each time a user updated it in the CMS, I have >> had a good amount of experience with template systems. The majority of >> template engines written solely in PHP seem to have the downfall of >> using eregs which on a high load can produce a good amount of latency. > > Well, ideally, for any kind of traffic, the templating system should > be combined with caching (I've done a lot of work building Vignette > systems, and the caching is one of the few things I really like about > their system). However, I'm not there yet. I've heard reasonably good > things about squid to that effect, but have yet to explore how (well) > it works with php. > >> Another option is to exec a process which does the templating, which >> also has a decent amount of latency, but when replacing a very large >> amount of variables may be a viable solution. Such an outside solution >> may also be good if you are in need of the use of templates outside of >> your project, such as external scripts in Java or Perl, etc. >> ClearSilver >> (www.clearsilver.net) may be a good example of this, and I think there >> is an apache module for it too (a friend of mine started work on a PHP >> module to replace the exec call, but never finished it if I recall >> correctly). >> >> The best solution I've seen to date is FastTemplate >> (http://www.thewebmasters.net/php/FastTemplate.phtml) modified to use >> a >> custom template php module. The module was not very near to being done >> and was written by a past employer of mine, basically taking out the >> PHP >> call to ereg and replacing it with a finite state machine. I'm not >> really sure why no one has put a suitable amount of time into a >> similar >> module for PHP as I think it would be widely used. >> >> Regardless, depending on your needs you have a few choices. >> >> -Max >> >> >> Adam Fields wrote: >>> I just joined this list, although I've been coding in PHP for a while >>> now. It was good to meet some of you at the meetup last week! >>> >>> I'm working on a dynamic configuration-driven autogenerated CMS in >>> PHP, and I'm looking for a templating system to hook into it for the >>> display side. I'm thinking something along the lines of velocity - >>> ideally even something that can read velocity templates (since I hope >>> to also port the system to java at some point). >>> >>> Any suggestions? >>> >>> (Also, Hans - please get in touch with me about your authentication >>> system, since I didn't get your email address.) >>> >> >> >> >> >> >> > > -- > - 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 > > > --- Unsubscribe at http://nyphp.org/list --- > > From talk at nyphp.org Tue Oct 8 13:59:56 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Tue, 8 Oct 2002 13:59:56 -0400 (EDT) Subject: Out of the office Message-ID: <103409999401@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From georgenatalino at yahoo.com Wed Oct 9 08:38:57 2002 From: georgenatalino at yahoo.com (George Natalino) Date: Wed, 09 Oct 2002 08:38:57 -0400 Subject: XML SIG 15 Oct: Sam Hunting on "Topic maps: Delivering finding aids that really find using RESTful web services" Message-ID: <3DA42361.6E0F33CA@yahoo.com> An HTML attachment was scrubbed... URL: From talk at nyphp.org Wed Oct 9 08:48:36 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 08:48:36 -0400 (EDT) Subject: Out of the office Message-ID: <103416771501@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From fawcett at bard.edu Wed Oct 9 11:35:47 2002 From: fawcett at bard.edu (P. Fawcett) Date: Wed, 09 Oct 2002 11:35:47 -0400 Subject: install php 4.2.2 with mysql & apache References: <200210091238.g99Cc5ix052558@parsec.nyphp.org> Message-ID: <3DA44CD3.BD46E965@bard.edu> hope i don't sound as confused as i am. not all questions may be answerable here, but to set the scene: i've tried to configure (on redhat 7.2) apache 1.3.26 w/ php4.2.2 & mysql 3.23.51 source tar or .52rpm - whatever i can get to work. 1) if i have php, mysql & perl installed on the sys, do i have to include them in the other configs. ie configuring php --with-mysql? & in configuring apache --with-perl. or are these built in lighter versions? am i right mod's, ie mod_php is just a lighter version of php & not necessary if i have php 4.2.2 installed? or does that mod_php tie apache to php? i... apache: configure --enable-module-so mysql: configure --enable-assembler --with-innodb php: (i'm thinking i don't need --activate-module=src/module/php4/libphp4.a if not using php_mod, but rather the full php) configure --with-apxs --with-ldap --with-mysql=/usr/local/mysql php worked if i source compiled mysql 3.23.51 which created /usr/local/mysql dir. but mysql would fail after config on: mysqladmin -u root -password "new-passwd" err: mysqladmin: connect to server at 'localhost'failed error: 'can't connect to local mysql server thru socket '/tmp/mysql.sock'(2). check that mysqld is running & that socket exists. well it wasn't & it didn't so i reconfig mysql with simplier 3.23.52 rpm, which would run thru the config ok, create the socket, start the daemon, but would populates files all over the sys and not create /usr/local/mysql dir, so without php config --with-mysql (no path) php would fail syntax in the hpptd.conf: LoadModule php4_module libexec/libphp4.so - "cannot load /usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so". 2) do i just eliminate in php config --with-mysql all together? & then how do the mysql php interact? From brian at preston-campbell.com Wed Oct 9 12:02:40 2002 From: brian at preston-campbell.com (Preston-Campbell) Date: Wed, 09 Oct 2002 12:02:40 -0400 Subject: OT ASP Message-ID: <3DA45320.1020502@preston-campbell.com> I have been dealt a project in ASP. I know that a few people on the list also develop ASP, so does anyone know of a download (preferably free although not holding out any hopes) to parse my scripts on Linux / Apache? I'm coming in to this very late, the site only needs some finalization and additions to the CMS but I want to work as usual, on my local machine without FTPing every friggin minor edit. Brian From talk at nyphp.org Wed Oct 9 12:05:06 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 12:05:06 -0400 (EDT) Subject: Out of the office Message-ID: <103417950601@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From jim at bizcomputinginc.com Wed Oct 9 12:08:34 2002 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Wed, 9 Oct 2002 12:08:34 -0400 Subject: [nycphp-talk] OT ASP References: <200210091557.g99FvRix052765@parsec.nyphp.org> Message-ID: <002e01c26fae$1f1fb700$6401a8c0@Notebook> All the ASP/Linux packages I have worked with have not mirrored the ASP/IIS environment closely enough to be of value to me. If someone has had a differing experience, I would love to hear it since I have a customer who wants to move some of the more critical ASP apps to Linux but does not want to tweak the app. Jim ----- Original Message ----- From: "Preston-Campbell" To: "NYPHP Talk" Sent: Wednesday, October 09, 2002 11:57 AM Subject: [nycphp-talk] OT ASP > I have been dealt a project in ASP. I know that a few people on the > list also develop ASP, so does anyone know of a download (preferably > free although not holding out any hopes) to parse my scripts on Linux / > Apache? I'm coming in to this very late, the site only needs some > finalization and additions to the CMS but I want to work as usual, on my > local machine without FTPing every friggin minor edit. > > Brian > > > > --- Unsubscribe at http://nyphp.org/list --- > > > > > From talk at nyphp.org Wed Oct 9 12:09:32 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 12:09:32 -0400 (EDT) Subject: Out of the office Message-ID: <103417977101@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From talk at nyphp.org Wed Oct 9 12:28:37 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 12:28:37 -0400 (EDT) Subject: Out of the office Message-ID: <103418091601@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From jkelly at sussex.cc.nj.us Wed Oct 9 12:36:06 2002 From: jkelly at sussex.cc.nj.us (jessica kelly) Date: Wed, 09 Oct 2002 12:36:06 -0400 Subject: [nycphp-talk] OT ASP Message-ID: You may want to look at http://wwws.sun.com/software/chilisoft/ but it's not cheep. I was looking for a similar solution a few years ago but then the module for apache was incomplete and did not mimic all of the MS ASP functions that I wanted to use. I imagine that they have improved it though. I wound up using pws as a production server. Jessica >>> brian at preston-campbell.com 10/9/02 11:57:27 AM >>> I have been dealt a project in ASP. I know that a few people on the list also develop ASP, so does anyone know of a download (preferably free although not holding out any hopes) to parse my scripts on Linux / Apache? I'm coming in to this very late, the site only needs some finalization and additions to the CMS but I want to work as usual, on my local machine without FTPing every friggin minor edit. Brian --- Unsubscribe at http://nyphp.org/list --- From LarryC at indexstock.com Wed Oct 9 12:48:50 2002 From: LarryC at indexstock.com (Larry Chuon) Date: Wed, 9 Oct 2002 12:48:50 -0400 Subject: Scaling LAMP Architecture Message-ID: <86713EAB93BD5F40B94A0C8E604C7C91AEB6DF@index-exchange.indexstock.com> Hi, Does anybody have any experiences designing LAMP for a large environment? As far as I know, LAMP is a 2-tier architecture. There isn't an application server such as JBOSS, Weblogic, or Zope that sits in between. Any suggestion on how to go about this problem is greatly appreciated. By the way, this is in reference to osCommece and Nola integration. The integration is about 95% done. We are dressing it up now. Hopefully, we can release the product to the public domain within a month or two. If you want to sign up for a test drive of a fully integrated ERP and eCom system, please send me an email. Our next goal is to integrate or build our own CRM/XRM module. Once again, if you are interested in helping out, please email me. Best regards, Larry Chuon Personal Email: lchuon at lechuon.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From talk at nyphp.org Wed Oct 9 12:56:22 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 12:56:22 -0400 (EDT) Subject: Out of the office Message-ID: <103418258201@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From brian at preston-campbell.com Wed Oct 9 13:03:49 2002 From: brian at preston-campbell.com (Preston-Campbell) Date: Wed, 09 Oct 2002 13:03:49 -0400 Subject: [nycphp-talk] OT ASP References: <200210091636.g99Gamix052871@parsec.nyphp.org> Message-ID: <3DA46175.8040006@preston-campbell.com> Actually I was looking for that. Google is still showing the old chilisoft.com pages and there is no forwarding information so I was out of luck. If I download the trial I have 30 days to complete my project -- if I need it further I can convince my client that it is a necessary purchase. Thanks for your help. Brian jessica kelly wrote: >You may want to look at http://wwws.sun.com/software/chilisoft/ but it's not cheep. >I was looking for a similar solution a few years ago but then the module for apache was incomplete and did not mimic all of the MS ASP functions that I wanted to use. I imagine that they have improved it though. > >I wound up using pws as a production server. > >Jessica > > > > > > > From talk at nyphp.org Wed Oct 9 13:03:48 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 13:03:48 -0400 (EDT) Subject: Out of the office Message-ID: <103418302702@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From nyphp at altunergil.com Wed Oct 9 13:01:06 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Wed, 9 Oct 2002 13:01:06 -0400 Subject: [nycphp-talk] OT ASP In-Reply-To: <200210091659.g99GxTix052919@parsec.nyphp.org> References: <200210091659.g99GxTix052919@parsec.nyphp.org> Message-ID: <20021009130106.1db0cfe5.nyphp@altunergil.com> Just a quick note.. You will probably not get some MS only ASP components with chilisoft ASP or any other non-MS ASP solution. One of the more important ones of such modules is the CDONTs objects. (i believe you need to use these if you want to send emails etc among other things). I believe there's also another to enable uploads.. I don't know if chilisoft has added support for this to their offering in the last few months, but I would definetely make sure it'll work for my needs before spending time on installing and configuring it. Oktay On Wed, 09 Oct 2002 12:59:29 -0400 Preston-Campbell wrote: > Actually I was looking for that. Google is still showing the old > chilisoft.com pages and there is no forwarding information so I was out > of luck. If I download the trial I have 30 days to complete my project > -- if I need it further I can convince my client that it is a necessary > purchase. Thanks for your help. > > Brian > > jessica kelly wrote: > > >You may want to look at http://wwws.sun.com/software/chilisoft/ but it's not cheep. > >I was looking for a similar solution a few years ago but then the module for apache was incomplete and did not mimic all of the MS ASP functions that I wanted to use. I imagine that they have improved it though. > > > >I wound up using pws as a production server. > > > >Jessica > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From talk at nyphp.org Wed Oct 9 13:13:32 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 13:13:32 -0400 (EDT) Subject: Out of the office Message-ID: <103418361101@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From talk at nyphp.org Wed Oct 9 13:14:11 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 13:14:11 -0400 (EDT) Subject: Out of the office Message-ID: <103418365101@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From danielc at analysisandsolutions.com Wed Oct 9 13:55:59 2002 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 9 Oct 2002 13:55:59 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache In-Reply-To: <200210091535.g99FZeix052739@parsec.nyphp.org> References: <200210091535.g99FZeix052739@parsec.nyphp.org> Message-ID: <20021009175559.GA14474@panix.com> Hey P: On Wed, Oct 09, 2002 at 11:35:40AM -0400, P. Fawcett wrote: > > 1) if i have php, mysql & perl installed on the sys, do i have to > include them in the other configs. ie configuring php --with-mysql? Yes. That gives PHP the ability to talk to MySQL. It makes PHP be compiled with the MySQL functions. > configuring apache --with-perl This enables the apache/perl module. It speeds things up. Either way, you can still call Perl scripts as standalone CGIs. > am i right mod's, ie mod_php is just a lighter version of php > & not necessary if i have php 4.2.2 installed? Similarly, mod_php installs the apache/perl module, which speeds up execution. If you install PHP separately, you can then also execute PHP scripts in CGI mode. In both cases, CGI mode would have the script execute as the owner of the script while the module versions execute as the Apache process. > but mysql would fail after config on: mysqladmin -u root -password > "new-passwd" > err: mysqladmin: connect to server at 'localhost'failed error: 'can't > connect to local mysql server thru socket '/tmp/mysql.sock'(2). check > that mysqld is running & that socket exists. well it wasn't & it didn't I run MySQL on Windows NT, so am not completely familliar with installing it on linux, but I believe you need to install MySQL as normal. Then start the daemon by issuing a "mysqld" command. > so i reconfig mysql with simplier 3.23.52 rpm, which would run thru the > config ok, create the socket, start the daemon, but would populates > files all over the sys and not create /usr/local/mysql dir, so without > php config --with-mysql (no path) php would fail syntax in the > hpptd.conf: > LoadModule php4_module libexec/libphp4.so - "cannot load > /usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so". Find where the files are created and set your my.conf and/or other configuration files/commands appropriately. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From prutwo at onebox.com Wed Oct 9 14:02:22 2002 From: prutwo at onebox.com (Ophir Prusak) Date: Wed, 9 Oct 2002 14:02:22 -0400 Subject: [nycphp-talk] OT ASP References: <200210091659.g99GxTix052919@parsec.nyphp.org> Message-ID: <06d401c26fbe$045899e0$bf65a8c0@tag1002> I've never used it myself but u might want to look into an asp 2 php coverter: http://asp2php.naken.cc/ Ophir ----- Original Message ----- From: "Preston-Campbell" To: "NYPHP Talk" Sent: Wednesday, October 09, 2002 12:59 PM Subject: Re: [nycphp-talk] OT ASP > Actually I was looking for that. Google is still showing the old > chilisoft.com pages and there is no forwarding information so I was out > of luck. If I download the trial I have 30 days to complete my project > -- if I need it further I can convince my client that it is a necessary > purchase. Thanks for your help. > > Brian > > jessica kelly wrote: > > >You may want to look at http://wwws.sun.com/software/chilisoft/ but it's not cheep. > >I was looking for a similar solution a few years ago but then the module for apache was incomplete and did not mimic all of the MS ASP functions that I wanted to use. I imagine that they have improved it though. > > > >I wound up using pws as a production server. > > > >Jessica > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > > From talk at nyphp.org Wed Oct 9 14:14:12 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 14:14:12 -0400 (EDT) Subject: Out of the office Message-ID: <103418725101@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From talk at nyphp.org Wed Oct 9 14:20:54 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 14:20:54 -0400 (EDT) Subject: Out of the office Message-ID: <103418765401@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From zaunere at yahoo.com Wed Oct 9 15:38:08 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 9 Oct 2002 12:38:08 -0700 (PDT) Subject: [nycphp-talk] install php 4.2.2 with mysql & apache In-Reply-To: <200210091535.g99FZeix052739@parsec.nyphp.org> Message-ID: <20021009193808.16615.qmail@web12802.mail.yahoo.com> --- "P. Fawcett" wrote: > hope i don't sound as confused as i am. not all questions may be > answerable here, but to set the scene: Sorry, you sound pretty confused :) Maybe I can point you in the right direction. > i've tried to configure (on redhat 7.2) apache 1.3.26 w/ php4.2.2 & > mysql 3.23.51 source tar or .52rpm - whatever i can get to work. It's important to pick either RPM or src and then stick with it. If this is new for you, try RPM. My RPM is a little rusty, but maybe something like this would help: rpm -q apache rpm -q php rpm -q mysql These will query to see what RPM packages are installed, which should give you a base to work from. If all three are installed (and you're not worried about being up to date) you can probably startup apache with something like apachectl start and mysql with something like /etc/init.d/mysql.server start Search redhat.com and zend.com/phpbuilder.com/etc, as they have some good tutorials for this type of thing. Also useful might be: http://www.redhat.com/docs/manuals/database/RHDB-7.1.3-Manual/prog/c7614.html > 1) if i have php, mysql & perl installed on the sys, do i have to > include them in the other configs. ie configuring php --with-mysql? Yes - this enables MySQL within PHP > in configuring apache --with-perl. No, this has nothing to do with compiling with mod_perl support. Don't use --with-perl. > or are these built in lighter versions? Nothing to do with lighter versions. > am i right mod's, ie mod_php is just a lighter version of php & not necessary if i have php 4.2.2 installed? If you've installed the RPMs, you don't need to do anything further, except start the daemons. > or does that mod_php tie apache to php? mod_php is php that is loadable into Apache. Now we're getting into source compiliation, which is something different. I would recommend sticking with RPM, but maybe http://nyphp.org/presentations/ampintro2/ can give you some pointers on compiling. > i... > apache: > configure --enable-module-so > > mysql: > configure --enable-assembler --with-innodb > > php: > (i'm thinking i don't need > --activate-module=src/module/php4/libphp4.a > if not using php_mod, but rather the full php) Unless you plan on using PHP as a CGI, you'll need that. > configure --with-apxs > --with-ldap > --with-mysql=/usr/local/mysql > php worked if i source compiled mysql 3.23.51 which created > /usr/local/mysql dir. Good enough. > but mysql would fail after config on: mysqladmin -u root -password > "new-passwd" You'll probably need to do something like: /usr/local/mysql/bin/safe_mysqld & first > err: mysqladmin: connect to server at 'localhost'failed error: 'can't > connect to local mysql server thru socket '/tmp/mysql.sock'(2). > check that mysqld is running & that socket exists. well it wasn't & > it didn't > > so i reconfig mysql with simplier 3.23.52 rpm, which would run thru > the config ok, create the socket, start the daemon, but would > populates files all over the sys and not create /usr/local/mysql dir, Ahh, the joy of package systems. > so without php config --with-mysql (no path) php would fail syntax in > the hpptd.conf: > LoadModule php4_module libexec/libphp4.so - "cannot load > /usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so". And here we have it - a crossed RPM/compiled environment. Pick one, and run with it :) > 2) do i just eliminate in php config --with-mysql all together? & > then how do the mysql php interact? No.. --with-mysql is important (or --with-mysql=/usr/local/mysql) And when in doubt, remember to run ldconfig once in a while :) Godspeed, H ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From zaunere at yahoo.com Wed Oct 9 15:43:22 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 9 Oct 2002 12:43:22 -0700 (PDT) Subject: [nycphp-talk] Scaling LAMP Architecture In-Reply-To: <200210091649.g99Gn7ix052886@parsec.nyphp.org> Message-ID: <20021009194322.24308.qmail@web12801.mail.yahoo.com> --- Larry Chuon wrote: > Hi, > > Does anybody have any experiences designing LAMP for a large > environment? Yeah, more or less. > As far as I know, LAMP is a 2-tier architecture. 2? I swore I saw about a dozen tiers running around the office today. > There isn't an application server such as JBOSS, Weblogic, or Zope > that sits in between. It's a do it yourself type of deal, which IMHO is better. > Any suggestion on how to go about this problem is greatly appreciated. Not personal experience, but maybe these are helpful: http://www.zend.com/zend/tut/tutsweatpart1.php http://www.zend.com/zend/tut/tutsweatpart2.php > > By the way, this is in reference to osCommece and Nola integration. > The integration is about 95% done. We are dressing it up now. > Hopefully, we can release the product to the public domain within a > month or two. If you want to sign up for a test drive of a fully > integrated ERP and eCom system, please send me an email. Our next > goal is to integrate or build our own CRM/XRM module. Once again, if > you are interested in helping out, please email me. Sounds interesting.. maybe you and your team would like to give a presentation some time. ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From talk at nyphp.org Wed Oct 9 15:51:16 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 15:51:16 -0400 (EDT) Subject: Out of the office Message-ID: <103419307501@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From chalu at egenius.com Wed Oct 9 16:00:47 2002 From: chalu at egenius.com (chalu) Date: Wed, 09 Oct 2002 16:00:47 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture References: <200210091943.g99JhUix053808@parsec.nyphp.org> Message-ID: <3DA48AEF.3050603@egenius.com> Hans Zaunere wrote: >--- Larry Chuon wrote: > > >>Hi, >> >>Does anybody have any experiences designing LAMP for a large >>environment? >> >> > >Yeah, more or less. > Hi Larry. There are much experiences of designing LAMP for large environments. Look at SQLRelay and Apache Proxy. Using these, you can do; 1. content redirection 2. content caching 3. database connection and caching There are a number of packages to do load-balancing of database server as well as application servers in this regard. > > > >>As far as I know, LAMP is a 2-tier architecture. >> >> > >2? I swore I saw about a dozen tiers running around the office today. > > ;-) > > >>There isn't an application server such as JBOSS, Weblogic, or Zope >>that sits in between. >> >> > >It's a do it yourself type of deal, which IMHO is better. > > Look at SQLRelay... > > >>Any suggestion on how to go about this problem is greatly >> >> >appreciated. > >Not personal experience, but maybe these are helpful: >http://www.zend.com/zend/tut/tutsweatpart1.php >http://www.zend.com/zend/tut/tutsweatpart2.php > > > >> >>By the way, this is in reference to osCommece and Nola integration. >>The integration is about 95% done. We are dressing it up now. >>Hopefully, we can release the product to the public domain within a >>month or two. If you want to sign up for a test drive of a fully >>integrated ERP and eCom system, please send me an email. Our next >>goal is to integrate or build our own CRM/XRM module. Once again, if >>you are interested in helping out, please email me. >> >> > >Sounds interesting.. maybe you and your team would like to give a >presentation some time. > > > Is this open-source or just an implementation of osCommerce/Nola? > >===== >Hans Zaunere >New York PHP >http://nyphp.org >hans at nyphp.org > >__________________________________________________ >Do you Yahoo!? >Faith Hill - Exclusive Performances, Videos & More >http://faith.yahoo.com > > >--- Unsubscribe at http://nyphp.org/list --- > > > > > -- Chalu Kim eGENIUS 20 Jay Street, 1002 Brooklyn, New York 11201 chalu at egenius.com (718) 858-0142 (718) 858-2434 FAX www.egenius.com From chalu at egenius.com Wed Oct 9 16:02:46 2002 From: chalu at egenius.com (chalu) Date: Wed, 09 Oct 2002 16:02:46 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache References: <200210091938.g99JcDix053797@parsec.nyphp.org> Message-ID: <3DA48B66.3000608@egenius.com> Hans Zaunere wrote: >--- "P. Fawcett" wrote: > > >>hope i don't sound as confused as i am. not all questions may be >>answerable here, but to set the scene: >> >> > >Sorry, you sound pretty confused :) Maybe I can point you in the >right direction. > > > >>i've tried to configure (on redhat 7.2) apache 1.3.26 w/ php4.2.2 & >>mysql 3.23.51 source tar or .52rpm - whatever i can get to work. >> >> > >It's important to pick either RPM or src and then stick with it. If >this is new for you, try RPM. My RPM is a little rusty, but maybe >something like this would help: > >rpm -q apache >rpm -q php >rpm -q mysql > You mean; rpm -e apache to erase? Suppose you have packages named "blabla.rpm" You can run; rpm -Uvh blabla.rpm It will replace in verbose mode. > >These will query to see what RPM packages are installed, which should >give you a base to work from. If all three are installed (and you're >not worried about being up to date) you can probably startup apache >with something like apachectl start and mysql with something like >/etc/init.d/mysql.server start > >Search redhat.com and zend.com/phpbuilder.com/etc, as they have some >good tutorials for this type of thing. > >Also useful might be: >http://www.redhat.com/docs/manuals/database/RHDB-7.1.3-Manual/prog/c7614.html > > > > >>1) if i have php, mysql & perl installed on the sys, do i have to >>include them in the other configs. ie configuring php --with-mysql? >> >> > >Yes - this enables MySQL within PHP > > > >>in configuring apache --with-perl. >> >> > >No, this has nothing to do with compiling with mod_perl support. Don't >use --with-perl. > > > >>or are these built in lighter versions? >> >> > >Nothing to do with lighter versions. > > > >>am i right mod's, ie mod_php is just a lighter version of php & not >> >> >necessary if i have php 4.2.2 installed? > >If you've installed the RPMs, you don't need to do anything further, >except start the daemons. > > > >> or does that mod_php tie apache to php? >> >> > >mod_php is php that is loadable into Apache. > >Now we're getting into source compiliation, which is something >different. I would recommend sticking with RPM, but maybe >http://nyphp.org/presentations/ampintro2/ can give you some pointers on >compiling. > > > >>i... >>apache: >>configure --enable-module-so >> >>mysql: >>configure --enable-assembler --with-innodb >> >>php: >>(i'm thinking i don't need >>--activate-module=src/module/php4/libphp4.a >>if not using php_mod, but rather the full php) >> >> > >Unless you plan on using PHP as a CGI, you'll need that. > > > >>configure --with-apxs >> --with-ldap >> --with-mysql=/usr/local/mysql >> php worked if i source compiled mysql 3.23.51 which created >>/usr/local/mysql dir. >> >> > >Good enough. > > > >>but mysql would fail after config on: mysqladmin -u root -password >>"new-passwd" >> >> > >You'll probably need to do something like: >/usr/local/mysql/bin/safe_mysqld & first > > > >>err: mysqladmin: connect to server at 'localhost'failed error: 'can't >>connect to local mysql server thru socket '/tmp/mysql.sock'(2). >>check that mysqld is running & that socket exists. well it wasn't & >>it didn't >> >>so i reconfig mysql with simplier 3.23.52 rpm, which would run thru >>the config ok, create the socket, start the daemon, but would >>populates files all over the sys and not create /usr/local/mysql dir, >> >> > >Ahh, the joy of package systems. > > > >>so without php config --with-mysql (no path) php would fail syntax in >>the hpptd.conf: >>LoadModule php4_module libexec/libphp4.so - "cannot load >>/usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so". >> >> > >And here we have it - a crossed RPM/compiled environment. Pick one, >and run with it :) > > > >>2) do i just eliminate in php config --with-mysql all together? & >>then how do the mysql php interact? >> >> > >No.. --with-mysql is important (or --with-mysql=/usr/local/mysql) > >And when in doubt, remember to run ldconfig once in a while :) > >Godspeed, > >H > > >===== >Hans Zaunere >New York PHP >http://nyphp.org >hans at nyphp.org > >__________________________________________________ >Do you Yahoo!? >Faith Hill - Exclusive Performances, Videos & More >http://faith.yahoo.com > > >--- Unsubscribe at http://nyphp.org/list --- > > > > > -- Chalu Kim eGENIUS 20 Jay Street, 1002 Brooklyn, New York 11201 chalu at egenius.com (718) 858-0142 (718) 858-2434 FAX www.egenius.com From LarryC at indexstock.com Wed Oct 9 15:55:31 2002 From: LarryC at indexstock.com (Larry Chuon) Date: Wed, 9 Oct 2002 15:55:31 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture Message-ID: <86713EAB93BD5F40B94A0C8E604C7C91AEB6E1@index-exchange.indexstock.com> Hi Hans and team, Haven't seen you guys for a while. I've been skipping your meeting due to this project. My team also meets on Wednesday evening. Once we're done with the integration, we love to demo it. There are many new features that were added as well. Thanks for the URLs. I'll check them out. Larry -----Original Message----- From: Hans Zaunere [mailto:zaunere at yahoo.com] Sent: Wednesday, October 09, 2002 3:44 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Scaling LAMP Architecture --- Larry Chuon wrote: > Hi, > > Does anybody have any experiences designing LAMP for a large > environment? Yeah, more or less. > As far as I know, LAMP is a 2-tier architecture. 2? I swore I saw about a dozen tiers running around the office today. > There isn't an application server such as JBOSS, Weblogic, or Zope > that sits in between. It's a do it yourself type of deal, which IMHO is better. > Any suggestion on how to go about this problem is greatly appreciated. Not personal experience, but maybe these are helpful: http://www.zend.com/zend/tut/tutsweatpart1.php http://www.zend.com/zend/tut/tutsweatpart2.php > > By the way, this is in reference to osCommece and Nola integration. > The integration is about 95% done. We are dressing it up now. > Hopefully, we can release the product to the public domain within a > month or two. If you want to sign up for a test drive of a fully > integrated ERP and eCom system, please send me an email. Our next > goal is to integrate or build our own CRM/XRM module. Once again, if > you are interested in helping out, please email me. Sounds interesting.. maybe you and your team would like to give a presentation some time. ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com --- Unsubscribe at http://nyphp.org/list --- From talk at nyphp.org Wed Oct 9 15:58:24 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 15:58:24 -0400 (EDT) Subject: Out of the office Message-ID: <103419350301@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From joshmccormack at travelersdiary.com Wed Oct 9 19:04:45 2002 From: joshmccormack at travelersdiary.com (Josh McCormack) Date: Wed, 09 Oct 2002 16:04:45 -0700 Subject: [nycphp-talk] Scaling LAMP Architecture References: <200210091943.g99JhUix053808@parsec.nyphp.org> Message-ID: <3DA4B60D.8060007@travelersdiary.com> > > >--- Larry Chuon wrote: > > > > >>As far as I know, LAMP is a 2-tier architecture. >> >> While there isn't a required seperate application server you could use the Zend Accelerator (http://www.zend.com/store/products/zend-accelerator.php) or if you don't want to use that develop with the MVC model, where you seperate web pages and most of the code so you can have servers optimized for each part. That's my take at least. Josh From talk at nyphp.org Wed Oct 9 16:05:25 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 16:05:25 -0400 (EDT) Subject: Out of the office Message-ID: <103419392101@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From talk at nyphp.org Wed Oct 9 16:05:36 2002 From: talk at nyphp.org (talk at nyphp.org) Date: Wed, 9 Oct 2002 16:05:36 -0400 (EDT) Subject: Out of the office Message-ID: <103419393501@mercury.hosting4u.net> I will be out of the office From October 2 to the 9th, will reply to all email ones I get back. Regards, Edgar Reyes Senior Consultant From zaunere at yahoo.com Wed Oct 9 16:28:13 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 9 Oct 2002 13:28:13 -0700 (PDT) Subject: [nycphp-talk] install php 4.2.2 with mysql & apache In-Reply-To: <200210091955.g99JtFix053855@parsec.nyphp.org> Message-ID: <20021009202813.16605.qmail@web12807.mail.yahoo.com> --- chalu wrote: > Hans Zaunere wrote: > > > >It's important to pick either RPM or src and then stick with it. If > >this is new for you, try RPM. My RPM is a little rusty, but maybe > >something like this would help: > > > >rpm -q apache > >rpm -q php > >rpm -q mysql > > > You mean; rpm -e apache to erase? -q to query, so he knows what's installed. Then -e to erase if needed, or -U to upgrade or -F to freshen (upgrades only if package is already installed). ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From nyphp at altunergil.com Wed Oct 9 16:32:48 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Wed, 9 Oct 2002 16:32:48 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache In-Reply-To: <200210092028.g99KSHix053975@parsec.nyphp.org> References: <200210092028.g99KSHix053975@parsec.nyphp.org> Message-ID: <20021009163248.40f48861.nyphp@altunergil.com> I'd put this together a long time ago.. It's the very basics of RPM. 5% of the available commands, but these constitute 90% of what a regular user would need to do everyday. Oktay RPM (RedHat Package Manager) Basics. http://freelinuxcd.org/YapBB/topicDisplay.php?topicID=4 On Wed, 09 Oct 2002 16:28:17 -0400 Hans Zaunere wrote: > > --- chalu wrote: > > Hans Zaunere wrote: > > > > > >It's important to pick either RPM or src and then stick with it. If > > >this is new for you, try RPM. My RPM is a little rusty, but maybe > > >something like this would help: > > > > > >rpm -q apache > > >rpm -q php > > >rpm -q mysql > > > > > You mean; rpm -e apache to erase? > > -q to query, so he knows what's installed. Then -e to erase if needed, > or -U to upgrade or -F to freshen (upgrades only if package is already > installed). > > > > > ===== > Hans Zaunere > New York PHP > http://nyphp.org > hans at nyphp.org > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > > --- Unsubscribe at http://nyphp.org/list --- > > From prutwo at onebox.com Wed Oct 9 17:22:51 2002 From: prutwo at onebox.com (Ophir Prusak) Date: Wed, 9 Oct 2002 17:22:51 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture References: <200210091943.g99JhUix053808@parsec.nyphp.org> Message-ID: <075d01c26fda$0639f350$bf65a8c0@tag1002> I work at http://www.communityconnect.com While we aren't LAMP, we are pretty close - LAOP (Oracle, not MySQL). To the best of my knowledge we're the busiest PHP powered site in the world ( 800 million page view a month in Jan 2002) so I can definitely say that L, A and P can be used to create a solution that scales. Ophir ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Wednesday, October 09, 2002 3:43 PM Subject: Re: [nycphp-talk] Scaling LAMP Architecture > > --- Larry Chuon wrote: > > Hi, > > > > Does anybody have any experiences designing LAMP for a large > > environment? > > Yeah, more or less. > > > As far as I know, LAMP is a 2-tier architecture. > > 2? I swore I saw about a dozen tiers running around the office today. > > > There isn't an application server such as JBOSS, Weblogic, or Zope > > that sits in between. > > It's a do it yourself type of deal, which IMHO is better. > > > Any suggestion on how to go about this problem is greatly > appreciated. > > Not personal experience, but maybe these are helpful: > http://www.zend.com/zend/tut/tutsweatpart1.php > http://www.zend.com/zend/tut/tutsweatpart2.php > > > > > By the way, this is in reference to osCommece and Nola integration. > > The integration is about 95% done. We are dressing it up now. > > Hopefully, we can release the product to the public domain within a > > month or two. If you want to sign up for a test drive of a fully > > integrated ERP and eCom system, please send me an email. Our next > > goal is to integrate or build our own CRM/XRM module. Once again, if > > you are interested in helping out, please email me. > > Sounds interesting.. maybe you and your team would like to give a > presentation some time. > > > > ===== > Hans Zaunere > New York PHP > http://nyphp.org > hans at nyphp.org > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > > --- Unsubscribe at http://nyphp.org/list --- > > > > From brian at preston-campbell.com Wed Oct 9 19:43:55 2002 From: brian at preston-campbell.com (Preston-Campbell) Date: Wed, 9 Oct 2002 19:43:55 -0400 Subject: [nycphp-talk] OT ASP References: <200210091804.g99I45ix053067@parsec.nyphp.org> Message-ID: <004501c26fed$bd11fc40$7e3efea9@brian> The problem is that I need to code and run ASP as if I were on IIS (just the thought makes me cringe). I have ASP2PHP installed on my box, it's available as a package in Mandrake 8.0 and I used it a while ago to see how accurate it was. If anyone is interested, I will be using Sun's ASP solution and can report of my success or failure in detail once I get involved with the code. Brian ----- Original Message ----- From: "Ophir Prusak" To: "NYPHP Talk" Sent: Wednesday, October 09, 2002 2:04 PM Subject: Re: [nycphp-talk] OT ASP > I've never used it myself but u might want to look into an asp 2 php > coverter: > > http://asp2php.naken.cc/ > > Ophir > > ----- Original Message ----- > From: "Preston-Campbell" > To: "NYPHP Talk" > Sent: Wednesday, October 09, 2002 12:59 PM > Subject: Re: [nycphp-talk] OT ASP > > > > Actually I was looking for that. Google is still showing the old > > chilisoft.com pages and there is no forwarding information so I was out > > of luck. If I download the trial I have 30 days to complete my project > > -- if I need it further I can convince my client that it is a necessary > > purchase. Thanks for your help. > > > > Brian > > > > jessica kelly wrote: > > > > >You may want to look at http://wwws.sun.com/software/chilisoft/ but it's > not cheep. > > >I was looking for a similar solution a few years ago but then the module > for apache was incomplete and did not mimic all of the MS ASP functions that > I wanted to use. I imagine that they have improved it though. > > > > > >I wound up using pws as a production server. > > > > > >Jessica > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > From ktuskey at exostream.com Thu Oct 10 00:21:27 2002 From: ktuskey at exostream.com (Kyle Tuskey) Date: Thu, 10 Oct 2002 00:21:27 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture In-Reply-To: <200210092124.g99LOXix054051@parsec.nyphp.org> Message-ID: <001101c27014$80b222d0$0100a8c0@win2kbox> You can scale LAMP (minus MySQL which is barely a database) to some degree, but it isn't really the best way to approach it. PHP was not built to be an enterprise language. The lack of the N-Tier model makes it great for most sites, but true enterprise level needs would be better approached with J2EE or .Net. Using .Net or J2EE (Java) will make the final solution much easier to use, manage, scale, and deploy. Though the word "enterprise" is thrown around too much and often isn't used accurately, applications that truly are enterprise do need to take into account a lot of the advantages of the N-Tier model. PHP has XML-RPC to all remote calls in a distributed architecture if I remember correctly, but it isn't very efficient. For instance, Java's RMI (Remote Method Invocation) implementation is much more robust for this purpose. If you must use PHP for an enterprise solution, use a strong RDBMS (MySQL is definitely not in this category) and some form of load balancing or clustering as opposed to an attempted distributed architecture w/ PHP. Kyle -----Original Message----- From: Ophir Prusak [mailto:prutwo at onebox.com] Sent: Wednesday, October 09, 2002 5:25 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Scaling LAMP Architecture I work at http://www.communityconnect.com While we aren't LAMP, we are pretty close - LAOP (Oracle, not MySQL). To the best of my knowledge we're the busiest PHP powered site in the world ( 800 million page view a month in Jan 2002) so I can definitely say that L, A and P can be used to create a solution that scales. Ophir ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Wednesday, October 09, 2002 3:43 PM Subject: Re: [nycphp-talk] Scaling LAMP Architecture > > --- Larry Chuon wrote: > > Hi, > > > > Does anybody have any experiences designing LAMP for a large > > environment? > > Yeah, more or less. > > > As far as I know, LAMP is a 2-tier architecture. > > 2? I swore I saw about a dozen tiers running around the office today. > > > There isn't an application server such as JBOSS, Weblogic, or Zope > > that sits in between. > > It's a do it yourself type of deal, which IMHO is better. > > > Any suggestion on how to go about this problem is greatly > appreciated. > > Not personal experience, but maybe these are helpful: > http://www.zend.com/zend/tut/tutsweatpart1.php > http://www.zend.com/zend/tut/tutsweatpart2.php > > > > > By the way, this is in reference to osCommece and Nola integration. > > The integration is about 95% done. We are dressing it up now. > > Hopefully, we can release the product to the public domain within a > > month or two. If you want to sign up for a test drive of a fully > > integrated ERP and eCom system, please send me an email. Our next > > goal is to integrate or build our own CRM/XRM module. Once again, if > > you are interested in helping out, please email me. > > Sounds interesting.. maybe you and your team would like to give a > presentation some time. > > > > ===== > Hans Zaunere > New York PHP > http://nyphp.org > hans at nyphp.org > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > > > > > > --- Unsubscribe at http://nyphp.org/list --- From fawcett at bard.edu Thu Oct 10 09:59:40 2002 From: fawcett at bard.edu (P. Fawcett) Date: Thu, 10 Oct 2002 09:59:40 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache References: <200210092028.g99KSHix053975@parsec.nyphp.org> Message-ID: <3DA587CC.4EE1710A@bard.edu> in picking & sticking w/either rpm or src, does that mean don't mix ie. an rpm php w/a mysql src? or simply always rpm (or src) with php & ditto mysql etc? the -F is new to me -tx Hans Zaunere wrote: > > --- chalu wrote: > > Hans Zaunere wrote: > > > > > >It's important to pick either RPM or src and then stick with it. If > > >this is new for you, try RPM. My RPM is a little rusty, but maybe > > >something like this would help: > > > > > >rpm -q apache > > >rpm -q php > > >rpm -q mysql > > > > > You mean; rpm -e apache to erase? > > -q to query, so he knows what's installed. Then -e to erase if needed, > or -U to upgrade or -F to freshen (upgrades only if package is already > installed). > > ===== > Hans Zaunere > New York PHP > http://nyphp.org > hans at nyphp.org > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > --- Unsubscribe at http://nyphp.org/list --- From sklar at sklar.com Thu Oct 10 10:26:31 2002 From: sklar at sklar.com (David Sklar) Date: Thu, 10 Oct 2002 10:26:31 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture In-Reply-To: <200210100420.g9A4KRix054768@parsec.nyphp.org> Message-ID: > From: Kyle Tuskey [mailto:ktuskey at exostream.com] > Sent: Thursday, October 10, 2002 12:20 AM > > You can scale LAMP (minus MySQL which is barely a database) to some > degree, but it isn't really the best way to approach it. PHP was not > built to be an enterprise language. The lack of the N-Tier model makes > it great for most sites, but true enterprise level needs would be better > approached with J2EE or .Net. Using .Net or J2EE (Java) will make the > final solution much easier to use, manage, scale, and deploy. Though > the word "enterprise" is thrown around too much and often isn't used > accurately, applications that truly are enterprise do need to take into > account a lot of the advantages of the N-Tier model. PHP has XML-RPC to > all remote calls in a distributed architecture if I remember correctly, > but it isn't very efficient. For instance, Java's RMI (Remote Method > Invocation) implementation is much more robust for this purpose. If you > must use PHP for an enterprise solution, use a strong RDBMS (MySQL is > definitely not in this category) and some form of load balancing or > clustering as opposed to an attempted distributed architecture w/ PHP. So, Kyle, what is "true enterprise level," then? A billion pageviews per month? The 800B PV/month Ophir cited at CCI works out to about 300/second, and I presume that doesn't include images or other static objects. Tell me, where is the point that MySQL breaks down? Traffic? Functionality? I admit, MySQL doesn't have, say, the World's Greatest parallel hot-failover technology, but I don't think anyone would classify Oracle's efforts in this regard in that way either. Don't get me wrong, I'm all for using the right tool for the job, and MySQL or PHP or Linux or Apache aren't each the right tool for every job. But if you're going to insist that PHP or MySQL has problems, please point out actual problems, instead of vague assertions. Thanks, David From fawcett at bard.edu Thu Oct 10 10:47:57 2002 From: fawcett at bard.edu (P. Fawcett) Date: Thu, 10 Oct 2002 10:47:57 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache References: <200210091756.g99Hu3ix053050@parsec.nyphp.org> Message-ID: <3DA5931D.64EBF4A7@bard.edu> tx. to confirm - so i can have both a mod & standalone cgi (thou i don't know why i'd want both but the programmers don't seem to know their environment so i'm just thinking of covering all bases till i get a handle on it.) i found that php 4.2.2 if mysql not specified in config, then it's auto built in so i've got php working but mysql won't do anything from within the server including basic #myqladmin version or variable info, returns w/error: "MySQL said: Host '204.nnn.nnn.nn' is not allowed to connect to this MySQL server" & docs point to 'make sure mysqld running- it is, & /tmp/msql-4socket exists -it does, so something else w/access prblm so i have to find mysql talk & maybe they'll know something Analysis & Solutions wrote: > > Hey P: > > On Wed, Oct 09, 2002 at 11:35:40AM -0400, P. Fawcett wrote: > > > > 1) if i have php, mysql & perl installed on the sys, do i have to > > include them in the other configs. ie configuring php --with-mysql? > > Yes. That gives PHP the ability to talk to MySQL. It makes PHP be > compiled with the MySQL functions. > > > configuring apache --with-perl > > This enables the apache/perl module. It speeds things up. Either way, > you can still call Perl scripts as standalone CGIs. > > > am i right mod's, ie mod_php is just a lighter version of php > > & not necessary if i have php 4.2.2 installed? > > Similarly, mod_php installs the apache/perl module, which speeds up > execution. If you install PHP separately, you can then also execute PHP > scripts in CGI mode. > > In both cases, CGI mode would have the script execute as the owner of the > script while the module versions execute as the Apache process. > > > but mysql would fail after config on: mysqladmin -u root -password > > "new-passwd" > > err: mysqladmin: connect to server at 'localhost'failed error: 'can't > > connect to local mysql server thru socket '/tmp/mysql.sock'(2). check > > that mysqld is running & that socket exists. well it wasn't & it didn't > > I run MySQL on Windows NT, so am not completely familliar with installing > it on linux, but I believe you need to install MySQL as normal. Then > start the daemon by issuing a "mysqld" command. > > > so i reconfig mysql with simplier 3.23.52 rpm, which would run thru the > > config ok, create the socket, start the daemon, but would populates > > files all over the sys and not create /usr/local/mysql dir, so without > > php config --with-mysql (no path) php would fail syntax in the > > hpptd.conf: > > LoadModule php4_module libexec/libphp4.so - "cannot load > > /usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so". > > Find where the files are created and set your my.conf and/or other > configuration files/commands appropriately. > > --Dan > > -- > PHP classes that make web design easier > SQL Solution | Layout Solution | Form Solution > sqlsolution.info | layoutsolution.info | formsolution.info > 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > --- Unsubscribe at http://nyphp.org/list --- From nyphp at altunergil.com Thu Oct 10 10:42:59 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Thu, 10 Oct 2002 10:42:59 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache In-Reply-To: <200210101444.g9AEi3ix055662@parsec.nyphp.org> References: <200210101444.g9AEi3ix055662@parsec.nyphp.org> Message-ID: <20021010104259.3efbd896.nyphp@altunergil.com> http://www.mysql.com/doc/en/GRANT.html On Thu, 10 Oct 2002 10:44:03 -0400 "P. Fawcett" wrote: > tx. > > to confirm - so i can have both a mod & standalone cgi (thou i don't > know why i'd want both but the programmers don't seem to know their > environment so i'm just thinking of covering all bases till i get a > handle on it.) > > i found that php 4.2.2 if mysql not specified in config, then it's auto > built in > > so i've got php working but mysql won't do anything from within the > server including basic #myqladmin version or variable info, returns > w/error: > > "MySQL said: > Host '204.nnn.nnn.nn' is not allowed to connect to this MySQL server" > > & docs point to 'make sure mysqld running- it is, & /tmp/msql-4socket > exists -it does, so something else w/access prblm so i have to find > mysql talk & maybe they'll know something > > Analysis & Solutions wrote: > > > > Hey P: > > > > On Wed, Oct 09, 2002 at 11:35:40AM -0400, P. Fawcett wrote: > > > > > > 1) if i have php, mysql & perl installed on the sys, do i have to > > > include them in the other configs. ie configuring php --with-mysql? > > > > Yes. That gives PHP the ability to talk to MySQL. It makes PHP be > > compiled with the MySQL functions. > > > > > configuring apache --with-perl > > > > This enables the apache/perl module. It speeds things up. Either way, > > you can still call Perl scripts as standalone CGIs. > > > > > am i right mod's, ie mod_php is just a lighter version of php > > > & not necessary if i have php 4.2.2 installed? > > > > Similarly, mod_php installs the apache/perl module, which speeds up > > execution. If you install PHP separately, you can then also execute PHP > > scripts in CGI mode. > > > > In both cases, CGI mode would have the script execute as the owner of the > > script while the module versions execute as the Apache process. > > > > > but mysql would fail after config on: mysqladmin -u root -password > > > "new-passwd" > > > err: mysqladmin: connect to server at 'localhost'failed error: 'can't > > > connect to local mysql server thru socket '/tmp/mysql.sock'(2). check > > > that mysqld is running & that socket exists. well it wasn't & it didn't > > > > I run MySQL on Windows NT, so am not completely familliar with installing > > it on linux, but I believe you need to install MySQL as normal. Then > > start the daemon by issuing a "mysqld" command. > > > > > so i reconfig mysql with simplier 3.23.52 rpm, which would run thru the > > > config ok, create the socket, start the daemon, but would populates > > > files all over the sys and not create /usr/local/mysql dir, so without > > > php config --with-mysql (no path) php would fail syntax in the > > > hpptd.conf: > > > LoadModule php4_module libexec/libphp4.so - "cannot load > > > /usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so". > > > > Find where the files are created and set your my.conf and/or other > > configuration files/commands appropriately. > > > > --Dan > > > > -- > > PHP classes that make web design easier > > SQL Solution | Layout Solution | Form Solution > > sqlsolution.info | layoutsolution.info | formsolution.info > > 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From prutwo at onebox.com Thu Oct 10 11:04:35 2002 From: prutwo at onebox.com (Ophir Prusak) Date: Thu, 10 Oct 2002 11:04:35 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture References: <200210101426.g9AEQMix055634@parsec.nyphp.org> Message-ID: <08ef01c2706e$590ec990$bf65a8c0@tag1002> I'd like to clear up some potential confusion about the term "scalable". See http://labs.google.com/glossary?q=scalable for some pretty good definitions. While we all agree (hopefully) about what scalable means, I think we're talking about two different things that we're trying to scale. You can talk about scalability of a web site in regards to: 1. Traffic and users - meaning if we get 100 times the traffic can we simply add 100 times the hardware without the need make any significant changes to the code/architecture. 2. Application complexity - meaning if we want to add more functionality to the site, can we do so without making significant changes to the existing code/architecture. While I think it's obvious that LAP scale quite well in regards to traffic (CCI proves this), I do agree that in regards to application complexity, there are better solutions than PHP (though much more $$$$ to use and probably slower) My 2 cents. Ophir p.s. Regarding MySQL breaking down, I do believe the problem was with connections, not speed. It just didn't hold up when trying to keep a few thousand simultaneous connections to the MySQL server. Oracle amazingly seems to do ok. It might slow down, but it doesn't crash/die/freeze. ----- Original Message ----- From: "David Sklar" To: "NYPHP Talk" Sent: Thursday, October 10, 2002 10:26 AM Subject: RE: [nycphp-talk] Scaling LAMP Architecture > > From: Kyle Tuskey [mailto:ktuskey at exostream.com] > > Sent: Thursday, October 10, 2002 12:20 AM > > > > You can scale LAMP (minus MySQL which is barely a database) to some > > degree, but it isn't really the best way to approach it. PHP was not > > built to be an enterprise language. The lack of the N-Tier model makes > > it great for most sites, but true enterprise level needs would be better > > approached with J2EE or .Net. Using .Net or J2EE (Java) will make the > > final solution much easier to use, manage, scale, and deploy. Though > > the word "enterprise" is thrown around too much and often isn't used > > accurately, applications that truly are enterprise do need to take into > > account a lot of the advantages of the N-Tier model. PHP has XML-RPC to > > all remote calls in a distributed architecture if I remember correctly, > > but it isn't very efficient. For instance, Java's RMI (Remote Method > > Invocation) implementation is much more robust for this purpose. If you > > must use PHP for an enterprise solution, use a strong RDBMS (MySQL is > > definitely not in this category) and some form of load balancing or > > clustering as opposed to an attempted distributed architecture w/ PHP. > > So, Kyle, what is "true enterprise level," then? A billion pageviews per > month? The 800B PV/month Ophir cited at CCI works out to about 300/second, > and I presume that doesn't include images or other static objects. > > Tell me, where is the point that MySQL breaks down? Traffic? Functionality? > I admit, MySQL doesn't have, say, the World's Greatest parallel hot-failover > technology, but I don't think anyone would classify Oracle's efforts in this > regard in that way either. > > Don't get me wrong, I'm all for using the right tool for the job, and MySQL > or PHP or Linux or Apache aren't each the right tool for every job. But if > you're going to insist that PHP or MySQL has problems, please point out > actual problems, instead of vague assertions. > > Thanks, > > David > > > > --- Unsubscribe at http://nyphp.org/list --- > > > > From fawcett at bard.edu Thu Oct 10 11:39:49 2002 From: fawcett at bard.edu (P. Fawcett) Date: Thu, 10 Oct 2002 11:39:49 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache References: <200210101447.g9AElBix055673@parsec.nyphp.org> Message-ID: <3DA59F45.79ADBADC@bard.edu> tx. but i can't even shell> mysql --user=root mysql i get error: # mysql --user=root mysql ERROR 1045: Access denied for user: 'root at localhost' (Using password: NO) Oktay Altunergil wrote: > > http://www.mysql.com/doc/en/GRANT.html > > On Thu, 10 Oct 2002 10:44:03 -0400 > "P. Fawcett" wrote: > > > tx. > > > > to confirm - so i can have both a mod & standalone cgi (thou i don't > > know why i'd want both but the programmers don't seem to know their > > environment so i'm just thinking of covering all bases till i get a > > handle on it.) > > > > i found that php 4.2.2 if mysql not specified in config, then it's auto > > built in > > > > so i've got php working but mysql won't do anything from within the > > server including basic #myqladmin version or variable info, returns > > w/error: > > > > "MySQL said: > > Host '204.nnn.nnn.nn' is not allowed to connect to this MySQL server" > > > > & docs point to 'make sure mysqld running- it is, & /tmp/msql-4socket > > exists -it does, so something else w/access prblm so i have to find > > mysql talk & maybe they'll know something > > > > Analysis & Solutions wrote: > > > > > > Hey P: > > > > > > On Wed, Oct 09, 2002 at 11:35:40AM -0400, P. Fawcett wrote: > > > > > > > > 1) if i have php, mysql & perl installed on the sys, do i have to > > > > include them in the other configs. ie configuring php --with-mysql? > > > > > > Yes. That gives PHP the ability to talk to MySQL. It makes PHP be > > > compiled with the MySQL functions. > > > > > > > configuring apache --with-perl > > > > > > This enables the apache/perl module. It speeds things up. Either way, > > > you can still call Perl scripts as standalone CGIs. > > > > > > > am i right mod's, ie mod_php is just a lighter version of php > > > > & not necessary if i have php 4.2.2 installed? > > > > > > Similarly, mod_php installs the apache/perl module, which speeds up > > > execution. If you install PHP separately, you can then also execute PHP > > > scripts in CGI mode. > > > > > > In both cases, CGI mode would have the script execute as the owner of the > > > script while the module versions execute as the Apache process. > > > > > > > but mysql would fail after config on: mysqladmin -u root -password > > > > "new-passwd" > > > > err: mysqladmin: connect to server at 'localhost'failed error: 'can't > > > > connect to local mysql server thru socket '/tmp/mysql.sock'(2). check > > > > that mysqld is running & that socket exists. well it wasn't & it didn't > > > > > > I run MySQL on Windows NT, so am not completely familliar with installing > > > it on linux, but I believe you need to install MySQL as normal. Then > > > start the daemon by issuing a "mysqld" command. > > > > > > > so i reconfig mysql with simplier 3.23.52 rpm, which would run thru the > > > > config ok, create the socket, start the daemon, but would populates > > > > files all over the sys and not create /usr/local/mysql dir, so without > > > > php config --with-mysql (no path) php would fail syntax in the > > > > hpptd.conf: > > > > LoadModule php4_module libexec/libphp4.so - "cannot load > > > > /usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so". > > > > > > Find where the files are created and set your my.conf and/or other > > > configuration files/commands appropriately. > > > > > > --Dan > > > > > > -- > > > PHP classes that make web design easier > > > SQL Solution | Layout Solution | Form Solution > > > sqlsolution.info | layoutsolution.info | formsolution.info > > > 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- From nyphp at altunergil.com Thu Oct 10 11:34:31 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Thu, 10 Oct 2002 11:34:31 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache In-Reply-To: <200210101535.g9AFZuix055748@parsec.nyphp.org> References: <200210101535.g9AFZuix055748@parsec.nyphp.org> Message-ID: <20021010113431.62962d1b.nyphp@altunergil.com> try mysql --user=root -p mysql You're attempting to log in without a password (hence the 'Using Password: NO at the end' ) Oktay On Thu, 10 Oct 2002 11:35:56 -0400 "P. Fawcett" wrote: > tx. but i can't even shell> mysql --user=root mysql > > i get error: > > # mysql --user=root mysql > ERROR 1045: Access denied for user: 'root at localhost' (Using password: > NO) > > Oktay Altunergil wrote: > > > > http://www.mysql.com/doc/en/GRANT.html > > > > On Thu, 10 Oct 2002 10:44:03 -0400 > > "P. Fawcett" wrote: > > > > > tx. > > > > > > to confirm - so i can have both a mod & standalone cgi (thou i don't > > > know why i'd want both but the programmers don't seem to know their > > > environment so i'm just thinking of covering all bases till i get a > > > handle on it.) > > > > > > i found that php 4.2.2 if mysql not specified in config, then it's auto > > > built in > > > > > > so i've got php working but mysql won't do anything from within the > > > server including basic #myqladmin version or variable info, returns > > > w/error: > > > > > > "MySQL said: > > > Host '204.nnn.nnn.nn' is not allowed to connect to this MySQL server" > > > > > > & docs point to 'make sure mysqld running- it is, & /tmp/msql-4socket > > > exists -it does, so something else w/access prblm so i have to find > > > mysql talk & maybe they'll know something > > > > > > Analysis & Solutions wrote: > > > > > > > > Hey P: > > > > > > > > On Wed, Oct 09, 2002 at 11:35:40AM -0400, P. Fawcett wrote: > > > > > > > > > > 1) if i have php, mysql & perl installed on the sys, do i have to > > > > > include them in the other configs. ie configuring php --with-mysql? > > > > > > > > Yes. That gives PHP the ability to talk to MySQL. It makes PHP be > > > > compiled with the MySQL functions. > > > > > > > > > configuring apache --with-perl > > > > > > > > This enables the apache/perl module. It speeds things up. Either way, > > > > you can still call Perl scripts as standalone CGIs. > > > > > > > > > am i right mod's, ie mod_php is just a lighter version of php > > > > > & not necessary if i have php 4.2.2 installed? > > > > > > > > Similarly, mod_php installs the apache/perl module, which speeds up > > > > execution. If you install PHP separately, you can then also execute PHP > > > > scripts in CGI mode. > > > > > > > > In both cases, CGI mode would have the script execute as the owner of the > > > > script while the module versions execute as the Apache process. > > > > > > > > > but mysql would fail after config on: mysqladmin -u root -password > > > > > "new-passwd" > > > > > err: mysqladmin: connect to server at 'localhost'failed error: 'can't > > > > > connect to local mysql server thru socket '/tmp/mysql.sock'(2). check > > > > > that mysqld is running & that socket exists. well it wasn't & it didn't > > > > > > > > I run MySQL on Windows NT, so am not completely familliar with installing > > > > it on linux, but I believe you need to install MySQL as normal. Then > > > > start the daemon by issuing a "mysqld" command. > > > > > > > > > so i reconfig mysql with simplier 3.23.52 rpm, which would run thru the > > > > > config ok, create the socket, start the daemon, but would populates > > > > > files all over the sys and not create /usr/local/mysql dir, so without > > > > > php config --with-mysql (no path) php would fail syntax in the > > > > > hpptd.conf: > > > > > LoadModule php4_module libexec/libphp4.so - "cannot load > > > > > /usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so". > > > > > > > > Find where the files are created and set your my.conf and/or other > > > > configuration files/commands appropriately. > > > > > > > > --Dan > > > > > > > > -- > > > > PHP classes that make web design easier > > > > SQL Solution | Layout Solution | Form Solution > > > > sqlsolution.info | layoutsolution.info | formsolution.info > > > > 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From zaunere at yahoo.com Thu Oct 10 11:42:46 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Thu, 10 Oct 2002 08:42:46 -0700 (PDT) Subject: [nycphp-talk] install php 4.2.2 with mysql & apache In-Reply-To: <200210101355.g9ADtlix055591@parsec.nyphp.org> Message-ID: <20021010154246.77093.qmail@web12807.mail.yahoo.com> --- "P. Fawcett" wrote: > in picking & sticking w/either rpm or src, does that mean don't mix > ie. an rpm php w/a mysql src? Right. While there's no technical reason not to do so (libs are libs, bins are bins) you can run into version/configuration mismatches, and most importantly sysadmin confusion. > or simply always rpm (or src) with php & ditto mysql etc? Try to keep them in parallel - especially since RPM packages have options/dependancies specific to one another. > the -F is new to me -tx Yeah, -U is always misleading to me - I shouldn't be able to upgrade something that doesn't exist; but I guess RPM calls it "freshen". H > > Hans Zaunere wrote: > > > > --- chalu wrote: > > > Hans Zaunere wrote: > > > > > > > >It's important to pick either RPM or src and then stick with it. > If > > > >this is new for you, try RPM. My RPM is a little rusty, but > maybe > > > >something like this would help: > > > > > > > >rpm -q apache > > > >rpm -q php > > > >rpm -q mysql > > > > > > > You mean; rpm -e apache to erase? > > > > -q to query, so he knows what's installed. Then -e to erase if > needed, > > or -U to upgrade or -F to freshen (upgrades only if package is > already > > installed). > > > > ===== > > Hans Zaunere > > New York PHP > > http://nyphp.org > > hans at nyphp.org > > > > __________________________________________________ > > Do you Yahoo!? > > Faith Hill - Exclusive Performances, Videos & More > > http://faith.yahoo.com > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From jonbaer at jonbaer.net Thu Oct 10 11:38:08 2002 From: jonbaer at jonbaer.net (Jon Baer) Date: Thu, 10 Oct 2002 11:38:08 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture References: <200210101426.g9AEQMix055634@parsec.nyphp.org> Message-ID: <3DA59EE0.50804@jonbaer.net> David Sklar wrote >Don't get me wrong, I'm all for using the right tool for the job, and MySQL >or PHP or Linux or Apache aren't each the right tool for every job. But if >you're going to insist that PHP or MySQL has problems, please point out >actual problems, instead of vague assertions. > > Yeah I agree, people tend to diss products based on either old info, old versions, or just bad initial info (did it myself to PHP when came to crossroads of PHP vs. JSP about a year ago) ... Id also like to hear what MySQL's problems are as my days of taking time to dabble with Oracle or Sybase are over :-) I also can't see how one can find a definitive answer for scaling when 1/2 the equation is based on how much money you put into scaling anyway, better equipment and more memory will always help any platform (PHP/J2EE/.Net) ... - Jon From fawcett at bard.edu Thu Oct 10 11:54:02 2002 From: fawcett at bard.edu (P. Fawcett) Date: Thu, 10 Oct 2002 11:54:02 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache References: <200210101538.g9AFckix055755@parsec.nyphp.org> Message-ID: <3DA5A29A.E23E958E@bard.edu> ah. wondered what those no/yes's were when testing stuff. but still failed #mysql --user=mysql -p mysql Enter password: ERROR 1045: Access denied for user: 'mysql at localhost' (Using password: YES) Oktay Altunergil wrote: > > try > > mysql --user=root -p mysql > > You're attempting to log in without a password (hence the 'Using Password: NO at the end' ) > > Oktay > On Thu, 10 Oct 2002 11:35:56 -0400 > "P. Fawcett" wrote: > > > tx. but i can't even shell> mysql --user=root mysql > > > > i get error: > > > > # mysql --user=root mysql > > ERROR 1045: Access denied for user: 'root at localhost' (Using password: > > NO) > > > > Oktay Altunergil wrote: > > > > > > http://www.mysql.com/doc/en/GRANT.html > > > > > > On Thu, 10 Oct 2002 10:44:03 -0400 > > > "P. Fawcett" wrote: > > > > > > > tx. > > > > > > > > to confirm - so i can have both a mod & standalone cgi (thou i don't > > > > know why i'd want both but the programmers don't seem to know their > > > > environment so i'm just thinking of covering all bases till i get a > > > > handle on it.) > > > > > > > > i found that php 4.2.2 if mysql not specified in config, then it's auto > > > > built in > > > > > > > > so i've got php working but mysql won't do anything from within the > > > > server including basic #myqladmin version or variable info, returns > > > > w/error: > > > > > > > > "MySQL said: > > > > Host '204.nnn.nnn.nn' is not allowed to connect to this MySQL server" > > > > > > > > & docs point to 'make sure mysqld running- it is, & /tmp/msql-4socket > > > > exists -it does, so something else w/access prblm so i have to find > > > > mysql talk & maybe they'll know something > > > > > > > > Analysis & Solutions wrote: > > > > > > > > > > Hey P: > > > > > > > > > > On Wed, Oct 09, 2002 at 11:35:40AM -0400, P. Fawcett wrote: > > > > > > > > > > > > 1) if i have php, mysql & perl installed on the sys, do i have to > > > > > > include them in the other configs. ie configuring php --with-mysql? > > > > > > > > > > Yes. That gives PHP the ability to talk to MySQL. It makes PHP be > > > > > compiled with the MySQL functions. > > > > > > > > > > > configuring apache --with-perl > > > > > > > > > > This enables the apache/perl module. It speeds things up. Either way, > > > > > you can still call Perl scripts as standalone CGIs. > > > > > > > > > > > am i right mod's, ie mod_php is just a lighter version of php > > > > > > & not necessary if i have php 4.2.2 installed? > > > > > > > > > > Similarly, mod_php installs the apache/perl module, which speeds up > > > > > execution. If you install PHP separately, you can then also execute PHP > > > > > scripts in CGI mode. > > > > > > > > > > In both cases, CGI mode would have the script execute as the owner of the > > > > > script while the module versions execute as the Apache process. > > > > > > > > > > > but mysql would fail after config on: mysqladmin -u root -password > > > > > > "new-passwd" > > > > > > err: mysqladmin: connect to server at 'localhost'failed error: 'can't > > > > > > connect to local mysql server thru socket '/tmp/mysql.sock'(2). check > > > > > > that mysqld is running & that socket exists. well it wasn't & it didn't > > > > > > > > > > I run MySQL on Windows NT, so am not completely familliar with installing > > > > > it on linux, but I believe you need to install MySQL as normal. Then > > > > > start the daemon by issuing a "mysqld" command. > > > > > > > > > > > so i reconfig mysql with simplier 3.23.52 rpm, which would run thru the > > > > > > config ok, create the socket, start the daemon, but would populates > > > > > > files all over the sys and not create /usr/local/mysql dir, so without > > > > > > php config --with-mysql (no path) php would fail syntax in the > > > > > > hpptd.conf: > > > > > > LoadModule php4_module libexec/libphp4.so - "cannot load > > > > > > /usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so". > > > > > > > > > > Find where the files are created and set your my.conf and/or other > > > > > configuration files/commands appropriately. > > > > > > > > > > --Dan > > > > > > > > > > -- > > > > > PHP classes that make web design easier > > > > > SQL Solution | Layout Solution | Form Solution > > > > > sqlsolution.info | layoutsolution.info | formsolution.info > > > > > 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- From zaunere at yahoo.com Thu Oct 10 11:51:29 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Thu, 10 Oct 2002 08:51:29 -0700 (PDT) Subject: [nycphp-talk] install php 4.2.2 with mysql & apache In-Reply-To: <200210101444.g9AEi3ix055662@parsec.nyphp.org> Message-ID: <20021010155129.40666.qmail@web12806.mail.yahoo.com> --- "P. Fawcett" wrote: > tx. > > to confirm - so i can have both a mod & standalone cgi (thou i don't > know why i'd want both but the programmers don't seem to know their > environment so i'm just thinking of covering all bases till i get a > handle on it.) The shotgun method - works well, until you need to upgrade/patch :) > i found that php 4.2.2 if mysql not specified in config, then it's > auto built in It's always better to use MySQL's client libs. ie, when configuring php: ./configure --with-mysql=/usr/local/mysql > so i've got php working but mysql won't do anything from within the > server including basic #myqladmin version or variable info, returns > w/error: > > "MySQL said: > Host '204.nnn.nnn.nn' is not allowed to connect to this MySQL server" > > & docs point to 'make sure mysqld running- it is, & /tmp/msql-4socket > exists -it does, so something else w/access prblm so i have to find > mysql talk & maybe they'll know something Maybe. Obviously, your permission tables aren't setup properly. There are a couple of issues: 1) if you connect to localhost or the FQDN or alias of a system, MySQL will see the connection as comming from different hosts. 2) if you INSERT/UPDATE/DELETE the mysql.* tables directly, you need to FLUSH PRIVILEGES for the changes to take effect. 3) Use GRANT/REVOKE. Read: http://www.mysql.com/doc/en/Privilege_system.html http://www.mysql.com/doc/en/User_Account_Management.html H ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From oktay at optonline.net Thu Oct 10 11:59:22 2002 From: oktay at optonline.net (Oktay Altunergil) Date: Thu, 10 Oct 2002 11:59:22 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache In-Reply-To: <200210101550.g9AFo9ix055788@parsec.nyphp.org> References: <200210101550.g9AFo9ix055788@parsec.nyphp.org> Message-ID: <20021010115922.2f13f1fd.oktay@optonline.net> I don't know how you've installed it. But if you've installed from source, there's a step which you perform to set up the initial system tables. (scripts/mysql_install_db) See the following page. I've installed MySQL about 50 times using these instructions. (no I don't memorize stuff like this). It has never failed. Most times you can actually copy/paste most of the stuff. http://www.mysql.com/doc/en/Quick_install.html If you have alrady run mysql_install_db or you have installed RPM (hence install_db shouldn't be the issue) reset the password by doing the following in shell as root. killall mysqld safe_mysqld --skip-grant-tables & # (i think new versions call this mysqld_safe ) mysql Once in the mysql monitor, run the following two queries. use mysql; UPDATE user SET password = PASSWORD("new_password") WHERE user = 'root'; FLUSH PRIVILEGES; # you don't need this since you'll restart again. quit; Then in shell again: killall mysqld; safe_mysqld& Have fun. --oktay-- On Thu, 10 Oct 2002 11:50:09 -0400 "P. Fawcett" wrote: > ah. wondered what those no/yes's were when testing stuff. > but still failed > > #mysql --user=mysql -p mysql > Enter password: > ERROR 1045: Access denied for user: 'mysql at localhost' (Using password: > YES) > > > Oktay Altunergil wrote: > > > > try > > > > mysql --user=root -p mysql > > > > You're attempting to log in without a password (hence the 'Using Password: NO at the end' ) > > > > Oktay > > On Thu, 10 Oct 2002 11:35:56 -0400 > > "P. Fawcett" wrote: > > > > > tx. but i can't even shell> mysql --user=root mysql > > > > > > i get error: > > > > > > # mysql --user=root mysql > > > ERROR 1045: Access denied for user: 'root at localhost' (Using password: > > > NO) > > > > > > Oktay Altunergil wrote: > > > > > > > > http://www.mysql.com/doc/en/GRANT.html > > > > > > > > On Thu, 10 Oct 2002 10:44:03 -0400 > > > > "P. Fawcett" wrote: > > > > > > > > > tx. > > > > > > > > > > to confirm - so i can have both a mod & standalone cgi (thou i don't > > > > > know why i'd want both but the programmers don't seem to know their > > > > > environment so i'm just thinking of covering all bases till i get a > > > > > handle on it.) > > > > > > > > > > i found that php 4.2.2 if mysql not specified in config, then it's auto > > > > > built in > > > > > > > > > > so i've got php working but mysql won't do anything from within the > > > > > server including basic #myqladmin version or variable info, returns > > > > > w/error: > > > > > > > > > > "MySQL said: > > > > > Host '204.nnn.nnn.nn' is not allowed to connect to this MySQL server" > > > > > > > > > > & docs point to 'make sure mysqld running- it is, & /tmp/msql-4socket > > > > > exists -it does, so something else w/access prblm so i have to find > > > > > mysql talk & maybe they'll know something > > > > > > > > > > Analysis & Solutions wrote: > > > > > > > > > > > > Hey P: > > > > > > > > > > > > On Wed, Oct 09, 2002 at 11:35:40AM -0400, P. Fawcett wrote: > > > > > > > > > > > > > > 1) if i have php, mysql & perl installed on the sys, do i have to > > > > > > > include them in the other configs. ie configuring php --with-mysql? > > > > > > > > > > > > Yes. That gives PHP the ability to talk to MySQL. It makes PHP be > > > > > > compiled with the MySQL functions. > > > > > > > > > > > > > configuring apache --with-perl > > > > > > > > > > > > This enables the apache/perl module. It speeds things up. Either way, > > > > > > you can still call Perl scripts as standalone CGIs. > > > > > > > > > > > > > am i right mod's, ie mod_php is just a lighter version of php > > > > > > > & not necessary if i have php 4.2.2 installed? > > > > > > > > > > > > Similarly, mod_php installs the apache/perl module, which speeds up > > > > > > execution. If you install PHP separately, you can then also execute PHP > > > > > > scripts in CGI mode. > > > > > > > > > > > > In both cases, CGI mode would have the script execute as the owner of the > > > > > > script while the module versions execute as the Apache process. > > > > > > > > > > > > > but mysql would fail after config on: mysqladmin -u root -password > > > > > > > "new-passwd" > > > > > > > err: mysqladmin: connect to server at 'localhost'failed error: 'can't > > > > > > > connect to local mysql server thru socket '/tmp/mysql.sock'(2). check > > > > > > > that mysqld is running & that socket exists. well it wasn't & it didn't > > > > > > > > > > > > I run MySQL on Windows NT, so am not completely familliar with installing > > > > > > it on linux, but I believe you need to install MySQL as normal. Then > > > > > > start the daemon by issuing a "mysqld" command. > > > > > > > > > > > > > so i reconfig mysql with simplier 3.23.52 rpm, which would run thru the > > > > > > > config ok, create the socket, start the daemon, but would populates > > > > > > > files all over the sys and not create /usr/local/mysql dir, so without > > > > > > > php config --with-mysql (no path) php would fail syntax in the > > > > > > > hpptd.conf: > > > > > > > LoadModule php4_module libexec/libphp4.so - "cannot load > > > > > > > /usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so". > > > > > > > > > > > > Find where the files are created and set your my.conf and/or other > > > > > > configuration files/commands appropriately. > > > > > > > > > > > > --Dan > > > > > > > > > > > > -- > > > > > > PHP classes that make web design easier > > > > > > SQL Solution | Layout Solution | Form Solution > > > > > > sqlsolution.info | layoutsolution.info | formsolution.info > > > > > > 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From fawcett at bard.edu Thu Oct 10 12:12:10 2002 From: fawcett at bard.edu (P. Fawcett) Date: Thu, 10 Oct 2002 12:12:10 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache References: <200210101542.g9AFgoix055766@parsec.nyphp.org> Message-ID: <3DA5A6DA.91140EAB@bard.edu> well i've certainly hit the admin confusion here, & prbly mismatches since i've got apache & php installed via binary (or source - still confused on that) but mysql is rpm'd, so i'll rpm -e the mysql & install it over again w/the binary (or source). would hate to change the apache or php as they're working! & i'll just reconfig the php with the client lib /configure --with-mysql=/usr/local/mysql as to me that seems cleaner & besides you also recommended it! nice to have thought process in a new area confirmed Hans Zaunere wrote: > > --- "P. Fawcett" wrote: > > in picking & sticking w/either rpm or src, does that mean don't mix > > ie. an rpm php w/a mysql src? > > Right. While there's no technical reason not to do so (libs are libs, > bins are bins) you can run into version/configuration mismatches, and > most importantly sysadmin confusion. > > > or simply always rpm (or src) with php & ditto mysql etc? > > Try to keep them in parallel - especially since RPM packages have > options/dependancies specific to one another. > > > the -F is new to me -tx > > Yeah, -U is always misleading to me - I shouldn't be able to upgrade > something that doesn't exist; but I guess RPM calls it "freshen". > > H > > > > > Hans Zaunere wrote: > > > > > > --- chalu wrote: > > > > Hans Zaunere wrote: > > > > > > > > > >It's important to pick either RPM or src and then stick with it. > > If > > > > >this is new for you, try RPM. My RPM is a little rusty, but > > maybe > > > > >something like this would help: > > > > > > > > > >rpm -q apache > > > > >rpm -q php > > > > >rpm -q mysql > > > > > > > > > You mean; rpm -e apache to erase? > > > > > > -q to query, so he knows what's installed. Then -e to erase if > > needed, > > > or -U to upgrade or -F to freshen (upgrades only if package is > > already > > > installed). > > > > > > ===== > > > Hans Zaunere > > > New York PHP > > > http://nyphp.org > > > hans at nyphp.org > > > > > > __________________________________________________ > > > Do you Yahoo!? > > > Faith Hill - Exclusive Performances, Videos & More > > > http://faith.yahoo.com > > > > > > > > > > > > > > > > > > ===== > Hans Zaunere > New York PHP > http://nyphp.org > hans at nyphp.org > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > --- Unsubscribe at http://nyphp.org/list --- From nyphp at altunergil.com Thu Oct 10 12:05:20 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Thu, 10 Oct 2002 12:05:20 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache In-Reply-To: <200210101550.g9AFo9ix055788@parsec.nyphp.org> References: <200210101550.g9AFo9ix055788@parsec.nyphp.org> Message-ID: <20021010120520.615102a3.nyphp@altunergil.com> I don't know how you've installed it. But if you've installed from source, there's a step which you perform to set up the initial system tables. (scripts/mysql_install_db) See the following page. I've installed MySQL about 50 times using these instructions. (no I don't memorize stuff like this). It has never failed. Most times you can actually copy/paste most of the stuff. http://www.mysql.com/doc/en/Quick_install.html If you have alrady run mysql_install_db or you have installed RPM (hence install_db shouldn't be the issue) reset the password by doing the following in shell as root. killall mysqld safe_mysqld --skip-grant-tables & # (i think new versions call this mysqld_safe ) mysql Once in the mysql monitor, run the following two queries. use mysql; UPDATE user SET password = PASSWORD("new_password") WHERE user = 'root'; FLUSH PRIVILEGES; # you don't need this since you'll restart again. quit; Then in shell again: killall mysqld; safe_mysqld& Have fun. --oktay-- On Thu, 10 Oct 2002 11:50:09 -0400 "P. Fawcett" wrote: > ah. wondered what those no/yes's were when testing stuff. > but still failed > > #mysql --user=mysql -p mysql > Enter password: > ERROR 1045: Access denied for user: 'mysql at localhost' (Using password: > YES) > > > Oktay Altunergil wrote: > > > > try > > > > mysql --user=root -p mysql > > > > You're attempting to log in without a password (hence the 'Using Password: NO at the end' ) > > > > Oktay > > On Thu, 10 Oct 2002 11:35:56 -0400 > > "P. Fawcett" wrote: > > > > > tx. but i can't even shell> mysql --user=root mysql > > > > > > i get error: > > > > > > # mysql --user=root mysql > > > ERROR 1045: Access denied for user: 'root at localhost' (Using password: > > > NO) > > > > > > Oktay Altunergil wrote: > > > > > > > > http://www.mysql.com/doc/en/GRANT.html > > > > > > > > On Thu, 10 Oct 2002 10:44:03 -0400 > > > > "P. Fawcett" wrote: > > > > > > > > > tx. > > > > > > > > > > to confirm - so i can have both a mod & standalone cgi (thou i don't > > > > > know why i'd want both but the programmers don't seem to know their > > > > > environment so i'm just thinking of covering all bases till i get a > > > > > handle on it.) > > > > > > > > > > i found that php 4.2.2 if mysql not specified in config, then it's auto > > > > > built in > > > > > > > > > > so i've got php working but mysql won't do anything from within the > > > > > server including basic #myqladmin version or variable info, returns > > > > > w/error: > > > > > > > > > > "MySQL said: > > > > > Host '204.nnn.nnn.nn' is not allowed to connect to this MySQL server" > > > > > > > > > > & docs point to 'make sure mysqld running- it is, & /tmp/msql-4socket > > > > > exists -it does, so something else w/access prblm so i have to find > > > > > mysql talk & maybe they'll know something > > > > > > > > > > Analysis & Solutions wrote: > > > > > > > > > > > > Hey P: > > > > > > > > > > > > On Wed, Oct 09, 2002 at 11:35:40AM -0400, P. Fawcett wrote: > > > > > > > > > > > > > > 1) if i have php, mysql & perl installed on the sys, do i have to > > > > > > > include them in the other configs. ie configuring php --with-mysql? > > > > > > > > > > > > Yes. That gives PHP the ability to talk to MySQL. It makes PHP be > > > > > > compiled with the MySQL functions. > > > > > > > > > > > > > configuring apache --with-perl > > > > > > > > > > > > This enables the apache/perl module. It speeds things up. Either way, > > > > > > you can still call Perl scripts as standalone CGIs. > > > > > > > > > > > > > am i right mod's, ie mod_php is just a lighter version of php > > > > > > > & not necessary if i have php 4.2.2 installed? > > > > > > > > > > > > Similarly, mod_php installs the apache/perl module, which speeds up > > > > > > execution. If you install PHP separately, you can then also execute PHP > > > > > > scripts in CGI mode. > > > > > > > > > > > > In both cases, CGI mode would have the script execute as the owner of the > > > > > > script while the module versions execute as the Apache process. > > > > > > > > > > > > > but mysql would fail after config on: mysqladmin -u root -password > > > > > > > "new-passwd" > > > > > > > err: mysqladmin: connect to server at 'localhost'failed error: 'can't > > > > > > > connect to local mysql server thru socket '/tmp/mysql.sock'(2). check > > > > > > > that mysqld is running & that socket exists. well it wasn't & it didn't > > > > > > > > > > > > I run MySQL on Windows NT, so am not completely familliar with installing > > > > > > it on linux, but I believe you need to install MySQL as normal. Then > > > > > > start the daemon by issuing a "mysqld" command. > > > > > > > > > > > > > so i reconfig mysql with simplier 3.23.52 rpm, which would run thru the > > > > > > > config ok, create the socket, start the daemon, but would populates > > > > > > > files all over the sys and not create /usr/local/mysql dir, so without > > > > > > > php config --with-mysql (no path) php would fail syntax in the > > > > > > > hpptd.conf: > > > > > > > LoadModule php4_module libexec/libphp4.so - "cannot load > > > > > > > /usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so". > > > > > > > > > > > > Find where the files are created and set your my.conf and/or other > > > > > > configuration files/commands appropriately. > > > > > > > > > > > > --Dan > > > > > > > > > > > > -- > > > > > > PHP classes that make web design easier > > > > > > SQL Solution | Layout Solution | Form Solution > > > > > > sqlsolution.info | layoutsolution.info | formsolution.info > > > > > > 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From sklar at sklar.com Thu Oct 10 12:13:49 2002 From: sklar at sklar.com (David Sklar) Date: Thu, 10 Oct 2002 12:13:49 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture In-Reply-To: <200210101544.g9AFiYix055773@parsec.nyphp.org> Message-ID: > From: Jon Baer [mailto:jonbaer at jonbaer.net] > Sent: Thursday, October 10, 2002 11:45 AM > > I also can't see how one can find a definitive answer for scaling when > 1/2 the equation is based on how much money you put into scaling anyway, > better equipment and more memory will always help any platform > (PHP/J2EE/.Net) ... Yes, perhaps the relevant criterion is the scalability of one's bank account. :) -dave From nyphp at altunergil.com Thu Oct 10 12:12:37 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Thu, 10 Oct 2002 12:12:37 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache In-Reply-To: <200210101608.g9AG8Iix055861@parsec.nyphp.org> References: <200210101608.g9AG8Iix055861@parsec.nyphp.org> Message-ID: <20021010121237.26367de1.nyphp@altunergil.com> When there's confusion, there should be some explanation. binary : as in precompiled on a different box and ready to run on another source : you do './configure && ./make && ./make install' yourself. Compiled on your box. rpm : a package format to make managing software easier. rpm's are esentially *binary* files that adhere to a specification. (i.e specs describe where the files go, what scripts are run during the install etc) Other examples of binary package management systems are Debian's .deb, Slackware's .tgz etc. There's yet another system where there's a package management system in place but the software is built from source on your own computer. (FreeBSD ports and Gentoo portage are examples of this) Oktay On Thu, 10 Oct 2002 12:08:18 -0400 "P. Fawcett" wrote: [ header snip ] > > well i've certainly hit the admin confusion here, & prbly mismatches > > since i've got apache & php installed via binary (or source - still > confused on that) but mysql is rpm'd, [ snip ] From fawcett at bard.edu Thu Oct 10 12:25:02 2002 From: fawcett at bard.edu (P. Fawcett) Date: Thu, 10 Oct 2002 12:25:02 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache References: <200210101609.g9AG9Xix055868@parsec.nyphp.org> Message-ID: <3DA5A9DE.2EA342E1@bard.edu> originally installed source mysql v.49, but missed the step "shell> cp support-files/my-medium.cnf /etc/my.cnf". maybe that's where i orginally ran into trbl. so gonna rpm -e v.52, & install from source the v.52. tx Oktay Altunergil wrote: > > I don't know how you've installed it. But if you've installed from source, there's a step which you perform to set up the initial system tables. > (scripts/mysql_install_db) > > See the following page. I've installed MySQL about 50 times using these instructions. (no I don't memorize stuff like this). It has never failed. Most times you can actually copy/paste most of the stuff. > > http://www.mysql.com/doc/en/Quick_install.html > > If you have alrady run mysql_install_db or you have installed RPM (hence install_db shouldn't be the issue) reset the password by doing the following in shell as root. > > killall mysqld > safe_mysqld --skip-grant-tables & # (i think new versions call this mysqld_safe ) > mysql > > Once in the mysql monitor, run the following two queries. > > use mysql; > UPDATE user SET password = PASSWORD("new_password") WHERE user = 'root'; > FLUSH PRIVILEGES; # you don't need this since you'll restart again. > quit; > > Then in shell again: > > killall mysqld; > safe_mysqld& > > Have fun. --oktay-- > > On Thu, 10 Oct 2002 11:50:09 -0400 > "P. Fawcett" wrote: > > > ah. wondered what those no/yes's were when testing stuff. > > but still failed > > > > #mysql --user=mysql -p mysql > > Enter password: > > ERROR 1045: Access denied for user: 'mysql at localhost' (Using password: > > YES) > > > > > > Oktay Altunergil wrote: > > > > > > try > > > > > > mysql --user=root -p mysql > > > > > > You're attempting to log in without a password (hence the 'Using Password: NO at the end' ) > > > > > > Oktay > > > On Thu, 10 Oct 2002 11:35:56 -0400 > > > "P. Fawcett" wrote: > > > > > > > tx. but i can't even shell> mysql --user=root mysql > > > > > > > > i get error: > > > > > > > > # mysql --user=root mysql > > > > ERROR 1045: Access denied for user: 'root at localhost' (Using password: > > > > NO) > > > > > > > > Oktay Altunergil wrote: > > > > > > > > > > http://www.mysql.com/doc/en/GRANT.html > > > > > > > > > > On Thu, 10 Oct 2002 10:44:03 -0400 > > > > > "P. Fawcett" wrote: > > > > > > > > > > > tx. > > > > > > > > > > > > to confirm - so i can have both a mod & standalone cgi (thou i don't > > > > > > know why i'd want both but the programmers don't seem to know their > > > > > > environment so i'm just thinking of covering all bases till i get a > > > > > > handle on it.) > > > > > > > > > > > > i found that php 4.2.2 if mysql not specified in config, then it's auto > > > > > > built in > > > > > > > > > > > > so i've got php working but mysql won't do anything from within the > > > > > > server including basic #myqladmin version or variable info, returns > > > > > > w/error: > > > > > > > > > > > > "MySQL said: > > > > > > Host '204.nnn.nnn.nn' is not allowed to connect to this MySQL server" > > > > > > > > > > > > & docs point to 'make sure mysqld running- it is, & /tmp/msql-4socket > > > > > > exists -it does, so something else w/access prblm so i have to find > > > > > > mysql talk & maybe they'll know something > > > > > > > > > > > > Analysis & Solutions wrote: > > > > > > > > > > > > > > Hey P: > > > > > > > > > > > > > > On Wed, Oct 09, 2002 at 11:35:40AM -0400, P. Fawcett wrote: > > > > > > > > > > > > > > > > 1) if i have php, mysql & perl installed on the sys, do i have to > > > > > > > > include them in the other configs. ie configuring php --with-mysql? > > > > > > > > > > > > > > Yes. That gives PHP the ability to talk to MySQL. It makes PHP be > > > > > > > compiled with the MySQL functions. > > > > > > > > > > > > > > > configuring apache --with-perl > > > > > > > > > > > > > > This enables the apache/perl module. It speeds things up. Either way, > > > > > > > you can still call Perl scripts as standalone CGIs. > > > > > > > > > > > > > > > am i right mod's, ie mod_php is just a lighter version of php > > > > > > > > & not necessary if i have php 4.2.2 installed? > > > > > > > > > > > > > > Similarly, mod_php installs the apache/perl module, which speeds up > > > > > > > execution. If you install PHP separately, you can then also execute PHP > > > > > > > scripts in CGI mode. > > > > > > > > > > > > > > In both cases, CGI mode would have the script execute as the owner of the > > > > > > > script while the module versions execute as the Apache process. > > > > > > > > > > > > > > > but mysql would fail after config on: mysqladmin -u root -password > > > > > > > > "new-passwd" > > > > > > > > err: mysqladmin: connect to server at 'localhost'failed error: 'can't > > > > > > > > connect to local mysql server thru socket '/tmp/mysql.sock'(2). check > > > > > > > > that mysqld is running & that socket exists. well it wasn't & it didn't > > > > > > > > > > > > > > I run MySQL on Windows NT, so am not completely familliar with installing > > > > > > > it on linux, but I believe you need to install MySQL as normal. Then > > > > > > > start the daemon by issuing a "mysqld" command. > > > > > > > > > > > > > > > so i reconfig mysql with simplier 3.23.52 rpm, which would run thru the > > > > > > > > config ok, create the socket, start the daemon, but would populates > > > > > > > > files all over the sys and not create /usr/local/mysql dir, so without > > > > > > > > php config --with-mysql (no path) php would fail syntax in the > > > > > > > > hpptd.conf: > > > > > > > > LoadModule php4_module libexec/libphp4.so - "cannot load > > > > > > > > /usr/local/apache/libexec/libphp4.so into server:libmysqlclient.so". > > > > > > > > > > > > > > Find where the files are created and set your my.conf and/or other > > > > > > > configuration files/commands appropriately. > > > > > > > > > > > > > > --Dan > > > > > > > > > > > > > > -- > > > > > > > PHP classes that make web design easier > > > > > > > SQL Solution | Layout Solution | Form Solution > > > > > > > sqlsolution.info | layoutsolution.info | formsolution.info > > > > > > > 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- From fawcett at bard.edu Thu Oct 10 12:43:50 2002 From: fawcett at bard.edu (P. Fawcett) Date: Thu, 10 Oct 2002 12:43:50 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache References: <200210101616.g9AGGnix055893@parsec.nyphp.org> Message-ID: <3DA5AE46.A33839DE@bard.edu> tx. i know the resulting dif between bin/src/rpm (but didn't know .deb/.tgz. interesting on freebsd & gentoo) but in downloading i can't tell from zipped tar file names which is binary & which is source as they seem to be same format ie. php or mysql-ver-os.tar.gz. unless maybe directory structure specific, but i didn't catch then when looking at mirrors Oktay Altunergil wrote: > > When there's confusion, there should be some explanation. > > binary : as in precompiled on a different box and ready to run on another > source : you do './configure && ./make && ./make install' yourself. Compiled on your box. > rpm : a package format to make managing software easier. rpm's are esentially *binary* files that adhere to a specification. (i.e specs describe where the files go, what scripts are run during the install etc) Other examples of binary package management systems are Debian's .deb, Slackware's .tgz etc. > > There's yet another system where there's a package management system in place but the software is built from source on your own computer. (FreeBSD ports and Gentoo portage are examples of this) > > Oktay > > On Thu, 10 Oct 2002 12:08:18 -0400 > "P. Fawcett" wrote: > > [ header snip ] > > > > well i've certainly hit the admin confusion here, & prbly mismatches > > > > since i've got apache & php installed via binary (or source - still > > confused on that) but mysql is rpm'd, > > [ snip ] > > --- Unsubscribe at http://nyphp.org/list --- From fawcett at bard.edu Thu Oct 10 12:48:12 2002 From: fawcett at bard.edu (P. Fawcett) Date: Thu, 10 Oct 2002 12:48:12 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache References: <200210101551.g9AFpaix055795@parsec.nyphp.org> Message-ID: <3DA5AF4C.D4D53D2C@bard.edu> i hate shotgun from maintenance standpoint - but when under fire... in fact i have to drop this server till tues as i have been given priority to another needed by tues. so you may not hear any more confusion till then. tx. for doc pointers. can spend lifetime reading & like to start in the right direction at least for production purposes was disappointed to miss recent nyc php users group discussing apache/php/mysql - was exactly what i needed! Hans Zaunere wrote: > > --- "P. Fawcett" wrote: > > tx. > > > > to confirm - so i can have both a mod & standalone cgi (thou i don't > > know why i'd want both but the programmers don't seem to know their > > environment so i'm just thinking of covering all bases till i get a > > handle on it.) > > The shotgun method - works well, until you need to upgrade/patch :) > > > i found that php 4.2.2 if mysql not specified in config, then it's > > auto built in > > It's always better to use MySQL's client libs. ie, when configuring > php: > > /configure --with-mysql=/usr/local/mysql > > > so i've got php working but mysql won't do anything from within the > > server including basic #myqladmin version or variable info, returns > > w/error: > > > > "MySQL said: > > Host '204.nnn.nnn.nn' is not allowed to connect to this MySQL server" > > > > & docs point to 'make sure mysqld running- it is, & /tmp/msql-4socket > > exists -it does, so something else w/access prblm so i have to find > > mysql talk & maybe they'll know something > > Maybe. > > Obviously, your permission tables aren't setup properly. There are a > couple of issues: > > 1) if you connect to localhost or the FQDN or alias of a system, MySQL > will see the connection as comming from different hosts. > > 2) if you INSERT/UPDATE/DELETE the mysql.* tables directly, you need to > FLUSH PRIVILEGES for the changes to take effect. > > 3) Use GRANT/REVOKE. Read: > http://www.mysql.com/doc/en/Privilege_system.html > http://www.mysql.com/doc/en/User_Account_Management.html > > H > > ===== > Hans Zaunere > New York PHP > http://nyphp.org > hans at nyphp.org > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > --- Unsubscribe at http://nyphp.org/list --- From nyphp at altunergil.com Thu Oct 10 12:42:47 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Thu, 10 Oct 2002 12:42:47 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache In-Reply-To: <200210101639.g9AGdwix055957@parsec.nyphp.org> References: <200210101639.g9AGdwix055957@parsec.nyphp.org> Message-ID: <20021010124247.4441147a.nyphp@altunergil.com> Yeah.. I remember downloading the binary tar.gz rather than the source one in the past.. For some odd reason mysql.com lists the source packages at the very bottom on their download page ( http://www.mysql.com/downloads/mysql-3.23.html) while the binary package(s) are listed at the top. Oktay On Thu, 10 Oct 2002 12:39:58 -0400 "P. Fawcett" wrote: > tx. i know the resulting dif between bin/src/rpm (but didn't know > deb/.tgz. interesting on freebsd & gentoo) > > but in downloading i can't tell from zipped tar file names which is > binary & which is source as they seem to be same format ie. php or > mysql-ver-os.tar.gz. unless maybe directory structure specific, but i > didn't catch then when looking at mirrors > > Oktay Altunergil wrote: > > > > When there's confusion, there should be some explanation. > > > > binary : as in precompiled on a different box and ready to run on another > > source : you do './configure && ./make && ./make install' yourself. Compiled on your box. > > rpm : a package format to make managing software easier. rpm's are esentially *binary* files that adhere to a specification. (i.e specs describe where the files go, what scripts are run during the install etc) Other examples of binary package management systems are Debian's .deb, Slackware's .tgz etc. > > > > There's yet another system where there's a package management system in place but the software is built from source on your own computer. (FreeBSD ports and Gentoo portage are examples of this) > > > > Oktay > > > > On Thu, 10 Oct 2002 12:08:18 -0400 > > "P. Fawcett" wrote: > > > > [ header snip ] > > > > > > well i've certainly hit the admin confusion here, & prbly mismatches > > > > > > since i've got apache & php installed via binary (or source - still > > > confused on that) but mysql is rpm'd, > > > > [ snip ] > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From Wasch at aol.com Thu Oct 10 13:24:37 2002 From: Wasch at aol.com (Wasch at aol.com) Date: Thu, 10 Oct 2002 13:24:37 EDT Subject: [nycphp-talk] install php 4.2.2 with mysql & apache Message-ID: <6f.2f13aa41.2ad711d5@aol.com> In a message dated 10/10/2002 12:21:56 PM Eastern Daylight Time, fawcett at bard.edu writes: > well i've certainly hit the admin confusion here, & prbly mismatches > > since i've got apache & php installed via binary (or source - still > confused on that) but mysql is rpm'd, so i'll rpm -e the mysql & install > it over again w/the binary (or source). would hate to change the apache > or php as they're working! & i'll just reconfig the php with the client > lib /configure --with-mysql=/usr/local/mysql as to me that seems cleaner > & besides you also recommended it! nice to have thought process in a > new area confirmed > Question: What OS are you using? If Windows, what flavor? If Linux, what flavor? Wayne Schultz DraftCAD LLC -------------- next part -------------- An HTML attachment was scrubbed... URL: From Wasch at aol.com Thu Oct 10 13:28:35 2002 From: Wasch at aol.com (Wasch at aol.com) Date: Thu, 10 Oct 2002 13:28:35 EDT Subject: [nycphp-talk] install php 4.2.2 with mysql & apache Message-ID: <11d.18847c40.2ad712c3@aol.com> In a message dated 10/10/2002 12:47:07 PM Eastern Daylight Time, fawcett at bard.edu writes: > was disappointed to miss recent nyc php users group discussing > apache/php/mysql - was exactly what i needed! > Sure wish I was closer to get to your meetings; but we have nothing like your group here in the Philly area. Guess there to busy eating Cheese Steaks or trying to fix the crack in the Liberty Bell. Wayne Schuiltz DraftCAD LLC -------------- next part -------------- An HTML attachment was scrubbed... URL: From fawcett at bard.edu Thu Oct 10 14:07:04 2002 From: fawcett at bard.edu (P. Fawcett) Date: Thu, 10 Oct 2002 14:07:04 -0400 Subject: [nycphp-talk] install php 4.2.2 with mysql & apache References: <200210101646.g9AGkxix055978@parsec.nyphp.org> Message-ID: <3DA5C1C8.D8091109@bard.edu> i've usually been ftp'ing so not noticed the web window layout -duh - i'm ashamed.. but the linux binary filename specifies pc - are the apps for php & mysql same for pc as server & just oddly named? i shy'ed from something named ...pc... Oktay Altunergil wrote: > > Yeah.. I remember downloading the binary tar.gz rather than the source one in the past.. For some odd reason mysql.com lists the source packages at the very bottom on their download page ( > http://www.mysql.com/downloads/mysql-3.23.html) while the binary package(s) are listed at the top. > > Oktay > > On Thu, 10 Oct 2002 12:39:58 -0400 > "P. Fawcett" wrote: > > > tx. i know the resulting dif between bin/src/rpm (but didn't know > > deb/.tgz. interesting on freebsd & gentoo) > > > > but in downloading i can't tell from zipped tar file names which is > > binary & which is source as they seem to be same format ie. php or > > mysql-ver-os.tar.gz. unless maybe directory structure specific, but i > > didn't catch then when looking at mirrors > > > > Oktay Altunergil wrote: > > > > > > When there's confusion, there should be some explanation. > > > > > > binary : as in precompiled on a different box and ready to run on another > > > source : you do './configure && ./make && ./make install' yourself. Compiled on your box. > > > rpm : a package format to make managing software easier. rpm's are esentially *binary* files that adhere to a specification. (i.e specs describe where the files go, what scripts are run during the install etc) Other examples of binary package management systems are Debian's .deb, Slackware's .tgz etc. > > > > > > There's yet another system where there's a package management system in place but the software is built from source on your own computer. (FreeBSD ports and Gentoo portage are examples of this) > > > > > > Oktay > > > > > > On Thu, 10 Oct 2002 12:08:18 -0400 > > > "P. Fawcett" wrote: > > > > > > [ header snip ] > > > > > > > > well i've certainly hit the admin confusion here, & prbly mismatches > > > > > > > > since i've got apache & php installed via binary (or source - still > > > > confused on that) but mysql is rpm'd, > > > > > > [ snip ] > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- From ktuskey at exostream.com Thu Oct 10 15:37:30 2002 From: ktuskey at exostream.com (Kyle Tuskey) Date: Thu, 10 Oct 2002 15:37:30 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture In-Reply-To: <200210101426.g9AEQMix055634@parsec.nyphp.org> Message-ID: <001e01c27094$792e3fa0$0100a8c0@win2kbox> David, MySQL lacks in quite a few areas. 1) It has poor performance under heavy loads 2) It lacks key functionality 3) Data integrity is currently a big problem 4) Large amounts of data are handled poorly 5) It lacks replication and other enterprise level features 6) Backup and recovery features could use improvement Just use MySQL for a while and try to do anything like a join on more than two tables. It chokes. Other databases are built to handle real and heavy processing, whereas MySQL is built for smaller needs. Some will argue the de-normalizing data is always the way to go anyway, but unless you are data warehousing there is no need to do it. It just creates poor database design. You might be able to get away with using MySQL on some heavier projects, but that doesn't make it the right tool for the job. As for your enterprise question, I classify enterprise level as an application (this is not limited to web applications) that is currently or possibly going to be under heavy load and needs to be distributed over multiple machines effectively. The application needs to be scalable to decrease the risk of poor application performance with increasing loads. As I said this is often misclassified because people throw the word around without cause. Most applications don't have enterprise needs, which makes PHP a great choice for development. Kyle -----Original Message----- From: David Sklar [mailto:sklar at sklar.com] Sent: Thursday, October 10, 2002 10:26 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Scaling LAMP Architecture > From: Kyle Tuskey [mailto:ktuskey at exostream.com] > Sent: Thursday, October 10, 2002 12:20 AM > > You can scale LAMP (minus MySQL which is barely a database) to some > degree, but it isn't really the best way to approach it. PHP was not > built to be an enterprise language. The lack of the N-Tier model makes > it great for most sites, but true enterprise level needs would be better > approached with J2EE or .Net. Using .Net or J2EE (Java) will make the > final solution much easier to use, manage, scale, and deploy. Though > the word "enterprise" is thrown around too much and often isn't used > accurately, applications that truly are enterprise do need to take into > account a lot of the advantages of the N-Tier model. PHP has XML-RPC to > all remote calls in a distributed architecture if I remember correctly, > but it isn't very efficient. For instance, Java's RMI (Remote Method > Invocation) implementation is much more robust for this purpose. If you > must use PHP for an enterprise solution, use a strong RDBMS (MySQL is > definitely not in this category) and some form of load balancing or > clustering as opposed to an attempted distributed architecture w/ PHP. So, Kyle, what is "true enterprise level," then? A billion pageviews per month? The 800B PV/month Ophir cited at CCI works out to about 300/second, and I presume that doesn't include images or other static objects. Tell me, where is the point that MySQL breaks down? Traffic? Functionality? I admit, MySQL doesn't have, say, the World's Greatest parallel hot-failover technology, but I don't think anyone would classify Oracle's efforts in this regard in that way either. Don't get me wrong, I'm all for using the right tool for the job, and MySQL or PHP or Linux or Apache aren't each the right tool for every job. But if you're going to insist that PHP or MySQL has problems, please point out actual problems, instead of vague assertions. Thanks, David --- Unsubscribe at http://nyphp.org/list --- From sklar at sklar.com Thu Oct 10 16:43:06 2002 From: sklar at sklar.com (David Sklar) Date: Thu, 10 Oct 2002 16:43:06 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture In-Reply-To: <200210101936.g9AJaQix056204@parsec.nyphp.org> Message-ID: > David, > > MySQL lacks in quite a few areas. > > 1) It has poor performance under heavy loads > 2) It lacks key functionality > 3) Data integrity is currently a big problem > 4) Large amounts of data are handled poorly > 5) It lacks replication and other enterprise level features > 6) Backup and recovery features could use improvement > > Just use MySQL for a while and try to do anything like a join on more > than two tables. It chokes. Other databases are built to handle real > and heavy processing, whereas MySQL is built for smaller needs. We can debate what "heavy loads" means, and Ophir's earlier comment about a few thousand simultaneous connects may be a good example of an area where MySQL has problems. In general, though, I don't agree with much of your assessment above. The only "key" piece of functionality that I've heard people complain about recently is sub-selects. If your application requires sub-selects, then yes, MySQL isn't the database for you. The InnoDB engine offers excellent transaction support, foreign keys, and data recovery. If you want, you can even pay $400 for a hot-backup utility that lets you setup MySQL replication slaves with no downtime for failover. What's a "large amount" of data? I've succesfully used MySQL with gigabytes of data in tables that have millions of rows. With multi-table joins. What were you doing that ran into problems? Having appropriate hardware and configuration is important for success. Again, I make no claim that MySQL is perfect. It has no stored procedures, for example. But if you're going to knock something (be it MySQL, Oracle, or Berkeley DB), provide some specifics. Maybe you tried to use MySQL and Oracle on similar hardware and Oracle provided better performance? Maybe Oracle is easier to tune for a particular situation that MySQL? Maybe even (and this is IMHO a perfectly justifiable reason to pick a technology) you or your company has more in-house Oracle knowledge than MySQL? What has drawn me into this thread, however, is criticisms like "It lacks replication and other enterprise level features". This obviously false -- search on Google for "mysql replication" and the first link that pops up is to the section of the MySQL manual about Replication. > Some > will argue the de-normalizing data is always the way to go anyway, but > unless you are data warehousing there is no need to do it. It just > creates poor database design. You might be able to get away with using > MySQL on some heavier projects, but that doesn't make it the right tool > for the job. I'm a big fan of normalized data. > As for your enterprise question, I classify enterprise > level as an application (this is not limited to web applications) that > is currently or possibly going to be under heavy load and needs to be > distributed over multiple machines effectively. The application needs > to be scalable to decrease the risk of poor application performance with > increasing loads. As I said this is often misclassified because people > throw the word around without cause. Most applications don't have > enterprise needs, which makes PHP a great choice for development. What prevents PHP from being scaled across multiple machines and across machines of increasing strength to accomodate application load growth? -dave From tanzola at rcn.com Thu Oct 10 17:00:20 2002 From: tanzola at rcn.com (Anthony Tanzola) Date: Thu, 10 Oct 2002 14:00:20 -0700 Subject: [nycphp-talk] Scaling LAMP Architecture In-Reply-To: <200210101936.g9AJaQix056204@parsec.nyphp.org> Message-ID: Greetings! I have just joined the list and find this topic interesting. I am a VB/ASP programmer and have to this point used both in conjunction with MS SQL Server 7 with successful results. My company has asked me to develop an accounting package for them and once it done using CGI or PHP and MySQL (despite the fact that we own a full license to MS SQL Server) as they are migrating from Microsoft to Linux for various reasons. I have many hesitations using MySQL as a back end for an accounting program. Access to the database will be at a maximum of 3 people at any given time, so server load should not be too heavy. Eventually I may have 20 people connecting to an orders database tied in. So my question is, aside from the small user loads and performance related issues, is MySQL reliable for handling such critical accounting data? Things that scare me are lack of referential integrity, lack of transactions, backup and recovery. Any thoughts would be appreciated. Anthony -----Original Message----- From: Kyle Tuskey [mailto:ktuskey at exostream.com] Sent: Thursday, October 10, 2002 12:36 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Scaling LAMP Architecture David, MySQL lacks in quite a few areas. 1) It has poor performance under heavy loads 2) It lacks key functionality 3) Data integrity is currently a big problem 4) Large amounts of data are handled poorly 5) It lacks replication and other enterprise level features 6) Backup and recovery features could use improvement Just use MySQL for a while and try to do anything like a join on more than two tables. It chokes. Other databases are built to handle real and heavy processing, whereas MySQL is built for smaller needs. Some will argue the de-normalizing data is always the way to go anyway, but unless you are data warehousing there is no need to do it. It just creates poor database design. You might be able to get away with using MySQL on some heavier projects, but that doesn't make it the right tool for the job. As for your enterprise question, I classify enterprise level as an application (this is not limited to web applications) that is currently or possibly going to be under heavy load and needs to be distributed over multiple machines effectively. The application needs to be scalable to decrease the risk of poor application performance with increasing loads. As I said this is often misclassified because people throw the word around without cause. Most applications don't have enterprise needs, which makes PHP a great choice for development. Kyle -----Original Message----- From: David Sklar [mailto:sklar at sklar.com] Sent: Thursday, October 10, 2002 10:26 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Scaling LAMP Architecture > From: Kyle Tuskey [mailto:ktuskey at exostream.com] > Sent: Thursday, October 10, 2002 12:20 AM > > You can scale LAMP (minus MySQL which is barely a database) to some > degree, but it isn't really the best way to approach it. PHP was not > built to be an enterprise language. The lack of the N-Tier model makes > it great for most sites, but true enterprise level needs would be better > approached with J2EE or .Net. Using .Net or J2EE (Java) will make the > final solution much easier to use, manage, scale, and deploy. Though > the word "enterprise" is thrown around too much and often isn't used > accurately, applications that truly are enterprise do need to take into > account a lot of the advantages of the N-Tier model. PHP has XML-RPC to > all remote calls in a distributed architecture if I remember correctly, > but it isn't very efficient. For instance, Java's RMI (Remote Method > Invocation) implementation is much more robust for this purpose. If you > must use PHP for an enterprise solution, use a strong RDBMS (MySQL is > definitely not in this category) and some form of load balancing or > clustering as opposed to an attempted distributed architecture w/ PHP. So, Kyle, what is "true enterprise level," then? A billion pageviews per month? The 800B PV/month Ophir cited at CCI works out to about 300/second, and I presume that doesn't include images or other static objects. Tell me, where is the point that MySQL breaks down? Traffic? Functionality? I admit, MySQL doesn't have, say, the World's Greatest parallel hot-failover technology, but I don't think anyone would classify Oracle's efforts in this regard in that way either. Don't get me wrong, I'm all for using the right tool for the job, and MySQL or PHP or Linux or Apache aren't each the right tool for every job. But if you're going to insist that PHP or MySQL has problems, please point out actual problems, instead of vague assertions. Thanks, David --- Unsubscribe at http://nyphp.org/list --- From nyphp at altunergil.com Thu Oct 10 17:10:04 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Thu, 10 Oct 2002 17:10:04 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture In-Reply-To: <200210102100.g9AL02ix056307@parsec.nyphp.org> References: <200210102100.g9AL02ix056307@parsec.nyphp.org> Message-ID: <20021010171004.45150bfb.nyphp@altunergil.com> You might not know it yet, but you're very lucky :) I'm kind of in an opposite situation right now, moving away from PHP & MySQL and towards .NET & MS SQL. I think the question you need to ask yourself is this. Are they really trying to migrate as much of their stuff as possible to Linux and MySQL? The reason I'm asking is this. If this accounting package will be a standalone system and not need to communicate with other systems, then you might as well do it using ASP and MS SQL. (though I would recommend using PHP anyway, regardless of the database) If you will need several systems to talk to each other in the future and there's a trend in the company "for various reasons" to migrate to linux, then you should try to consolidate as many of your systems as possible on linux. This will make communication between the systems much easier and your SQL queries much simpler. As for your questions about whether MySQL can do the job.. .. MySQL has a very simplistic way of doing things. This is not necessarily inferior. Backups and restores are extremely easy to do and there are multiple ways to do it. (SQL dump vs actual data files). IMO, you are all right as long as you take periodic backups and run a stable kernel on your OS. (I recall something about a data corruption issue with some kernels) Oktay On Thu, 10 Oct 2002 17:00:02 -0400 Anthony Tanzola wrote: > Greetings! > > I have just joined the list and find this topic interesting. I am a VB/ASP > programmer and have to this point used both in conjunction with MS SQL > Server 7 with successful results. > > My company has asked me to develop an accounting package for them and once > it done using CGI or PHP and MySQL (despite the fact that we own a full > license to MS SQL Server) as they are migrating from Microsoft to Linux for > various reasons. > > I have many hesitations using MySQL as a back end for an accounting program. > Access to the database will be at a maximum of 3 people at any given time, > so server load should not be too heavy. Eventually I may have 20 people > connecting to an orders database tied in. > > So my question is, aside from the small user loads and performance related > issues, is MySQL reliable for handling such critical accounting data? > > Things that scare me are lack of referential integrity, lack of > transactions, backup and recovery. > > Any thoughts would be appreciated. > > Anthony > > > > -----Original Message----- > From: Kyle Tuskey [mailto:ktuskey at exostream.com] > Sent: Thursday, October 10, 2002 12:36 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] Scaling LAMP Architecture > > > David, > > MySQL lacks in quite a few areas. > > 1) It has poor performance under heavy loads > 2) It lacks key functionality > 3) Data integrity is currently a big problem > 4) Large amounts of data are handled poorly > 5) It lacks replication and other enterprise level features > 6) Backup and recovery features could use improvement > > Just use MySQL for a while and try to do anything like a join on more > than two tables. It chokes. Other databases are built to handle real > and heavy processing, whereas MySQL is built for smaller needs. Some > will argue the de-normalizing data is always the way to go anyway, but > unless you are data warehousing there is no need to do it. It just > creates poor database design. You might be able to get away with using > MySQL on some heavier projects, but that doesn't make it the right tool > for the job. As for your enterprise question, I classify enterprise > level as an application (this is not limited to web applications) that > is currently or possibly going to be under heavy load and needs to be > distributed over multiple machines effectively. The application needs > to be scalable to decrease the risk of poor application performance with > increasing loads. As I said this is often misclassified because people > throw the word around without cause. Most applications don't have > enterprise needs, which makes PHP a great choice for development. > > > > Kyle > > > > -----Original Message----- > From: David Sklar [mailto:sklar at sklar.com] > Sent: Thursday, October 10, 2002 10:26 AM > To: NYPHP Talk > Subject: RE: [nycphp-talk] Scaling LAMP Architecture > > > From: Kyle Tuskey [mailto:ktuskey at exostream.com] > > Sent: Thursday, October 10, 2002 12:20 AM > > > > You can scale LAMP (minus MySQL which is barely a database) to some > > degree, but it isn't really the best way to approach it. PHP was not > > built to be an enterprise language. The lack of the N-Tier model > makes > > it great for most sites, but true enterprise level needs would be > better > > approached with J2EE or .Net. Using .Net or J2EE (Java) will make the > > final solution much easier to use, manage, scale, and deploy. Though > > the word "enterprise" is thrown around too much and often isn't used > > accurately, applications that truly are enterprise do need to take > into > > account a lot of the advantages of the N-Tier model. PHP has XML-RPC > to > > all remote calls in a distributed architecture if I remember > correctly, > > but it isn't very efficient. For instance, Java's RMI (Remote Method > > Invocation) implementation is much more robust for this purpose. If > you > > must use PHP for an enterprise solution, use a strong RDBMS (MySQL is > > definitely not in this category) and some form of load balancing or > > clustering as opposed to an attempted distributed architecture w/ PHP. > > So, Kyle, what is "true enterprise level," then? A billion pageviews per > month? The 800B PV/month Ophir cited at CCI works out to about > 300/second, > and I presume that doesn't include images or other static objects. > > Tell me, where is the point that MySQL breaks down? Traffic? > Functionality? > I admit, MySQL doesn't have, say, the World's Greatest parallel > hot-failover > technology, but I don't think anyone would classify Oracle's efforts in > this > regard in that way either. > > Don't get me wrong, I'm all for using the right tool for the job, and > MySQL > or PHP or Linux or Apache aren't each the right tool for every job. But > if > you're going to insist that PHP or MySQL has problems, please point out > actual problems, instead of vague assertions. > > Thanks, > > David > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From sklar at sklar.com Thu Oct 10 17:26:16 2002 From: sklar at sklar.com (David Sklar) Date: Thu, 10 Oct 2002 17:26:16 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture In-Reply-To: <200210102100.g9AL02ix056307@parsec.nyphp.org> Message-ID: > I have many hesitations using MySQL as a back end for an > accounting program. > Access to the database will be at a maximum of 3 people at any given time, > so server load should not be too heavy. Eventually I may have 20 people > connecting to an orders database tied in. > > So my question is, aside from the small user loads and performance related > issues, is MySQL reliable for handling such critical accounting data? Yes. If you are using more than a P133 for this load, you will be fine. (I know that sounds sarcastic, but I'm not. It really doesn't need much horsepower.) To ensure safe handling of the accounting data, use the InnoDB table type so that you can use transactions and referential integrity. > Things that scare me are lack of referential integrity, lack of > transactions, backup and recovery. InnoDB will handle all of this for you just fine. You probably don't need their fancy backup utility either. What volume of data are you dealing with? Something like this might be useful: --> http://jeremy.zawodny.com/mysql/mysqlsnapshot/ David From chalu at egenius.com Thu Oct 10 18:16:13 2002 From: chalu at egenius.com (chalu) Date: Thu, 10 Oct 2002 18:16:13 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture References: <200210101936.g9AJaQix056204@parsec.nyphp.org> Message-ID: <3DA5FC2D.8000202@egenius.com> Kyle Tuskey wrote: >David, > >MySQL lacks in quite a few areas. > >1) It has poor performance under heavy loads > Talk to different practitioners of different databases. They will come up with this type of heresay. There have been side-by-side comparisons fo these databases. MySQL does not do badly. But then, if you want more enterprise DB, think PostgreSQL. >2) It lacks key functionality > You mean like transaction? foreign key? hot backup? I saw someone mentioning INNODB. >3) Data integrity is currently a big problem > >4) Large amounts of data are handled poorly > Usually, MYSQL is used by people with less means; no hardware controller, no fiber, no SAN. Hey, wait a few months. We will have iSCSI and sanify if MS comes up with the driver. I doubt it, though. >5) It lacks replication and other enterprise level features > You give me a database which you replicated successfully. I doubt you have a good example. I can prove you wrong this area. >6) Backup and recovery features could use improvement > > Support and maintenance is usual weak point for open-source as developers move on. >Just use MySQL for a while and try to do anything like a join on more >than two tables. It chokes. Other databases are built to handle real >and heavy processing, whereas MySQL is built for smaller needs. Some >will argue the de-normalizing data is always the way to go anyway, but >unless you are data warehousing there is no need to do it. It just >creates poor database design. You might be able to get away with using >MySQL on some heavier projects, but that doesn't make it the right tool >for the job. As for your enterprise question, I classify enterprise >level as an application (this is not limited to web applications) that >is currently or possibly going to be under heavy load and needs to be >distributed over multiple machines effectively. The application needs >to be scalable to decrease the risk of poor application performance with >increasing loads. As I said this is often misclassified because people >throw the word around without cause. Most applications don't have >enterprise needs, which makes PHP a great choice for development. > > It sounds like you should use PG. > > >Kyle > > > > From chalu at egenius.com Thu Oct 10 18:24:22 2002 From: chalu at egenius.com (chalu) Date: Thu, 10 Oct 2002 18:24:22 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture References: <200210102100.g9AL02ix056307@parsec.nyphp.org> Message-ID: <3DA5FE16.50203@egenius.com> MYSQL can handle your load. Consider NOLA and it was originally developed for Becktel, one of the largest public construction company. As someone mentioned, INNODB deals with some of these issues. It should be fine. We have done MYSQL support and PG support as well as commercial DBs. It is pretty solid. Only times I saw problems are operator errors and having millions of rows and disk filling up. Some web analytics engine we worked with. Anthony Tanzola wrote: >Greetings! > >I have just joined the list and find this topic interesting. I am a VB/ASP >programmer and have to this point used both in conjunction with MS SQL >Server 7 with successful results. > >My company has asked me to develop an accounting package for them and once >it done using CGI or PHP and MySQL (despite the fact that we own a full >license to MS SQL Server) as they are migrating from Microsoft to Linux for >various reasons. > >I have many hesitations using MySQL as a back end for an accounting program. >Access to the database will be at a maximum of 3 people at any given time, >so server load should not be too heavy. Eventually I may have 20 people >connecting to an orders database tied in. > >So my question is, aside from the small user loads and performance related >issues, is MySQL reliable for handling such critical accounting data? > >Things that scare me are lack of referential integrity, lack of >transactions, backup and recovery. > >Any thoughts would be appreciated. > >Anthony > > > >-----Original Message----- >From: Kyle Tuskey [mailto:ktuskey at exostream.com] >Sent: Thursday, October 10, 2002 12:36 PM >To: NYPHP Talk >Subject: RE: [nycphp-talk] Scaling LAMP Architecture > > >David, > >MySQL lacks in quite a few areas. > >1) It has poor performance under heavy loads >2) It lacks key functionality >3) Data integrity is currently a big problem >4) Large amounts of data are handled poorly >5) It lacks replication and other enterprise level features >6) Backup and recovery features could use improvement > >Just use MySQL for a while and try to do anything like a join on more >than two tables. It chokes. Other databases are built to handle real >and heavy processing, whereas MySQL is built for smaller needs. Some >will argue the de-normalizing data is always the way to go anyway, but >unless you are data warehousing there is no need to do it. It just >creates poor database design. You might be able to get away with using >MySQL on some heavier projects, but that doesn't make it the right tool >for the job. As for your enterprise question, I classify enterprise >level as an application (this is not limited to web applications) that >is currently or possibly going to be under heavy load and needs to be >distributed over multiple machines effectively. The application needs >to be scalable to decrease the risk of poor application performance with >increasing loads. As I said this is often misclassified because people >throw the word around without cause. Most applications don't have >enterprise needs, which makes PHP a great choice for development. > > > >Kyle > > > >-----Original Message----- >From: David Sklar [mailto:sklar at sklar.com] >Sent: Thursday, October 10, 2002 10:26 AM >To: NYPHP Talk >Subject: RE: [nycphp-talk] Scaling LAMP Architecture > > > >>From: Kyle Tuskey [mailto:ktuskey at exostream.com] >>Sent: Thursday, October 10, 2002 12:20 AM >> >>You can scale LAMP (minus MySQL which is barely a database) to some >>degree, but it isn't really the best way to approach it. PHP was not >>built to be an enterprise language. The lack of the N-Tier model >> >> >makes > > >>it great for most sites, but true enterprise level needs would be >> >> >better > > >>approached with J2EE or .Net. Using .Net or J2EE (Java) will make the >>final solution much easier to use, manage, scale, and deploy. Though >>the word "enterprise" is thrown around too much and often isn't used >>accurately, applications that truly are enterprise do need to take >> >> >into > > >>account a lot of the advantages of the N-Tier model. PHP has XML-RPC >> >> >to > > >>all remote calls in a distributed architecture if I remember >> >> >correctly, > > >>but it isn't very efficient. For instance, Java's RMI (Remote Method >>Invocation) implementation is much more robust for this purpose. If >> >> >you > > >>must use PHP for an enterprise solution, use a strong RDBMS (MySQL is >>definitely not in this category) and some form of load balancing or >>clustering as opposed to an attempted distributed architecture w/ PHP. >> >> > >So, Kyle, what is "true enterprise level," then? A billion pageviews per >month? The 800B PV/month Ophir cited at CCI works out to about >300/second, >and I presume that doesn't include images or other static objects. > >Tell me, where is the point that MySQL breaks down? Traffic? >Functionality? >I admit, MySQL doesn't have, say, the World's Greatest parallel >hot-failover >technology, but I don't think anyone would classify Oracle's efforts in >this >regard in that way either. > >Don't get me wrong, I'm all for using the right tool for the job, and >MySQL >or PHP or Linux or Apache aren't each the right tool for every job. But >if >you're going to insist that PHP or MySQL has problems, please point out >actual problems, instead of vague assertions. > >Thanks, > >David > > > > > > > > > > > > > > >--- Unsubscribe at http://nyphp.org/list --- > > > > > -- Chalu Kim eGENIUS 20 Jay Street, 1002 Brooklyn, New York 11201 chalu at egenius.com (718) 858-0142 (718) 858-2434 FAX www.egenius.com From zaunere at yahoo.com Thu Oct 10 18:33:02 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Thu, 10 Oct 2002 15:33:02 -0700 (PDT) Subject: [nycphp-talk] Scaling LAMP Architecture In-Reply-To: <200210102114.g9ALEIix056322@parsec.nyphp.org> Message-ID: <20021010223302.58265.qmail@web12803.mail.yahoo.com> --- Oktay Altunergil wrote: > You might not know it yet, but you're very lucky :) > > I'm kind of in an opposite situation right now, moving away from PHP > & MySQL and towards .NET & MS SQL. You'll be back :) > I think the question you need to ask yourself is this. > > Are they really trying to migrate as much of their stuff as possible > to Linux and MySQL? The reason I'm asking is this. If this accounting > package will be a standalone system and not need to communicate with > other systems, then you might as well do it using ASP and MS SQL. > (though I would recommend using PHP anyway, regardless of the > database) > > If you will need several systems to talk to each other in the future > and there's a trend in the company "for various reasons" to migrate > to linux, then you should try to consolidate as many of your systems > as possible on linux. This will make communication between the > systems much easier and your SQL queries much simpler. > > As for your questions about whether MySQL can do the job.. .. MySQL > has a very simplistic way of doing things. Which falls inline with the UNIX adage "do one thing, and do it well." > This is not necessarily > inferior. Backups and restores are extremely easy to do and there are > multiple ways to do it. (SQL dump vs actual data files). IMO, you are > all right as long as you take periodic backups and run a stable > kernel on your OS. (I recall something about a data corruption issue > with some kernels) While there were kernel issues, there are still issues with GCC. This is why MySQL lists it's source last, and recommends their binary distributions, as came up in another thread. Older/newer versions of GCC fix this, and FreeBSD has never had any problems that I've seen. > On Thu, 10 Oct 2002 17:00:02 -0400 > Anthony Tanzola wrote: > > > Greetings! > > > > I have just joined the list and find this topic interesting. I am > > a VB/ASP programmer and have to this point used both in conjunction > > with MS SQL Server 7 with successful results. > > > > My company has asked me to develop an accounting package for them > > and once it done using CGI or PHP and MySQL (despite the fact that > > we own a full license to MS SQL Server) as they are migrating from > > Microsoft to Linux for various reasons. Good :) > > I have many hesitations using MySQL as a back end for an accounting > > program. Access to the database will be at a maximum of 3 people at > > any given time, so server load should not be too heavy. Eventually > > I may have 20 people connecting to an orders database tied in. No problem - you won't even need persistent connections with MySQL. > > So my question is, aside from the small user loads and performance > > related issues, is MySQL reliable for handling such critical > > accounting data? It has been with us, with far more than 20 users. > > Things that scare me are lack of referential integrity, lack of > > transactions, backup and recovery. These are not lacking at all. It all depends on implementation. I'm of the idealogy that DBs are for storing data, and that programming languages are for everything else. While MySQL does lack some SQL bells and whistles (which are being addressed in the not-too-distant-future), it's a different beast than the Oracles and DB2s of the world. MySQL is designed for fast and effeceint access and simple maintenance - as I noted in one of the AMP Intro presentations, a "SQL-enabled filesystem." That said, it is used in many large/"enterprise" situations, with great success: http://www.mysql.com/press/user_stories/index.html The yahoo finance story is very interesting, and Jeremy is an asset for tuning and tips. So what does thousands of dollars for Oracle/etc get you? 1) Someone to blame, besides your self, when it breaks. ("Hey, I'm using Oracle, it's not my fault"). 2) From a techical standpoint, Oracle is very forgiving. Bad applications and implementations can be written, and if given enough hardware/money, they will run. Not so with MySQL. 3) MySQL depends on good design, implementation, and in the end, thought. 4) Most importantly: When you pay the money for Oracle, you're buying what boils down to thought. When you download MySQL for nothing, it's up to you to do it right. I've seen Oracle die on 200 connections, and MySQL hum on gigabytes of data. And MySQL die with a crazy join and Oracle squeak by with enough RAM. They're different animals, better suited for different applications, but most of the work I've seen, can be done on MySQL with proper design. Lastly, don't forget that Oracle has had billions of dollars and millions of man-hours dedicated to it - MySQL is the new kid on the block. H ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From LarryC at indexstock.com Thu Oct 10 18:37:59 2002 From: LarryC at indexstock.com (Larry Chuon) Date: Thu, 10 Oct 2002 18:37:59 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture Message-ID: <86713EAB93BD5F40B94A0C8E604C7C91AEB6FA@index-exchange.indexstock.com> Anthony, How far have you gotten with your development process on the accounting program? My team did a lot of works on NOLA (web-based accounting or ERP). If you want, you can take our newly modified version and see if it suite your environment. It's an open-source app. We might be to co-develop some new functionality for free. Let me know if you're interested. Larry -----Original Message----- From: Anthony Tanzola [mailto:tanzola at rcn.com] Sent: Thursday, October 10, 2002 5:00 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Scaling LAMP Architecture Greetings! I have just joined the list and find this topic interesting. I am a VB/ASP programmer and have to this point used both in conjunction with MS SQL Server 7 with successful results. My company has asked me to develop an accounting package for them and once it done using CGI or PHP and MySQL (despite the fact that we own a full license to MS SQL Server) as they are migrating from Microsoft to Linux for various reasons. I have many hesitations using MySQL as a back end for an accounting program. Access to the database will be at a maximum of 3 people at any given time, so server load should not be too heavy. Eventually I may have 20 people connecting to an orders database tied in. So my question is, aside from the small user loads and performance related issues, is MySQL reliable for handling such critical accounting data? Things that scare me are lack of referential integrity, lack of transactions, backup and recovery. Any thoughts would be appreciated. Anthony -----Original Message----- From: Kyle Tuskey [mailto:ktuskey at exostream.com] Sent: Thursday, October 10, 2002 12:36 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Scaling LAMP Architecture David, MySQL lacks in quite a few areas. 1) It has poor performance under heavy loads 2) It lacks key functionality 3) Data integrity is currently a big problem 4) Large amounts of data are handled poorly 5) It lacks replication and other enterprise level features 6) Backup and recovery features could use improvement Just use MySQL for a while and try to do anything like a join on more than two tables. It chokes. Other databases are built to handle real and heavy processing, whereas MySQL is built for smaller needs. Some will argue the de-normalizing data is always the way to go anyway, but unless you are data warehousing there is no need to do it. It just creates poor database design. You might be able to get away with using MySQL on some heavier projects, but that doesn't make it the right tool for the job. As for your enterprise question, I classify enterprise level as an application (this is not limited to web applications) that is currently or possibly going to be under heavy load and needs to be distributed over multiple machines effectively. The application needs to be scalable to decrease the risk of poor application performance with increasing loads. As I said this is often misclassified because people throw the word around without cause. Most applications don't have enterprise needs, which makes PHP a great choice for development. Kyle -----Original Message----- From: David Sklar [mailto:sklar at sklar.com] Sent: Thursday, October 10, 2002 10:26 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Scaling LAMP Architecture > From: Kyle Tuskey [mailto:ktuskey at exostream.com] > Sent: Thursday, October 10, 2002 12:20 AM > > You can scale LAMP (minus MySQL which is barely a database) to some > degree, but it isn't really the best way to approach it. PHP was not > built to be an enterprise language. The lack of the N-Tier model makes > it great for most sites, but true enterprise level needs would be better > approached with J2EE or .Net. Using .Net or J2EE (Java) will make the > final solution much easier to use, manage, scale, and deploy. Though > the word "enterprise" is thrown around too much and often isn't used > accurately, applications that truly are enterprise do need to take into > account a lot of the advantages of the N-Tier model. PHP has XML-RPC to > all remote calls in a distributed architecture if I remember correctly, > but it isn't very efficient. For instance, Java's RMI (Remote Method > Invocation) implementation is much more robust for this purpose. If you > must use PHP for an enterprise solution, use a strong RDBMS (MySQL is > definitely not in this category) and some form of load balancing or > clustering as opposed to an attempted distributed architecture w/ PHP. So, Kyle, what is "true enterprise level," then? A billion pageviews per month? The 800B PV/month Ophir cited at CCI works out to about 300/second, and I presume that doesn't include images or other static objects. Tell me, where is the point that MySQL breaks down? Traffic? Functionality? I admit, MySQL doesn't have, say, the World's Greatest parallel hot-failover technology, but I don't think anyone would classify Oracle's efforts in this regard in that way either. Don't get me wrong, I'm all for using the right tool for the job, and MySQL or PHP or Linux or Apache aren't each the right tool for every job. But if you're going to insist that PHP or MySQL has problems, please point out actual problems, instead of vague assertions. Thanks, David --- Unsubscribe at http://nyphp.org/list --- From prutwo at onebox.com Thu Oct 10 19:10:39 2002 From: prutwo at onebox.com (Ophir Prusak) Date: Thu, 10 Oct 2002 19:10:39 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture References: <200210101936.g9AJaQix056204@parsec.nyphp.org> Message-ID: <0b5a01c270b2$3f8ab620$bf65a8c0@tag1002> You should read the database showdown article in eweek: http://www.eweek.com/article2/0,3959,293,00.asp In a recent database (feb 2002) benchmark test performed by Ziff Davis Media Inc., the company behind PC Magazine, eWeek and other well-known publications, MySQL stands out as a winner. MySQL is presented as having the overall best performance and scalability along with Oracle9i. Also, MySQL excelled in stability, ease of tuning and connectivity. Considering pricing and ease of use, this further strengthens MySQL as being the database server of choice for price-efficient, high-performance web use. The databases tested were: DB2 7.2, MS SQL Server 2000, MySQL-Max 4.0.1, Oracle9i 9.0.1.1.1 and Sybase ASE 12.5.0.1. Read more about the benchmark test in eWeek: http://www.eweek.com/article2/0,3959,293,00.asp ----- Original Message ----- From: "Kyle Tuskey" To: "NYPHP Talk" Sent: Thursday, October 10, 2002 3:36 PM Subject: RE: [nycphp-talk] Scaling LAMP Architecture > David, > > MySQL lacks in quite a few areas. > > 1) It has poor performance under heavy loads > 2) It lacks key functionality > 3) Data integrity is currently a big problem > 4) Large amounts of data are handled poorly > 5) It lacks replication and other enterprise level features > 6) Backup and recovery features could use improvement > > Just use MySQL for a while and try to do anything like a join on more > than two tables. It chokes. Other databases are built to handle real > and heavy processing, whereas MySQL is built for smaller needs. Some > will argue the de-normalizing data is always the way to go anyway, but > unless you are data warehousing there is no need to do it. It just > creates poor database design. You might be able to get away with using > MySQL on some heavier projects, but that doesn't make it the right tool > for the job. As for your enterprise question, I classify enterprise > level as an application (this is not limited to web applications) that > is currently or possibly going to be under heavy load and needs to be > distributed over multiple machines effectively. The application needs > to be scalable to decrease the risk of poor application performance with > increasing loads. As I said this is often misclassified because people > throw the word around without cause. Most applications don't have > enterprise needs, which makes PHP a great choice for development. > > > > Kyle > > > > -----Original Message----- > From: David Sklar [mailto:sklar at sklar.com] > Sent: Thursday, October 10, 2002 10:26 AM > To: NYPHP Talk > Subject: RE: [nycphp-talk] Scaling LAMP Architecture > > > From: Kyle Tuskey [mailto:ktuskey at exostream.com] > > Sent: Thursday, October 10, 2002 12:20 AM > > > > You can scale LAMP (minus MySQL which is barely a database) to some > > degree, but it isn't really the best way to approach it. PHP was not > > built to be an enterprise language. The lack of the N-Tier model > makes > > it great for most sites, but true enterprise level needs would be > better > > approached with J2EE or .Net. Using .Net or J2EE (Java) will make the > > final solution much easier to use, manage, scale, and deploy. Though > > the word "enterprise" is thrown around too much and often isn't used > > accurately, applications that truly are enterprise do need to take > into > > account a lot of the advantages of the N-Tier model. PHP has XML-RPC > to > > all remote calls in a distributed architecture if I remember > correctly, > > but it isn't very efficient. For instance, Java's RMI (Remote Method > > Invocation) implementation is much more robust for this purpose. If > you > > must use PHP for an enterprise solution, use a strong RDBMS (MySQL is > > definitely not in this category) and some form of load balancing or > > clustering as opposed to an attempted distributed architecture w/ PHP. > > So, Kyle, what is "true enterprise level," then? A billion pageviews per > month? The 800B PV/month Ophir cited at CCI works out to about > 300/second, > and I presume that doesn't include images or other static objects. > > Tell me, where is the point that MySQL breaks down? Traffic? > Functionality? > I admit, MySQL doesn't have, say, the World's Greatest parallel > hot-failover > technology, but I don't think anyone would classify Oracle's efforts in > this > regard in that way either. > > Don't get me wrong, I'm all for using the right tool for the job, and > MySQL > or PHP or Linux or Apache aren't each the right tool for every job. But > if > you're going to insist that PHP or MySQL has problems, please point out > actual problems, instead of vague assertions. > > Thanks, > > David > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > > From jonbaer at jonbaer.net Thu Oct 10 23:36:15 2002 From: jonbaer at jonbaer.net (Jon Baer) Date: Thu, 10 Oct 2002 23:36:15 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture References: <200210102312.g9ANCLix056531@parsec.nyphp.org> Message-ID: <3DA6472F.3020101@jonbaer.net> Ophir Prusak wrote: >You should read the database showdown article in eweek: >http://www.eweek.com/article2/0,3959,293,00.asp > > > > The main point to note here (which Ive seen noted a few times) is this: MySQL's great performance was due mostly to our use of an in-memory query results cache that is new in MySQL 4.0.1. When we tested without this cache, MySQL's performance fell by two-thirds. I have not myself used this cache but from people who have I heard it makes or breaks the product :-\\ - Jon From jonbaer at jonbaer.net Fri Oct 11 00:34:52 2002 From: jonbaer at jonbaer.net (Jon Baer) Date: Fri, 11 Oct 2002 00:34:52 -0400 Subject: MySQL cookbook out yet? References: <200210020106.g9216q4M014618@parsec.nyphp.org> Message-ID: <3DA654EC.3090409@jonbaer.net> Hi, Anyone know if this book is available yet and if anyone has read it? Reviews? http://www.oreilly.com/catalog/mysqlckbk/ Thanks. - Jon From brian at preston-campbell.com Fri Oct 11 07:35:12 2002 From: brian at preston-campbell.com (Preston-Campbell) Date: Fri, 11 Oct 2002 07:35:12 -0400 Subject: [nycphp-talk] MySQL cookbook out yet? References: <200210110441.g9B4fCix057087@parsec.nyphp.org> Message-ID: <000201c2711c$72b85060$7d71fea9@brian> Although http://www.Bookpool.com is vague about its release (simply October 2002) the price is right as usual and they offer to ship it when it arrives. You could email Bookpool or even O'rielly, they might know when that will be. Brian ----- Original Message ----- From: "Jon Baer" To: "NYPHP Talk" Sent: Friday, October 11, 2002 12:41 AM Subject: [nycphp-talk] MySQL cookbook out yet? > Hi, > > Anyone know if this book is available yet and if anyone has read it? > Reviews? > > http://www.oreilly.com/catalog/mysqlckbk/ > > Thanks. > > - Jon > > > > --- Unsubscribe at http://nyphp.org/list --- > > > From nyphp at gwprogramming.com Fri Oct 11 09:27:00 2002 From: nyphp at gwprogramming.com (George Webb) Date: Fri, 11 Oct 2002 09:27:00 -0400 Subject: [nycphp-talk] PHPCon2002 - Register before 10/11 and save $100 Message-ID: <3DA6D1A4.A7A2212A@gwprogramming.com> Good Friday! Just a quick reminder that you might want to Save $100! I am actually very psyched for this thing. I actually got my generous company (Vermont Teddy Bear Co.) to send me out there, although I'm paying for the hotel and "incidentals," and I may not bring a friend. The Hotel said even the cheap rooms ("Cabana Deck"; $69) have internet access; don't know what that means yet, but 24-hour fun seems likely! Also the travel company is making me stay till Sunday; I have no idea why, and I am not complaining. Somehow it would be nice to figure out beforehand, who else is as juiced as I am to go to this thing! Best, George. George Webb nyphp at gwprogramming.com (802) 283-4352 From zala007 at hotmail.com Fri Oct 11 11:23:00 2002 From: zala007 at hotmail.com (Anirudh Zala) Date: Fri, 11 Oct 2002 15:23:00 +0000 Subject: [nycphp-talk] Scaling LAMP Architecture Message-ID: Hi all :) Thank you for all of yours opinions and suggestions. All have given better solution for this problem as they could, and we know this problem can have many solutions, and finally depends upon person or company who is going to use and in which manner bcoz as it question of $ too J some of you have suggested using LAMP, or LAOP or LAPgP or .NeT or j2EE and many more but still problem remains same. What's correct definition of "Scalable" system or architecture? Well if it's just question of having such a system which can run with same speed and efficiency even when total hits increase from 1000 to 1 million, or having all above advantages plus having all enterprise features. etc then here we r mistaking all. There is no any solution, which can provide all of these advantages simultaneously and in which way we need. So we have to find better rather than best. Here my suggestion is whatever tech. is used, it must be able to satisfy the owner and those who r going to use. Here "Satisfy" is in general terms, so whatever u think would be ok.. So main thing is not to talk advantages and disadvantage of any existing tech. likes comparison btwn MySql and Oracle or PHP and jSp or MsSql vs. PgSql or whatever, instead we need to think in diff direction like using concept of SDDS Scalable Distributed Database Server and/or Multiprocessing where client requests are divided into small parts or are redirected to other servers or processor thus keeping main server or processor less burdened. In SDDS, Data and Files are kept on several machines rather than same server or 2 servers (i mean many companies use db server and scripting/file server as separate to get better output and faster execution). This tech is also known as Client-Agent-Server tech. where u can say there is 1 main server where all data is kept and at second level there comes Agents machines/servers interacts btwn main server and client. All client servers has replica of main servers DB but in diff parts not as whole db so like 4 servers with 25% and almost all clients queries are first directed to this Agents only and replied/executed by these 4 servers and if needed they are redirected to main server and finally records btwn main server and agent servers are updated. This is similar like concept of cache servers in Oracle and Java but this is bit new and different. The main diff is all Agent servers acts like as they are main servers so at client end u never know where your request is being redirected or which server your data is coming from? This is like a concept of having chain store where u have McDonald's fast food available at New York, Syracuse and Seattle rather than all have to go to New York only whether u live in Syracuse or Seattle. I hope u all r getting what I mean. So main point is whatever tech (Db, Scripting lang, Servers OS u use) your software must have Strong RDBMS, Proper coding style, Robust architecture maybe using SDDS tech. an other normal stuffs. These concept can give u satisfactory solutions, otherwise there is no such tech. in this world which can give u all at once without having Distributed Database and/or multiprocessing. Also PHP guys will say PHP is best, ASP will say ASP is the best bcoz it has these facilities, same with DB and OS, ok ok we need to think in diff direction and develop something new using existing tech :) not just adhering to existing tools. Thanks All, Anirudh Zala (Globalwebwise INDIA) >From: "Ophir Prusak" >Reply-To: talk at nyphp.org >To: NYPHP Talk >Subject: Re: [nycphp-talk] Scaling LAMP Architecture >Date: Thu, 10 Oct 2002 11:06:11 -0400 >Received: from mc5-f22.law1.hotmail.com ([65.54.252.29]) by >mc5-s15.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Thu, 10 Oct >2002 09:50:32 -0700 >Received: from parsec.nyphp.org ([66.250.54.138]) by >mc5-f22.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Thu, 10 Oct >2002 08:16:52 -0700 >Received: from nyphp.org (parsec.nyphp.org [66.250.54.138])by >parsec.nyphp.org (8.12.3/8.12.3) with ESMTP id g9AF6Bix055705;Thu, 10 Oct >2002 11:06:11 -0400 (EDT)(envelope-from listmaster at nyphp.org) >Message-Id: <200210101506.g9AF6Bix055705 at parsec.nyphp.org> >X-Paralist-Archived: > >X-List-Software: Paralist 0.6 >List-ID: >List-Owner: >List-Archive: >List-Subscribe: >List-Unsubscribe: >Organization: New York PHP >X-Mailer: Paramail 0.5 >Return-Path: listmaster at nyphp.org >X-OriginalArrivalTime: 10 Oct 2002 15:16:52.0625 (UTC) >FILETIME=[0FF66810:01C27070] > >I'd like to clear up some potential confusion about the term "scalable". >See http://labs.google.com/glossary?q=scalable for some pretty good >definitions. >While we all agree (hopefully) about what scalable means, I think we're >talking about two different things that we're trying to scale. >You can talk about scalability of a web site in regards to: >1. Traffic and users - meaning if we get 100 times the traffic can we >simply >add 100 times the hardware without the need make any significant changes to >the code/architecture. >2. Application complexity - meaning if we want to add more functionality to >the site, can we do so without making significant changes to the existing >code/architecture. > >While I think it's obvious that LAP scale quite well in regards to traffic >(CCI proves this), I do agree that in regards to application complexity, >there are better solutions than PHP (though much more $$$$ to use and >probably slower) > >My 2 cents. > >Ophir > >p.s. >Regarding MySQL breaking down, I do believe the problem was with >connections, not speed. >It just didn't hold up when trying to keep a few thousand simultaneous >connections to the MySQL server. >Oracle amazingly seems to do ok. It might slow down, but it doesn't >crash/die/freeze. > >----- Original Message ----- >From: "David Sklar" >To: "NYPHP Talk" >Sent: Thursday, October 10, 2002 10:26 AM >Subject: RE: [nycphp-talk] Scaling LAMP Architecture > > > > > From: Kyle Tuskey [mailto:ktuskey at exostream.com] > > > Sent: Thursday, October 10, 2002 12:20 AM > > > > > > You can scale LAMP (minus MySQL which is barely a database) to some > > > degree, but it isn't really the best way to approach it. PHP was not > > > built to be an enterprise language. The lack of the N-Tier model >makes > > > it great for most sites, but true enterprise level needs would be >better > > > approached with J2EE or .Net. Using .Net or J2EE (Java) will make the > > > final solution much easier to use, manage, scale, and deploy. Though > > > the word "enterprise" is thrown around too much and often isn't used > > > accurately, applications that truly are enterprise do need to take >into > > > account a lot of the advantages of the N-Tier model. PHP has XML-RPC >to > > > all remote calls in a distributed architecture if I remember >correctly, > > > but it isn't very efficient. For instance, Java's RMI (Remote Method > > > Invocation) implementation is much more robust for this purpose. If >you > > > must use PHP for an enterprise solution, use a strong RDBMS (MySQL is > > > definitely not in this category) and some form of load balancing or > > > clustering as opposed to an attempted distributed architecture w/ PHP. > > > > So, Kyle, what is "true enterprise level," then? A billion pageviews per > > month? The 800B PV/month Ophir cited at CCI works out to about >300/second, > > and I presume that doesn't include images or other static objects. > > > > Tell me, where is the point that MySQL breaks down? Traffic? >Functionality? > > I admit, MySQL doesn't have, say, the World's Greatest parallel >hot-failover > > technology, but I don't think anyone would classify Oracle's efforts in >this > > regard in that way either. > > > > Don't get me wrong, I'm all for using the right tool for the job, and >MySQL > > or PHP or Linux or Apache aren't each the right tool for every job. But >if > > you're going to insist that PHP or MySQL has problems, please point out > > actual problems, instead of vague assertions. > > > > Thanks, > > > > David > > > > > > > > > > > > > > > > > > > > >--- Unsubscribe at http://nyphp.org/list --- _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx From georgenatalino at yahoo.com Fri Oct 11 12:04:58 2002 From: georgenatalino at yahoo.com (georgenatalino at yahoo.com) Date: Fri, 11 Oct 2002 12:04:58 -0400 Subject: Article: The Quickest Way To Count Users Online With PHP Message-ID: <3DA6F6AA.F3F332B6@yahoo.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From chalu at egenius.com Fri Oct 11 12:15:04 2002 From: chalu at egenius.com (chalu) Date: Fri, 11 Oct 2002 12:15:04 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture References: <200210111523.g9BFN5WM058105@parsec.nyphp.org> Message-ID: <3DA6F908.5090002@egenius.com> I think you are hitting close to the basic point of "scalable". Lot of folks worry about "scalabe" because you may not have the experience of making your system scalable. Having designed many of "scalable" systems and lived with them, there are a lot of assumptions one makes. Fail-over and redundant design.... Replication.. 2-tier vs 4-tier. What is different about 4-tier vs SDDS? Just different jargon. Lot of developers would throw lot of these technologies without having configured themselves. Having a hot-failover system configured is very elaborate. You need to worry about things as basic as ARP table and configuring multipath RAID subsystem. Lot of things have gotten easier over the years. But I still see many MCSE walking around with a clue of how to use ARP. I have seen only few "scalable" systems over the years serving the business owners. It is often "tail wagging the dog" as in we tend to use technology as an escape hatch. I remember seeing architectures of the world's busiest sites and the biggest e-commerce sites. Then, I remember being impressed of master-slave database servers. Absolutely the textbook case from Microsoft land! Over the years, my longview reveals gigantic mistakes of these architectures. Techies' idea of "scalable" does not scale business or the use. Nowadays, I am impressed by those architectures balancing different objectives such as speed, flexibility and good common-sense of making usable systems. One of the folks mentioned "communityconnect". Here is a good example of people who scaled to large traffic. For example, think of problem having to serve so many images including resolving multiple includes of banners from different web-sites. It is normal to gain most speed improvement from programming practices like improving your database design and using index tables. A well know moutain climber said, "It is not the equipment, it is how you use it."..... If you can scale ASP and MS SQL and run some large sites, you can do it with PHP and MySQL. ditto. Anirudh Zala wrote: >Hi all :) > >Thank you for all of yours opinions and suggestions. All have given better >solution for this problem as they could, and we know this problem can have >many solutions, and finally depends upon person or company who is going to >use and in which manner bcoz as it question of $ too J > >some of you have suggested using LAMP, or LAOP or LAPgP or .NeT or j2EE and >many more but still problem remains same. What's correct definition of >"Scalable" system or architecture? > >Well if it's just question of having such a system which can run with same >speed and efficiency even when total hits increase from 1000 to 1 million, >or having all above advantages plus having all enterprise features. etc then >here we r mistaking all. There is no any solution, which can provide all of >these advantages simultaneously and in which way we need. > >So we have to find better rather than best. Here my suggestion is whatever >tech. is used, it must be able to satisfy the owner and those who r going to >use. Here "Satisfy" is in general terms, so whatever u think would be ok.. > >So main thing is not to talk advantages and disadvantage of any existing >tech. likes comparison btwn MySql and Oracle or PHP and jSp or MsSql vs. >PgSql or whatever, instead we need to think in diff direction like using >concept of SDDS >Scalable Distributed Database Server and/or Multiprocessing where client >requests are divided into small parts or are redirected to other servers or >processor thus keeping main server or processor less burdened. > >In SDDS, Data and Files are kept on several machines rather than same server >or 2 servers (i mean many companies use db server and scripting/file server >as separate to get better output and faster execution). This tech is also >known as >Client-Agent-Server tech. where u can say there is 1 main server where all >data is kept and at second level there comes Agents machines/servers >interacts btwn main server and client. All client servers has replica of >main servers DB but in diff parts not as whole db so like 4 servers with 25% >and almost all clients queries are first directed to this Agents only and >replied/executed by these 4 servers and if needed they are redirected to >main server and finally records btwn main server and agent servers are >updated. > >This is similar like concept of cache servers in Oracle and Java but this is >bit new and different. The main diff is all Agent servers acts like as they >are main servers so at client end u never know where your request is being >redirected or which server your data is coming from? > >This is like a concept of having chain store where u have McDonald's fast >food available at New York, Syracuse and Seattle rather than all have to go >to New York only whether u live in Syracuse or Seattle. I hope u all r >getting what I mean. > >So main point is whatever tech (Db, Scripting lang, Servers OS u use) your >software must have Strong RDBMS, Proper coding style, Robust architecture >maybe using SDDS tech. an other normal stuffs. > >These concept can give u satisfactory solutions, otherwise there is no such >tech. in this world which can give u all at once without having Distributed >Database and/or multiprocessing. Also PHP guys will say PHP is best, ASP >will say ASP is the best bcoz it has these facilities, same with DB and OS, >ok ok we need to think in diff direction and develop something new using >existing tech :) not just adhering to existing tools. > >Thanks All, > >Anirudh Zala >(Globalwebwise INDIA) > > > > >>From: "Ophir Prusak" >>Reply-To: talk at nyphp.org >>To: NYPHP Talk >>Subject: Re: [nycphp-talk] Scaling LAMP Architecture >>Date: Thu, 10 Oct 2002 11:06:11 -0400 >>Received: from mc5-f22.law1.hotmail.com ([65.54.252.29]) by >>mc5-s15.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Thu, 10 Oct >>2002 09:50:32 -0700 >>Received: from parsec.nyphp.org ([66.250.54.138]) by >>mc5-f22.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Thu, 10 Oct >>2002 08:16:52 -0700 >>Received: from nyphp.org (parsec.nyphp.org [66.250.54.138])by >>parsec.nyphp.org (8.12.3/8.12.3) with ESMTP id g9AF6Bix055705;Thu, 10 Oct >>2002 11:06:11 -0400 (EDT)(envelope-from listmaster at nyphp.org) >>Message-Id: <200210101506.g9AF6Bix055705 at parsec.nyphp.org> >>X-Paralist-Archived: >> >>X-List-Software: Paralist 0.6 >>List-ID: >>List-Owner: >>List-Archive: >>List-Subscribe: >>List-Unsubscribe: >>Organization: New York PHP >>X-Mailer: Paramail 0.5 >>Return-Path: listmaster at nyphp.org >>X-OriginalArrivalTime: 10 Oct 2002 15:16:52.0625 (UTC) >>FILETIME=[0FF66810:01C27070] >> >>I'd like to clear up some potential confusion about the term "scalable". >>See http://labs.google.com/glossary?q=scalable for some pretty good >>definitions. >>While we all agree (hopefully) about what scalable means, I think we're >>talking about two different things that we're trying to scale. >>You can talk about scalability of a web site in regards to: >>1. Traffic and users - meaning if we get 100 times the traffic can we >>simply >>add 100 times the hardware without the need make any significant changes to >>the code/architecture. >>2. Application complexity - meaning if we want to add more functionality to >>the site, can we do so without making significant changes to the existing >>code/architecture. >> >>While I think it's obvious that LAP scale quite well in regards to traffic >>(CCI proves this), I do agree that in regards to application complexity, >>there are better solutions than PHP (though much more $$$$ to use and >>probably slower) >> >>My 2 cents. >> >>Ophir >> >>p.s. >>Regarding MySQL breaking down, I do believe the problem was with >>connections, not speed. >>It just didn't hold up when trying to keep a few thousand simultaneous >>connections to the MySQL server. >>Oracle amazingly seems to do ok. It might slow down, but it doesn't >>crash/die/freeze. >> >>----- Original Message ----- >>From: "David Sklar" >>To: "NYPHP Talk" >>Sent: Thursday, October 10, 2002 10:26 AM >>Subject: RE: [nycphp-talk] Scaling LAMP Architecture >> >> >> >> >>>>From: Kyle Tuskey [mailto:ktuskey at exostream.com] >>>>Sent: Thursday, October 10, 2002 12:20 AM >>>> >>>>You can scale LAMP (minus MySQL which is barely a database) to some >>>>degree, but it isn't really the best way to approach it. PHP was not >>>>built to be an enterprise language. The lack of the N-Tier model >>>> >>>> >>makes >> >> >>>>it great for most sites, but true enterprise level needs would be >>>> >>>> >>better >> >> >>>>approached with J2EE or .Net. Using .Net or J2EE (Java) will make the >>>>final solution much easier to use, manage, scale, and deploy. Though >>>>the word "enterprise" is thrown around too much and often isn't used >>>>accurately, applications that truly are enterprise do need to take >>>> >>>> >>into >> >> >>>>account a lot of the advantages of the N-Tier model. PHP has XML-RPC >>>> >>>> >>to >> >> >>>>all remote calls in a distributed architecture if I remember >>>> >>>> >>correctly, >> >> >>>>but it isn't very efficient. For instance, Java's RMI (Remote Method >>>>Invocation) implementation is much more robust for this purpose. If >>>> >>>> >>you >> >> >>>>must use PHP for an enterprise solution, use a strong RDBMS (MySQL is >>>>definitely not in this category) and some form of load balancing or >>>>clustering as opposed to an attempted distributed architecture w/ PHP. >>>> >>>> >>>So, Kyle, what is "true enterprise level," then? A billion pageviews per >>>month? The 800B PV/month Ophir cited at CCI works out to about >>> >>> >>300/second, >> >> >>>and I presume that doesn't include images or other static objects. >>> >>>Tell me, where is the point that MySQL breaks down? Traffic? >>> >>> >>Functionality? >> >> >>>I admit, MySQL doesn't have, say, the World's Greatest parallel >>> >>> >>hot-failover >> >> >>>technology, but I don't think anyone would classify Oracle's efforts in >>> >>> >>this >> >> >>>regard in that way either. >>> >>>Don't get me wrong, I'm all for using the right tool for the job, and >>> >>> >>MySQL >> >> >>>or PHP or Linux or Apache aren't each the right tool for every job. But >>> >>> >>if >> >> >>>you're going to insist that PHP or MySQL has problems, please point out >>>actual problems, instead of vague assertions. >>> >>>Thanks, >>> >>>David >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >> >> >> >> >> > > > > >_________________________________________________________________ >MSN Photos is the easiest way to share and print your photos: >http://photos.msn.com/support/worldwide.aspx > > > >--- Unsubscribe at http://nyphp.org/list --- > > > > > -- Chalu Kim eGENIUS 20 Jay Street, 1002 Brooklyn, New York 11201 chalu at egenius.com (718) 858-0142 (718) 858-2434 FAX www.egenius.com From georgenatalino at yahoo.com Fri Oct 11 12:16:58 2002 From: georgenatalino at yahoo.com (georgenatalino at yahoo.com) Date: Fri, 11 Oct 2002 12:16:58 -0400 Subject: Article: Vince Oostindie is the author of the Eclipse library, an object-orientated programming library written in PHP. Message-ID: <3DA6F97A.C1972950@yahoo.com> An HTML attachment was scrubbed... URL: From zaunere at yahoo.com Fri Oct 11 12:26:39 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Fri, 11 Oct 2002 09:26:39 -0700 (PDT) Subject: [nycphp-talk] Scaling LAMP Architecture In-Reply-To: <200210111523.g9BFN5WM058105@parsec.nyphp.org> Message-ID: <20021011162639.17596.qmail@web12801.mail.yahoo.com> Hi Anirudh, --- Anirudh Zala wrote: > > In SDDS, Data and Files are kept on several machines rather than same > server or 2 servers (i mean many companies use db server and > scripting/file server as separate to get better output and faster > execution). This tech is also known as Client-Agent-Server tech. > here u can say there is 1 main server where all data is kept and at > second level there comes Agents machines/servers interacts btwn main > server and client. All client servers has replica of main servers DB > but in diff parts not as whole db so like 4 servers with 25% and > almost all clients queries are first directed to this Agents only and > replied/executed by these 4 servers and if needed they are redirected > to main server and finally records btwn main server and agent servers > are updated. > > This is similar like concept of cache servers in Oracle and Java but > this is bit new and different. The main diff is all Agent servers > acts like as they are main servers so at client end u never know > where your request is being redirected or which server your data is > coming from? This is a very effective way to handle large quantities of traffic, and is needed with any DB/language/server/OS. While Oracle supports a lot of this as a shrink-wrapped package, there are limitations, and of course price. I've seen very effective implementations using replication/MySQL/round-robin, and with a cost of only the hardware. I think most sites would be hard-pressed to saturate even two Pentium-4 MySQL servers with proper DB design. And scalability? Buy another server and add an A record to your DNS. > This is like a concept of having chain store where u have McDonald's > fast food available at New York, Syracuse and Seattle rather than all > have to go to New York only whether u live in Syracuse or Seattle. I > hope u all r getting what I mean. But there's nothing like a NY Big Mac :) > So main point is whatever tech (Db, Scripting lang, Servers OS u use) > your software must have Strong RDBMS, Proper coding style, Robust > architecture maybe using SDDS tech. an other normal stuffs. > These concept can give u satisfactory solutions, otherwise there is > no such tech. in this world which can give u all at once without > having Distributed Database and/or multiprocessing. Also PHP guys > will say PHP is best, ASP will say ASP is the best bcoz it has these > facilities, same with DB and OS, > ok ok we need to think in diff > direction and develop something new using existing tech :) not just > adhering to existing tools. Couldn't agree more, H ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From ejp at well.com Fri Oct 11 14:24:10 2002 From: ejp at well.com (Edward Potter) Date: Fri, 11 Oct 2002 14:24:10 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture In-Reply-To: <200210111523.g9BFN5WM058105@parsec.nyphp.org> Message-ID: I think you can buy a pallete of Compaq's on eBay for probably next to nothing. Make a cluster + php +oracle or postgres, et al. That would be the cheap and easy way to do it. But if you have venture capital, you can wow them for months with whiteboards, arcane technical details, J2EE enterprise models, etc and stay on the payroll much longer! -- ed On Friday, October 11, 2002, at 11:23 AM, Anirudh Zala wrote: > Hi all :) > > Thank you for all of yours opinions and suggestions. All have given > better > solution for this problem as they could, and we know this problem can > have > many solutions, and finally depends upon person or company who is going > to > use and in which manner bcoz as it question of $ too J > > some of you have suggested using LAMP, or LAOP or LAPgP or .NeT or j2EE > and > many more but still problem remains same. What's correct definition of > "Scalable" system or architecture? > > Well if it's just question of having such a system which can run with > same > speed and efficiency even when total hits increase from 1000 to 1 > million, > or having all above advantages plus having all enterprise features. etc > then > here we r mistaking all. There is no any solution, which can provide > all of > these advantages simultaneously and in which way we need. > > So we have to find better rather than best. Here my suggestion is > whatever > tech. is used, it must be able to satisfy the owner and those who r > going to > use. Here "Satisfy" is in general terms, so whatever u think would be > ok.. > > So main thing is not to talk advantages and disadvantage of any existing > tech. likes comparison btwn MySql and Oracle or PHP and jSp or MsSql vs. > PgSql or whatever, instead we need to think in diff direction like using > concept of SDDS > Scalable Distributed Database Server and/or Multiprocessing where client > requests are divided into small parts or are redirected to other > servers or > processor thus keeping main server or processor less burdened. > > In SDDS, Data and Files are kept on several machines rather than same > server > or 2 servers (i mean many companies use db server and scripting/file > server > as separate to get better output and faster execution). This tech is > also > known as > Client-Agent-Server tech. where u can say there is 1 main server where > all > data is kept and at second level there comes Agents machines/servers > interacts btwn main server and client. All client servers has replica of > main servers DB but in diff parts not as whole db so like 4 servers > with 25% > and almost all clients queries are first directed to this Agents only > and > replied/executed by these 4 servers and if needed they are redirected to > main server and finally records btwn main server and agent servers are > updated. > > This is similar like concept of cache servers in Oracle and Java but > this is > bit new and different. The main diff is all Agent servers acts like as > they > are main servers so at client end u never know where your request is > being > redirected or which server your data is coming from? > > This is like a concept of having chain store where u have McDonald's > fast > food available at New York, Syracuse and Seattle rather than all have > to go > to New York only whether u live in Syracuse or Seattle. I hope u all r > getting what I mean. > > So main point is whatever tech (Db, Scripting lang, Servers OS u use) > your > software must have Strong RDBMS, Proper coding style, Robust > architecture > maybe using SDDS tech. an other normal stuffs. > > These concept can give u satisfactory solutions, otherwise there is no > such > tech. in this world which can give u all at once without having > Distributed > Database and/or multiprocessing. Also PHP guys will say PHP is best, ASP > will say ASP is the best bcoz it has these facilities, same with DB and > OS, > ok ok we need to think in diff direction and develop something new using > existing tech :) not just adhering to existing tools. > > Thanks All, > > Anirudh Zala > (Globalwebwise INDIA) > > >> From: "Ophir Prusak" >> Reply-To: talk at nyphp.org >> To: NYPHP Talk >> Subject: Re: [nycphp-talk] Scaling LAMP Architecture >> Date: Thu, 10 Oct 2002 11:06:11 -0400 >> Received: from mc5-f22.law1.hotmail.com ([65.54.252.29]) by >> mc5-s15.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Thu, >> 10 Oct >> 2002 09:50:32 -0700 >> Received: from parsec.nyphp.org ([66.250.54.138]) by >> mc5-f22.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Thu, >> 10 Oct >> 2002 08:16:52 -0700 >> Received: from nyphp.org (parsec.nyphp.org [66.250.54.138])by >> parsec.nyphp.org (8.12.3/8.12.3) with ESMTP id g9AF6Bix055705;Thu, 10 >> Oct >> 2002 11:06:11 -0400 (EDT)(envelope-from listmaster at nyphp.org) >> Message-Id: <200210101506.g9AF6Bix055705 at parsec.nyphp.org> >> X-Paralist-Archived: >> >> X-List-Software: Paralist 0.6 >> List-ID: >> List-Owner: >> List-Archive: >> List-Subscribe: >> List-Unsubscribe: >> Organization: New York PHP >> X-Mailer: Paramail 0.5 >> Return-Path: listmaster at nyphp.org >> X-OriginalArrivalTime: 10 Oct 2002 15:16:52.0625 (UTC) >> FILETIME=[0FF66810:01C27070] >> >> I'd like to clear up some potential confusion about the term >> "scalable". >> See http://labs.google.com/glossary?q=scalable for some pretty good >> definitions. >> While we all agree (hopefully) about what scalable means, I think we're >> talking about two different things that we're trying to scale. >> You can talk about scalability of a web site in regards to: >> 1. Traffic and users - meaning if we get 100 times the traffic can we >> simply >> add 100 times the hardware without the need make any significant >> changes to >> the code/architecture. >> 2. Application complexity - meaning if we want to add more >> functionality to >> the site, can we do so without making significant changes to the >> existing >> code/architecture. >> >> While I think it's obvious that LAP scale quite well in regards to >> traffic >> (CCI proves this), I do agree that in regards to application >> complexity, >> there are better solutions than PHP (though much more $$$$ to use and >> probably slower) >> >> My 2 cents. >> >> Ophir >> >> p.s. >> Regarding MySQL breaking down, I do believe the problem was with >> connections, not speed. >> It just didn't hold up when trying to keep a few thousand simultaneous >> connections to the MySQL server. >> Oracle amazingly seems to do ok. It might slow down, but it doesn't >> crash/die/freeze. >> >> ----- Original Message ----- >> From: "David Sklar" >> To: "NYPHP Talk" >> Sent: Thursday, October 10, 2002 10:26 AM >> Subject: RE: [nycphp-talk] Scaling LAMP Architecture >> >> >>>> From: Kyle Tuskey [mailto:ktuskey at exostream.com] >>>> Sent: Thursday, October 10, 2002 12:20 AM >>>> >>>> You can scale LAMP (minus MySQL which is barely a database) to some >>>> degree, but it isn't really the best way to approach it. PHP was not >>>> built to be an enterprise language. The lack of the N-Tier model >> makes >>>> it great for most sites, but true enterprise level needs would be >> better >>>> approached with J2EE or .Net. Using .Net or J2EE (Java) will make >>>> the >>>> final solution much easier to use, manage, scale, and deploy. Though >>>> the word "enterprise" is thrown around too much and often isn't used >>>> accurately, applications that truly are enterprise do need to take >> into >>>> account a lot of the advantages of the N-Tier model. PHP has XML-RPC >> to >>>> all remote calls in a distributed architecture if I remember >> correctly, >>>> but it isn't very efficient. For instance, Java's RMI (Remote Method >>>> Invocation) implementation is much more robust for this purpose. If >> you >>>> must use PHP for an enterprise solution, use a strong RDBMS (MySQL is >>>> definitely not in this category) and some form of load balancing or >>>> clustering as opposed to an attempted distributed architecture w/ >>>> PHP. >>> >>> So, Kyle, what is "true enterprise level," then? A billion pageviews >>> per >>> month? The 800B PV/month Ophir cited at CCI works out to about >> 300/second, >>> and I presume that doesn't include images or other static objects. >>> >>> Tell me, where is the point that MySQL breaks down? Traffic? >> Functionality? >>> I admit, MySQL doesn't have, say, the World's Greatest parallel >> hot-failover >>> technology, but I don't think anyone would classify Oracle's efforts >>> in >> this >>> regard in that way either. >>> >>> Don't get me wrong, I'm all for using the right tool for the job, and >> MySQL >>> or PHP or Linux or Apache aren't each the right tool for every job. >>> But >> if >>> you're going to insist that PHP or MySQL has problems, please point >>> out >>> actual problems, instead of vague assertions. >>> >>> Thanks, >>> >>> David >>> >>> >>> >>> >>> >>> >>> >>> >> >> >> >> >> > > > > > _________________________________________________________________ > MSN Photos is the easiest way to share and print your photos: > http://photos.msn.com/support/worldwide.aspx > > > > --- Unsubscribe at http://nyphp.org/list --- > > From zaunere at yahoo.com Fri Oct 11 14:44:48 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Fri, 11 Oct 2002 11:44:48 -0700 (PDT) Subject: Fwd: Php Developer Needed Message-ID: <20021011184448.57598.qmail@web12806.mail.yahoo.com> Please contact Tim directly if interested. --- Tim Nilson wrote: > From: "Tim Nilson" > To: > Subject: Php Developer Needed > Date: Thu, 10 Oct 2002 14:27:15 -0400 > > Hello, > > My company is looking to bring on a PHP developer for a 2-3 week > project in > Manhattan. If you know of any talented individuals you could > recommend, I > would very much appreciate it. Please see my contact info below. > > Best, > Tim > > Tim Nilson > President & CTO > Run Media Inc. > One Park Ave, 12th Floor, New York, NY 10016 > 212.209.3349 office > 917.856.6279 usa cell > +49.(0)170.5863592 europe cell > 212.889.8595 fax > > NEW: RUNpics on AT&T Wireless > your pictures, on your phone, anytime > http://www.runpics.com/att > > > ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From zala007 at hotmail.com Sat Oct 12 00:53:50 2002 From: zala007 at hotmail.com (Anirudh Zala) Date: Sat, 12 Oct 2002 04:53:50 +0000 Subject: [nycphp-talk] Scaling LAMP Architecture Message-ID: Hans Z. :) Your r right, it's not imp. which tools u use, but it's imp. how effectively u use it. And as i told there can be several solution for this, and may be someone will have better solution than i have..Gotcha Anyway this was nice topic to discuss..thanks all for giving suggestions Anirudh Zala >From: Hans Zaunere >Reply-To: talk at nyphp.org >To: NYPHP Talk >Subject: Re: [nycphp-talk] Scaling LAMP Architecture >Date: Fri, 11 Oct 2002 12:26:44 -0400 >Received: from mc5-f17.law1.hotmail.com ([65.54.252.24]) by >mc5-s8.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Fri, 11 Oct >2002 10:02:33 -0700 >Received: from parsec.nyphp.org ([66.250.54.138]) by >mc5-f17.law1.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Fri, 11 Oct >2002 09:37:27 -0700 >Received: from nyphp.org (parsec.nyphp.org [66.250.54.138])by >parsec.nyphp.org (8.12.3/8.12.3) with ESMTP id g9BGQiWM058205;Fri, 11 Oct >2002 12:26:44 -0400 (EDT)(envelope-from listmaster at nyphp.org) >Message-Id: <200210111626.g9BGQiWM058205 at parsec.nyphp.org> >X-Paralist-Archived: > >X-List-Software: Paralist 0.6 >List-ID: >List-Owner: >List-Archive: >List-Subscribe: >List-Unsubscribe: >Organization: New York PHP >X-Mailer: Paramail 0.5 >Return-Path: listmaster at nyphp.org >X-OriginalArrivalTime: 11 Oct 2002 16:37:27.0968 (UTC) >FILETIME=[7C76F200:01C27144] > >Hi Anirudh, > > >--- Anirudh Zala wrote: > > > > In SDDS, Data and Files are kept on several machines rather than same > > server or 2 servers (i mean many companies use db server and > > scripting/file server as separate to get better output and faster > > execution). This tech is also known as Client-Agent-Server tech. > > here u can say there is 1 main server where all data is kept and at > > second level there comes Agents machines/servers interacts btwn main > > server and client. All client servers has replica of main servers DB > > but in diff parts not as whole db so like 4 servers with 25% and > > almost all clients queries are first directed to this Agents only and > > replied/executed by these 4 servers and if needed they are redirected > > to main server and finally records btwn main server and agent servers > > are updated. > > > > This is similar like concept of cache servers in Oracle and Java but > > this is bit new and different. The main diff is all Agent servers > > acts like as they are main servers so at client end u never know > > where your request is being redirected or which server your data is > > coming from? > >This is a very effective way to handle large quantities of traffic, and >is needed with any DB/language/server/OS. While Oracle supports a lot >of this as a shrink-wrapped package, there are limitations, and of >course price. I've seen very effective implementations using >replication/MySQL/round-robin, and with a cost of only the hardware. I >think most sites would be hard-pressed to saturate even two Pentium-4 >MySQL servers with proper DB design. And scalability? Buy another >server and add an A record to your DNS. > > > This is like a concept of having chain store where u have McDonald's > > fast food available at New York, Syracuse and Seattle rather than all > > have to go to New York only whether u live in Syracuse or Seattle. I > > hope u all r getting what I mean. > >But there's nothing like a NY Big Mac :) > > > So main point is whatever tech (Db, Scripting lang, Servers OS u use) > > your software must have Strong RDBMS, Proper coding style, Robust > > architecture maybe using SDDS tech. an other normal stuffs. > > These concept can give u satisfactory solutions, otherwise there is > > no such tech. in this world which can give u all at once without > > having Distributed Database and/or multiprocessing. Also PHP guys > > will say PHP is best, ASP will say ASP is the best bcoz it has these > > facilities, same with DB and OS, > > > ok ok we need to think in diff > > direction and develop something new using existing tech :) not just > > adhering to existing tools. > >Couldn't agree more, > >H > > >===== >Hans Zaunere >New York PHP >http://nyphp.org >hans at nyphp.org > >__________________________________________________ >Do you Yahoo!? >Faith Hill - Exclusive Performances, Videos & More >http://faith.yahoo.com > > >--- Unsubscribe at http://nyphp.org/list --- _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com From zaunere at yahoo.com Sat Oct 12 10:31:36 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Sat, 12 Oct 2002 07:31:36 -0700 (PDT) Subject: The Parable of the Languages [FUN] Message-ID: <20021012143136.65001.qmail@web12805.mail.yahoo.com> "...And PHP answered: All I ever do, day in and day out, is work and work and work. The only time I'm noticed is when I break, and then I'm cursed and kicked, and roundly blasted for being useless. However, when things go well, I never get a kind word. There's no notice of my ease of use, my elegance, my simplicity. Only my failures..." http://weblog.burningbird.net/archives/000581.php ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From seth at ghiek.com Sat Oct 12 11:34:02 2002 From: seth at ghiek.com (Seth) Date: Sat, 12 Oct 2002 11:34:02 -0400 Subject: [nycphp-talk] The Parable of the Languages [FUN] References: <200210121431.g9CEVeWM062818@parsec.nyphp.org> Message-ID: <001001c27204$cae97b90$0602a8c0@GHIEKJT5HZPBAD> Everyone, the weblog reading noted in Hans' link is fun reading ... i could certainly smile at [some of] the xml "accusations". spirits, seth j hersh ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Saturday, October 12, 2002 10:31 AM Subject: [nycphp-talk] The Parable of the Languages [FUN] > > "...And PHP answered: > > All I ever do, day in and day out, is work and work and work. The only > time I'm noticed is when I break, and then I'm cursed and kicked, and > roundly blasted for being useless. However, when things go well, I > never get a kind word. > > There's no notice of my ease of use, my elegance, my simplicity. Only > my failures..." > > http://weblog.burningbird.net/archives/000581.php > > ===== > Hans Zaunere > New York PHP > http://nyphp.org > hans at nyphp.org > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > > --- Unsubscribe at http://nyphp.org/list --- > > > > > From soazine at erols.com Mon Oct 14 04:06:01 2002 From: soazine at erols.com (Phil Powell) Date: Mon, 14 Oct 2002 04:06:01 -0400 Subject: chmod - some files can be viewed, others cannot Message-ID: <03a001c27358$89964c40$dcbe6444@scandinawa1bo6> I have a directory $DOCUMENT_ROOT/my/images, permission 0755 I have three images in my folder with the exact same permissions: 0755; same ownership, same everything. The files, viewed on my machine, are fine too. However, two cannot be seen due to permissions errors; one can be seen. All three were uploaded the exact same way too. Anyone want to solve this riddle? I am stumped as usual. Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From soazine at erols.com Mon Oct 14 04:23:20 2002 From: soazine at erols.com (Phil Powell) Date: Mon, 14 Oct 2002 04:23:20 -0400 Subject: chmod and file permissions Message-ID: <03a901c2735a$f51721e0$dcbe6444@scandinawa1bo6> If your directory is set to permissions 0755, and you upload your files to be at permissions 0744, will that change the permissions of the directory? Whenever I upload a file, even though I have an is_dir check in place for the directory, the file is uploaded with permissions of 0755 and then the file becomes 0744 and then the file becomes 0744, and then I can't view the file! I am not grasping this whole aspect of file permissions apparently enough to be able to handle file uploading correctly within the framework of PHP. Anyone out there know what I must do to ensure the directory remains at 0755 and the files at 0744 or 0755 and ensure they can be viewed by all? Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From ejp at well.com Mon Oct 14 09:47:30 2002 From: ejp at well.com (Edward Potter) Date: Mon, 14 Oct 2002 09:47:30 -0400 Subject: [nycphp-talk] chmod and file permissions In-Reply-To: <200210140825.g9E8PfWM066281@parsec.nyphp.org> Message-ID: <7C1FE54A-DF7B-11D6-B3E4-00039398609A@well.com> hi, ok, is this an upload using php with a form? Then files are owned by user nobody, which should have viewable permission, HOWEVER you should also check out the UMASK command in Unix. If this an FTP upload, then that's another story. Permissions can be kinda of tricky. You may to assume the ID of the user at the command line, create a file, and do a basic save, see where it ends up permissions wise. Once you get your UMASK set, I think you'll be ok. No matter what u do permissions wise, the UMASK is going to be the default maker of permissions. -- ed The default file permissions (umask): Each user has a default set of permissions which apply to all files created by that user, unless the software explicitly sets something else. This is often called the 'umask', after the command used to change it. It is either inherited from the login process, or set in the .cshrc or .login file which configures an individual account, or it can be run manually. On Monday, October 14, 2002, at 04:25 AM, Phil Powell wrote: > If your directory is set to permissions 0755, and you upload your files > to be at permissions 0744, will that change the permissions of the > directory? Whenever I upload a file, even though I have an is_dir > check in place for the directory, the file is uploaded with permissions > of 0755 and then the file becomes 0744 and then the file becomes 0744, > and then I can't view the file! > > I am not grasping this whole aspect of file permissions apparently > enough to be able to handle file uploading correctly within the > framework of PHP. Anyone out there know what I must do to ensure the > directory remains at 0755 and the files at 0744 or 0755 and ensure they > can be viewed by all? > > Thanx > Phil > > > > --- Unsubscribe at http://nyphp.org/list --- > > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 2010 bytes Desc: not available URL: From LarryC at indexstock.com Mon Oct 14 14:28:43 2002 From: LarryC at indexstock.com (Larry Chuon) Date: Mon, 14 Oct 2002 14:28:43 -0400 Subject: [nycphp-talk] Scaling LAMP Architecture Message-ID: <86713EAB93BD5F40B94A0C8E604C7C91AEB706@index-exchange.indexstock.com> Hi folk, Thank you for all the inputs on this subject. They have been very helpful. There are many ways to skin a cat. As my team begins to plug open-source applications together to build our "ossuite" (tm) package, we compromise on time, best practice, and efficiency due to restraint on the resource. If all conditions exist, specifically resource [time, money, people, place, etc.], we would have built everything from ground up. Even with that, the new app needs to be "scalable" enough to meet the rapidly changing business requirements - which means ossuite needs dynamic workflow. Instead, we decided to integrate existing apps [NOLA and osCommerce] because we don't want to reinvent the wheel. It has been a very challenging and exciting experience. Soon, we'll integrate Relata and [Relatamail or PHPList] to ossuite. We hope SME (small medium enterprise) will enjoy this new free software. We'll launch the demo site soon. We live, learn and share. Write me if you guys want to collaborate with our development process. Upside compensation plan will be available for serious players. Regards, Larry Chuon http://ossuite.org/ http://lechuon.com From soazine at erols.com Mon Oct 14 14:47:03 2002 From: soazine at erols.com (Phil Powell) Date: Mon, 14 Oct 2002 14:47:03 -0400 Subject: [nycphp-talk] chmod and file permissions References: <200210141347.g9EDljWM087526@parsec.nyphp.org> Message-ID: <050601c273b2$16a21890$dcbe6444@scandinawa1bo6> I didn't see anything, sorry. Phil ----- Original Message ----- From: "Edward Potter" To: "NYPHP Talk" Sent: Monday, October 14, 2002 9:47 AM Subject: Re: [nycphp-talk] chmod and file permissions > > From ejp at well.com Mon Oct 14 17:07:28 2002 From: ejp at well.com (Edward Potter) Date: Mon, 14 Oct 2002 17:07:28 -0400 Subject: chmod and file permissions Message-ID: yeah, i saw that email went blank, weird... any way here's my input... thanks > > hi, > > ok, is this an upload using php with a form? Then files are owned by > user nobody, which should have viewable permission, HOWEVER you should > also check out the UMASK command in Unix. If this an FTP upload, then > that's another story. Permissions can be kinda of tricky. You may to > assume the ID of the user at the command line, create a file, and do a > basic save, see where it ends up permissions wise. Once you get your > UMASK set, I think you'll be ok. No matter what u do permissions > wise, the UMASK is going to be the default maker of permissions. > > -- ed > > The default file permissions (umask): > Each user has a default set of permissions which apply to all files > created by that user, unless the software explicitly sets something > else. This is often called the 'umask', after the command used to > change it. It is either inherited from the login process, or set in the > .cshrc or .login file which configures an individual account, or it can > be run manually. > On Monday, October 14, 2002, at 04:25 AM, Phil Powell wrote: > >> If your directory is set to permissions 0755, and you upload your >> files to be at permissions 0744, will that change the permissions of >> the directory? Whenever I upload a file, even though I have an is_dir >> check in place for the directory, the file is uploaded with >> permissions of 0755 and then the file becomes 0744 and then the file >> becomes 0744, and then I can't view the file! >> >> I am not grasping this whole aspect of file permissions apparently >> enough to be able to handle file uploading correctly within the >> framework of PHP. Anyone out there know what I must do to ensure the >> directory remains at 0755 and the files at 0744 or 0755 and ensure >> they can be viewed by all? >> >> Thanx >> Phil >> >> >> >> --- Unsubscribe at http://nyphp.org/list --- >> >> From soazine at erols.com Mon Oct 14 17:09:38 2002 From: soazine at erols.com (Phil Powell) Date: Mon, 14 Oct 2002 17:09:38 -0400 Subject: How to setcookie with two domains Message-ID: <002601c273c6$025292c0$dcbe6444@scandinawa1bo6> Is it possible, w/o using sessionid session variables, to use setcookie to set a cookie that will have two domains or more? Just curious. I am having to set a cookie that will go to one domain and then to another domain. Not sure if I can do multiple setcookie commands and be able to produce the desired results. Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From jellicle at inch.com Mon Oct 14 17:27:50 2002 From: jellicle at inch.com (Michael Sims) Date: Mon, 14 Oct 2002 17:27:50 -0400 Subject: [nycphp-talk] How to setcookie with two domains In-Reply-To: <200210142111.g9ELBTWM013133@parsec.nyphp.org> References: <200210142111.g9ELBTWM013133@parsec.nyphp.org> Message-ID: <20021014213143.2A46E10DE2E@carbine.dsl.net> On Monday 14 October 2002 17:11 pm, Phil Powell wrote: > Is it possible, w/o using sessionid session variables, to use setcookie > to set a cookie that will have two domains or more? > > Just curious. I am having to set a cookie that will go to one domain > and then to another domain. Not sure if I can do multiple setcookie > commands and be able to produce the desired results. I'm not entirely sure I understand your question, but it would be a security hole to allow cookies to be set for domains other than the originating one. The website www.foo.com can set cookies for www.foo.com (sent only to www.foo.com) or .foo.com (sent to any *.foo.com site) but can't (shouldn't be able to) set cookies for cnn.com or any other domain. -- Michael Sims From soazine at erols.com Mon Oct 14 17:58:46 2002 From: soazine at erols.com (Phil Powell) Date: Mon, 14 Oct 2002 17:58:46 -0400 Subject: [nycphp-talk] How to setcookie with two domains References: <200210142131.g9ELVlWM013162@parsec.nyphp.org> Message-ID: <005d01c273cc$df38cf00$dcbe6444@scandinawa1bo6> That I figured.. which leads to a dilemma: I can set cookies to *.domain1.com, however, I am having to also set a cookie value, the same cookie value, to a few remote scripts on *.domain2.com, and since setcookie can't be used twice (I tried doing that and only *.domain1.com was set, *.domain2.com was not), I don't know of an easy solution to set the values of both domains in at least one script? Phil ----- Original Message ----- From: "Michael Sims" To: "NYPHP Talk" Sent: Monday, October 14, 2002 5:31 PM Subject: Re: [nycphp-talk] How to setcookie with two domains > On Monday 14 October 2002 17:11 pm, Phil Powell wrote: > > > Is it possible, w/o using sessionid session variables, to use setcookie > > to set a cookie that will have two domains or more? > > > > Just curious. I am having to set a cookie that will go to one domain > > and then to another domain. Not sure if I can do multiple setcookie > > commands and be able to produce the desired results. > > I'm not entirely sure I understand your question, but it would be a > security hole to allow cookies to be set for domains other than the > originating one. The website www.foo.com can set cookies for www.foo.com > (sent only to www.foo.com) or .foo.com (sent to any *.foo.com site) but > can't (shouldn't be able to) set cookies for cnn.com or any other domain. > > > -- > Michael Sims > > > --- Unsubscribe at http://nyphp.org/list --- > > From jellicle at inch.com Mon Oct 14 18:28:30 2002 From: jellicle at inch.com (Michael Sims) Date: Mon, 14 Oct 2002 18:28:30 -0400 Subject: [nycphp-talk] How to setcookie with two domains In-Reply-To: <200210142200.g9EM0cWM013200@parsec.nyphp.org> References: <200210142200.g9EM0cWM013200@parsec.nyphp.org> Message-ID: <20021014222920.2539110DE2A@abbots.dsl.net> On Monday 14 October 2002 18:00 pm, Phil Powell wrote: > That I figured.. which leads to a dilemma: > > I can set cookies to *.domain1.com, however, I am having to also set a > cookie value, the same cookie value, to a few remote scripts on > *.domain2.com, and since setcookie can't be used twice (I tried doing > that and only *.domain1.com was set, *.domain2.com was not), I don't > know of an easy solution to set the values of both domains in at least > one script? Setcookie() can be used more than once. The reason it isn't working is that it's a security violation for the website domain1.com to be able to modify cookies for domain2.com, and the web browser is refusing (correctly) to store the cookies for domain2 that you are sending. See the cookie RFC, section 4.3.2: http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2109.html This RFC does not accurately express the current state of cookie-handling in browsers (because it didn't consider country code TLD's), but, eh, close enough. You can still transfer information to domain2.com by loading URLs: http://domain2.com/script.php?yourvariable=value and domain2.com could then set its own cookies. -- Michael Sims From soazine at erols.com Mon Oct 14 18:49:53 2002 From: soazine at erols.com (Phil Powell) Date: Mon, 14 Oct 2002 18:49:53 -0400 Subject: [nycphp-talk] How to setcookie with two domains References: <200210142229.g9EMTOWM013234@parsec.nyphp.org> Message-ID: <009801c273d4$02d4b2b0$dcbe6444@scandinawa1bo6> yep just as I figured.. which would be a breeze were it not for the wacky requirements of dealing with ASP, TCL, PHP and HTML files that are all affected by this query string addition. *sigh* Phil ----- Original Message ----- From: "Michael Sims" To: "NYPHP Talk" Sent: Monday, October 14, 2002 6:29 PM Subject: Re: [nycphp-talk] How to setcookie with two domains > On Monday 14 October 2002 18:00 pm, Phil Powell wrote: > > > That I figured.. which leads to a dilemma: > > > > I can set cookies to *.domain1.com, however, I am having to also set a > > cookie value, the same cookie value, to a few remote scripts on > > *.domain2.com, and since setcookie can't be used twice (I tried doing > > that and only *.domain1.com was set, *.domain2.com was not), I don't > > know of an easy solution to set the values of both domains in at least > > one script? > > Setcookie() can be used more than once. The reason it isn't working is > that it's a security violation for the website domain1.com to be able to > modify cookies for domain2.com, and the web browser is refusing > (correctly) to store the cookies for domain2 that you are sending. > > See the cookie RFC, section 4.3.2: > > http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2109.html > > This RFC does not accurately express the current state of cookie-handling > in browsers (because it didn't consider country code TLD's), but, eh, > close enough. > > You can still transfer information to domain2.com by loading URLs: > > http://domain2.com/script.php?yourvariable=value > > and domain2.com could then set its own cookies. > > > -- > Michael Sims > > > --- Unsubscribe at http://nyphp.org/list --- > > From zaunere at yahoo.com Mon Oct 14 22:41:42 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Mon, 14 Oct 2002 19:41:42 -0700 (PDT) Subject: NYPHP Presents: AMP Development under Win2K and the AIP Message-ID: <20021015024142.70424.qmail@web12808.mail.yahoo.com> NYPHP Presents... As the weather cools off and we move into the fall season, NYPHP is excited to offer a two-pronged presentation this month. This month's presentations, "Introduction to AMP Technology -- Development Under Windows 2000" and "The Net and The Association of Internet Professionals," will be technically and culturally stimulating, given by two immersed in PHP and Internet development. As always, NYPHP's meetings are free and open to the public, with presentation, location and time details at http://nyphp.org. ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From zaunere at yahoo.com Tue Oct 15 10:50:10 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 15 Oct 2002 07:50:10 -0700 (PDT) Subject: PHPCon 2002 Early Bird Discount Extended to October 18th! Message-ID: <20021015145010.64135.qmail@web12808.mail.yahoo.com> Save $100 on PHPCon - now util 10/18. Announcement follows: "We know times are tough and budgets are tight. But the need to keep up with technology and technical education never ceases. This is why we've extended our Early Bird registration discount an extra week. If you eat, sleep, and breathe web development -- if you have your hands in PHP everyday ? you need to attend this conference. And if you register on or before Friday, October 18th ? you will continue to receive a $100 discount on fees. PHPCon 2002 offers attendees a comprehensive, practical technical program featuring: - Keynote by Rasmus Lerdorf, Inventor of PHP - Three Technical tracks including Enterprise PHP, Applications Development, and XML/CMS. - Best Practices from gurus and greats such as Dirk Elmendorf of Rackspace, Introduction to SOAP for PHP with Shane Caraveo, ActiveState, Reading the PHP Source with Zak Greant, MySQL Community Advocate, and High Performance PHP: Profiling and Benchmarking Techniques with George Schlossnagle, OmniTI - Opportunities to meet and mingle with peers, gurus, and greats in a relaxed, congenial setting. PHPCon 2002 is just around the corner. Join us on October 24th and 25th at the Clarion Hotel in Millbrae, California for the first PHPCon! For full program and online registration, log onto our website at http://www.php-con.com." ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From mjdewitt at alexcommgrp.com Tue Oct 15 11:21:13 2002 From: mjdewitt at alexcommgrp.com (DeWitt, Michael) Date: Tue, 15 Oct 2002 11:21:13 -0400 Subject: Seeking recommendations for resources on LAMP best practices Message-ID: Hello, I have been lurking on the list for a while and really enjoy the discussion. I have been running LAMP based websites for a couple of years, but feel its time to address some high level issues with the maintenance of LAMP based systems. I have looked over and read a few books on Apache and PHP and they really don't cover what you do after you get things running. Some of the issues I have run into and am looking for direction on are: 1. What is the best way to maintain all of the server software components: I bet most admin's servers like mine are much more complicated than merely apache/mysql/php. SSL, other database connectivity like ODBC and TDS, encryption libraries, log readers, site indexers, link checkers, frontpage, and so on are needed to make a site really functional. Some of these components have dependencies which raises issues in getting the whole shebang working when you change one component. So, what is to be done to maintain the server from one generation of daemons and programs to another? From here, other issues arise as to the best way to move from one production server to another as in the case of an OS or hardware upgrade. 2. what is the best way to setup and maintain apache logs? What is the best log reader? If you want to have automated log rotation that dovetails with both static log readers like webalayzer or dynamic (you can do ad-hoc queries) like analog. Or perhaps a better log reader would streamline everything? 3. what is the best way to setup and maintain a backup "hot" apache/mysql server? Can this be practically done with standard linux installs and the capabilites of the OS and server daemons? There are many operational and maintenance questions like these which I am finding a hard time getting answers to. I am not really expecting anyone to answer these questions in detail. I know that someone somewhere has figured out this stuff and I would love to know what that is. Just point me in the right direction. Perhaps some book or online resource is available that addresses these kinds of questions? If so, please let me know what it is. I have looked around on the web and Barnes and Noble, but have turned up little as my patience and ability are limited. I know its out there, somewhere. Isn't everything? Thanks in advance for your time and for providing this valuable forum. Mike From sailer at bnl.gov Tue Oct 15 11:29:46 2002 From: sailer at bnl.gov (Tim Sailer) Date: Tue, 15 Oct 2002 11:29:46 -0400 Subject: [nycphp-talk] Seeking recommendations for resources on LAMP best practices In-Reply-To: <200210151517.g9FFH0WM014506@parsec.nyphp.org> References: <200210151517.g9FFH0WM014506@parsec.nyphp.org> Message-ID: <20021015152946.GA31501@bnl.gov> On Tue, Oct 15, 2002 at 11:17:00AM -0400, DeWitt, Michael wrote: > 3. what is the best way to setup and maintain a backup "hot" > apache/mysql server? > > Can this be practically done with standard linux installs and the > capabilites of the OS and server daemons? The way I do this is first, get two web servers running, configured identical. Keeping them that way can be a chore, but that's another question. Use rsync between them to keep your content current. One hole this leaves is log files, which, to e-commerce sites, may be more important than content, so I'd look at mysql logging from apache, os that ilk. Mysql is simple. You can set up 2 replicated servers, but the best way is to have 3 servers, with the master being where all the writes are going, and replicated to the slaves, where the reads are done. Now, in your database code, when you try to attach to your primary slave server, if that fails, simply try to attach to your 'hot spare' server. I know this is Perl and LDAP, but it will work the same way in PHP/Mysql. I just happen to have this code open in my editor: $ldap=Net::LDAP->new('ldapA.bnl.gov') or $ldap=Net::LDAP->new('ldapB.bnl.gov') or $ldap=Net::LDAP->new('ldapC.bnl.gov') or die "$@"; This way, one call should almost always yield a database connection. Tim -- Tim Sailer Application Services Information Technology Division Brookhaven National Laboratory (631) 344-3001 From rainman at deroo.net Tue Oct 15 11:44:07 2002 From: rainman at deroo.net (The RainMaker) Date: Tue, 15 Oct 2002 11:44:07 -0400 Subject: [nycphp-talk] Seeking recommendations for resources on LAMP best practices In-Reply-To: <200210151530.g9FFUjWM014561@parsec.nyphp.org> Message-ID: <5.1.1.6.0.20021015114313.00ab2788@mail.deroo.net> > >$ldap=Net::LDAP->new('ldapA.bnl.gov') or >$ldap=Net::LDAP->new('ldapB.bnl.gov') or >$ldap=Net::LDAP->new('ldapC.bnl.gov') or die "$@"; > >This way, one call should almost always yield a database connection. If not... ya have a new definition for the term "Having a bad day." .r :+) From nyphp at altunergil.com Tue Oct 15 12:08:17 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Tue, 15 Oct 2002 12:08:17 -0400 Subject: Fw: [nylug-announce] LinuxWorld New York 2003 Registration is Open! (fwd) [FREE Exhibits Pass] Message-ID: <20021015120817.21fc12d9.nyphp@altunergil.com> My apologies if it was posted before. Oktay Begin forwarded message: Date: Mon, 14 Oct 2002 12:13:17 -0400 (EDT) To: nylug-talk , nylug-announce Subject: [nylug-announce] LinuxWorld New York 2003 Registration is Open! (fwd) ***************************************************************************** This message is brought to you by LinuxWorld Conference & Expo Show Management. We respect your privacy. Please refer to the end of this message for instructions on how to be removed from our email database. ***************************************************************************** We're excited to inform you that LinuxWorld Conference & Expo New York 2003 Registration is now open! Register today for your FREE Exhibits Pass with your SPECIAL PRIORITY CODE - ALUM http://www.linuxworldexpo.com/linuxworldny03/V33/index.cvn?ID=10098 LinuxWorld Conference & Expo January 21 - 24, 2003 Jacob K. Javits Center New York, NY http://www.linuxworldexpo.com *** DISCOVER why Linux is thriving in financial, telecommunications, government and retail industries. *** EXPERIENCE multi-vendor enterprise solution demonstrations at the all-new Enterprise Solutions Center. *** HEAR how Wall Street firms are already leveraging Linux to achieve a lower total cost of ownership (TCO). *** EXPLORE the newest technologies from leading Linux and Open Source suppliers such as AMD, HP, IBM, Intel, Red Hat, Sun and a growing array of start-ups. *** IMPROVE your Linux skills by participating in our world-class education program. Your Exhibits Pass allows you access to Keynotes, Feature Presentations, Taste of Linux Series and other exciting show features! *** VISIONARY KEYNOTES *** - Open to all registered attendees! * Hector Ruiz, Ph.D., President and Chief Executive Officer, AMD Wednesday, January 22nd, 10:30am - 11:30am * Financial Services Case Study Keynote: Jeffrey Birnbaum, Managing Director & Global Head of Enterprise Computing - Institutional Securities Division, Morgan Stanley & Michael Tiemann, Chief Technical Officer, Red Hat, Inc. Wednesday, January 22nd ; 1:30pm-2:30pm * Steven A. Mills, Senior Vice President and Group Executive, IBM Corporation Thursday, January 23rd ; 10:30am-11:30am * Randall D. Mott, Senior Vice President & Chief Information Officer, Dell Computer Corporation Thursday, January 23rd ; 1:30pm-2:30pm *** FEATURE PRESENTATION *** - Open to all registered attendees! * The Golden Penguin Bowl, hosted by Chris DiBona, Director of Special Projects, Open Source Development Network (OSDN) For a complete overview of our exciting show features including our all-NEW Enterprise Solutions Center, visit http://www.linuxworldexpo.com/linuxworldny03/V33/index.cvn?id=10010&p_navID=7 Visit http://www.linuxworldexpo.com for continuous updates on conference sessions and exhibitor information. We look forward to seeing you in New York! - The LinuxWorld Conference & Expo Team For general information, call 1-800-657-1474 We're proud to have the following sponsors associated with LinuxWorld Conference & Expo! Cornerstone Sponsor: HP Platinum Sponsors: AMD, IBM, Intel, Red Hat and Sun Silver Sponsor: macrovision, GLOBEtrotter Software Division Linux Certification Program Sponsor: Linux Professional Institute (LPI) Media Sponsors: Bityard, C++ Users Journal, CRN, Daemon News, Dr. Dobb's Journal, InfoWorld, IT Professional, Linux Journal, Linux Magazine, Network World, Software Development Magazine, Sys Admin, VARBusiness and WebSphere Magazine. _________________________________________________________________ If you would like your name removed from this list, "REPLY" to this message with "UNSUBSCRIBE" in the subject line. Please be sure to use "REPLY" (rather than composing a new message), so that we may properly handle your request. _______________________________________________ nylug-announce mailing list nylug-announce at nylug.org http://herzl.nylug.org/mailman/listinfo/nylug-announce From enunez at tiaa-cref.org Tue Oct 15 12:14:16 2002 From: enunez at tiaa-cref.org (Nunez, Eddy) Date: Tue, 15 Oct 2002 12:14:16 -0400 Subject: Javascript & Sessions Message-ID: <7CE0EC1FC2D0D411910700508BE38D0F0A6D9B81@msxnyusr01.msx.ops.tiaa-cref.org> Heya folks, Just ran into an odd bit of coding. I wrote some Javascript functions to manipulate options to a dropdown lists from a text field. i.e. function addOption( listObj, option ) There seems to be a problem with Javascript and Sessioning when it comes to accessing the document object, because when PHP initially sets the browser cookie for the session the document object is unaccessable? Let me give you an example: 1. I try my page without "session_start()". addOption() works fine. 2. I add the session_start() to the page, addOption() generetes an "Object expected error", when I try to use it. I am guessing it can't access document object? using this format: document.form1.elements[i]. (the form was named to form1) 3. I reload the page as is, the addOption() works fine again; note: I didn't touch session_start() in the code. 4. I delete my cookies, reload the page, and the "Object expected error" returns. Seems that document obj disappears only when initially setting the session cookie? Odd. Anyone can shed some light on this particular situation? FYI: Using IE6, I really hate the way IE handles Javascript Errors, Loved the way Netscape had a Javascript console for reviewing/locating errors. Thanks! -Ed ********************************************************************** 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 sailer at bnl.gov Tue Oct 15 12:36:18 2002 From: sailer at bnl.gov (Tim Sailer) Date: Tue, 15 Oct 2002 12:36:18 -0400 Subject: [nycphp-talk] Seeking recommendations for resources on LAMP best practices In-Reply-To: <200210151544.g9FFiZWM014609@parsec.nyphp.org> References: <200210151544.g9FFiZWM014609@parsec.nyphp.org> Message-ID: <20021015163618.GB32618@bnl.gov> On Tue, Oct 15, 2002 at 11:44:35AM -0400, The RainMaker wrote: > > > > >$ldap=Net::LDAP->new('ldapA.bnl.gov') or > >$ldap=Net::LDAP->new('ldapB.bnl.gov') or > >$ldap=Net::LDAP->new('ldapC.bnl.gov') or die "$@"; > > > >This way, one call should almost always yield a database connection. > > If not... ya have a new definition for the term "Having a bad day." Yeah, well welcome to my world. :) Take a machine down for upgrades, have another fail, and the third be unavailable due to a network outage. :( Tim -- Tim Sailer Application Services Information Technology Division Brookhaven National Laboratory (631) 344-3001 From jim at bizcomputinginc.com Wed Oct 16 13:12:12 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 13:12:12 -0400 Subject: Building trees References: <200210111614.g9BGEiWM058174@parsec.nyphp.org> Message-ID: <3DAD9DEC.1010309@bizcomputinginc.com> I know this is a SQL question, but since most apps deal with SQL, I figured I'ld ask here since the app is using PHP and MySQL. I have a table that establishes an entity that may have a parent from the same table. I would like to display the data in a tree format where all items with a ParentID of 0 ( no parent ) are listed with children indented under the parent. The nesting can be infinite, but realistically will only be 2 or 3 levels deep. I can see how to do this through a whole series of queries, but can see how the performance of such a design could be very poor if there is a lot of items. Looking for any ideas, even if they would require a table design mod to make the queries simpler. The current design is a single table with ID, and ParentID and whatever other info needed for the item. Thanks, Jim From zaunere at yahoo.com Wed Oct 16 13:35:51 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 16 Oct 2002 10:35:51 -0700 (PDT) Subject: Graphics with php In-Reply-To: <200210161651.g9GGpfWM016341@parsec.nyphp.org> Message-ID: <20021016173551.20434.qmail@web12808.mail.yahoo.com> [Moved to NYPHP-Talk] --- elvire dardier wrote: > Hi everybody, > > I am new to this forum and also new to using php. I > have created a web page that connects to my oracle > data base, where weather data is stored. Now I also > want to create graphs. I configured php with gd and > the recommanded librairies, jpeg, png, zlib, I haven't used GD in a while (last compile I did with it was when the libs were still seperate) but I think modern PHP versions come with a bundled version, which is certainly recommended. > ..When > running a small test script, it tells me that it does > not find imagepng() for instance ( I am on > sun/solaris). Hmm... Are you sure the script is running with the PHP binary/module you think it is? Is that the only error it gives? If it couldn't find the GD libs properly, you should get a different error (if it would even compile at all). But this error seems like PHP doesn't even know this module is available. Is PNG specifically enabled? Do any of the image functions work (getimagesize(),exif_imagetype())? Are the constants defined? Did you compile it as a dynamic module? Did you load it with dl() if so? ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From sailer at bnl.gov Wed Oct 16 13:44:42 2002 From: sailer at bnl.gov (Tim Sailer) Date: Wed, 16 Oct 2002 13:44:42 -0400 Subject: [nycphp-talk] Re: Graphics with php In-Reply-To: <200210161735.g9GHZuWM016403@parsec.nyphp.org> References: <200210161735.g9GHZuWM016403@parsec.nyphp.org> Message-ID: <20021016174442.GB17733@bnl.gov> On Wed, Oct 16, 2002 at 01:35:56PM -0400, Hans Zaunere wrote: > > ..When > > running a small test script, it tells me that it does > > not find imagepng() for instance ( I am on > > sun/solaris). > > Hmm... Are you sure the script is running with the PHP binary/module > you think it is? Is that the only error it gives? If it couldn't find > the GD libs properly, you should get a different error (if it would > even compile at all). But this error seems like PHP doesn't even know > this module is available. Is PNG specifically enabled? Do any of the > image functions work (getimagesize(),exif_imagetype())? Are the > constants defined? Did you compile it as a dynamic module? Did you > load it with dl() if so? Also, if the PHP build was done as modules, make sure you have the gd.so extention loded in the php.ini... Tim -- Tim Sailer Application Services Information Technology Division Brookhaven National Laboratory (631) 344-3001 From bruce at mtiglobal.com Thu Oct 17 05:47:19 2002 From: bruce at mtiglobal.com (bruce at mtiglobal.com) Date: Thu, 17 Oct 2002 01:47:19 -0800 (CST) Subject: [nycphp-talk] Building trees In-Reply-To: <200210161712.g9GHCNWM016368@parsec.nyphp.org> References: <200210161712.g9GHCNWM016368@parsec.nyphp.org> Message-ID: <4761.65.112.109.66.1034790439.squirrel@taipei.mtiglobal.com> Can a parent by a child and a child be a parent? Is so, perhaps you could have another table where the relationship is established. tblObjects: objectID fname lname etc. fields tblRelationships: relationship - autonumber parent child where parent and child are the id's from tblObjects. I could probably be more clear if I knew the specifics of what the entities you are using are. >From this you could then select from the two tables. - Bruce > I know this is a SQL question, but since most apps deal with SQL, I > figured I'ld ask here since the app is using PHP and MySQL. > > I have a table that establishes an entity that may have a parent from > the same table. I would like to display the data in a tree format where > all items with a ParentID of 0 ( no parent ) are listed with children > indented under the parent. The nesting can be infinite, but > realistically will only be 2 or 3 levels deep. I can see how to do this > through a whole series of queries, but can see how the performance of > such a design could be very poor if there is a lot of items. Looking > for any ideas, even if they would require a table design mod to make the > queries simpler. The current design is a single table with ID, and > ParentID and whatever other info needed for the item. > > Thanks, Jim > > > > > > > --- Unsubscribe at http://nyphp.org/list --- From fields at surgam.net Wed Oct 16 14:00:48 2002 From: fields at surgam.net (Adam Fields) Date: Wed, 16 Oct 2002 13:00:48 -0500 Subject: [nycphp-talk] Building trees In-Reply-To: <200210161712.g9GHCNWM016368@parsec.nyphp.org> References: <200210161712.g9GHCNWM016368@parsec.nyphp.org> Message-ID: <20021016180047.GB23049@eye.surgam.net> On Wed, Oct 16, 2002 at 01:12:23PM -0400, Jim Hendricks wrote: > I know this is a SQL question, but since most apps deal with SQL, I > figured I'ld ask here since the app is using PHP and MySQL. > > I have a table that establishes an entity that may have a parent from > the same table. I would like to display the data in a tree format where > all items with a ParentID of 0 ( no parent ) are listed with children > indented under the parent. The nesting can be infinite, but > realistically will only be 2 or 3 levels deep. I can see how to do this > through a whole series of queries, but can see how the performance of > such a design could be very poor if there is a lot of items. Looking > for any ideas, even if they would require a table design mod to make the > queries simpler. The current design is a single table with ID, and > ParentID and whatever other info needed for the item. There's no easy way to do this now with MySQL. In Oracle, you can use a CONNECT BY query to return this sort of structure. The only good news I have about this is that it is on the list of things that ought to be included at some point: http://www.mysql.com/doc/en/TODO_future.html -- - 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 MJames at emarketer.com Wed Oct 16 14:12:53 2002 From: MJames at emarketer.com (Michael James) Date: Wed, 16 Oct 2002 14:12:53 -0400 Subject: [nycphp-talk] Building trees Message-ID: Jim, I had to build a tree for a project, and I found that de-normalization worked rather well. In my case i had a tree of "subjects", therefore i created a "subject path" table with the following fields: id parent_id subject_id_0 subject_id_1 subject_id_2 subject_id_3 subject_id_4 subject_id_5 subject_id_6 subject_name_0 subject_name_1 subject_name_2 subject_name_3 subject_name_4 subject_name_5 subject_name_6 narrowest_subject_id narrowest_subject_name full_name also, i had a subject table: id name I knew that I would never go over 7 levels in my tree, but i could always add more fields to the subject path table if necessary. Anyway, from the subject table and from the id and parent id fields in the subject path table, i can derive all of the other fields for each row in the subject path table. (this would be something you can do as a pre-processed script, because you wouldn't want to figure it out during run-time since it would slow your site down.) And I used these de-normalized fields to create the tree on the website using very simple queries (ex. SELECT narrowest_subject_name from subject_path where parent_id = 5) Mike >>> jim at bizcomputinginc.com 10/16/02 01:12PM >>> I know this is a SQL question, but since most apps deal with SQL, I figured I'ld ask here since the app is using PHP and MySQL. I have a table that establishes an entity that may have a parent from the same table. I would like to display the data in a tree format where all items with a ParentID of 0 ( no parent ) are listed with children indented under the parent. The nesting can be infinite, but realistically will only be 2 or 3 levels deep. I can see how to do this through a whole series of queries, but can see how the performance of such a design could be very poor if there is a lot of items. Looking for any ideas, even if they would require a table design mod to make the queries simpler. The current design is a single table with ID, and ParentID and whatever other info needed for the item. Thanks, Jim --- Unsubscribe at http://nyphp.org/list --- From jim at bizcomputinginc.com Wed Oct 16 14:26:18 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 14:26:18 -0400 Subject: [nycphp-talk] Building trees References: <200210161749.g9GHnGWM016431@parsec.nyphp.org> Message-ID: <3DADAF4A.304@bizcomputinginc.com> Yes, I think if I get your meaning. The app is a broadbased app for managing my business and extending certain parts to involved parties ( ie. my clients and sub contractors ). The specific table in question is projects where projects can have subprojects which can have subprojects... as deep as you want. So with my table design you might see: ID ParentID Name 1 0 The greatgrandaddy project 2 1 grandpa 1 3 1 grandpa 2 4 2 pa 1 5 2 pa 2 6 3 pa 3 7 3 pa 4 8 5 child 1 9 5 child 2 10 5 child 3 The results of the query would lead to a display like: The greatgranddaddy project grandpa 1 pa 1 pa 2 child 1 child 2 child 3 grandpa 2 pa 3 pa 4 I had thought about using the relationship table, but didn't see how that would make the query simpler. A straight query of my original design will get me all the data, the problem is parsing that data so I can lay it out in a tree format. If there were a way within the query where I can order the data on greatgranddaddy, granddaddy, daddy, child then it could be done in 1 query. But this then also assumes a tree only 3 levels deep ( which is plenty for this situation, but I may need this solution in other places as well where 3 may not be deep enough ). This also assumes ordering by id's but ultimately I want it ordered by name within each tier. Jim bruce at mtiglobal.com wrote: >Can a parent by a child and a child be a parent? > >Is so, perhaps you could have another table where the relationship is >established. > >tblObjects: >objectID >fname >lname >etc. fields > >tblRelationships: >relationship - autonumber >parent >child > >where parent and child are the id's from tblObjects. > >I could probably be more clear if I knew the specifics of what the >entities you are using are. > >>From this you could then select from the two tables. > >- Bruce > > > >>I know this is a SQL question, but since most apps deal with SQL, I >>figured I'ld ask here since the app is using PHP and MySQL. >> >>I have a table that establishes an entity that may have a parent from >>the same table. I would like to display the data in a tree format where >> all items with a ParentID of 0 ( no parent ) are listed with children >>indented under the parent. The nesting can be infinite, but >>realistically will only be 2 or 3 levels deep. I can see how to do this >> through a whole series of queries, but can see how the performance of >>such a design could be very poor if there is a lot of items. Looking >>for any ideas, even if they would require a table design mod to make the >> queries simpler. The current design is a single table with ID, and >>ParentID and whatever other info needed for the item. >> >>Thanks, Jim >> >> >> >> >> >> >> >> >> > > > > > >--- Unsubscribe at http://nyphp.org/list --- > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rainman at deroo.net Wed Oct 16 14:29:06 2002 From: rainman at deroo.net (The RainMaker) Date: Wed, 16 Oct 2002 14:29:06 -0400 Subject: [nycphp-talk] Building trees In-Reply-To: <200210161801.g9GI11WM016464@parsec.nyphp.org> Message-ID: <5.1.1.6.0.20021016142754.00a91af8@mail.deroo.net> Humph... >The only good news I have about this is that it is on the list of >things that ought to be included at some point: > >http://www.mysql.com/doc/en/TODO_future.html Subselect have been on the TODO list for over five years... I wouldn't go holding your breath. .r From jim at bizcomputinginc.com Wed Oct 16 14:44:54 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 14:44:54 -0400 Subject: [nycphp-talk] Building trees References: <200210161810.g9GIAKWM016485@parsec.nyphp.org> Message-ID: <3DADB3A6.3080600@bizcomputinginc.com> This idea might hold promise for my needs. I need to mull over. I imagine I can maintain the "subject path" table at file time of a new "subject" since this is a quick save query so tacking on the added time to backwalk the tree for the new "subject" to glean the necessary info to add to the "subject path" table would be hardly noticed. I don't know how the sorting would be done with this design though. If I want "subject" ordering within the tier, I may need to add a sortation weight. The other thing would be, this design still needs multiple queries, for each level of each branch. I'm thinking that since my requirements are: 1. a parent can have many children of which can also have many children 2. a child can have only 1 parent 3. the tree query needs to display within an alpha sort on name within the tier I might need to have a sort weight field which factors all these in when my entity is saved and generates a value which would allow a sort on the weight field to cause the query to retrieve the data in the right order with parents immediately followed by their children. Then it is a simple matter durring display to do the necessary indenting as you interate through the result set. Michael James wrote: >Jim, > >I had to build a tree for a project, and I found that de-normalization worked rather well. In my case i had a tree of "subjects", therefore i created a "subject path" table with the following fields: > >id >parent_id >subject_id_0 >subject_id_1 >subject_id_2 >subject_id_3 >subject_id_4 >subject_id_5 >subject_id_6 >subject_name_0 >subject_name_1 >subject_name_2 >subject_name_3 >subject_name_4 >subject_name_5 >subject_name_6 >narrowest_subject_id >narrowest_subject_name >full_name > >also, i had a subject table: >id >name > > >I knew that I would never go over 7 levels in my tree, but i could always add more fields to the subject path table if necessary. Anyway, from the subject table and from the id and parent id fields in the subject path table, i can derive all of the other fields for each row in the subject path table. (this would be something you can do as a pre-processed script, because you wouldn't want to figure it out during run-time since it would slow your site down.) And I used these de-normalized fields to create the tree on the website using very simple queries (ex. SELECT narrowest_subject_name from subject_path where parent_id = 5) > >Mike > > > >>>>jim at bizcomputinginc.com 10/16/02 01:12PM >>> >>>> >>>> >I know this is a SQL question, but since most apps deal with SQL, I >figured I'ld ask here since the app is using PHP and MySQL. > >I have a table that establishes an entity that may have a parent from >the same table. I would like to display the data in a tree format where >all items with a ParentID of 0 ( no parent ) are listed with children >indented under the parent. The nesting can be infinite, but >realistically will only be 2 or 3 levels deep. I can see how to do this >through a whole series of queries, but can see how the performance of >such a design could be very poor if there is a lot of items. Looking >for any ideas, even if they would require a table design mod to make the >queries simpler. The current design is a single table with ID, and >ParentID and whatever other info needed for the item. > >Thanks, Jim > > > > > > > > > > > > > >--- Unsubscribe at http://nyphp.org/list --- > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Wed Oct 16 14:47:13 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 14:47:13 -0400 Subject: [nycphp-talk] Building trees References: <200210161829.g9GITUWM016521@parsec.nyphp.org> Message-ID: <3DADB431.5000902@bizcomputinginc.com> Yeah, I think I would rather see subselects before I see tree building functionality. Subselects bring a wider basis of ease. Jim The RainMaker wrote: >Humph... > > > >>The only good news I have about this is that it is on the list of >>things that ought to be included at some point: >> >>http://www.mysql.com/doc/en/TODO_future.html >> >> > >Subselect have been on the TODO list for over five years... I wouldn't go >holding your breath. > >r > > > >--- Unsubscribe at http://nyphp.org/list --- > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Wed Oct 16 15:09:09 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 15:09:09 -0400 Subject: [nycphp-talk] Building trees References: <200210161810.g9GIAKWM016485@parsec.nyphp.org> Message-ID: <3DADB955.1030501@bizcomputinginc.com> I'm thinking now along the lines of adding a tierlevel field to my table design. In that way I can do 1 query for each tier. Like: // get top tier $oRS1 = mysql_query("SELECT ID, Name FROM Projects WHERE TierLevel = 1 ORDER BY Name") ; // get second tier $oRS2 = mysql_query("SELECT ParentID, ID, Name FROM Projects WHERE TierLevel = 2 ORDER BY ParentID, Name") ; // get third tier $oRS2 = mysql_query("SELECT ParentID, ID, Name FROM Projects WHERE TierLevel = 3 ORDER BY ParentID, Name") ; // get fourth tier $oRS2 = mysql_query("SELECT ParentID, ID, Name FROM Projects WHERE TierLevel = 4 ORDER BY ParentID, Name") ; Now as I iterate through $oRS1, display Name, I then look at $oRS2, if oRS2.ParentID == oRS1.ID, then dip down into iterating $oRS2 until the ParentID == something other than oRS1.ID. At each level the logic would be the same. This would require 1 query per level, and it would require choosing a maximum tree depth at design time. The code might even be simple enough to write through a recursive algorithm, although I have yet to attempt any recursing in PHP so I'm ignorant if this would be the easiest and cleanest way to do it. Figuring out the level at the time a Project is saved is simple since I have a parent ID, I can walk the tree backwards until I get a 0 ParentID ( 0 is not a legal ProjectID in my design ). The number of queries I had to do plus one would be the level of this new item. What think ye all? From fields at surgam.net Wed Oct 16 15:56:30 2002 From: fields at surgam.net (Adam Fields) Date: Wed, 16 Oct 2002 14:56:30 -0500 Subject: [nycphp-talk] Building trees In-Reply-To: <200210161909.g9GJ9HWM016607@parsec.nyphp.org> References: <200210161909.g9GJ9HWM016607@parsec.nyphp.org> Message-ID: <20021016195629.GG23049@eye.surgam.net> On Wed, Oct 16, 2002 at 03:09:17PM -0400, Jim Hendricks wrote: > I'm thinking now along the lines of adding a tierlevel field to my table > design. In that way I can do 1 query for each tier. Like: > > // get top tier > $oRS1 = mysql_query("SELECT ID, Name FROM Projects WHERE TierLevel = 1 > ORDER BY Name") ; > // get second tier > $oRS2 = mysql_query("SELECT ParentID, ID, Name FROM Projects WHERE > TierLevel = 2 ORDER BY ParentID, Name") ; > // get third tier > $oRS2 = mysql_query("SELECT ParentID, ID, Name FROM Projects WHERE > TierLevel = 3 ORDER BY ParentID, Name") ; > // get fourth tier > $oRS2 = mysql_query("SELECT ParentID, ID, Name FROM Projects WHERE > TierLevel = 4 ORDER BY ParentID, Name") ; > > Now as I iterate through $oRS1, display Name, I then look at $oRS2, if > oRS2.ParentID == oRS1.ID, then dip down into iterating $oRS2 until the > ParentID == something other than oRS1.ID. At each level the logic would > be the same. I'd wrap a class around the whole thing. Use that class to broker reads and writes to the tree table. Add a "changed" timestamp to the tree, and have a read from the class only reload the tree from the database if it's changed since the last read. Stash the object in the session for reuse, or serialize it to another table (or file, or whatever) for quick retrieval. > This would require 1 query per level, and it would require choosing a > maximum tree depth at design time. The code might even be simple enough > to write through a recursive algorithm, although I have yet to attempt > any recursing in PHP so I'm ignorant if this would be the easiest and > cleanest way to do it. > > Figuring out the level at the time a Project is saved is simple since I > have a parent ID, I can walk the tree backwards until I get a 0 ParentID > ( 0 is not a legal ProjectID in my design ). The number of queries I > had to do plus one would be the level of this new item. You don't even have to do that. You can just take the level of the parent node + 1. > What think ye all? -- - 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 sharpwit at hotmail.com Wed Oct 16 15:58:36 2002 From: sharpwit at hotmail.com ((kris)janis p gale) Date: Wed, 16 Oct 2002 15:58:36 -0400 Subject: [nycphp-talk] Building trees References: <200210161749.g9GHnGWM016431@parsec.nyphp.org> Message-ID: or, if you were really lazy, you could just have a self-referencing table... tblObjects: objectID parentID fname lname etc... where parentID is the objectID of this object's parent what's nice about this is, you could query just one table to find all siblings -- just search for equivalent parentID's. similarly, it's easy to find orphans and objects that came before all others -- where parentID = NULL. From jim at bizcomputinginc.com Wed Oct 16 16:02:49 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 16:02:49 -0400 Subject: [nycphp-talk] Building trees References: <200210161956.g9GJubWM016679@parsec.nyphp.org> Message-ID: <3DADC5E9.2040607@bizcomputinginc.com> >>Figuring out the level at the time a Project is saved is simple since I >>have a parent ID, I can walk the tree backwards until I get a 0 ParentID >>( 0 is not a legal ProjectID in my design ). The number of queries I >>had to do plus one would be the level of this new item. >> >> > >You don't even have to do that. You can just take the level of the >parent node + 1. > > Dooh... -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Wed Oct 16 16:16:28 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 16:16:28 -0400 Subject: [nycphp-talk] Building trees References: <200210162001.g9GK1sWM016693@parsec.nyphp.org> Message-ID: <3DADC91C.4010302@bizcomputinginc.com> That's what I'm doing now, but in order to build the whole tree requires multiple queries with this design. My latest idea is to add a tierlevel field so I won't have to issue a query for parentID = 0 ( top level ) then iterate this result & generate a query for parentID = the id of the row we are on in top level etc. right on down the line. If I have 4 top level projects each with 3 sub projects and 1 of the subprojects have 2 subprojects this would require issuing 1 toplevel query, 4 2nd level queries, 12 3rd level queries, and 2 4th level queries. All told for this simple tree I will have issued 19 queries. If I have a tierlevel I can issue 1 query per allowable tier which would be 4 queries in all for a max 4 tierdepth tree. This would be the same no matter how many items I have in the tree, nor how many children etc. janis p gale wrote: >or, if you were really lazy, >you could just have a self-referencing table... > >tblObjects: >objectID >parentID >fname >lname >etc... > >where parentID is the objectID of this object's parent > >what's nice about this is, you could query just one table >to find all siblings -- just search for equivalent parentID's. >similarly, it's easy to find orphans and objects that >came before all others -- where parentID = NULL. > > >--- Unsubscribe at http://nyphp.org/list --- > > > > > > > From jim at bizcomputinginc.com Wed Oct 16 16:22:03 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 16:22:03 -0400 Subject: [nycphp-talk] Building trees References: <200210161956.g9GJubWM016679@parsec.nyphp.org> Message-ID: <3DADCA6B.1070209@bizcomputinginc.com> Adam Fields wrote: >I'd wrap a class around the whole thing. Use that class to broker >reads and writes to the tree table. Add a "changed" timestamp to the >tree, and have a read from the class only reload the tree from the >database if it's changed since the last read. Stash the object in the >session for reuse, or serialize it to another table (or file, or >whatever) for quick retrieval. > > I don't know about the class thing since it adds a level of complexity to the code that I don't know if it's waranted. I do like the idea of caching the tree though. I would cache it in the DB so that the tree does not need to be generated at all when the request to display it occurs. The tree would be regenerated everytime a change occurs to the underlying data ( which is a low volume data set ) This may not be a good idea for items that have a higher change velocity. Jim From nygini at yahoo.com Wed Oct 16 16:34:43 2002 From: nygini at yahoo.com (elvire dardier) Date: Wed, 16 Oct 2002 13:34:43 -0700 (PDT) Subject: [nycphp-talk] Re: Graphics with php In-Reply-To: <200210161735.g9GHZuWM016403@parsec.nyphp.org> Message-ID: <20021016203443.29364.qmail@web14702.mail.yahoo.com> Hi Hans, Yes, it is the only error that we get in our little script im.php: "Fatal error: Call to undefined function: imagepng() in im.php on line 9 We tried using getimagesize() and some other gd_functions and they were found by php. I do not exaclty understand what you mean by enabling PNG? We specified PNG directory with the option "--with" when configuring php. What constants should be defined? Thank you again, Genevieve. > > I haven't used GD in a while (last compile I did > with it was when the > libs were still seperate) but I think modern PHP > versions come with a > bundled version, which is certainly recommended. > > > ..When > > running a small test script, it tells me that it > does > > not find imagepng() for instance ( I am on > > sun/solaris). > > Hmm... Are you sure the script is running with the > PHP binary/module > you think it is? Is that the only error it gives? > If it couldn't find > the GD libs properly, you should get a different > error (if it would > even compile at all). But this error seems like PHP > doesn't even know > this module is available. Is PNG specifically > enabled? Do any of the > image functions work > (getimagesize(),exif_imagetype())? Are the > constants defined? Did you compile it as a dynamic > module? Did you > load it with dl() if so? > > > > > ===== > Hans Zaunere > New York PHP > http://nyphp.org > hans at nyphp.org > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > > --- Unsubscribe at http://nyphp.org/list --- > > __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From fields at surgam.net Wed Oct 16 16:40:26 2002 From: fields at surgam.net (Adam Fields) Date: Wed, 16 Oct 2002 15:40:26 -0500 Subject: [nycphp-talk] Building trees In-Reply-To: <200210162016.g9GKGaWM016725@parsec.nyphp.org> References: <200210162016.g9GKGaWM016725@parsec.nyphp.org> Message-ID: <20021016204025.GJ23049@eye.surgam.net> On Wed, Oct 16, 2002 at 04:16:36PM -0400, Jim Hendricks wrote: > That's what I'm doing now, but in order to build the whole tree requires > multiple queries with this design. My latest idea is to add a tierlevel > field so I won't have to issue a query for parentID = 0 ( top level ) > then iterate this result & generate a query for parentID = the id of the > row we are on in top level etc. right on down the line. If I have 4 top > level projects each with 3 sub projects and 1 of the subprojects have 2 > subprojects this would require issuing 1 toplevel query, 4 2nd level > queries, 12 3rd level queries, and 2 4th level queries. All told for > this simple tree I will have issued 19 queries. If I have a tierlevel > I can issue 1 query per allowable tier which would be 4 queries in all > for a max 4 tierdepth tree. This would be the same no matter how many > items I have in the tree, nor how many children etc. You can do this without the tierlevel by building dynamic queries of the form: (sorry, I forgot your table/column names) # get the top list first select node_id, name from tree where parent_id = 0; # get the results and build list x,y,z of those nodes # then query for the nodes which have those nodes as parents select node_id, parent_id, name from tree where parent_id in (x,y,z); # and so forth. -- - 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 sailer at bnl.gov Wed Oct 16 16:45:46 2002 From: sailer at bnl.gov (Tim Sailer) Date: Wed, 16 Oct 2002 16:45:46 -0400 Subject: [nycphp-talk] Building trees In-Reply-To: <200210162016.g9GKGaWM016725@parsec.nyphp.org> References: <200210162016.g9GKGaWM016725@parsec.nyphp.org> Message-ID: <20021016204546.GA23019@bnl.gov> On Wed, Oct 16, 2002 at 04:16:36PM -0400, Jim Hendricks wrote: > That's what I'm doing now, but in order to build the whole tree requires > multiple queries with this design. My latest idea is to add a tierlevel > field so I won't have to issue a query for parentID = 0 ( top level ) > then iterate this result & generate a query for parentID = the id of the > row we are on in top level etc. right on down the line. If I have 4 top > level projects each with 3 sub projects and 1 of the subprojects have 2 > subprojects this would require issuing 1 toplevel query, 4 2nd level > queries, 12 3rd level queries, and 2 4th level queries. All told for > this simple tree I will have issued 19 queries. If I have a tierlevel Those of you (if any) from a manufacturing background will see this as the way a Bill of Materials (BOM) is built for a product. A product is built from subassemblies, which are built from either other subs or individual components (greatly simplified). This is a tried and tested way of building trees. Tim -- Tim Sailer Application Services Information Technology Division Brookhaven National Laboratory (631) 344-3001 From fields at surgam.net Wed Oct 16 16:53:31 2002 From: fields at surgam.net (Adam Fields) Date: Wed, 16 Oct 2002 15:53:31 -0500 Subject: [nycphp-talk] Building trees In-Reply-To: <200210162022.g9GKMBWM016746@parsec.nyphp.org> References: <200210162022.g9GKMBWM016746@parsec.nyphp.org> Message-ID: <20021016205331.GK23049@eye.surgam.net> On Wed, Oct 16, 2002 at 04:22:11PM -0400, Jim Hendricks wrote: > Adam Fields wrote: > > >I'd wrap a class around the whole thing. Use that class to broker > >reads and writes to the tree table. Add a "changed" timestamp to the > >tree, and have a read from the class only reload the tree from the > >database if it's changed since the last read. Stash the object in the > >session for reuse, or serialize it to another table (or file, or > >whatever) for quick retrieval. > > > > > I don't know about the class thing since it adds a level of complexity > to the code that I don't know > if it's waranted. I would argue that this will actually make the majority of your code simpler, because you're encapsulating the complexity. :) I'm the first to admit that classes aren't appropriate for everything, but they're the right approach for this kind of stuff. I'd do something like this: class tree { var nodemap; # and whatever else you want function tree () { # maybe some init code } function get_tree () { # check if tree has changed or isn't populated yet # if yes to either, get tree from db # otherwise, maybe get tree from intermediate storage if you're doing that } function save_tree () { # write tree to db } function store_tree () { # write tree to intermediate storage } function render_tree () { # if tree isn't populated, get tree # output tree html or tree values or whatever } function get_tree_values () { # return raw node data for the tree } } Then, in your page: $mytree = new tree(); $mytree->render_tree(); or $mytree->get_tree_values(); > I do like the idea of caching the tree though. I > would cache it in the DB so that the > tree does not need to be generated at all when the request to display it > occurs. The tree would > be regenerated everytime a change occurs to the underlying data ( which > is a low volume data set ) > This may not be a good idea for items that have a higher change velocity. While I wouldn't advocate this approach for something that changes once a minute or so, if it changes less than once an hour, this will probably still result in a performance gain, and it will be easier to maintain. -- - 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 zaunere at yahoo.com Wed Oct 16 17:13:53 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 16 Oct 2002 14:13:53 -0700 (PDT) Subject: [nycphp-talk] Building trees In-Reply-To: <200210161712.g9GHCNWM016368@parsec.nyphp.org> Message-ID: <20021016211353.63128.qmail@web12806.mail.yahoo.com> --- Jim Hendricks wrote: > I know this is a SQL question, but since most apps deal with SQL, I > figured I'ld ask here since the app is using PHP and MySQL. > > I have a table that establishes an entity that may have a parent from > the same table. I would like to display the data in a tree format > where all items with a ParentID of 0 ( no parent ) are listed with > children indented under the parent. As pointed out Oracle has this with the CONNECT TO method. Alas, this is one of the biggest misses in MySQL (IMO). > The nesting can be infinite, but realistically will only be 2 or 3 > levels deep. I can see how to do this through a whole series of > queries, but can see how the performance of such a design could be > very poor if there is a lot of items. Sure, multiple queries would do it, and depending on the environment may be the best way. I've had to tackle similar problems, and found that a single dynamically generated SQL query is often best. If you form the joins properly (LEFT JOIN table ON something=somethingelse) you can match much of this functionality (I even use it for subselects, and have only ran into a wall once). In a for loop, bascially just join the table to itself (or to another for that matter) with an incrementing aliased name and then set the criteria at each level in the WHERE clause. This is all Oracle's CONNECT TO is doing behind the scenes - you can even maintain a counter so you know how far each row is "indented." Here's some code totally ripped from context that probably won't help at all: for( $i = 1; $i < count($keys); ++$i) { $tag = mysql_escape_string($keys[$i]); $select .= ",m$i.mid,m$i.R_mid,m$i.file,m$i.tag,m$i.title"; $from .= " LEFT JOIN psite.map m$i ON m$i.R_mid=m".($i-1).".mid"; $where .= " AND m$i.tag='$tag'"; } $result = mysql_query("SELECT $select FROM $from WHERE $where", $DB); H ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From jim at bizcomputinginc.com Wed Oct 16 17:32:45 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 17:32:45 -0400 Subject: [nycphp-talk] Building trees References: <200210162040.g9GKeYWM016793@parsec.nyphp.org> Message-ID: <3DADDAFD.2090401@bizcomputinginc.com> True, but then I would have to parse the result sets twice each, once to get the id's for the next level, the second time to build the output display. Adam Fields wrote: >On Wed, Oct 16, 2002 at 04:16:36PM -0400, Jim Hendricks wrote: > > >>That's what I'm doing now, but in order to build the whole tree requires >>multiple queries with this design. My latest idea is to add a tierlevel >>field so I won't have to issue a query for parentID = 0 ( top level ) >>then iterate this result & generate a query for parentID = the id of the >>row we are on in top level etc. right on down the line. If I have 4 top >>level projects each with 3 sub projects and 1 of the subprojects have 2 >>subprojects this would require issuing 1 toplevel query, 4 2nd level >>queries, 12 3rd level queries, and 2 4th level queries. All told for >>this simple tree I will have issued 19 queries. If I have a tierlevel >> I can issue 1 query per allowable tier which would be 4 queries in all >>for a max 4 tierdepth tree. This would be the same no matter how many >>items I have in the tree, nor how many children etc. >> >> > >You can do this without the tierlevel by building dynamic queries of >the form: > >(sorry, I forgot your table/column names) > ># get the top list first > >select node_id, name from tree where parent_id = 0; > ># get the results and build list x,y,z of those nodes ># then query for the nodes which have those nodes as parents > >select node_id, parent_id, name from tree where parent_id in (x,y,z); > ># and so forth. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Wed Oct 16 17:37:46 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 17:37:46 -0400 Subject: [nycphp-talk] Building trees References: <200210162046.g9GKkrWM016804@parsec.nyphp.org> Message-ID: <3DADDC2A.2010908@bizcomputinginc.com> Yes, I've worked with manufacturing apps, more from the repair parts/refurb/warranty repair side. The database we were working with back then wasn't SQL though it was relational. This allowed for some interesting permutations you can't do in SQL for trees. Jim Tim Sailer wrote: >On Wed, Oct 16, 2002 at 04:16:36PM -0400, Jim Hendricks wrote: > > >>That's what I'm doing now, but in order to build the whole tree requires >>multiple queries with this design. My latest idea is to add a tierlevel >>field so I won't have to issue a query for parentID = 0 ( top level ) >>then iterate this result & generate a query for parentID = the id of the >>row we are on in top level etc. right on down the line. If I have 4 top >>level projects each with 3 sub projects and 1 of the subprojects have 2 >>subprojects this would require issuing 1 toplevel query, 4 2nd level >>queries, 12 3rd level queries, and 2 4th level queries. All told for >>this simple tree I will have issued 19 queries. If I have a tierlevel >> >> > >Those of you (if any) from a manufacturing background will see this as >the way a Bill of Materials (BOM) is built for a product. A product is >built from subassemblies, which are built from either other subs or >individual components (greatly simplified). This is a tried and tested >way of building trees. > >Tim > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Wed Oct 16 17:40:45 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 17:40:45 -0400 Subject: [nycphp-talk] Building trees References: <200210162053.g9GKrdWM016819@parsec.nyphp.org> Message-ID: <3DADDCDD.9010802@bizcomputinginc.com> The other reason for avoiding this is my Host Provider would croak if I build too much in memory thus hogging the memory shared across many sites. I avoid as much memory use as I can so when I really need it it's available. Jim Adam Fields wrote: >On Wed, Oct 16, 2002 at 04:22:11PM -0400, Jim Hendricks wrote: > > >>Adam Fields wrote: >> >> >> >>>I'd wrap a class around the whole thing. Use that class to broker >>>reads and writes to the tree table. Add a "changed" timestamp to the >>>tree, and have a read from the class only reload the tree from the >>>database if it's changed since the last read. Stash the object in the >>>session for reuse, or serialize it to another table (or file, or >>>whatever) for quick retrieval. >>> >>> >>> >>> >>I don't know about the class thing since it adds a level of complexity >>to the code that I don't know >>if it's waranted. >> >> > >I would argue that this will actually make the majority of your code >simpler, because you're encapsulating the complexity. :) > >I'm the first to admit that classes aren't appropriate for everything, >but they're the right approach for this kind of stuff. > >I'd do something like this: > >class tree { > var nodemap; > # and whatever else you want > > function tree () { > # maybe some init code > } > > function get_tree () { > # check if tree has changed or isn't populated yet > # if yes to either, get tree from db > # otherwise, maybe get tree from intermediate storage if you're > doing that > > } > > function save_tree () { > # write tree to db > } > > function store_tree () { > # write tree to intermediate storage > } > > function render_tree () { > # if tree isn't populated, get tree > # output tree html or tree values or whatever > } > > function get_tree_values () { > # return raw node data for the tree > } >} > >Then, in your page: > >$mytree = new tree(); >$mytree->render_tree(); >or >$mytree->get_tree_values(); > > > >>I do like the idea of caching the tree though. I >>would cache it in the DB so that the >>tree does not need to be generated at all when the request to display it >>occurs. The tree would >>be regenerated everytime a change occurs to the underlying data ( which >>is a low volume data set ) >>This may not be a good idea for items that have a higher change velocity. >> >> > >While I wouldn't advocate this approach for something that changes >once a minute or so, if it changes less than once an hour, this will >probably still result in a performance gain, and it will be easier to >maintain. > > > From zaunere at yahoo.com Wed Oct 16 17:59:13 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 16 Oct 2002 14:59:13 -0700 (PDT) Subject: [nycphp-talk] Re: Graphics with php In-Reply-To: <200210162034.g9GKYmWM016773@parsec.nyphp.org> Message-ID: <20021016215913.57200.qmail@web12807.mail.yahoo.com> --- elvire dardier wrote: > Hi Hans, > Yes, it is the only error that we get in our little > script im.php: > > "Fatal error: Call to undefined function: imagepng() > in im.php on line 9 > > We tried using getimagesize() and some other > gd_functions and they were found by php. Well that's a good sign at least. > I do not exaclty understand what you mean by enabling > PNG? We specified PNG directory with the option > "--with" when configuring php. --with-gd=/path/to/gd and --with-png-dir=/path/to/png (again, I haven't done this in ages, at may be dated info). Do other image formats/more intensive functions work? imagejpeg, imageline, imagegd? > What constants should be defined? IMG_PNG, IMAGETYPE_PNG, etc http://www.php.net/manual/en/ref.image.php Also, are things linked properly? I'm not sure off the cuff how Solaris does all this, but ldconfig/nm/objdump/ar runs on libphp4.so or php the binary might show something. ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From fields at surgam.net Wed Oct 16 18:05:59 2002 From: fields at surgam.net (Adam Fields) Date: Wed, 16 Oct 2002 17:05:59 -0500 Subject: [nycphp-talk] Building trees In-Reply-To: <200210162140.g9GLerWM016923@parsec.nyphp.org> References: <200210162140.g9GLerWM016923@parsec.nyphp.org> Message-ID: <20021016220558.GL23049@eye.surgam.net> On Wed, Oct 16, 2002 at 05:40:53PM -0400, Jim Hendricks wrote: > The other reason for avoiding this is my Host Provider would croak if I > build too much in memory thus hogging the memory shared across many > sites. I avoid as much memory use as I can so when I really need it > it's available. Seems reasonable. I don't know how much memory overhead the class implementation adds. I wouldn't think too much. Anyone? Even session variables aren't stored in memory though - they're written out to temp space on disk (at least, that's how I read the docs). > Adam Fields wrote: > > >On Wed, Oct 16, 2002 at 04:22:11PM -0400, Jim Hendricks wrote: > > > > > >>Adam Fields wrote: > >> > >> > >> > >>>I'd wrap a class around the whole thing. Use that class to broker > >>>reads and writes to the tree table. Add a "changed" timestamp to the > >>>tree, and have a read from the class only reload the tree from the > >>>database if it's changed since the last read. Stash the object in the > >>>session for reuse, or serialize it to another table (or file, or > >>>whatever) for quick retrieval. > >>> > >>> > >>> > >>> > >>I don't know about the class thing since it adds a level of complexity > >>to the code that I don't know > >>if it's waranted. > >> > >> > > > >I would argue that this will actually make the majority of your code > >simpler, because you're encapsulating the complexity. :) > > > >I'm the first to admit that classes aren't appropriate for everything, > >but they're the right approach for this kind of stuff. > > > >I'd do something like this: > > > >class tree { > > var nodemap; > > # and whatever else you want > > > > function tree () { > > # maybe some init code > > } > > > > function get_tree () { > > # check if tree has changed or isn't populated yet > > # if yes to either, get tree from db > > # otherwise, maybe get tree from intermediate storage if you're > > doing that > > > > } > > > > function save_tree () { > > # write tree to db > > } > > > > function store_tree () { > > # write tree to intermediate storage > > } > > > > function render_tree () { > > # if tree isn't populated, get tree > > # output tree html or tree values or whatever > > } > > > > function get_tree_values () { > > # return raw node data for the tree > > } > >} > > > >Then, in your page: > > > >$mytree = new tree(); > >$mytree->render_tree(); > >or > >$mytree->get_tree_values(); > > > > > > > >>I do like the idea of caching the tree though. I > >>would cache it in the DB so that the > >>tree does not need to be generated at all when the request to display it > >>occurs. The tree would > >>be regenerated everytime a change occurs to the underlying data ( which > >>is a low volume data set ) > >>This may not be a good idea for items that have a higher change velocity. > >> > >> > > > >While I wouldn't advocate this approach for something that changes > >once a minute or so, if it changes less than once an hour, this will > >probably still result in a performance gain, and it will be easier to > >maintain. > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > -- - 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 max at idsociety.com Wed Oct 16 18:39:24 2002 From: max at idsociety.com (max goldberg) Date: Wed, 16 Oct 2002 18:39:24 -0400 Subject: [nycphp-talk] Building trees References: <200210161712.g9GHCNWM016368@parsec.nyphp.org> Message-ID: <3DADEA9C.7080707@idsociety.com> I wrote something similar to what you are describing for a personal project a while back. On the SQL side it's a pretty simple layout, every record has a parent id, and from that I can figure out all the children by making a quick and dirty index before hand. Check out (sorry if the url offends) http://www.fuck.org/~max/traverse.phps for the example and http://www.fuck.org/~max/traverse.php for the output. Sorry if the code is a bit dirty, it's kind of old. =) -Max Jim Hendricks wrote: > I know this is a SQL question, but since most apps deal with SQL, I > figured I'ld ask here since the app is using PHP and MySQL. > > I have a table that establishes an entity that may have a parent from > the same table. I would like to display the data in a tree format where > all items with a ParentID of 0 ( no parent ) are listed with children > indented under the parent. The nesting can be infinite, but > realistically will only be 2 or 3 levels deep. I can see how to do this > through a whole series of queries, but can see how the performance of > such a design could be very poor if there is a lot of items. Looking > for any ideas, even if they would require a table design mod to make the > queries simpler. The current design is a single table with ID, and > ParentID and whatever other info needed for the item. > > Thanks, Jim > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From jim at bizcomputinginc.com Wed Oct 16 19:25:58 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 19:25:58 -0400 Subject: [nycphp-talk] Building trees References: <200210162241.g9GMf3WM017170@parsec.nyphp.org> Message-ID: <3DADF586.1000301@bizcomputinginc.com> This looks to be a simple answer, question is how much memory does it consume when dealing with larger amounts of data. By being able to draw the list directly from the result sets, the only memory you are consuming is the result set cache's which should not be the whole resultset, and the memory for caching the resulting page. With this solution you have all the results held in memory twice, once for manipulation, the second for the display cache. The other thing is for my use, the manipulation would also need to include a sort so that your data would display as: Servers [ID 7] - Development [ID 8] - - Home Directories [ID 11] - Live [ID 10] - Staging [ID 9] Websites [ID 1] - mySQL.com [ID 3] - PHP.net [ID 2] - - Manual [ID 4] - - - Comments [ID 6] - - - Functions [ID 5] I'll have to look at this further, see if it might be the solution, or part of it. Thanks. max goldberg wrote: >I wrote something similar to what you are describing for a personal >project a while back. On the SQL side it's a pretty simple layout, >every record has a parent id, and from that I can figure out all the >children by making a quick and dirty index before hand. > >Check out (sorry if the url offends) >http://www.fuck.org/~max/traverse.phps for the example >and http://www.fuck.org/~max/traverse.php for the output. > >Sorry if the code is a bit dirty, it's kind of old. =) > >-Max > >Jim Hendricks wrote: > > >>I know this is a SQL question, but since most apps deal with SQL, I >>figured I'ld ask here since the app is using PHP and MySQL. >> >>I have a table that establishes an entity that may have a parent from >>the same table. I would like to display the data in a tree format where >>all items with a ParentID of 0 ( no parent ) are listed with children >>indented under the parent. The nesting can be infinite, but >>realistically will only be 2 or 3 levels deep. I can see how to do this >>through a whole series of queries, but can see how the performance of >>such a design could be very poor if there is a lot of items. Looking >>for any ideas, even if they would require a table design mod to make the >>queries simpler. The current design is a single table with ID, and >>ParentID and whatever other info needed for the item. >> >>Thanks, Jim >> >> >> >> >> >> >> >> >> >> >> > > > >--- Unsubscribe at http://nyphp.org/list --- > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Wed Oct 16 19:37:50 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 19:37:50 -0400 Subject: [nycphp-talk] Building trees References: <200210162206.g9GM67WM017117@parsec.nyphp.org> Message-ID: <3DADF84E.5000306@bizcomputinginc.com> Agreed that session variables aren't stored in memory between pages, but they are fully in memory for the life of every page while the session variable exists. And as a session variable, the space would be consumed for each page currently being processed, so for 5 active connections, you would have 5 copies in memory. I've seen discussion of a static memory area that can be used to simulate application scoped variables, but from what I've seen so far, that solution doesn't seem ready for primetime. By storing the tree in a table, I eliminate the memory requirments, It would only be in memory when I need to display the tree & will build the display. The table version of the tree would also be very simple since I don't need any linking information, just a key field to ensure the proper sortation, and depth indicator so I know how far to indent or what graphics to display etc. Lastly, from a memory standpoint, I have been burned too many times by knowing I work within a constrained environment but then design with false assumptions. Here the assumption is that the memory for the class is not that much and that the total size of the tree will not be that great. The first assumption could be answered by the php team, or someone else familure with the php memory model and therefore would no longer be an assumption. The second assumption cannot be answered without putting a limit on the number of total items to be handled. Putting a limit then creates the next assumption and that is choosing a limit everyone can live with for the life of the app ( with the assumption as to how long that life is ). All these assumptions scare the crap out of me as a professional software developer because Mr. Murphy will screw me in the end. Please don't take this as a flame, I think you have a great idea, just not an idea I think will fit in with what I am comfortable with. Jim Adam Fields wrote: >On Wed, Oct 16, 2002 at 05:40:53PM -0400, Jim Hendricks wrote: > > >>The other reason for avoiding this is my Host Provider would croak if I >>build too much in memory thus hogging the memory shared across many >>sites. I avoid as much memory use as I can so when I really need it >>it's available. >> >> > >Seems reasonable. I don't know how much memory overhead the class >implementation adds. I wouldn't think too much. Anyone? > >Even session variables aren't stored in memory though - they're >written out to temp space on disk (at least, that's how I read the >docs). > > > >>Adam Fields wrote: >> >> >> >>>On Wed, Oct 16, 2002 at 04:22:11PM -0400, Jim Hendricks wrote: >>> >>> >>> >>> >>>>Adam Fields wrote: >>>> >>>> >>>> >>>> >>>> >>>>>I'd wrap a class around the whole thing. Use that class to broker >>>>>reads and writes to the tree table. Add a "changed" timestamp to the >>>>>tree, and have a read from the class only reload the tree from the >>>>>database if it's changed since the last read. Stash the object in the >>>>>session for reuse, or serialize it to another table (or file, or >>>>>whatever) for quick retrieval. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>I don't know about the class thing since it adds a level of complexity >>>>to the code that I don't know >>>>if it's waranted. >>>> >>>> >>>> >>>> >>>I would argue that this will actually make the majority of your code >>>simpler, because you're encapsulating the complexity. :) >>> >>>I'm the first to admit that classes aren't appropriate for everything, >>>but they're the right approach for this kind of stuff. >>> >>>I'd do something like this: >>> >>>class tree { >>> var nodemap; >>> # and whatever else you want >>> >>> function tree () { >>> # maybe some init code >>> } >>> >>> function get_tree () { >>> # check if tree has changed or isn't populated yet >>> # if yes to either, get tree from db >>> # otherwise, maybe get tree from intermediate storage if you're >>> doing that >>> >>> } >>> >>> function save_tree () { >>> # write tree to db >>> } >>> >>> function store_tree () { >>> # write tree to intermediate storage >>> } >>> >>> function render_tree () { >>> # if tree isn't populated, get tree >>> # output tree html or tree values or whatever >>> } >>> >>> function get_tree_values () { >>> # return raw node data for the tree >>> } >>>} >>> >>>Then, in your page: >>> >>>$mytree = new tree(); >>>$mytree->render_tree(); >>>or >>>$mytree->get_tree_values(); >>> >>> >>> >>> >>> >>>>I do like the idea of caching the tree though. I >>>>would cache it in the DB so that the >>>>tree does not need to be generated at all when the request to display it >>>>occurs. The tree would >>>>be regenerated everytime a change occurs to the underlying data ( which >>>>is a low volume data set ) >>>>This may not be a good idea for items that have a higher change velocity. >>>> >>>> >>>> >>>> >>>While I wouldn't advocate this approach for something that changes >>>once a minute or so, if it changes less than once an hour, this will >>>probably still result in a performance gain, and it will be easier to >>>maintain. >>> >>> >>> >>> >>> >> >> >> >> >> >> >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at bizcomputinginc.com Wed Oct 16 19:45:32 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 19:45:32 -0400 Subject: [nycphp-talk] Building trees References: <200210162113.g9GLDwWM016870@parsec.nyphp.org> Message-ID: <3DADFA1C.4050101@bizcomputinginc.com> > > >Sure, multiple queries would do it, and depending on the environment >may be the best way. I've had to tackle similar problems, and found >that a single dynamically generated SQL query is often best. If you >form the joins properly (LEFT JOIN table ON something=somethingelse) >you can match much of this functionality (I even use it for subselects, >and have only ran into a wall once). > >In a for loop, bascially just join the table to itself (or to another >for that matter) with an incrementing aliased name and then set the >criteria at each level in the WHERE clause. This is all Oracle's >CONNECT TO is doing behind the scenes - you can even maintain a counter >so you know how far each row is "indented." > >Here's some code totally ripped from context that probably won't help >at all: > >for( $i = 1; $i < count($keys); ++$i) { > $tag = mysql_escape_string($keys[$i]); > $select .= ",m$i.mid,m$i.R_mid,m$i.file,m$i.tag,m$i.title"; > $from .= " LEFT JOIN psite.map m$i ON m$i.R_mid=m".($i-1).".mid"; > $where .= " AND m$i.tag='$tag'"; >} > >$result = mysql_query("SELECT $select FROM $from WHERE $where", $DB); > > I wouldn't say it's useless ( at least not yet ;-) ) I just don't have the mental capacity left after a day banging on my keyboard, I'll have to look at this with a fresh brain ( how do you get one of those anyway? ) My initial knee-jerk response is how do I get what I want through JOINS? That may allow me to connect records together, but in my case I'm looking to order the data in a strange ( at least to SQL )way. Unless you are looking to create a derived record which contains a string encapsulating the whole branch. If that's the case, then I question what the performance would be to parse the results into a displayable format. Jim From fields at surgam.net Wed Oct 16 19:48:34 2002 From: fields at surgam.net (Adam Fields) Date: Wed, 16 Oct 2002 18:48:34 -0500 Subject: [nycphp-talk] Building trees In-Reply-To: <200210162241.g9GMf3WM017170@parsec.nyphp.org> References: <200210162241.g9GMf3WM017170@parsec.nyphp.org> Message-ID: <20021016234834.GB22881@eye.surgam.net> On Wed, Oct 16, 2002 at 06:41:03PM -0400, max goldberg wrote: > I wrote something similar to what you are describing for a personal > project a while back. On the SQL side it's a pretty simple layout, > every record has a parent id, and from that I can figure out all the > children by making a quick and dirty index before hand. > > Check out (sorry if the url offends) > http://www.fuck.org/~max/traverse.phps for the example > and http://www.fuck.org/~max/traverse.php for the output. > > Sorry if the code is a bit dirty, it's kind of old. =) What did you use to generate the source listing? -- - 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 jim at bizcomputinginc.com Wed Oct 16 19:52:11 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 19:52:11 -0400 Subject: [nycphp-talk] Building trees References: <200210162053.g9GKrdWM016819@parsec.nyphp.org> Message-ID: <3DADFBAB.2000900@bizcomputinginc.com> > > >>I don't know about the class thing since it adds a level of complexity >>to the code that I don't know >>if it's waranted. >> >> > >I would argue that this will actually make the majority of your code >simpler, because you're encapsulating the complexity. :) > >I'm the first to admit that classes aren't appropriate for everything, >but they're the right approach for this kind of stuff. > > Yeah, your right. Sometimes though encapsulation can be a bad thing though when it hides too much and you have to pull your hair out later trying to figure out what the heck you did. There's still too much procedural coding in my blood that avoids OOP unless I have to ( as is the case with Java ). In the case of Java and C++, I preceive that the performance of the VM/runtime would be better if you were to drop the OOP and just go with good old procedural code. Granted procedural code can be messy, but an experienced coder should be able to write modular proc code to rival OOP. Just my own old fart ( 19 years in the business I guess qualifies for old fartism in the IT world even though I'm only 37 ) biased opinion probably not worth admitting! Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: From mjdewitt at alexcommgrp.com Wed Oct 16 19:58:54 2002 From: mjdewitt at alexcommgrp.com (DeWitt, Michael) Date: Wed, 16 Oct 2002 19:58:54 -0400 Subject: [nycphp-talk] Seeking recommendations for resources on LAMP be st practices Message-ID: Thanks Tim for the insight. I can see that this is going to take some re-architecting of my sites. Perhaps there is a php library around which does the database abstraction along with checking for redundent databases in case of primary failure. I will look around and see what I can find and post back to the group if anyone is interested. Mike Tim said: On Tue, Oct 15, 2002 at 11:17:00AM -0400, DeWitt, Michael wrote: > 3. what is the best way to setup and maintain a backup "hot" > apache/mysql server? > > Can this be practically done with standard linux installs and the > capabilites of the OS and server daemons? The way I do this is first, get two web servers running, configured identical. Keeping them that way can be a chore, but that's another question. Use rsync between them to keep your content current. One hole this leaves is log files, which, to e-commerce sites, may be more important than content, so I'd look at mysql logging from apache, os that ilk. Mysql is simple. You can set up 2 replicated servers, but the best way is to have 3 servers, with the master being where all the writes are going, and replicated to the slaves, where the reads are done. Now, in your database code, when you try to attach to your primary slave server, if that fails, simply try to attach to your 'hot spare' server. I know this is Perl and LDAP, but it will work the same way in PHP/Mysql. I just happen to have this code open in my editor: $ldap=Net::LDAP->new('ldapA.bnl.gov') or $ldap=Net::LDAP->new('ldapB.bnl.gov') or $ldap=Net::LDAP->new('ldapC.bnl.gov') or die "$@"; This way, one call should almost always yield a database connection. Tim -- Tim Sailer Application Services Information Technology Division Brookhaven National Laboratory (631) 344-3001 --- Unsubscribe at http://nyphp.org/list --- From max at idsociety.com Wed Oct 16 20:40:04 2002 From: max at idsociety.com (max at idsociety.com) Date: Wed, 16 Oct 2002 20:40:04 -0400 (EDT) Subject: [nycphp-talk] Building trees In-Reply-To: <200210162348.g9GNmpWM017260@parsec.nyphp.org> References: <200210162348.g9GNmpWM017260@parsec.nyphp.org> Message-ID: <1765.68.36.91.141.1034815204.squirrel@webmail.idsociety.com> Added the line: AddType application/x-httpd-php-source .phps in my apache conf. it's built into php. > On Wed, Oct 16, 2002 at 06:41:03PM -0400, max goldberg wrote: >> I wrote something similar to what you are describing for a personal >> project a while back. On the SQL side it's a pretty simple layout, >> every record has a parent id, and from that I can figure out all the >> children by making a quick and dirty index before hand. >> >> Check out (sorry if the url offends) >> http://www.fuck.org/~max/traverse.phps for the example >> and http://www.fuck.org/~max/traverse.php for the output. >> >> Sorry if the code is a bit dirty, it's kind of old. =) > > What did you use to generate the source listing? > > -- > - 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 > > > --- Unsubscribe at http://nyphp.org/list --- From max at idsociety.com Wed Oct 16 20:52:15 2002 From: max at idsociety.com (max at idsociety.com) Date: Wed, 16 Oct 2002 20:52:15 -0400 (EDT) Subject: [nycphp-talk] Building trees In-Reply-To: <200210162326.g9GNQ8WM017219@parsec.nyphp.org> References: <200210162326.g9GNQ8WM017219@parsec.nyphp.org> Message-ID: <1817.68.36.91.141.1034815935.squirrel@webmail.idsociety.com> I updated the code/source to show a small fix I made which basically allows you to add a SQL restraint for ordering. So by adding ORDER BY name ASC it will return the results you said below. How much data are you talking about? If memory is that big of an issue you may look into caching the results of your script and only update it when changes are made. -Max > This looks to be a simple answer, question is how much memory does it > consume when dealing with larger amounts of data. By being able to > draw the list directly from the result sets, the only memory you are > consuming is the result set cache's which should not be the whole > resultset, and the memory for caching the resulting page. With this > solution you have all the results held in memory twice, once for > manipulation, the second for the display cache. > > The other thing is for my use, the manipulation would also need to > include a sort so that your data would display as: > > Servers [ID 7] > - Development [ID 8] > - - Home Directories [ID 11] > - Live [ID 10] > - Staging [ID 9] > Websites [ID 1] > - mySQL.com [ID 3] > - PHP.net [ID 2] > - - Manual [ID 4] > - - - Comments [ID 6] > - - - Functions [ID 5] > > I'll have to look at this further, see if it might be the solution, or > part of it. Thanks. > > > > max goldberg wrote: > >>I wrote something similar to what you are describing for a personal >>project a while back. On the SQL side it's a pretty simple layout, >>every record has a parent id, and from that I can figure out all the >>children by making a quick and dirty index before hand. >> >>Check out (sorry if the url offends) >>http://www.fuck.org/~max/traverse.phps for the example >>and http://www.fuck.org/~max/traverse.php for the output. >> >>Sorry if the code is a bit dirty, it's kind of old. =) >> >>-Max >> >>Jim Hendricks wrote: >> >> >>>I know this is a SQL question, but since most apps deal with SQL, I >>>figured I'ld ask here since the app is using PHP and MySQL. >>> >>>I have a table that establishes an entity that may have a parent from >>>the same table. I would like to display the data in a tree format >>>where all items with a ParentID of 0 ( no parent ) are listed with >>>children indented under the parent. The nesting can be infinite, but >>> >>>realistically will only be 2 or 3 levels deep. I can see how to do >>>this through a whole series of queries, but can see how the >>>performance of such a design could be very poor if there is a lot of >>>items. Looking for any ideas, even if they would require a table >>>design mod to make the queries simpler. The current design is a >>>single table with ID, and ParentID and whatever other info needed for >>>the item. >>> >>>Thanks, Jim >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >> >> >> >> >> >> >> >> >> >> >> > > > > --- Unsubscribe at http://nyphp.org/list --- From jim at bizcomputinginc.com Wed Oct 16 22:09:26 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Wed, 16 Oct 2002 22:09:26 -0400 Subject: [nycphp-talk] Building trees References: <200210162040.g9GKeYWM016793@parsec.nyphp.org> Message-ID: <3DAE1BD6.7070503@bizcomputinginc.com> > > >You can do this without the tierlevel by building dynamic queries of >the form: > Would the resultant SQL perform as well as a straight "SELECT * FROM mytable WHERE tierLevel=4"? From fields at surgam.net Wed Oct 16 22:23:54 2002 From: fields at surgam.net (Adam Fields) Date: Wed, 16 Oct 2002 21:23:54 -0500 Subject: [nycphp-talk] Building trees In-Reply-To: <200210162338.g9GNc0WM017235@parsec.nyphp.org> References: <200210162338.g9GNc0WM017235@parsec.nyphp.org> Message-ID: <20021017022354.GD22881@eye.surgam.net> On Wed, Oct 16, 2002 at 07:38:00PM -0400, Jim Hendricks wrote: > Agreed that session variables aren't stored in memory between pages, but > they are fully in memory for the life of every page while the session > variable exists. And as a session variable, the space would be consumed > for each page currently being processed, so for 5 active connections, > you would have 5 copies in memory. I've seen discussion of a static > memory area that can be used to simulate application scoped variables, > but from what I've seen so far, that solution doesn't seem ready for > primetime. By storing the tree in a table, I eliminate the memory > requirments, It would only be in memory when I need to display the tree > & will build the display. The table version of the tree would also be > very simple since I don't need any linking information, just a key field > to ensure the proper sortation, and depth indicator so I know how far to > indent or what graphics to display etc. Because there are no application scope variables or the like, I don't think the decision of whether you do this with classes is mutually exclusive with the above. You could wrap a class around it, and serialize/deserialize the tree class to the database as easily as you could (more easily, in fact, since PHP includes an object serialization routine, if you wanted to go that route) with straight db access. Anyway, I think we've beaten this one to death. Good luck! > Lastly, from a memory standpoint, I have been burned too many times by > knowing I work within a constrained environment but then design with > false assumptions. Here the assumption is that the memory for the class > is not that much and that the total size of the tree will not be that > great. The first assumption could be answered by the php team, or > someone else familure with the php memory model and therefore would no > longer be an assumption. The second assumption cannot be answered > without putting a limit on the number of total items to be handled. > Putting a limit then creates the next assumption and that is choosing a > limit everyone can live with for the life of the app ( with the > assumption as to how long that life is ). All these assumptions scare > the crap out of me as a professional software developer because Mr. > Murphy will screw me in the end. > > Please don't take this as a flame, I think you have a great idea, just > not an idea I think will fit in with what I am comfortable with. Nope. Just enjoying the discussion. > Adam Fields wrote: > > >On Wed, Oct 16, 2002 at 05:40:53PM -0400, Jim Hendricks wrote: > > > > > >>The other reason for avoiding this is my Host Provider would croak if I > >>build too much in memory thus hogging the memory shared across many > >>sites. I avoid as much memory use as I can so when I really need it > >>it's available. > >> > >> > > > >Seems reasonable. I don't know how much memory overhead the class > >implementation adds. I wouldn't think too much. Anyone? > > > >Even session variables aren't stored in memory though - they're > >written out to temp space on disk (at least, that's how I read the > >docs). > > > > > > > >>Adam Fields wrote: > >> > >> > >> > >>>On Wed, Oct 16, 2002 at 04:22:11PM -0400, Jim Hendricks wrote: > >>> > >>> > >>> > >>> > >>>>Adam Fields wrote: > >>>> > >>>> > >>>> > >>>> > >>>> > >>>>>I'd wrap a class around the whole thing. Use that class to broker > >>>>>reads and writes to the tree table. Add a "changed" timestamp to the > >>>>>tree, and have a read from the class only reload the tree from the > >>>>>database if it's changed since the last read. Stash the object in the > >>>>>session for reuse, or serialize it to another table (or file, or > >>>>>whatever) for quick retrieval. > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>> > >>>>I don't know about the class thing since it adds a level of complexity > >>>>to the code that I don't know > >>>>if it's waranted. > >>>> > >>>> > >>>> > >>>> > >>>I would argue that this will actually make the majority of your code > >>>simpler, because you're encapsulating the complexity. :) > >>> > >>>I'm the first to admit that classes aren't appropriate for everything, > >>>but they're the right approach for this kind of stuff. > >>> > >>>I'd do something like this: > >>> > >>>class tree { > >>> var nodemap; > >>> # and whatever else you want > >>> > >>> function tree () { > >>> # maybe some init code > >>> } > >>> > >>> function get_tree () { > >>> # check if tree has changed or isn't populated yet > >>> # if yes to either, get tree from db > >>> # otherwise, maybe get tree from intermediate storage if you're > >>> doing that > >>> > >>> } > >>> > >>> function save_tree () { > >>> # write tree to db > >>> } > >>> > >>> function store_tree () { > >>> # write tree to intermediate storage > >>> } > >>> > >>> function render_tree () { > >>> # if tree isn't populated, get tree > >>> # output tree html or tree values or whatever > >>> } > >>> > >>> function get_tree_values () { > >>> # return raw node data for the tree > >>> } > >>>} > >>> > >>>Then, in your page: > >>> > >>>$mytree = new tree(); > >>>$mytree->render_tree(); > >>>or > >>>$mytree->get_tree_values(); > >>> > >>> > >>> > >>> > >>> > >>>>I do like the idea of caching the tree though. I > >>>>would cache it in the DB so that the > >>>>tree does not need to be generated at all when the request to display it > >>>>occurs. The tree would > >>>>be regenerated everytime a change occurs to the underlying data ( which > >>>>is a low volume data set ) > >>>>This may not be a good idea for items that have a higher change velocity. > >>>> > >>>> > >>>> > >>>> > >>>While I wouldn't advocate this approach for something that changes > >>>once a minute or so, if it changes less than once an hour, this will > >>>probably still result in a performance gain, and it will be easier to > >>>maintain. > >>> > >>> > >>> > >>> > >>> > >> > >> > >> > >> > >> > >> > >> > >> > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > -- - 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 Wed Oct 16 22:37:16 2002 From: fields at surgam.net (Adam Fields) Date: Wed, 16 Oct 2002 21:37:16 -0500 Subject: [nycphp-talk] Building trees In-Reply-To: <200210170209.g9H29aWM017490@parsec.nyphp.org> References: <200210170209.g9H29aWM017490@parsec.nyphp.org> Message-ID: <20021017023716.GE22881@eye.surgam.net> On Wed, Oct 16, 2002 at 10:09:36PM -0400, Jim Hendricks wrote: > > > > > >You can do this without the tierlevel by building dynamic queries of > >the form: > > > Would the resultant SQL perform as well as a straight "SELECT * FROM > mytable WHERE tierLevel=4"? I don't know what kind of query optimization mysql does, but I'd suspect not. Even still, you have some extra processing in PHP between the queries. However, if performance is your goal, I'd say you should be looking at HTML caching instead, and not generating the page afresh on each view. -- - 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 Wed Oct 16 23:01:46 2002 From: fields at surgam.net (Adam Fields) Date: Wed, 16 Oct 2002 22:01:46 -0500 Subject: OOP (Was: Re: [nycphp-talk] Building trees) In-Reply-To: <200210162352.g9GNqLWM017271@parsec.nyphp.org> References: <200210162352.g9GNqLWM017271@parsec.nyphp.org> Message-ID: <20021017030146.GF22881@eye.surgam.net> On Wed, Oct 16, 2002 at 07:52:21PM -0400, Jim Hendricks wrote: > Yeah, your right. Sometimes though encapsulation can be a bad thing > though when it hides too much and you have to pull your hair out later > trying to figure out what the heck you did. There's still too much > procedural coding in my blood that avoids OOP unless I have to ( as is > the case with Java ). In the case of Java and C++, I preceive that the > performance of the VM/runtime would be better if you were to drop the > OOP and just go with good old procedural code. Granted procedural code > can be messy, but an experienced coder should be able to write modular > proc code to rival OOP. Just my own old fart ( 19 years in the business > I guess qualifies for old fartism in the IT world even though I'm only > 37 ) biased opinion probably not worth admitting! I've been concentrating recently on building reusable components and frameworks. While this is doable with procedural code, having object handling makes some of it much easier. In PHP, the lack of private and protected entities makes this more a syntactical issue than true encapsulation. I do, however, find that even the illusion of encapsulation tends to encourage better code organization. -- - 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 sharpwit at hotmail.com Thu Oct 17 06:13:52 2002 From: sharpwit at hotmail.com ((kris)janis p gale) Date: Thu, 17 Oct 2002 06:13:52 -0400 Subject: displaying a tree defined by one table Message-ID: the trees thread made me realize it was a topic near and dear to my heart, since way-back-when i had devoted pretty much an entire day's research-and-development effort towards devising a method of not only creating an arbitrarily-deep tree structure using a single self-referencing table, but also be able to traverse such a structure with relative ease... my development environment at the time was a windows nt box running coldfusion and access as a db -- so recursion was NOT an option, not only because coldfusion doesn't even support recursion, but also due to the total lack of resources on that puny development box... call me crazy, but i actually Enjoy developing iterative algorithms for problems that usually lend themselves to recursion, especially when even brainstorming such an iterative solution would send most developers screaming out the door in search of fresh air and daylight. anyways, porting my coldfusion script to php proved extremely rudimentary. i created a basic table for this exercise, called "test" it has three fields -- id [int], parent_id [int], and name [varchar(64)] there's an index on id (primary) and parent_id contents of "test": id, parent_id, name 3, 0, primary1 2, 0, primary2 1, 0, primary3 5, 3, secondary1 6, 3, secondary2 4, 1, secondary3 7, 5, tertiary1 8, 4, tertiary2 9, 4, tertiary3 my assumption here is that a top-level item's parent_id is to be zero. (i could have just as easily used NULL.) the code to display this tree: ---- '); for($n = 0 ; $n < $nrows ; $n++) print(str_repeat("----",$depth_list[$n]) . $data[$row_list[$n]]["name"] . '
'); print(''); ?> ---- the useful variables created by the end result of this code is three arrays... $nrows number of rows in your dataset $data[][] contains the entirety of your data, in a two-dimensional array $row_list[] a single dimentional array that you'll use to index rows of $data in tree-order, not in alphabetical or row-order (see the very end of the above code to see what i mean) $depth_list[] the depth of each item in the tree, in tree-order (see above how i used this variable to indent the displayed item to show its depth in the tree) ---- see the code in action: http://krisgale.com/code/tree.php ---- incidentally, anyone have a job for me? i truly miss solid development work like this... (database-driven web applications is my fort?) my resum?: http://krisgale.com/work/kpg_resume.gif regards, - kris gale -------------- next part -------------- An HTML attachment was scrubbed... URL: From smanes at magpie.com Thu Oct 17 07:43:48 2002 From: smanes at magpie.com (Steve Manes) Date: Thu, 17 Oct 2002 07:43:48 -0400 Subject: [nycphp-talk] Building trees In-Reply-To: <200210161712.g9GHCNWM016368@parsec.nyphp.org> Message-ID: <5.1.1.6.2.20021017073254.01256520@192.168.111.6> At 01:12 PM 10/16/2002 -0400, Jim Hendricks wrote: >I know this is a SQL question, but since most apps deal with SQL, I >figured I'ld ask here since the app is using PHP and MySQL. > >I have a table that establishes an entity that may have a parent from >the same table. I would like to display the data in a tree format where >all items with a ParentID of 0 ( no parent ) are listed with children >indented under the parent. The nesting can be infinite, but >realistically will only be 2 or 3 levels deep. I can see how to do this >through a whole series of queries, but can see how the performance of >such a design could be very poor if there is a lot of items. SQL deals in result sets and is unfortunately not a good tool for working with directed graphs, of which trees are one such data structure. I've been working casually on this for a couple of years without much success. There are alternative methods of representing trees in SQL as nested sets, or at least it's possible in Oracle. But it's not pretty. Here's a Joe Celko article I've archived, which is the best I've found on the topic of generating trees with SQL: http://www.dbmsmag.com/9603d06.html From jim at bizcomputinginc.com Thu Oct 17 07:51:15 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Thu, 17 Oct 2002 07:51:15 -0400 Subject: [nycphp-talk] Building trees References: <200210170237.g9H2bYWM017538@parsec.nyphp.org> Message-ID: <3DAEA433.1030308@bizcomputinginc.com> > > >However, if performance is your goal, I'd say you should be looking at >HTML caching instead, and not generating the page afresh on each view. > performance isn't my goal other than the general attempt to choose the best performing solution within all the other constraints. When I was project lead on many projects at my old business, it saddened me to see how many programmers forget that performance needs to be a thought in everything we do lest we produce a great solution but a cludge on resources and performance. Without performance as a backthought in all your decisions, you can also produce a great solution in testing but performs horibly when put under load, or when the load grows as most businesses hope. So far, the performance of my app is stunning, and this is over the web. I've been very happy with the performance of PHP when it comes to page building. From jim at bizcomputinginc.com Thu Oct 17 08:18:53 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Thu, 17 Oct 2002 08:18:53 -0400 Subject: [nycphp-talk] OOP References: <200210170302.g9H323WM017585@parsec.nyphp.org> Message-ID: <3DAEAAAD.50408@bizcomputinginc.com> > > >I've been concentrating recently on building reusable components and >frameworks. While this is doable with procedural code, having object >handling makes some of it much easier. In PHP, the lack of private and >protected entities makes this more a syntactical issue than true >encapsulation. > >I do, however, find that even the illusion of encapsulation tends to >encourage better code organization. > reusable modules are always your best candidate for OOP. In this situation, the implementation details are only important at the time of module development or improvement. For the consumer of the module, the interface is all that matters. And yes, your right, this can also be done with procedural code, you produce your module as a seperate file, each procedure's call interface clearly documented, all data passed as procedure arguments. There's also no argument from me that OOP encourages better code organization. With procedural code you can make a real mess, OOP provides the organizational framework so your potential for a mess is lower. I don't want to sound all doom and gloom on OOP, but I don't think it really is all that it's hyped up to be. If I could get the same performance out of OOP code as I can out of proc code, I wouldn't care. It just seems that OOP has become the be all and end all of development in most developers minds without even questioning it's benefit or seeing it's downside. I also don't like a half implemented OOP. I was first introed to OOP in the early days of PowerBuilder. I had an acedemic understanding of OOP from C++, but PB was where I got my feet wet. I initially produced some pretty nasty code, mostly because PB allowed both proc code and OOP. It took a while for me to realize that with OOP, the more OOPish my code, the more I would reap the benefits of OOP. By the time I got into Java, I had it down pat, and loved the fact that Java forced me all OOP so I couldn't get careless and go back to the half breed code I was originally producing in PB. I guess in the case of PHP, as with ASP/JavaScript/VBScript, I don't like the OOP/proc mix. I guess I also don't like a half implemented OOP where key features of OOP are missing. I've only been working with PHP for about a year now and only the past 6 months or so with real development. I also don't have any paying projects yet in PHP so my PHP time is only a fraction of my dev time. I have yet to really dive into the OOP side of PHP so you never know, I might find I like it and flip all my stuff over to OOP. I do know that I have some stuff in my existing app that could really benefit from inheritance. From babacar at omnet.sn Thu Oct 17 08:55:15 2002 From: babacar at omnet.sn (Babacar Mbaye) Date: Thu, 17 Oct 2002 12:55:15 +0000 Subject: Pay application in PHP? Message-ID: <1034859315.3daeb333e6e3f@www.omnet.sn> Hi, Do you know any application written in Php which can manage the wages of workers in a Small Company. Thanks! -- Babacar Mbaye --------------------------------------------------------------------- OMNET NetWork, the Net that sucks less. You deserve a FREE Network with vanishing to zero downtime, just ask! From brian at preston-campbell.com Thu Oct 17 09:53:57 2002 From: brian at preston-campbell.com (Preston-Campbell) Date: Thu, 17 Oct 2002 09:53:57 -0400 Subject: [nycphp-talk] Pay application in PHP? References: <200210171244.g9HCigWM018503@parsec.nyphp.org> Message-ID: <000901c275e4$a47acde0$0100a8c0@brian> Not sure if this will do it, but found on Hotscripts. http://epayroll.sourceforge.net/ May be overkill if you only need to track wages / labor costs. Brian ----- Original Message ----- From: "Babacar Mbaye" To: "NYPHP Talk" Sent: Thursday, October 17, 2002 8:44 AM Subject: [nycphp-talk] Pay application in PHP? > Hi, > Do you know any application written in Php which can manage the wages of > workers in a Small Company. > Thanks! > > -- Babacar Mbaye > > --------------------------------------------------------------------- > OMNET NetWork, the Net that sucks less. > You deserve a FREE Network with vanishing to zero downtime, just ask! > > > --- Unsubscribe at http://nyphp.org/list --- > > > > From jim at bizcomputinginc.com Thu Oct 17 10:38:37 2002 From: jim at bizcomputinginc.com (Jim Hendricks(Biz Computing)) Date: Thu, 17 Oct 2002 10:38:37 -0400 Subject: [nycphp-talk] Building trees References: <200210171141.g9HBftWM018409@parsec.nyphp.org> Message-ID: <3DAECB6D.6010206@bizcomputinginc.com> Hey, thanks, I recalled reading the Celco articles on trees years ago, didn't know they could still be obtained, thanks. This may be my best bet yet. Celco can be deep reading, but worth it in the end. Just a perusal of this article and the ensuing 2 shows that Celco put a lot of thought into it which allows doing this tree stuff at the SQL Server end in standard SQL without burdening the application. Just grab the data, iterate for display. This is the kind of solution I was looking for. Thanks big time. Now if I can just understand all the in's and out's of Celco's stuff... Jim Steve Manes wrote: >At 01:12 PM 10/16/2002 -0400, Jim Hendricks wrote: > > >>I know this is a SQL question, but since most apps deal with SQL, I >>figured I'ld ask here since the app is using PHP and MySQL. >> >>I have a table that establishes an entity that may have a parent from >>the same table. I would like to display the data in a tree format where >>all items with a ParentID of 0 ( no parent ) are listed with children >>indented under the parent. The nesting can be infinite, but >>realistically will only be 2 or 3 levels deep. I can see how to do this >>through a whole series of queries, but can see how the performance of >>such a design could be very poor if there is a lot of items. >> >> > >SQL deals in result sets and is unfortunately not a good tool for working >with directed graphs, of which trees are one such data structure. I've >been working casually on this for a couple of years without much >success. There are alternative methods of representing trees in SQL as >nested sets, or at least it's possible in Oracle. But it's not >pretty. Here's a Joe Celko article I've archived, which is the best I've >found on the topic of generating trees with SQL: > >http://www.dbmsmag.com/9603d06.html > > > > > >--- Unsubscribe at http://nyphp.org/list --- > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nygini at yahoo.com Thu Oct 17 10:56:20 2002 From: nygini at yahoo.com (elvire dardier) Date: Thu, 17 Oct 2002 07:56:20 -0700 (PDT) Subject: [nycphp-talk] Re: Graphics with php In-Reply-To: <200210162159.g9GLxIWM017097@parsec.nyphp.org> Message-ID: <20021017145620.32882.qmail@web14706.mail.yahoo.com> Thanks for your help. We eventually ended up deleting a cache file (config.cach) and the graphics work now... Thanks anyway! Genevieve. --- Hans Zaunere wrote: > > --- elvire dardier wrote: > > Hi Hans, > > Yes, it is the only error that we get in our > little > > script im.php: > > > > "Fatal error: Call to undefined function: > imagepng() > > in im.php on line 9 > > > > We tried using getimagesize() and some other > > gd_functions and they were found by php. > > Well that's a good sign at least. > > > I do not exaclty understand what you mean by > enabling > > PNG? We specified PNG directory with the option > > "--with" when configuring php. > > --with-gd=/path/to/gd and > --with-png-dir=/path/to/png > > (again, I haven't done this in ages, at may be dated > info). > > Do other image formats/more intensive functions > work? imagejpeg, > imageline, imagegd? > > > What constants should be defined? > > IMG_PNG, IMAGETYPE_PNG, etc > > http://www.php.net/manual/en/ref.image.php > > Also, are things linked properly? I'm not sure off > the cuff how Solaris > does all this, but ldconfig/nm/objdump/ar runs on > libphp4.so or php the > binary might show something. > > > > ===== > Hans Zaunere > New York PHP > http://nyphp.org > hans at nyphp.org > > __________________________________________________ > Do you Yahoo!? > Faith Hill - Exclusive Performances, Videos & More > http://faith.yahoo.com > > > --- Unsubscribe at http://nyphp.org/list --- > > __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From fields at surgam.net Thu Oct 17 13:10:46 2002 From: fields at surgam.net (Adam Fields) Date: Thu, 17 Oct 2002 12:10:46 -0500 Subject: RFC: I'm building a data management framework Message-ID: <20021017171046.GJ1146@eye.surgam.net> The following is a high level description of a general system I'm currently building. I'd love to get some feedback on whether such a thing is interesting to you, and what features you'd like to see. ---------- Starting from a user perspective, there are a few levels, and at each level you define the behavior of the system with an XML file (or generate one from some interactive choices). At the lowest level, you define datasets, which are made up of fields, each of which has a data types. Each data set corresponds to a table in the database, and each field you want to manage must be listed in the description. I've imposed some restrictions on the structure of the tables (this makes things a lot easier to dynamically manage, and corresponds to my style in making relational databases, and I don't think it's too restrictive, but I'm open to suggestions) : - currently, you must use mysql. This will change eventually. - each table must have an autogenerated primary key, named "_id" - each table must have an integer field called "status" - foreign keys must have the same field name in both tables - if you want to support versions, each table must have a corresponding table called "_updates" with id, object (blob) structure. Field types correspond to commonly used html structures - text, textarea, select (you can either specify the options in the definition or specify a table to read name/value pairs from), date (which pops up a calendar), image (which gives you a file choose box and saves the uploaded file on disk). Relations to other tables are handled in two ways - there's a field type called "contains" that takes a data set as a parameter. Also, data set types are supported - currently, I support "item" and "relation". Item datasets represent single-item tables, which may reference other tables with contains fields (1:n) relations. Relation datasets represent n:n mapping tables and must contain references to exactly two item datasets. There's a script which will read the xml files and output the db creation SQL (or connect to the database directly and just do it). So... you've got all these datasets, which represent a relational database structure. The system defines ways to operate on the datasets, which are represented currently either by a single-screen or a two-screen form and form handler. It doesn't currently support field validation, but because of the structure, it would be fairly easy to add. So for editing, all you do is hand the renderer a dataset name, an appropriate mode, and an id for an existing item (unless you're adding a new one), and it gives you a dynamically generated form for doing so, based on your data definition. It also lets you do some traversal of the relations to edit other connected items. There's a dynamic display component as well, but the details are in progress. Any thoughts? -- - 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 Thu Oct 17 13:19:21 2002 From: fields at surgam.net (Adam Fields) Date: Thu, 17 Oct 2002 12:19:21 -0500 Subject: [nycphp-talk] Building trees In-Reply-To: <200210171141.g9HBftWM018409@parsec.nyphp.org> References: <200210171141.g9HBftWM018409@parsec.nyphp.org> Message-ID: <20021017171921.GL1146@eye.surgam.net> On Thu, Oct 17, 2002 at 07:41:55AM -0400, Steve Manes wrote: > SQL deals in result sets and is unfortunately not a good tool for working > with directed graphs, of which trees are one such data structure. I've > been working casually on this for a couple of years without much > success. There are alternative methods of representing trees in SQL as > nested sets, or at least it's possible in Oracle. But it's not > pretty. Here's a Joe Celko article I've archived, which is the best I've > found on the topic of generating trees with SQL: > > http://www.dbmsmag.com/9603d06.html That is some clever stuff. Thanks! -- - 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 ejp at well.com Thu Oct 17 13:37:20 2002 From: ejp at well.com (Edward Potter) Date: Thu, 17 Oct 2002 13:37:20 -0400 Subject: [nycphp-talk] Pay application in PHP? In-Reply-To: <200210171244.g9HCigWM018503@parsec.nyphp.org> Message-ID: <164DC6B0-E1F7-11D6-BF78-00039398609A@well.com> Have you looked at Quick Books? This stuff has been debugged, and out for years. It's all pre-canned, ready to go. Can handle virtually any sort of tax issues, social security, deductions, regulations, etc. http://www.payroll.com/support/deluxe/signup/2001_faq.html -e On Thursday, October 17, 2002, at 08:44 AM, Babacar Mbaye wrote: > Hi, > Do you know any application written in Php which can manage the wages of > workers in a Small Company. > Thanks! > > -- Babacar Mbaye > > --------------------------------------------------------------------- > OMNET NetWork, the Net that sucks less. > You deserve a FREE Network with vanishing to zero downtime, just ask! > > > --- Unsubscribe at http://nyphp.org/list --- > > From markjia at yahoo.com Thu Oct 17 13:47:10 2002 From: markjia at yahoo.com (Mark Jia) Date: Thu, 17 Oct 2002 10:47:10 -0700 (PDT) Subject: DVD Rental Application In-Reply-To: <200210081539.g98FdCix050737@parsec.nyphp.org> Message-ID: <20021017174723.4141.qmail@web20416.mail.yahoo.com> Does anyone know some DVD Rental Applications in PHP? Thank you! Mark Regards Mark Jia -------------- next part -------------- An HTML attachment was scrubbed... URL: From sharpwit at hotmail.com Thu Oct 17 13:48:51 2002 From: sharpwit at hotmail.com ((kris)janis p gale) Date: Thu, 17 Oct 2002 13:48:51 -0400 Subject: [nycphp-talk] Building trees References: <200210170224.g9H2OBWM017509@parsec.nyphp.org> Message-ID: the trees thread made me realize it was a topic near and dear to my heart, since way-back-when i had devoted pretty much an entire day's research-and-development effort towards devising a method of not only creating an arbitrarily-deep tree structure using a single self-referencing table, but also be able to traverse such a structure with relative ease... my development environment at the time was a windows nt box running coldfusion and access as a db -- so recursion was NOT an option, not only because coldfusion doesn't even support recursion, but also due to the total lack of resources on that puny development box... call me crazy, but i actually Enjoy developing iterative algorithms for problems that usually lend themselves to recursion, especially when even brainstorming such an iterative solution would send most developers screaming out the door in search of fresh air and daylight. anyways, porting my coldfusion script to php proved extremely rudimentary. i created a basic table for this exercise, called "test" it has three fields -- id [int], parent_id [int], and name [varchar(64)] there's an index on id (primary) and parent_id contents of "test": id, parent_id, name 3, 0, primary1 2, 0, primary2 1, 0, primary3 5, 3, secondary1 6, 3, secondary2 4, 1, secondary3 7, 5, tertiary1 8, 4, tertiary2 9, 4, tertiary3 my assumption here is that a top-level item's parent_id is to be zero. (i could have just as easily used NULL.) the code to display this tree: ---- '); for($n = 0 ; $n < $nrows ; $n++) print(str_repeat("----",$depth_list[$n]) . $data[$row_list[$n]]["name"] . '
'); print(''); ?> ---- the useful variables created by the end result of this code is as such... $nrows number of rows in your dataset $data[][] contains the entirety of your data, in a two-dimensional array $row_list[] a single dimentional array that you'll use to index rows of $data in tree-order, not in alphabetical or row-order (see the very end of the above code to see what i mean) $depth_list[] the depth of each item in the tree, in tree-order (see above how i used this variable to indent the displayed item to show its depth in the tree) ---- see the code in action: http://krisgale.com/code/tree.php ---- incidentally, anyone have a job for me? i truly miss solid development work like this... (database-driven web applications is my fort?) my resum?: http://krisgale.com/work/kpg_resume.gif regards, - kris gale From ejp at well.com Thu Oct 17 13:55:06 2002 From: ejp at well.com (Edward Potter) Date: Thu, 17 Oct 2002 13:55:06 -0400 Subject: [nycphp-talk] RFC: I'm building a data management framework In-Reply-To: <200210171710.g9HHArWM018802@parsec.nyphp.org> Message-ID: <92162CA5-E1F9-11D6-BF78-00039398609A@well.com> I was playing around with this awhile back also. I always thought that you could send XML back and forth, and when it landed on various servers, it would create the database's for you. Sort of a viral-db thing... But of course then I became unemployed... :-) On Thursday, October 17, 2002, at 01:10 PM, Adam Fields wrote: > The following is a high level description of a general system I'm > currently building. I'd love to get some feedback on whether such a > thing is interesting to you, and what features you'd like to see. > > ---------- > > Starting from a user perspective, there are a few levels, and at each > level you define the behavior of the system with an XML file (or > generate one from some interactive choices). > > At the lowest level, you define datasets, which are made up of fields, > each of which has a data types. Each data set corresponds to a table > in the database, and each field you want to manage must be listed in > the description. I've imposed some restrictions on the structure of > the tables (this makes things a lot easier to dynamically manage, and > corresponds to my style in making relational databases, and I don't > think it's too restrictive, but I'm open to suggestions) : > > - currently, you must use mysql. This will change eventually. > > - each table must have an autogenerated primary key, named > "_id" > > - each table must have an integer field called "status" > > - foreign keys must have the same field name in both tables > > - if you want to support versions, each table must have a > corresponding table called "_updates" with id, object > (blob) structure. > > Field types correspond to commonly used html structures - text, > textarea, select (you can either specify the options in the definition > or specify a table to read name/value pairs from), date (which pops up > a calendar), image (which gives you a file choose box and saves the > uploaded file on disk). > > Relations to other tables are handled in two ways - there's a field > type called "contains" that takes a data set as a parameter. Also, > data set types are supported - currently, I support "item" and > "relation". Item datasets represent single-item tables, which may > reference other tables with contains fields (1:n) relations. Relation > datasets represent n:n mapping tables and must contain references to > exactly two item datasets. > > There's a script which will read the xml files and output the db > creation SQL (or connect to the database directly and just do > it). > > So... you've got all these datasets, which represent a relational > database structure. The system defines ways to operate on the > datasets, which are represented currently either by a single-screen or > a two-screen form and form handler. It doesn't currently support field > validation, but because of the structure, it would be fairly easy to > add. So for editing, all you do is hand the renderer a dataset name, > an appropriate mode, and an id for an existing item (unless you're > adding a new one), and it gives you a dynamically generated form for > doing so, based on your data definition. It also lets you do some > traversal of the relations to edit other connected items. > > There's a dynamic display component as well, but the details are in > progress. > > Any thoughts? > > -- > - 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 > > > --- Unsubscribe at http://nyphp.org/list --- > > From MLynn at exchange.ml.com Thu Oct 17 14:21:14 2002 From: MLynn at exchange.ml.com (Lynn, Michael (DCS)) Date: Thu, 17 Oct 2002 14:21:14 -0400 Subject: [nycphp-talk] DVD Rental Application Message-ID: <8FA07D8665A9D511B80E00B0D068A1510293A90C@ehope16.hew.us.ml.com> Not quite a rental - but this provides excellent tracking of loaned dvds, cds, etc. http://freshmeat.net/projects/opendb/?topic_id=92 -----Original Message----- From: Mark Jia [mailto:markjia at yahoo.com] Sent: Thursday, October 17, 2002 1:48 PM To: NYPHP Talk Subject: [nycphp-talk] DVD Rental Application Does anyone know some DVD Rental Applications in PHP? Thank you! Mark Regards Mark Jia --- Unsubscribe at http://nyphp.org/list --- From fields at surgam.net Thu Oct 17 14:50:45 2002 From: fields at surgam.net (Adam Fields) Date: Thu, 17 Oct 2002 13:50:45 -0500 Subject: Quick little question - variable interpolation Message-ID: <20021017185045.GA12191@eye.surgam.net> This is one of those really easy questions that's difficult to search for because the search terms look like everything else. Is there an easy way to do simple variable interpolation on a string? For example, if I have: $one = '1'; $two = '= $one'; Is there a way to get $two to equal '= 1' (or whatever $one happens to contain, obviously)? -- - 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 nyphp at altunergil.com Thu Oct 17 14:46:29 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Thu, 17 Oct 2002 14:46:29 -0400 Subject: [nycphp-talk] Pay application in PHP? In-Reply-To: <200210171244.g9HCigWM018503@parsec.nyphp.org> References: <200210171244.g9HCigWM018503@parsec.nyphp.org> Message-ID: <20021017144629.34668ca2.nyphp@altunergil.com> searched 'php payroll' on google and got this Enterprise TimeSheet and Payroll at http://www.hotscripts.com/Detailed/14498.html Oktay PS: I leave it to the reader as an exercise to search for 'internet', 'www', 'web', 'search' on google. On Thu, 17 Oct 2002 08:44:42 -0400 Babacar Mbaye wrote: > Hi, > Do you know any application written in Php which can manage the wages of > workers in a Small Company. > Thanks! > > -- Babacar Mbaye > > --------------------------------------------------------------------- > OMNET NetWork, the Net that sucks less. > You deserve a FREE Network with vanishing to zero downtime, just ask! > > > --- Unsubscribe at http://nyphp.org/list --- > > From nyphp at altunergil.com Thu Oct 17 15:04:18 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Thu, 17 Oct 2002 15:04:18 -0400 Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: <200210171850.g9HIotWM018983@parsec.nyphp.org> References: <200210171850.g9HIotWM018983@parsec.nyphp.org> Message-ID: <20021017150418.7df06b3a.nyphp@altunergil.com> $two = "= $one" doesn't work? oktay On Thu, 17 Oct 2002 14:50:55 -0400 Adam Fields wrote: > This is one of those really easy questions that's difficult to search > for because the search terms look like everything else. > > Is there an easy way to do simple variable interpolation on a string? > > For example, if I have: > > $one = '1'; > $two = '= $one'; > > Is there a way to get $two to equal '= 1' (or whatever $one happens to > contain, obviously)? > > -- > - 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 > > > --- Unsubscribe at http://nyphp.org/list --- > > From fields at surgam.net Thu Oct 17 15:16:15 2002 From: fields at surgam.net (Adam Fields) Date: Thu, 17 Oct 2002 14:16:15 -0500 Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: <200210171850.g9HIotWM018983@parsec.nyphp.org> References: <200210171850.g9HIotWM018983@parsec.nyphp.org> Message-ID: <20021017191615.GD12191@eye.surgam.net> On Thu, Oct 17, 2002 at 02:50:55PM -0400, Adam Fields wrote: > This is one of those really easy questions that's difficult to search > for because the search terms look like everything else. > > Is there an easy way to do simple variable interpolation on a string? > > For example, if I have: > > $one = '1'; > $two = '= $one'; > > Is there a way to get $two to equal '= 1' (or whatever $one happens to > contain, obviously)? To clarify, I don't want $two to equal $one. I want $two to equal some string that has a bunch of other characters and the value of $one. So if the original $two string was: 'this string = $one and that is it' I want it to be: 'this string = 1 and that is it' after processing. -- - 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 rsd at electronink.com Thu Oct 17 15:11:23 2002 From: rsd at electronink.com (Russ Demarest) Date: Thu, 17 Oct 2002 15:11:23 -0400 Subject: [nycphp-talk] Quick little question - variable interpolation References: <200210171850.g9HIotWM018983@parsec.nyphp.org> Message-ID: <3DAF0B5B.3030301@electronink.com> I believe $two = "= " . $one; will do it. Good luck Adam Fields wrote: >This is one of those really easy questions that's difficult to search >for because the search terms look like everything else. > >Is there an easy way to do simple variable interpolation on a string? > >For example, if I have: > >$one = '1'; >$two = '= $one'; > >Is there a way to get $two to equal '= 1' (or whatever $one happens to >contain, obviously)? > > > From adam at trachtenberg.com Thu Oct 17 15:18:55 2002 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Thu, 17 Oct 2002 15:18:55 -0400 (EDT) Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: <200210171850.g9HIotWM018983@parsec.nyphp.org> Message-ID: On Thu, 17 Oct 2002, Adam Fields wrote: > $one = '1'; > $two = '= $one'; > > Is there a way to get $two to equal '= 1' (or whatever $one happens to > contain, obviously)? $two = "= $one"; -adam From fields at surgam.net Thu Oct 17 15:28:37 2002 From: fields at surgam.net (Adam Fields) Date: Thu, 17 Oct 2002 14:28:37 -0500 Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: <200210171908.g9HJ8hWM019009@parsec.nyphp.org> References: <200210171908.g9HJ8hWM019009@parsec.nyphp.org> Message-ID: <20021017192837.GF12191@eye.surgam.net> On Thu, Oct 17, 2002 at 03:08:43PM -0400, Oktay Altunergil wrote: > $two = "= $one" doesn't work? It does. But it assumes I don't already have the string literal value of $two. Suppose I want to read in a string from a file or db that is stored as "= $one" and I want to interpolate it after reading it? How do I do that? > On Thu, 17 Oct 2002 14:50:55 -0400 > Adam Fields wrote: > > > This is one of those really easy questions that's difficult to search > > for because the search terms look like everything else. > > > > Is there an easy way to do simple variable interpolation on a string? > > > > For example, if I have: > > > > $one = '1'; > > $two = '= $one'; > > > > Is there a way to get $two to equal '= 1' (or whatever $one happens to > > contain, obviously)? > > > > -- > > - 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 > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > -- - 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 sklar at sklar.com Thu Oct 17 15:35:54 2002 From: sklar at sklar.com (David Sklar) Date: Thu, 17 Oct 2002 15:35:54 -0400 Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: <200210171916.g9HJGNWM019035@parsec.nyphp.org> Message-ID: > 'this string = $one and that is it' > > I want it to be: > > 'this string = 1 and that is it' > > after processing. $one = 1; $two = "this string = $one and that is it"; Double quotes. -dave From max at idsociety.com Thu Oct 17 15:53:53 2002 From: max at idsociety.com (max goldberg) Date: Thu, 17 Oct 2002 15:53:53 -0400 Subject: [nycphp-talk] Quick little question - variable interpolation References: <200210171928.g9HJSiWM019070@parsec.nyphp.org> Message-ID: <3DAF1551.9030702@idsociety.com> should do what you are looking for I think? -max Adam Fields wrote: > On Thu, Oct 17, 2002 at 03:08:43PM -0400, Oktay Altunergil wrote: > >>$two = "= $one" doesn't work? > > > It does. But it assumes I don't already have the string literal value > of $two. Suppose I want to read in a string from a file or db that is > stored as "= $one" and I want to interpolate it after reading it? > > How do I do that? > > >>On Thu, 17 Oct 2002 14:50:55 -0400 >>Adam Fields wrote: >> >> >>>This is one of those really easy questions that's difficult to search >>>for because the search terms look like everything else. >>> >>>Is there an easy way to do simple variable interpolation on a string? >>> >>>For example, if I have: >>> >>>$one = '1'; >>>$two = '= $one'; >>> >>>Is there a way to get $two to equal '= 1' (or whatever $one happens to >>>contain, obviously)? >>> >>>-- >>> - 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 nyphp at altunergil.com Thu Oct 17 15:50:32 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Thu, 17 Oct 2002 15:50:32 -0400 Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: <200210171928.g9HJSiWM019070@parsec.nyphp.org> References: <200210171928.g9HJSiWM019070@parsec.nyphp.org> Message-ID: <20021017155032.6879f4e9.nyphp@altunergil.com> Hm.. "= $one" is not a variable.. I don't know how you would treat it as one. I think you might be able to do something with 'variable variables'. http://www.php.net/manual/en/language.variables.variable.php --oktay-- On Thu, 17 Oct 2002 15:28:44 -0400 Adam Fields wrote: > On Thu, Oct 17, 2002 at 03:08:43PM -0400, Oktay Altunergil wrote: > > $two = "= $one" doesn't work? > > It does. But it assumes I don't already have the string literal value > of $two. Suppose I want to read in a string from a file or db that is > stored as "= $one" and I want to interpolate it after reading it? > > How do I do that? > > > On Thu, 17 Oct 2002 14:50:55 -0400 > > Adam Fields wrote: > > > > > This is one of those really easy questions that's difficult to search > > > for because the search terms look like everything else. > > > > > > Is there an easy way to do simple variable interpolation on a string? > > > > > > For example, if I have: > > > > > > $one = '1'; > > > $two = '= $one'; > > > > > > Is there a way to get $two to equal '= 1' (or whatever $one happens to > > > contain, obviously)? > > > > > > -- > > > - 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 > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > - 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 > > > --- Unsubscribe at http://nyphp.org/list --- > > From danielc at analysisandsolutions.com Thu Oct 17 16:01:48 2002 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 17 Oct 2002 16:01:48 -0400 Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: <200210171935.g9HJZgWM019097@parsec.nyphp.org> References: <200210171935.g9HJZgWM019097@parsec.nyphp.org> Message-ID: <20021017200147.GA18255@panix.com> On Thu, Oct 17, 2002 at 03:35:42PM -0400, David Sklar wrote: > > $one = 1; > $two = "this string = $one and that is it"; > > Double quotes. Just to make sure everything is clear to Adam: Only strings inside double quotes get evaluated. Strings inside single quotes are taken literally. So: $one = 1; $two = "this string = $one and that is it"; echo $two; [results: this string = 1 and that is it] $one = 1; $two = 'this string = $one and that is it'; echo $two; [results: this string = $one and that is it] --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From fields at surgam.net Thu Oct 17 16:17:40 2002 From: fields at surgam.net (Adam Fields) Date: Thu, 17 Oct 2002 15:17:40 -0500 Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: <200210171954.g9HJswWM019143@parsec.nyphp.org> References: <200210171954.g9HJswWM019143@parsec.nyphp.org> Message-ID: <20021017201740.GI12191@eye.surgam.net> On Thu, Oct 17, 2002 at 03:54:58PM -0400, Oktay Altunergil wrote: > Hm.. "= $one" is not a variable.. I don't know how you would treat it as one. I think you might be able to do something with 'variable variables'. > > http://www.php.net/manual/en/language.variables.variable.php > > --oktay-- I didn't find anything useful in there. However, this works. It's not particularly elegant, but it does what I want: -------------- $i = 0; foreach (explode(' ', $test) as $word) { if (substr($word, 0, 1) == '$') { $newstring[$i] = eval ("return $word;"); } else { $newstring[$i] = $word; } $i++; } print join(' ', $newstring); -------------- Assuming that $test is my source string. -- - 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 Thu Oct 17 16:24:20 2002 From: fields at surgam.net (Adam Fields) Date: Thu, 17 Oct 2002 15:24:20 -0500 Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: <200210172001.g9HK1qWM019169@parsec.nyphp.org> References: <200210172001.g9HK1qWM019169@parsec.nyphp.org> Message-ID: <20021017202420.GJ12191@eye.surgam.net> On Thu, Oct 17, 2002 at 04:01:52PM -0400, Analysis & Solutions wrote: > Just to make sure everything is clear to Adam: > > Only strings inside double quotes get evaluated. Strings inside single > quotes are taken literally. Yes, I'm fully aware of that. That was not my question. > So: > > $one = 1; > $two = "this string = $one and that is it"; > echo $two; > [results: this string = 1 and that is it] > > $one = 1; > $two = 'this string = $one and that is it'; > echo $two; > [results: this string = $one and that is it] That is also not my question. I don't want to know how to assign a string such that variable interpolation happens. I want to know how to take an existing string and perform variable interpolation on it. I posted my solution already, but I'm still wondering if there's a better way. For completeness sake, here it is again (this does what I want, given an existing string): $i = 0; foreach (explode(' ', $test) as $word) { if (substr($word, 0, 1) == '$') { $newstring[$i] = eval ("return $word;"); } else { $newstring[$i] = $word; } $i++; } print join(' ', $newstring); -- - 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 Oct 17 17:05:56 2002 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 17 Oct 2002 17:05:56 -0400 Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: <200210172024.g9HKOSWM019228@parsec.nyphp.org> References: <200210172024.g9HKOSWM019228@parsec.nyphp.org> Message-ID: <20021017210556.GA6484@panix.com> On Thu, Oct 17, 2002 at 04:24:28PM -0400, Adam Fields wrote: > On Thu, Oct 17, 2002 at 04:01:52PM -0400, Analysis & Solutions wrote: > > That is also not my question. I don't want to know how to assign a > string such that variable interpolation happens. I want to know how to > take an existing string and perform variable interpolation on it. Oh. I didn't understand your question. Guess I was too busy working on other things to really pay attention to the whole thread. Max was on target with eval(). So, continuing with my example... $one = 1; $two = 'this string = $one and that is it'; $three = eval($two); echo $three; [results: this string = 1 and that is it] Now, BE CAREFUL about using eval(). You could do some really nasty things if the incoming string is corrupted by nasty persons. Please read the PHP manual about eval() to make sure you're being safe. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From max at idsociety.com Thu Oct 17 17:23:33 2002 From: max at idsociety.com (max goldberg) Date: Thu, 17 Oct 2002 17:23:33 -0400 Subject: [nycphp-talk] Quick little question - variable interpolation References: <200210172106.g9HL61WM019311@parsec.nyphp.org> Message-ID: <3DAF2A55.8090504@idsociety.com> That actually wouldn't work, in order to do eval() you must pass it a valid piece of code, so at runtime your code would return a parse error as it would be the same as a line of code that said 'this string = $one and that is it', where as '\\$string = $one;' would parse. Earlier I gave the answer: $one = '1'; $two = '$one'; eval("\\$result = \\"$two\\";"); echo $result; Which would work fine, but you are very correct about the safety and it is a bad idea to eval anything coming in from user input without a huge load of data integrity checking. -Max Analysis & Solutions wrote: > On Thu, Oct 17, 2002 at 04:24:28PM -0400, Adam Fields wrote: > >>On Thu, Oct 17, 2002 at 04:01:52PM -0400, Analysis & Solutions wrote: >> >>That is also not my question. I don't want to know how to assign a >>string such that variable interpolation happens. I want to know how to >>take an existing string and perform variable interpolation on it. > > > Oh. I didn't understand your question. Guess I was too busy working on > other things to really pay attention to the whole thread. Max was on > target with eval(). So, continuing with my example... > > $one = 1; > $two = 'this string = $one and that is it'; > $three = eval($two); > echo $three; > [results: this string = 1 and that is it] > > Now, BE CAREFUL about using eval(). You could do some really nasty things > if the incoming string is corrupted by nasty persons. Please read the PHP > manual about eval() to make sure you're being safe. > > --Dan > From sklar at sklar.com Thu Oct 17 17:25:35 2002 From: sklar at sklar.com (David Sklar) Date: Thu, 17 Oct 2002 17:25:35 -0400 Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: <200210172024.g9HKOSWM019228@parsec.nyphp.org> Message-ID: > That is also not my question. I don't want to know how to assign a > string such that variable interpolation happens. I want to know how to > take an existing string and perform variable interpolation on it. I > posted my solution already, but I'm still wondering if there's a > better way. > > For completeness sake, here it is again (this does what I want, given > an existing string): > > $i = 0; > foreach (explode(' ', $test) as $word) { > if (substr($word, 0, 1) == '$') { > $newstring[$i] = eval ("return $word;"); > } else { > $newstring[$i] = $word; > } > $i++; > } > print join(' ', $newstring); Why explode and rejoin instead of just one eval? $foo = eval("return '$foo';"); You might need to addslashes() on $foo first: $safe = addslashes($foo); $foo = eval("return '$safe';"); -dave From cahoyos at us.ibm.com Thu Oct 17 17:25:53 2002 From: cahoyos at us.ibm.com (Carlos A Hoyos) Date: Thu, 17 Oct 2002 17:25:53 -0400 Subject: [nycphp-talk] Quick little question - variable interpolation Message-ID: try eval '; echo $one; eval ("\\$two = \\"$one\\";"); echo $two; ?> will print This is a $string with my $name in it. This is a cup with my coffee in it. Adam Fields t> cc: Subject: [nycphp-talk] Quick little question - variable interpolation 10/17/2002 02:50 PM Please respond to talk This is one of those really easy questions that's difficult to search for because the search terms look like everything else. Is there an easy way to do simple variable interpolation on a string? For example, if I have: $one = '1'; $two = '= $one'; Is there a way to get $two to equal '= 1' (or whatever $one happens to contain, obviously)? -- - 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 --- Unsubscribe at http://nyphp.org/list --- From sklar at sklar.com Thu Oct 17 17:28:30 2002 From: sklar at sklar.com (David Sklar) Date: Thu, 17 Oct 2002 17:28:30 -0400 Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: Message-ID: > Why explode and rejoin instead of just one eval? > > $foo = eval("return '$foo';"); > > You might need to addslashes() on $foo first: > > $safe = addslashes($foo); > $foo = eval("return '$safe';"); Oops, those should be doublequotes inside the eval: $foo = eval("return \\"$foo\\";"); and $safe = addcslashes($foo,'"'); $foo = eval("return \\"$safe\\";"); -dave From danielc at analysisandsolutions.com Thu Oct 17 17:39:45 2002 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 17 Oct 2002 17:39:45 -0400 Subject: [nycphp-talk] Quick little question - variable interpolation In-Reply-To: <200210172124.g9HLOXWM019337@parsec.nyphp.org> References: <200210172124.g9HLOXWM019337@parsec.nyphp.org> Message-ID: <20021017213945.GA18081@panix.com> On Thu, Oct 17, 2002 at 05:24:33PM -0400, max goldberg wrote: > Analysis & Solutions wrote: > > $three = eval($two); > > That actually wouldn't work, in order to do eval() you must pass it a > valid piece of code Oh, dear. You're right. I so rarely use eval() I forgot about that. Once again, haste makes waste. Thanks, --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From sharpwit at hotmail.com Fri Oct 18 00:42:41 2002 From: sharpwit at hotmail.com ((kris)janis p gale) Date: Fri, 18 Oct 2002 00:42:41 -0400 Subject: [nycphp-talk] Building trees References: <200210171438.g9HEcsWM018629@parsec.nyphp.org> Message-ID: anyone see my post? i replied with one of my solutions for displaying trees yesterday but didn't see it echoed on the list... just checking that it was received. ----- Original Message ----- From: Jim Hendricks To: NYPHP Talk Sent: Thursday, October 17, 2002 10:38 AM Subject: Re: [nycphp-talk] Building trees > Hey, thanks, I recalled reading the Celco articles on trees years ago, > didn't know they could still be obtained, thanks. This may be my best > bet yet. Celco can be deep reading, but worth it in the end. Just a > perusal of this article and the ensuing 2 shows that Celco put a lot of > thought into it which allows doing this tree stuff at the SQL Server end > in standard SQL without burdening the application. Just grab the data, > iterate for display. This is the kind of solution I was looking for. > Thanks big time. Now if I can just understand all the in's and out's > of Celco's stuff... > > Jim > > Steve Manes wrote: > > >At 01:12 PM 10/16/2002 -0400, Jim Hendricks wrote: > > > > > >>I know this is a SQL question, but since most apps deal with SQL, I > >>figured I'ld ask here since the app is using PHP and MySQL. > >> > >>I have a table that establishes an entity that may have a parent from > >>the same table. I would like to display the data in a tree format where > >>all items with a ParentID of 0 ( no parent ) are listed with children > >>indented under the parent. The nesting can be infinite, but > >>realistically will only be 2 or 3 levels deep. I can see how to do this > >>through a whole series of queries, but can see how the performance of > >>such a design could be very poor if there is a lot of items. > >> > >> > > > >SQL deals in result sets and is unfortunately not a good tool for working > >with directed graphs, of which trees are one such data structure. I've > >been working casually on this for a couple of years without much > >success. There are alternative methods of representing trees in SQL as > >nested sets, or at least it's possible in Oracle. But it's not > >pretty. Here's a Joe Celko article I've archived, which is the best I've > >found on the topic of generating trees with SQL: > > > >http://www.dbmsmag.com/9603d06.html > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > From babacar at omnet.sn Fri Oct 18 07:20:35 2002 From: babacar at omnet.sn (Babacar Mbaye) Date: Fri, 18 Oct 2002 11:20:35 +0000 Subject: [nycphp-talk] Pay application in PHP? In-Reply-To: <200210171850.g9HIouWM018984@parsec.nyphp.org> References: <200210171850.g9HIouWM018984@parsec.nyphp.org> Message-ID: <1034940035.3dafee837695c@www.omnet.sn> Thank you for all your replies. God bless you all Babacar --------------------------------------------------------------------- OMNET NetWork, the Net that sucks less. You deserve a FREE Network with vanishing to zero downtime, just ask! From jim at bizcomputinginc.com Fri Oct 18 07:10:28 2002 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Fri, 18 Oct 2002 07:10:28 -0400 Subject: [nycphp-talk] Building trees References: <200210180446.g9I4k2WM019829@parsec.nyphp.org> Message-ID: <001c01c27696$f78f97b0$6401a8c0@Notebook> Kris, Yes, it was received. Sorry I didn't comment on it, been busy with trying to make some money and the Celco solution seemed more like what I was looking for. Your solution puts the work burden on the application, Celco's on the DBMS. I've found in most cases, if it can be done through a query, do it through a query, that is usually the best performing, least resource intense aproach. It also scales well as the tree grows both in items and in depth. Jim PS. I see your in Hoboken, wish I could offer you a job, but I'm still too small at this point. ----- Original Message ----- From: "janis p gale" To: "NYPHP Talk" Sent: Friday, October 18, 2002 12:46 AM Subject: Re: [nycphp-talk] Building trees > anyone see my post? > i replied with one of my solutions for displaying trees > yesterday but didn't see it echoed on the list... > > just checking that it was received. From smanes at magpie.com Fri Oct 18 07:39:06 2002 From: smanes at magpie.com (Steve Manes) Date: Fri, 18 Oct 2002 07:39:06 -0400 Subject: [nycphp-talk] Building trees In-Reply-To: <200210181110.g9IBAeWM020478@parsec.nyphp.org> Message-ID: <5.1.1.6.2.20021018073513.0123d780@192.168.111.6> At 07:10 AM 10/18/2002 -0400, Jim Hendricks wrote: >Yes, it was received. Sorry I didn't comment on it, been busy with trying >to make some money and the Celco solution seemed more like what I was >looking for. If you're on the WWWAC list, I'd also suggest talking with Andrew Gideon of TAG Online. He and I had a fairly extensive offline message discussion on the subject of SQL and trees last year. He has something like the Celko solution already running with some threaded discussion software he wrote and I believe he's the guy who referred me to those Celko articles. From sharpwit at hotmail.com Fri Oct 18 08:21:55 2002 From: sharpwit at hotmail.com ((kris)janis p gale) Date: Fri, 18 Oct 2002 08:21:55 -0400 Subject: [nycphp-talk] Building trees References: <200210181110.g9IBAeWM020478@parsec.nyphp.org> Message-ID: ah, ok. thanks! yeah i'm kinda curious myself how my solution would scale... i've used it in the past (when it was a coldfusion script) with as many as a hundred nested categories linked data items, and pretty successfully, but haven't done any stress-testing. anyways glad the list got the message - it's definately handy for use on dbms' that aren't that great at handling many queries at once (i.e. Access - ugh :) ----- Original Message ----- From: Jim Hendricks To: NYPHP Talk Sent: Friday, October 18, 2002 07:10 AM Subject: Re: [nycphp-talk] Building trees > Kris, > > Yes, it was received. Sorry I didn't comment on it, been busy with trying > to make some money and the Celco solution seemed more like what I was > looking for. Your solution puts the work burden on the application, Celco's > on the DBMS. I've found in most cases, if it can be done through a query, > do it through a query, that is usually the best performing, least resource > intense aproach. It also scales well as the tree grows both in items and in > depth. > > Jim > > PS. I see your in Hoboken, wish I could offer you a job, but I'm still too > small at this point. > > ----- Original Message ----- > From: "janis p gale" > To: "NYPHP Talk" > Sent: Friday, October 18, 2002 12:46 AM > Subject: Re: [nycphp-talk] Building trees > > > > anyone see my post? > > i replied with one of my solutions for displaying trees > > yesterday but didn't see it echoed on the list... > > > > just checking that it was received. > > > > > --- Unsubscribe at http://nyphp.org/list --- > From georgenatalino at yahoo.com Fri Oct 18 12:11:44 2002 From: georgenatalino at yahoo.com (George Natalino) Date: Fri, 18 Oct 2002 09:11:44 -0700 (PDT) Subject: Fwd: Complimentary Pass for XML Developers Message-ID: <20021018161144.30402.qmail@web11405.mail.yahoo.com> Note: forwarded message attached. Use code EXPOXML when registering. SpeechTEK 2002 EXPO: October 30 - October 31, 2002 Wednesday: 10:30 AM-5:30 PM Thursday: 10:30 AM-4:00 PM Where: Marriott Marquis New York 1535 Broadway New York, NY 10036 212.398.1900 800.843.4898 (toll-free) 212.704.8983 (fax) www.nymarriotmarquis.com ================================================ Regards George Natalino georgenatalino at yahoo.com VoiceMail/Fax: (212) 894-3714 x1001 --------------------------------- Do you Yahoo!? Faith Hill - Exclusive Performances, Videos, & more faith.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded message was scrubbed... From: "Speech Technology Magazine" Subject: Complimentary Pass for XML Developers Date: Wed, 16 Oct 2002 10:13:41 -0400 Size: 7931 URL: From sharpwit at hotmail.com Sat Oct 19 17:19:32 2002 From: sharpwit at hotmail.com ((kris)janis p gale) Date: Sat, 19 Oct 2002 17:19:32 -0400 Subject: [nycphp-talk] Building trees References: <200210161909.g9GJ9HWM016607@parsec.nyphp.org> Message-ID: actually... wouldn't it be as simple as querying the tierlevel of the parent project, and incrementing by one? > Figuring out the level at the time a Project is saved is simple since I > have a parent ID, I can walk the tree backwards until I get a 0 ParentID > ( 0 is not a legal ProjectID in my design ). The number of queries I > had to do plus one would be the level of this new item. From jim at bizcomputinginc.com Sat Oct 19 18:11:55 2002 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Sat, 19 Oct 2002 18:11:55 -0400 Subject: [nycphp-talk] Building trees References: <200210192122.g9JLMx4a049973@parsec.nyphp.org> Message-ID: <014301c277bc$890f8d50$6401a8c0@Notebook> Yes, but I am persuing the design proposed by Celco since it is a mostly DB solution. Jim ----- Original Message ----- From: "janis p gale" To: "NYPHP Talk" Sent: Saturday, October 19, 2002 5:22 PM Subject: Re: [nycphp-talk] Building trees > actually... > wouldn't it be as simple as querying the tierlevel > of the parent project, and incrementing by one? > > > Figuring out the level at the time a Project is saved is simple since I > > have a parent ID, I can walk the tree backwards until I get a 0 ParentID > > ( 0 is not a legal ProjectID in my design ). The number of queries I > > had to do plus one would be the level of this new item. > > > > --- Unsubscribe at http://nyphp.org/list --- > > > > > From zaunere at yahoo.com Tue Oct 22 08:35:48 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 22 Oct 2002 05:35:48 -0700 (PDT) Subject: Tomorrow, NYPHP Presents: AMP Development under Win2K and the AIP Message-ID: <20021022123548.25133.qmail@web12806.mail.yahoo.com> Tomorrow, NYPHP Presents... As the weather cools off and we move into the fall season, NYPHP is excited to offer a two-pronged presentation this month. This month's presentations, "Introduction to AMP Technology -- Development Under Windows 2000" and "The Net and The Association of Internet Professionals," will be technically and culturally stimulating, given by two that are immersed in PHP and Internet development. As always, NYPHP's meetings are free and open to the public, with presentation, location and time details at http://nyphp.org. ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ From gderoover at mac.com Tue Oct 22 12:49:58 2002 From: gderoover at mac.com (Giro De Roover) Date: Tue, 22 Oct 2002 12:49:58 -0400 Subject: [nycphp-talk] Tomorrow, NYPHP Presents: AMP Development under Win2K and the AIP In-Reply-To: <200210221235.g9MCZrqn001548@parsec.nyphp.org> Message-ID: I wanted to cancelled th emailing list but I forgot my userid and password. Could you help me Giro De Roover From soazine at erols.com Tue Oct 22 13:27:28 2002 From: soazine at erols.com (Phil Powell) Date: Tue, 22 Oct 2002 13:27:28 -0400 Subject: how to use CVS Message-ID: <001f01c279f0$4bb329e0$dcbe6444@scandinawa1bo6> I am required to use CVS for modifying PHP files, but I know absolutely NOTHING about CVS. Can someone give me a tutorial on how to use it? Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Tue Oct 22 13:41:00 2002 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Tue, 22 Oct 2002 13:41:00 -0400 Subject: [nycphp-talk] how to use CVS In-Reply-To: <200210221729.g9MHTMqn001839@parsec.nyphp.org> References: <200210221729.g9MHTMqn001839@parsec.nyphp.org> Message-ID: <20021022174100.GA13521@panix.com> Hi Phil: On Tue, Oct 22, 2002 at 01:29:22PM -0400, Phil Powell wrote: > I am required to use CVS for modifying PHP files, but I know absolutely > NOTHING about CVS. Can someone give me a tutorial on how to use it? Main manual page: http://www.cvshome.org/docs/manual/cvs.html The quick guide: http://www.cvshome.org/docs/manual/cvs_16.html#SEC113 The sections you'll need to focus on there are A.7 (checkout), A.8 (commit) and A.16 (update). Enjoy, --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From nyphp at jimbishop.org Tue Oct 22 13:46:17 2002 From: nyphp at jimbishop.org (nyphp at jimbishop.org) Date: Tue, 22 Oct 2002 10:46:17 -0700 (PDT) Subject: [nycphp-talk] how to use CVS In-Reply-To: <200210221729.g9MHTMqn001839@parsec.nyphp.org> Message-ID: > I am required to use CVS for modifying PHP files, but I know > absolutely NOTHING about CVS. Can someone give me a tutorial on how > to use it? http://www.cvshome.org/docs/manual/cvs.html learn the cederqvist. love the cederqvist. live the cederqvist. From jon at corporatelords.org Tue Oct 22 13:52:14 2002 From: jon at corporatelords.org (Jon Britton) Date: 22 Oct 2002 13:52:14 -0400 Subject: [nycphp-talk] how to use CVS In-Reply-To: <200210221729.g9MHTMqn001839@parsec.nyphp.org> References: <200210221729.g9MHTMqn001839@parsec.nyphp.org> Message-ID: <1035309167.4206.76.camel@widowmaker.localdomain> On Tue, 2002-10-22 at 13:29, Phil Powell wrote: > I am required to use CVS for modifying PHP files, but I know absolutely NOTHING about CVS. Can someone give me a tutorial on how to use it? http://www.google.com/search?q=cvs+tutorial The first few are actually pretty good. It's a pain to get started, but will make your life much easier in the long run. - Jon From emm at scriptdigital.com Tue Oct 22 13:50:14 2002 From: emm at scriptdigital.com (Emmanuel. M. Decarie) Date: Tue, 22 Oct 2002 13:50:14 -0400 Subject: [nycphp-talk] how to use CVS In-Reply-To: <200210221729.g9MHTMqn001839@parsec.nyphp.org> References: <200210221729.g9MHTMqn001839@parsec.nyphp.org> Message-ID: >I am required to use CVS for modifying PHP files, but I know >absolutely NOTHING about CVS. Can someone give me a tutorial on how >to use it? > >Thanx >Phil Hey, what a coincidence, I just started using it and like it a lot. CVS is quite nice, but you really need to wrap your mind around it. I have bought the O'Reilly Pocket Reference on CVS and it helped me to figure out CVS. Here's more pointers: Version Control with CVS on Mac OS X (should also work I guess on Linux and the BSDs) http://developer.apple.com/internet/macosx/cvsoverview.html Introduction to CVS http://linux.oreillynet.com/pub/a/linux/2002/01/03/cvs_intro.html Easing Web Application Development with CVS http://linux.oreillynet.com/pub/a/linux/2002/01/31/CVS.html CVS--Concurrent Versions System http://www.cvshome.org/docs/manual/cvs.html CVS--Concurrent Versions System http://www.loria.fr/~molli/cvs/doc/cvs_toc.html Open Source Development with CVS http://cvsbook.red-bean.com/ HTH Cheers -Emmanuel -- ______________________________________________________________________ Emmanuel D?carie / Programmation pour le Web - Programming for the Web Frontier - Perl - PHP - Javascript - XML From sklar at sklar.com Tue Oct 22 14:16:23 2002 From: sklar at sklar.com (David Sklar) Date: Tue, 22 Oct 2002 14:16:23 -0400 Subject: [nycphp-talk] how to use CVS In-Reply-To: <200210221749.g9MHnjqn001882@parsec.nyphp.org> Message-ID: On Tue, 2002-10-22 at 13:29, Phil Powell wrote: > I am required to use CVS for modifying PHP files, but I know > absolutely NOTHING about CVS. Can someone give me a tutorial on > how to use it? This is about using CVS for collaborative web site development: http://www.sklar.com/web-and-cvs/sandbox.html -dave From markjia at yahoo.com Tue Oct 22 17:38:44 2002 From: markjia at yahoo.com (Mark Jia) Date: Tue, 22 Oct 2002 14:38:44 -0700 (PDT) Subject: Can I ask a DHTML question In-Reply-To: <200210221816.g9MIGBqn001955@parsec.nyphp.org> Message-ID: <20021022213844.73527.qmail@web20418.mail.yahoo.com> I got an interface project, but I never be an interface programmer, I think a lot of people out there could know this or could give me some hints, here is my problem: I have one text field and a button, if user want to ask for another text field, user just simply click on the button, then another text field will be generate right after the previous text filed, user can generate unlimited fields, this function should work for both IE5.0+ and Netcape4.0+. like this: ------------------------- ---------------------------------------- Enter your account : | | |click if you have more accts| -------------------------- ----------------------------------------- when user click on "click if you have more accounts", another text filed will be generate right on the next line. I know it will use Javascript, also some knowledge about windows DOM structure, I didn't find some similar website, could you give me some hints? or give me a website using this kind of text fileds. sorry it is not a PHP question. Thank you for your help! Mark Regards Mark Jia -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruce at mtiglobal.com Wed Oct 23 10:13:07 2002 From: bruce at mtiglobal.com (bruce at mtiglobal.com) Date: Wed, 23 Oct 2002 06:13:07 -0800 (CST) Subject: [nycphp-talk] Can I ask a DHTML question In-Reply-To: <200210222138.g9MLcnqn002180@parsec.nyphp.org> References: <200210222138.g9MLcnqn002180@parsec.nyphp.org> Message-ID: <1207.208.229.254.129.1035324787.squirrel@taipei.mtiglobal.com> My experience with javascript is when you click a button to execute a javascript function to output HTML it will refresh the page. You could try creating the page with multiple textboxes with only the first one visible and if they want to add more then add it by making the next one visible; this would also include the text as well. Not sure if text can be switched between visible and not visible (visible = true / false), probably though would use the text color as long as the background was a single color. Of course the drawback with this method is that you would have to have a finite set of textboxes . . . but you could always add another button that would allow the user to enter "more". Hope this helps. I'm just trying to give a quick answer based on what I can remember. - Bruce > > I got an interface project, but I never be an interface programmer, I > think a lot of people out there could know this or could give me some > hints, here is my problem: I have one text field and a button, if user > want to ask for another text field, user just simply click on the > button, then another text field will be generate right after the > previous text filed, user can generate unlimited fields, this function > should work for both IE5.0+ and Netcape4.0+. like this: > ------------------------- > > ---------------------------------------- > Enter your account : | | > |click if you have more accts| > -------------------------- > > ----------------------------------------- > when user click on "click if you have more accounts", another text filed > will be generate right on the next line. I know it will use Javascript, > also some knowledge about windows DOM structure, I didn't find some > similar website, could you give me some hints? or give me a website > using this kind of text fileds. sorry it is not a PHP question. > Thank you for your help! > Mark > > > Regards > > Mark Jia > > > --- Unsubscribe at http://nyphp.org/list --- From rsd at electronink.com Tue Oct 22 18:57:22 2002 From: rsd at electronink.com (Russ Demarest) Date: Tue, 22 Oct 2002 18:57:22 -0400 Subject: [nycphp-talk] Can I ask a DHTML question References: <200210222138.g9MLcnqn002180@parsec.nyphp.org> Message-ID: <3DB5D7D2.1070502@electronink.com> Mark, Everytime the button is pushed send the form back to a PHP script on the server and have it rebuild the page with another text box. You might also want to store the first text field in a "hidden" variable in the page and also print the name to the screen as text. You can continue to add features in the php script depending on what is submitted and how fancy you want to get. There is probably an easier answer but this way you do not have to worry about the client's js abilities, other than displaying the form. Good luck, Russ Mark Jia wrote: >I got an interface project, but I never be an interface programmer, I think a lot of people out there could know this or could give me some hints, here is my problem: >I have one text field and a button, if user want to ask for another text field, user just simply click on the button, then another text field will be generate right after the previous text filed, user can generate unlimited fields, this function should work for both IE5.0+ and Netcape4.0+. >like this: > ------------------------- ---------------------------------------- > Enter your account : | | |click if you have more accts| > -------------------------- ----------------------------------------- >when user click on "click if you have more accounts", another text filed will be generate right on the next line. >I know it will use Javascript, also some knowledge about windows DOM structure, I didn't find some similar website, could you give me some hints? or give me a website using this kind of text fileds. >sorry it is not a PHP question. >Thank you for your help! >Mark > > >Regards > >Mark Jia > > >--- Unsubscribe at http://nyphp.org/list --- > > > > From jim at bizcomputinginc.com Tue Oct 22 18:58:58 2002 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Tue, 22 Oct 2002 18:58:58 -0400 Subject: [nycphp-talk] Can I ask a DHTML question References: <200210222213.g9MMDFqn002225@parsec.nyphp.org> Message-ID: <03be01c27a1e$9b3b0860$6401a8c0@Notebook> I have lots of places where I need this functionality, but I perform it at the server via whatever my server technology is. When the "ADD" button is detected on the server, it recreates the page with the form data, with 1 extra line of data entry. This allows for an unlimited number of lines and eliminates the cross browser issues. Since I know this page will be reloading multiple times, I attempt all the page performance helps I can add like use of a seperate CSS and hand optimized HTML. Jim ----- Original Message ----- From: To: "NYPHP Talk" Sent: Tuesday, October 22, 2002 6:13 PM Subject: Re: [nycphp-talk] Can I ask a DHTML question > My experience with javascript is when you click a button to execute a > javascript function to output HTML it will refresh the page. > > You could try creating the page with multiple textboxes with only the > first one visible and if they want to add more then add it by making the > next one visible; this would also include the text as well. Not sure if > text can be switched between visible and not visible (visible = true / > false), probably though would use the text color as long as the background > was a single color. > > Of course the drawback with this method is that you would have to have a > finite set of textboxes . . . but you could always add another button > that would allow the user to enter "more". > > Hope this helps. I'm just trying to give a quick answer based on what I > can remember. > > - Bruce > > > > > > I got an interface project, but I never be an interface programmer, I > > think a lot of people out there could know this or could give me some > > hints, here is my problem: I have one text field and a button, if user > > want to ask for another text field, user just simply click on the > > button, then another text field will be generate right after the > > previous text filed, user can generate unlimited fields, this function > > should work for both IE5.0+ and Netcape4.0+. like this: > > ------------------------- > > > > ---------------------------------------- > > Enter your account : | | > > |click if you have more accts| > > -------------------------- > > > > ----------------------------------------- > > when user click on "click if you have more accounts", another text filed > > will be generate right on the next line. I know it will use Javascript, > > also some knowledge about windows DOM structure, I didn't find some > > similar website, could you give me some hints? or give me a website > > using this kind of text fileds. sorry it is not a PHP question. > > Thank you for your help! > > Mark > > > > > > Regards > > > > Mark Jia > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > > > From villeg2 at nyc.rr.com Tue Oct 22 22:06:43 2002 From: villeg2 at nyc.rr.com (Jose Villegas) Date: Tue, 22 Oct 2002 19:06:43 -0700 Subject: [nycphp-talk] Can I ask a DHTML question References: <200210222138.g9MLcnqn002180@parsec.nyphp.org> Message-ID: <004e01c27a38$d5c6ad80$1202a8c0@Ronchamp> In Explorer 5 and Netscape 6 you can actually create elements on the fly and insert them anywhere in your document. I've done this successfully with tables and table rows. I'm not sure if this works for all html elements, but give it a try. This is a way it works with tables: Let's say I have a div tag in my html document like this:
With JavaScript I can create a table element like this: var newTable = document.createElement("table"); newTable.width = "300"; newTable.style.backgroundColor = "blue"; newTable.border = 1; I can then append the table to the html document like this: var x = document.getElementById("placeHolder"); x.appendChild(newTable); Of course, with tables I also have to create and append all the table elements. hope this helps, Jose ----- Original Message ----- From: "Mark Jia" To: "NYPHP Talk" Sent: Tuesday, October 22, 2002 2:38 PM Subject: [nycphp-talk] Can I ask a DHTML question > > I got an interface project, but I never be an interface programmer, I think a lot of people out there could know this or could give me some hints, here is my problem: > I have one text field and a button, if user want to ask for another text field, user just simply click on the button, then another text field will be generate right after the previous text filed, user can generate unlimited fields, this function should work for both IE5.0+ and Netcape4.0+. > like this: > ------------------------- ---------------------------------------- > Enter your account : | | |click if you have more accts| > -------------------------- ----------------------------------------- > when user click on "click if you have more accounts", another text filed will be generate right on the next line. > I know it will use Javascript, also some knowledge about windows DOM structure, I didn't find some similar website, could you give me some hints? or give me a website using this kind of text fileds. > sorry it is not a PHP question. > Thank you for your help! > Mark > > > Regards > > Mark Jia From markjia at yahoo.com Tue Oct 22 21:25:50 2002 From: markjia at yahoo.com (Mark Jia) Date: Tue, 22 Oct 2002 18:25:50 -0700 (PDT) Subject: [nycphp-talk] Can I ask a DHTML question In-Reply-To: <200210222306.g9MN6Rqn002303@parsec.nyphp.org> Message-ID: <20021023012550.19741.qmail@web20417.mail.yahoo.com> Thanks for all, actually I can't use hide fields since there is a number limit, also I can't use server side script since there are heavy loads on servers, I know server side is safe and will work absolutely, but I try to resolve it on client side. Hi Jose, Could you give me one or more websites using the way you said here? I think that is the way I am looking, I remembered one was on Ebay, but it was removed recently. Thanks for all! Mark Jose Villegas wrote:In Explorer 5 and Netscape 6 you can actually create elements on the fly and insert them anywhere in your document. I've done this successfully with tables and table rows. I'm not sure if this works for all html elements, but give it a try. This is a way it works with tables: Let's say I have a div tag in my html document like this: With JavaScript I can create a table element like this: var newTable = document.createElement("table"); newTable.width = "300"; newTable.style.backgroundColor = "blue"; newTable.border = 1; I can then append the table to the html document like this: var x = document.getElementById("placeHolder"); x.appendChild(newTable); Of course, with tables I also have to create and append all the table elements. hope this helps, Jose ----- Original Message ----- From: "Mark Jia" To: "NYPHP Talk" Sent: Tuesday, October 22, 2002 2:38 PM Subject: [nycphp-talk] Can I ask a DHTML question > > I got an interface project, but I never be an interface programmer, I think a lot of people out there could know this or could give me some hints, here is my problem: > I have one text field and a button, if user want to ask for another text field, user just simply click on the button, then another text field will be generate right after the previous text filed, user can generate unlimited fields, this function should work for both IE5.0+ and Netcape4.0+. > like this: > ------------------------- ---------------------------------------- > Enter your account : | | |click if you have more accts| > -------------------------- ----------------------------------------- > when user click on "click if you have more accounts", another text filed will be generate right on the next line. > I know it will use Javascript, also some knowledge about windows DOM structure, I didn't find some similar website, could you give me some hints? or give me a website using this kind of text fileds. > sorry it is not a PHP question. > Thank you for your help! > Mark > > > Regards > > Mark Jia --- Unsubscribe at http://nyphp.org/list --- Regards Mark Jia -------------- next part -------------- An HTML attachment was scrubbed... URL: From jayeshsh at netscape.net Tue Oct 22 22:21:20 2002 From: jayeshsh at netscape.net (Jayesh Sheth) Date: Tue, 22 Oct 2002 22:21:20 -0400 Subject: [nycphp-talk] Can I ask a DHTML question References: <200210222138.g9MLcnqn002180@parsec.nyphp.org> Message-ID: <3DB607A0.3000008@netscape.net> Hello Mark, As the others have pointed out, there are basically three ways of adding form elements to the page: 1) The first one is an immediate addition to the page of a certain element. This can be accomplished in version 5.0 + browsers (IE 5+, Netscape 6+) using the W3C Document Object Model specification and JavaScript. This page by Peter-Paul Koch explains how to dynamically add a table row ( tr ) to a table. http://www.xs4all.nl/~ppk/js/tablefun.html . I am sure a similar thing can be accomplished with form input and select | option elements. In this case, you are really adding or removing elements from a page. A good introduction to the DOM and its uses can be found at mozilla.org : http://www.mozilla.org/docs/dom/domref/dom_intro.html . Although adding and removing elements this way can be tedious, it is one way of doing it. 2)You create, say, 10 form elements on the page, and "hide" 9 of them, by using a snippet of JavaScript which will set those 9 to be invisible. So, for example, you could have something like (I left the lesser than and greater than signs out) input class="elem0" value="something 0" input class="elem1" value="something 1" ... input class="elem8" value="something 8" and then on your page you link the stylesheet mystyle.css in the head section, whose contents look like this: input.elem0 { display:inline; } input.elem1 { display:none; } ... input.elem8 { display:none; } thus all elements except the first are hidden when the page loads. Then, using a JavaScript snippet, you can selectively make others visible. I have only tried this with paragraphs ( the P tag) so I am not sure if this wil work. The code for hiding and unhiding elements can be found here: http://www.xs4all.nl/~ppk/js/blockinvi.html and also: http://www.xs4all.nl/~ppk/js/display.html The important difference between hiding elements here is that there are still there - you just can't see them. In the first example, with the DOM you can really remove the elements, so they are gone. 3) Another solution - and appropriate for this discussion group - is using JavaScript to redirect your page (and the chose elements) to a PHP processing script, which will figure out what the user has chosen so far, and build extra form elements to the page, before submitting it back. The benefit of this is that older browsers (such as Netscape 4.x) will be able to use the form you made, because they cannot handle the advanced DOM add/remove of elements, and can barely handle the hiding /unhiding stuff. I hope this helps. If you need more specific code, please let me know. Kind Regards, - Jay Mark Jia wrote: >I got an interface project, but I never be an interface programmer, I think a lot of people out there could know this or could give me some hints, here is my problem: >I have one text field and a button, if user want to ask for another text field, user just simply click on the button, then another text field will be generate right after the previous text filed, user can generate unlimited fields, this function should work for both IE5.0+ and Netcape4.0+. >like this: > ------------------------- ---------------------------------------- > Enter your account : | | |click if you have more accts| > -------------------------- ----------------------------------------- >when user click on "click if you have more accounts", another text filed will be generate right on the next line. >I know it will use Javascript, also some knowledge about windows DOM structure, I didn't find some similar website, could you give me some hints? or give me a website using this kind of text fileds. >sorry it is not a PHP question. >Thank you for your help! >Mark > > >Regards > >Mark Jia > > >--- Unsubscribe at http://nyphp.org/list --- > > > > From villeg2 at nyc.rr.com Wed Oct 23 01:54:23 2002 From: villeg2 at nyc.rr.com (Jose Villegas) Date: Tue, 22 Oct 2002 22:54:23 -0700 Subject: [nycphp-talk] Can I ask a DHTML question References: <200210230125.g9N1Puqn002495@parsec.nyphp.org> Message-ID: <009001c27a58$a395a800$1202a8c0@Ronchamp> Hi Mark, I put together a page that I think does what you need: http://www.third-frame.com/toolbox/dynamic_fields.html I tested this on IE6 and NN6. I think it should also work on IE5. It definitely doesn't work on NN4. Jose ----- Original Message ----- From: "Mark Jia" To: "NYPHP Talk" Sent: Tuesday, October 22, 2002 6:25 PM Subject: Re: [nycphp-talk] Can I ask a DHTML question > > Thanks for all, actually I can't use hide fields since there is a number limit, also I can't use server side script since there are heavy loads on servers, I know server side is safe and will work absolutely, but I try to resolve it on client side. > Hi Jose, > Could you give me one or more websites using the way you said here? I think that is the way I am looking, I remembered one was on Ebay, but it was removed recently. > Thanks for all! > Mark From markjia at yahoo.com Tue Oct 22 23:22:03 2002 From: markjia at yahoo.com (Mark Jia) Date: Tue, 22 Oct 2002 20:22:03 -0700 (PDT) Subject: [nycphp-talk] Can I ask a DHTML question In-Reply-To: <200210230254.g9N2s4qn003095@parsec.nyphp.org> Message-ID: <20021023032203.45400.qmail@web20421.mail.yahoo.com> Thanks Jose! That is Cool! That is what I want! I appreciate your help!!! Mark Jose Villegas wrote:Hi Mark, I put together a page that I think does what you need: http://www.third-frame.com/toolbox/dynamic_fields.html I tested this on IE6 and NN6. I think it should also work on IE5. It definitely doesn't work on NN4. Jose ----- Original Message ----- From: "Mark Jia" To: "NYPHP Talk" Sent: Tuesday, October 22, 2002 6:25 PM Subject: Re: [nycphp-talk] Can I ask a DHTML question > > Thanks for all, actually I can't use hide fields since there is a number limit, also I can't use server side script since there are heavy loads on servers, I know server side is safe and will work absolutely, but I try to resolve it on client side. > Hi Jose, > Could you give me one or more websites using the way you said here? I think that is the way I am looking, I remembered one was on Ebay, but it was removed recently. > Thanks for all! > Mark --- Unsubscribe at http://nyphp.org/list --- Regards Mark Jia -------------- next part -------------- An HTML attachment was scrubbed... URL: From markjia at yahoo.com Tue Oct 22 23:33:17 2002 From: markjia at yahoo.com (Mark Jia) Date: Tue, 22 Oct 2002 20:33:17 -0700 (PDT) Subject: [nycphp-talk] Can I ask a DHTML question In-Reply-To: <200210230225.g9N2POqn002892@parsec.nyphp.org> Message-ID: <20021023033317.93188.qmail@web20416.mail.yahoo.com> Thanks Jayesh! Thanks for All! Jose gave me a code. I appreciate all help! Mark Jayesh Sheth wrote:Hello Mark, As the others have pointed out, there are basically three ways of adding form elements to the page: 1) The first one is an immediate addition to the page of a certain element. This can be accomplished in version 5.0 + browsers (IE 5+, Netscape 6+) using the W3C Document Object Model specification and JavaScript. This page by Peter-Paul Koch explains how to dynamically add a table row ( tr ) to a table. http://www.xs4all.nl/~ppk/js/tablefun.html . I am sure a similar thing can be accomplished with form input and select | option elements. In this case, you are really adding or removing elements from a page. A good introduction to the DOM and its uses can be found at mozilla.org : http://www.mozilla.org/docs/dom/domref/dom_intro.html . Although adding and removing elements this way can be tedious, it is one way of doing it. 2)You create, say, 10 form elements on the page, and "hide" 9 of them, by using a snippet of JavaScript which will set those 9 to be invisible. So, for example, you could have something like (I left the lesser than and greater than signs out) input class="elem0" value="something 0" input class="elem1" value="something 1" ... input class="elem8" value="something 8" and then on your page you link the stylesheet mystyle.css in the head section, whose contents look like this: input.elem0 { display:inline; } input.elem1 { display:none; } .. input.elem8 { display:none; } thus all elements except the first are hidden when the page loads. Then, using a JavaScript snippet, you can selectively make others visible. I have only tried this with paragraphs ( the P tag) so I am not sure if this wil work. The code for hiding and unhiding elements can be found here: http://www.xs4all.nl/~ppk/js/blockinvi.html and also: http://www.xs4all.nl/~ppk/js/display.html The important difference between hiding elements here is that there are still there - you just can't see them. In the first example, with the DOM you can really remove the elements, so they are gone. 3) Another solution - and appropriate for this discussion group - is using JavaScript to redirect your page (and the chose elements) to a PHP processing script, which will figure out what the user has chosen so far, and build extra form elements to the page, before submitting it back. The benefit of this is that older browsers (such as Netscape 4.x) will be able to use the form you made, because they cannot handle the advanced DOM add/remove of elements, and can barely handle the hiding /unhiding stuff. I hope this helps. If you need more specific code, please let me know. Kind Regards, - Jay Mark Jia wrote: >I got an interface project, but I never be an interface programmer, I think a lot of people out there could know this or could give me some hints, here is my problem: >I have one text field and a button, if user want to ask for another text field, user just simply click on the button, then another text field will be generate right after the previous text filed, user can generate unlimited fields, this function should work for both IE5.0+ and Netcape4.0+. >like this: > ------------------------- ---------------------------------------- > Enter your account : | | |click if you have more accts| > -------------------------- ----------------------------------------- >when user click on "click if you have more accounts", another text filed will be generate right on the next line. >I know it will use Javascript, also some knowledge about windows DOM structure, I didn't find some similar website, could you give me some hints? or give me a website using this kind of text fileds. >sorry it is not a PHP question. >Thank you for your help! >Mark > > >Regards > >Mark Jia > > > > > > > --- Unsubscribe at http://nyphp.org/list --- Regards Mark Jia -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony at jupub.com Wed Oct 23 04:28:35 2002 From: tony at jupub.com (Anthony Julien) Date: Wed, 23 Oct 2002 01:28:35 -0700 Subject: [nycphp-talk] PHP Form Question In-Reply-To: <200210230333.g9N3XLqn021733@parsec.nyphp.org> Message-ID: <6C5231B6-E661-11D6-86B8-003065D6D27C@jupub.com> Can anyone tell me what wrong with this code? I'm just trying to do an INSERT query in mySQL. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1038 bytes Desc: not available URL: From zaunere at yahoo.com Wed Oct 23 08:39:48 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 23 Oct 2002 05:39:48 -0700 (PDT) Subject: Tonight, NYPHP Presents: AMP Development under Win2K and the AIP Message-ID: <20021023123948.22924.qmail@web12807.mail.yahoo.com> Tonight, NYPHP Presents... When: 6:30pm Tonight, 10/23/02 Where: Digital Pulp, Inc What: "Introduction to AMP Technology -- Development Under Windows 2000" and "The Net and The Association of Internet Professionals," More at http://nyphp.org. ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ From paul at thelanding.us Wed Oct 23 12:58:54 2002 From: paul at thelanding.us (Landing) Date: Wed, 23 Oct 2002 12:58:54 -0400 Subject: Web-Master Full Time Job Opportunity at a Fortune 500 HQ Message-ID: <003a01c27ab5$7a0655e0$33b0fea9@ivfd.com> I've been telling a friend of mine who is a CIO at a very large company about the impact LAMP could have on his international company HQ in NYC. He's interested but has a short term need. He needs a webmaster now in his Oracle/NT environment, going to Sequel Server/ NT environment. Where the technology goes is impacted by the business case as they move forward. If this opportunity is of interest to any of you contact me and we can talk and I can get you in touch. -------------- next part -------------- An HTML attachment was scrubbed... URL: From e-merge at dynamicink.com Wed Oct 23 16:25:26 2002 From: e-merge at dynamicink.com (Dynamic Ink) Date: Wed, 23 Oct 2002 16:25:26 -0400 Subject: [nycphp-talk] Web-Master Full Time Job Opportunity at a Fortune 500 HQ References: <200210231656.g9NGuiqn022850@parsec.nyphp.org> Message-ID: <005601c27ad2$70bb7750$57eafea9@win2kas> Dear Paul, I am qualified and interested. Please give me some more details of the position. Thank you, -Eric ----- Original Message ----- From: "Landing" To: "NYPHP Talk" Sent: Wednesday, October 23, 2002 12:56 PM Subject: [nycphp-talk] Web-Master Full Time Job Opportunity at a Fortune 500 HQ > I've been telling a friend of mine who is a CIO at a very large company about the impact LAMP could have on his international company HQ in NYC. > > He's interested but has a short term need. He needs a webmaster now in his Oracle/NT environment, going to Sequel Server/ NT environment. Where the technology goes is impacted by the business case as they move forward. > > If this opportunity is of interest to any of you contact me and we can talk and I can get you in touch. > > > > --- Unsubscribe at http://nyphp.org/list --- > > > From zaunere at yahoo.com Wed Oct 23 23:50:33 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 23 Oct 2002 20:50:33 -0700 (PDT) Subject: Slashdot Meetup Tomorrow Night (10/24 @ 7:00pm) Message-ID: <20021024035033.93534.qmail@web12808.mail.yahoo.com> Just a quick reminder that the monthly Slashdot meetup is happening tomorrow, 10/24 at 7:00pm. When: 10/24 @ 7:00pm Where: Remote Lounge (http://remotelounge.com) Details at http://slashdot.meetup.com (or just show up). See you there, ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ From nyphp at websapp.com Thu Oct 24 11:06:47 2002 From: nyphp at websapp.com (Daniel Kushner) Date: Thu, 24 Oct 2002 11:06:47 -0400 Subject: Web Developer position In-Reply-To: <200210231656.g9NGuiqn022850@parsec.nyphp.org> Message-ID: Got this on a different mailing list. Maybe one of you guy is interested: My company is looking to fill the following position: Sports Systems is looking for a well-rounded web developer that is able to take ownership of a project from start to finish. The Web Developer needs to be able to develop requirements, design, implement and support Web sites. Responsibilities include working on all of Sports Systems? web sites as well as clients? sites created by Sports Systems using our own content management system. Job Qualifications: Cold Fusion, SQL Server 2000 Job also involves: FoxPro, relational database design, IIS 5.0, XML, CSS, JavaScript, WebTrends Reporting Center, Flash We would prefer someone interested in sports since the company provides services to sports teams and leagues at the college and professional level. Please send resume and cover letter to Michelle Kempner, michelle at sportssystems.com. From MJames at emarketer.com Thu Oct 24 11:12:09 2002 From: MJames at emarketer.com (Michael James) Date: Thu, 24 Oct 2002 11:12:09 -0400 Subject: [nycphp-talk] Tonight, NYPHP Presents: AMP Development under Win2K and the AIP Message-ID: I enjoyed the meeting last night (first one for me). Thanks! I would be interested in seeing a presentation about Flash and PHP/MySQL if other people are interested too. I have been doing some work in this area, but I would like to hear about other people's trials and tribulations.... One good website for this I found is: www.flash-db.com. Michael Michael James www.emarketer.com 821 Broadway New York, NY 10003 (212) 763-6076 (direct #) (212) 677-6300 (main #) mjames at emarketer.com Join over 50,000 marketers receiving internet and e-business stat news daily. Subscribe to the free eMarketer Daily: http://www.emarketer.com/news/newsletter.php >>> zaunere at yahoo.com 10/23/02 08:39AM >>> Tonight, NYPHP Presents... When: 6:30pm Tonight, 10/23/02 Where: Digital Pulp, Inc What: "Introduction to AMP Technology -- Development Under Windows 2000" and "The Net and The Association of Internet Professionals," More at http://nyphp.org. ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ --- Unsubscribe at http://nyphp.org/list --- From andrew at digitalpulp.com Thu Oct 24 11:30:49 2002 From: andrew at digitalpulp.com (Andrew M. Yochum) Date: Thu, 24 Oct 2002 11:30:49 -0400 (EDT) Subject: PHP Job Message-ID: Contractual job opp... -- Andrew Yochum Digital Pulp, Inc. 212.679.0676x255 andrew at digitalpulp.com ---------- Forwarded message ---------- Date: Wed, 23 Oct 2002 15:45:05 -0700 From: mjr40 at ix.netcom.com Reply-To: nyc-g33ks at nyc-g33ks.org To: nyc-g33ks at nyc-g33ks.org Subject: [nyc-g33ks] PHP Job PHP Guru Sought for Immediate Contract Work Innovative entertainment application production company looking for PHP guru for contract work starting immediately. Initial project is a dynamic backend for an existing front end, involving media downloads/uploads and database connectivity. Must have 2+ years of experience, and more specifically, must be highly proficient or at least knowledgeable in the following issues: - best practices for connecting to a database and performing database related logic; - knowledge of best practices of database schema and related topics(stored procedures); - methods of authenticating clients before allowing downloads, as well as accepting uploads; - audio processing via PHP modules; - connecting to third party HTTP services via PHP. Additionally, candidates must have had experience building related projects for massively scalable and robust implementations, and must have well-organized and commented coding techniques. Candidates should also be easy to communicate with and able to document their work (before and after), and should have had experience in architecting the backends for a variety of projects they've worked on. Company: MusicHall Worldwide Contact: Emerson Wong Phone: 917-270-3627 Fax: URL: Email: emerson at mh2o.com Posted: 20-Oct-02, 04:36 PM From fields at surgam.net Thu Oct 24 11:45:17 2002 From: fields at surgam.net (Adam Fields) Date: Thu, 24 Oct 2002 10:45:17 -0500 Subject: [nycphp-talk] Tonight, NYPHP Presents: AMP Development under Win2K and the AIP In-Reply-To: <200210241509.g9OF9aqn024463@parsec.nyphp.org> References: <200210241509.g9OF9aqn024463@parsec.nyphp.org> Message-ID: <20021024154517.GB19244@eye.surgam.net> On Thu, Oct 24, 2002 at 11:09:36AM -0400, Michael James wrote: > I enjoyed the meeting last night (first one for me). Thanks! Likewise! > I would be interested in seeing a presentation about Flash and PHP/MySQL if other people are interested too. I have been doing some work in this area, but I would like to hear about other people's trials and tribulations.... One good website for this I found is: www.flash-db.com. > Following on Andrew's suggestion, I think I'd like to see something on good development tools. -- - 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 dkrook at hotmail.com Thu Oct 24 11:48:20 2002 From: dkrook at hotmail.com (D C Krook) Date: Thu, 24 Oct 2002 10:48:20 -0500 Subject: NYNMA: PHP Guru Sought Message-ID: Came across this on the New York New Media Assoc. boards: PHP Guru Sought for Immediate Contract Work Innovative entertainment application production company looking for PHP guru for contract work starting immediately. Initial project is a dynamic backend for an existing front end, involving media downloads/uploads and database connectivity. Must have 2+ years of experience, and more specifically, must be highly proficient or at least knowledgeable in the following issues: - best practices for connecting to a database and performing database related logic; - knowledge of best practices of database schema and related topics(stored procedures); - methods of authenticating clients before allowing downloads, as well as accepting uploads; - audio processing via PHP modules; - connecting to third party HTTP services via PHP. Additionally, candidates must have had experience building related projects for massively scalable and robust implementations, and must have well-organized and commented coding techniques. Candidates should also be easy to communicate with and able to document their work (before and after), and should have had experience in architecting the backends for a variety of projects they've worked on. Company: MusicHall Worldwide Contact: Emerson Wong Phone: 917-270-3627 Fax: URL: Email: emerson at mh2o.com Posted: 20-Oct-02, 04:36 PM ========================================== Daniel Christer Krook http://krook.net/ || http://krook.info/ http://civet.net/ || http://dev.krook.org/ _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp From palexanderbalogh at yahoo.com Thu Oct 24 18:21:03 2002 From: palexanderbalogh at yahoo.com (Peter Balogh) Date: Thu, 24 Oct 2002 15:21:03 -0700 (PDT) Subject: Programmer needed Message-ID: <20021024222103.11293.qmail@web40312.mail.yahoo.com> The company I'm working for is looking for a contract programmer in the New York area. The project will begin next Wednesday, by all indications, and will involve PHP and mySQL programming. They're using Postnuke for a CMS and want to create customized sections that tap into Postnuke session variables, so familiarity with the inner workings of that CMS is a big, big plus. Some light travel within the NY area is required but will be fully reimbursed, and they tell me that the pay will be competitive. Reply to me off-list with relevant links and any information you wish to pass along. Thank you. -------- Peter Balogh http://www.drunkencop.com __________________________________________________ __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ From georgenatalino at yahoo.com Fri Oct 25 01:41:39 2002 From: georgenatalino at yahoo.com (georgenatalino at yahoo.com) Date: Fri, 25 Oct 2002 01:41:39 -0400 Subject: Free Exhibits Pass and more to LinuxWorld New York Message-ID: <3DB8D993.BA3F3AAB@yahoo.com> An HTML attachment was scrubbed... URL: From cjtotheg at artisanquest.com Fri Oct 25 15:38:12 2002 From: cjtotheg at artisanquest.com (Clay Givens) Date: Sat, 26 Oct 2002 03:38:12 +0800 (MYT) Subject: Executing from the command line Message-ID: Hello, I'm trying to run a program from the command line using the passthru() function. I'm using phptriad on an NT machine. I can get the passthru() function to execut basic DOS commands like "dir" etc, but as soon as I try to execute a program, my browser spins. I'm adding an extra layer even, by running the program through a c command line parser that I wrote. Still no good. The command line argument is executed, but it starts a rogue process or something because the programs are running in my task manager, but the browser never comes back. So this is quite a situation for me now... I'm wondering if anyone has experience running command lines from a PHP page. Thanks a lot! Clay For your reference, here is my php code: "); print("
\ "); print("\ "); print("\ "); print("
\ "); if($go == 1){ //execute local c program //$command = "sys_run.exe c://progra~1/Segue/SilkTest/partner.exe"; //$command = "/apache/htdocs/pats/sys_run.exe /progra~1/Segue/SilkTest/partner.exe -r /apache/htdocs/pats/pats_individual_template.t > output.txt"; $command = "/apache/htdocs/pats/sys_run.exe /progra~1/Segue/SilkTest/partner.exe -q -resexport -r /apache/htdocs/pats/pats_testplan.pln"; //$command = "/apache/htdocs/pats/sys_run.exe /progra~1/Segue/SilkTest/partner.exe"; //$command = "/apache/htdocs/pats/sys_run.exe dir"; //works //$return = exec($command); //$return = system($command); //$return = exec("c://progra~1/Segue/SilkTest/partner.exe -r c://apache/htdocs/pats/pats_individual_template.t"); print("
");
		passthru($command);
	print("
"); } ?> and here is my c program sys_run.c that is using a system() command with the parsed arguments in argv[]: #include #include #include int main(int argc, char * argv[]){ int a, b, c; char CmdLn[5200]; if(argc < 2){ printf("please specify a system command (with optional arguments) as an argument"); return 0; } printf("argc = %d\ ", argc); for(a=1, b=2, c=argc; b<=c; a++, b++){ if(b == 2){ strcpy(CmdLn, argv[a]); strcat(CmdLn, " "); } if( (b > 2) && (b < c) ){ strcat(CmdLn, argv[a]); strcat(CmdLn, " "); } if(b == c){ strcat(CmdLn, argv[a]); } printf("loop: CmdLn = %s\ ", CmdLn); } //"c://progra~1/Segue/SilkTest/partner.exe -r c://apache/htdocs/pats/pats_individual_template.t" printf("final: CmdLn = %s\ ", CmdLn); system(CmdLn); return 0; } From zaunere at yahoo.com Sun Oct 27 20:57:03 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Sun, 27 Oct 2002 17:57:03 -0800 (PST) Subject: Win2K Development Presentation Online Message-ID: <20021028015703.91640.qmail@web12803.mail.yahoo.com> Good evening, Last week's presentation material from Daniel is now online at http://nyphp.org/presentations/ If anyone notices any errors, please let me know. Also, there were several good links and points made during the presentation, and I noticed some people were taking notes as well. Please send me any useful notes and I'll add them to the presentation so others may see them. Thank you, ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ From fields at surgam.net Sun Oct 27 21:16:48 2002 From: fields at surgam.net (Adam Fields) Date: Sun, 27 Oct 2002 20:16:48 -0600 Subject: unserialize_callback_func Message-ID: <20021028021648.GF14105@eye.surgam.net> I'm trying to use unserialize_callback_func to set up an autoloader function to be called if an object is unserialized and the class hasn't been defined yet. However, it doesn't seem to work - the callback function isn't getting called. I tried ini_set and setting the value explicitly in the php.ini, but it doesn't call the function. Drawing on the example from the docs: ------------------- function __unser($class) { die ("Callback"); } ini_set('unserialize_callback_func','__unser'); $serialized_object='O:1:"a":1:{s:5:"value";s:3:"100";}'; print_r (unserialize($serialized_object)); ------------------- should print "Callback", but instead, it prints (as expected without the callback) "Array ( ) __PHP_Incomplete_Class Object ( [__PHP_Incomplete_Class_Name] => a [value] => 100 ) ". Has anyone used this successfully? Also, assuming there's a way to do this, does anyone know if this callback can be a class method for a singleton class instead of a regular function? -- - 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 kaangunay at superonline.com Sun Oct 27 21:20:07 2002 From: kaangunay at superonline.com (Kaan Gunay) Date: Sun, 27 Oct 2002 21:20:07 -0500 Subject: Hosting In-Reply-To: <200210280157.g9S1v7qn032464@parsec.nyphp.org> Message-ID: Does anyone know a good hosting company with php and mysql support. It should be either free or cheap since I am a student. I need to use it to test my application on the web. Thank you very much Kaan From nyphp at altunergil.com Sun Oct 27 21:43:17 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Sun, 27 Oct 2002 21:43:17 -0500 Subject: [nycphp-talk] Hosting In-Reply-To: <200210280220.g9S2KUqn032516@parsec.nyphp.org> References: <200210280220.g9S2KUqn032516@parsec.nyphp.org> Message-ID: <20021027214317.1fb6284a.nyphp@altunergil.com> jtlnet.com has pretty decent prices and a very high speed network which makes it ideal for small sites. oktay On Sun, 27 Oct 2002 21:20:30 -0500 Kaan Gunay wrote: > > > Does anyone know a good hosting company with php and mysql support. > It should be either free or cheap since I am a student. I need to use it > to test my application on the web. > > Thank you very much > > Kaan > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From jim at bizcomputinginc.com Sun Oct 27 21:51:37 2002 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Sun, 27 Oct 2002 21:51:37 -0500 Subject: [nycphp-talk] Hosting References: <200210280220.g9S2KUqn032516@parsec.nyphp.org> Message-ID: <007c01c27e2c$ef65c440$6401a8c0@Notebook> I have a freind who runs www.hostvelocity.com which provides quite cheap hosting with php and mysql support. Check it out, and if you sign up, let Stephen know that Jim Hendricks with Biz Computing made the recommendation. Jim ----- Original Message ----- From: "Kaan Gunay" To: "NYPHP Talk" Sent: Sunday, October 27, 2002 9:20 PM Subject: [nycphp-talk] Hosting > > > Does anyone know a good hosting company with php and mysql support. > It should be either free or cheap since I am a student. I need to use it > to test my application on the web. > > Thank you very much > > Kaan > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > > > From jbmurphyii at mac.com Sun Oct 27 22:16:26 2002 From: jbmurphyii at mac.com (John B. Murphy) Date: Sun, 27 Oct 2002 22:16:26 -0500 Subject: [nycphp-talk] Hosting In-Reply-To: <200210280220.g9S2KUqn032516@parsec.nyphp.org> Message-ID: Kaan We have been using ipowerweb.com has that and more for 7.95/mo john On Sunday, October 27, 2002, at 09:20 PM, Kaan Gunay wrote: > > > Does anyone know a good hosting company with php and mysql support. > It should be either free or cheap since I am a student. I need to use > it > to test my application on the web. > > Thank you very much > > Kaan > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From punktoad at oddpost.com Sun Oct 27 22:16:40 2002 From: punktoad at oddpost.com (Jeffrey Konikowski) Date: Sun, 27 Oct 2002 19:16:40 -0800 Subject: [nycphp-talk] Hosting Message-ID: <200210280321.g9S3LXqn032635@parsec.nyphp.org> I have used phpwebhosting.com and have had good experiences in both the uptime of their servers and responses from customer service. Jeffrey -----Original Message----- Does anyone know a good hosting company with php and mysql support. It should be either free or cheap since I am a student. I need to use it to test my application on the web. Thank you very much Kaan --- Unsubscribe at http://nyphp.org/list --- From nyphp at websapp.com Sun Oct 27 22:41:34 2002 From: nyphp at websapp.com (Daniel Kushner) Date: Sun, 27 Oct 2002 22:41:34 -0500 Subject: [nycphp-talk] Hosting In-Reply-To: <200210280321.g9S3Lbqn032639@parsec.nyphp.org> Message-ID: <000001c27e33$f383d3d0$7560c118@blackjack> Okay, so I'll post mine too :) http://thehostingcompany.us --Daniel -----Original Message----- From: Jeffrey Konikowski [mailto:punktoad at oddpost.com] Sent: Sunday, October 27, 2002 10:22 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Hosting I have used phpwebhosting.com and have had good experiences in both the uptime of their servers and responses from customer service. Jeffrey -----Original Message----- Does anyone know a good hosting company with php and mysql support. It should be either free or cheap since I am a student. I need to use it to test my application on the web. Thank you very much Kaan --- Unsubscribe at http://nyphp.org/list --- From joserivera at mindspring.com Sun Oct 27 22:50:31 2002 From: joserivera at mindspring.com (Jose B. Rivera) Date: Sun, 27 Oct 2002 22:50:31 -0500 Subject: [nycphp-talk] Hosting In-Reply-To: <200210280321.g9S3Lbqn032639@parsec.nyphp.org> References: <200210280321.g9S3Lbqn032639@parsec.nyphp.org> Message-ID: <5ucpru86ivrc8r1kdo7io21o610fmat88d@4ax.com> I have been using www.hostingmatters.com. Great prices and features a very nice online community of all who use this host. Jose B. Rivera www.east-harlem.com www.powermemorialacademy.com > From tony at jupub.com Mon Oct 28 02:49:40 2002 From: tony at jupub.com (Anthony Julien) Date: Sun, 27 Oct 2002 23:49:40 -0800 Subject: [nycphp-talk] Hosting In-Reply-To: <200210280220.g9S2KUqn032516@parsec.nyphp.org> Message-ID: www.eperfect.net. $10 per month On Sunday, October 27, 2002, at 06:20 PM, Kaan Gunay wrote: > > > Does anyone know a good hosting company with php and mysql support. > It should be either free or cheap since I am a student. I need to use > it > to test my application on the web. > > Thank you very much > > Kaan > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From jonbaer at jonbaer.net Sun Oct 27 23:55:15 2002 From: jonbaer at jonbaer.net (Jon Baer) Date: Sun, 27 Oct 2002 23:55:15 -0500 Subject: [nycphp-talk] Hosting References: <200210280220.g9S2KUqn032516@parsec.nyphp.org> Message-ID: <3DBCC333.9030902@jonbaer.net> http://www.phpwebhosting.com for $10 a month for php and mysql you can't really complain. - jon Kaan Gunay wrote: >Does anyone know a good hosting company with php and mysql support. >It should be either free or cheap since I am a student. I need to use it >to test my application on the web. > >Thank you very much > >Kaan > > > > >--- Unsubscribe at http://nyphp.org/list --- > > > > > > From dorgan at optonline.net Mon Oct 28 00:18:14 2002 From: dorgan at optonline.net (Donald J. Organ IV) Date: Mon, 28 Oct 2002 00:18:14 -0500 Subject: [nycphp-talk] Hosting References: <200210280220.g9S2KUqn032516@parsec.nyphp.org> Message-ID: <00a501c27e41$6b4d0960$0600020a@laptop01> does anyone know any free php/mysql hosting sites? ----- Original Message ----- From: "Kaan Gunay" To: "NYPHP Talk" Sent: Sunday, October 27, 2002 9:20 PM Subject: [nycphp-talk] Hosting > > > Does anyone know a good hosting company with php and mysql support. > It should be either free or cheap since I am a student. I need to use it > to test my application on the web. > > Thank you very much > > Kaan > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > From lists at ehummel.net Mon Oct 28 00:44:48 2002 From: lists at ehummel.net (Erik) Date: Mon, 28 Oct 2002 00:44:48 -0500 Subject: [nycphp-talk] Hosting In-Reply-To: <200210280220.g9S2KUqn032516@parsec.nyphp.org> Message-ID: <000001c27e45$231b7380$0200a8c0@laptophum> http://www.loadedweb.com/ $7.00/month mySql & php No problems with their service. They will even create a custom plan for you if what you need is in between two of the set plans (what I did) Erik >Does anyone know a good hosting company with php and mysql support. >Kaan From jonbaer at jonbaer.net Mon Oct 28 00:38:54 2002 From: jonbaer at jonbaer.net (Jon Baer) Date: Mon, 28 Oct 2002 00:38:54 -0500 Subject: [nycphp-talk] Hosting References: <200210280523.g9S5NLqn032850@parsec.nyphp.org> Message-ID: <3DBCCD6E.2000800@jonbaer.net> try these guys http://localhost :-) - jon Donald J. Organ IV wrote: >does anyone know any free php/mysql hosting sites? > > > > From nyphp at altunergil.com Mon Oct 28 00:45:53 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Mon, 28 Oct 2002 00:45:53 -0500 Subject: [nycphp-talk] Hosting In-Reply-To: <200210280545.g9S5jiqn032898@parsec.nyphp.org> References: <200210280545.g9S5jiqn032898@parsec.nyphp.org> Message-ID: <20021028004553.0d97e284.nyphp@altunergil.com> This is one of those threads that should really be a FAQ item on the web site. By the way.. very good one Jon :P oktay On Mon, 28 Oct 2002 00:45:44 -0500 Jon Baer wrote: > try these guys > > http://localhost > > :-) > > - jon > > Donald J. Organ IV wrote: > > >does anyone know any free php/mysql hosting sites? > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From mz34 at nyu.edu Mon Oct 28 06:50:36 2002 From: mz34 at nyu.edu (Matthew Zimmerman) Date: Mon, 28 Oct 2002 06:50:36 -0500 Subject: [nycphp-talk] Hosting In-Reply-To: <200210280316.g9S3GXqn032625@parsec.nyphp.org> Message-ID: <78A5FA4B-EA6B-11D6-9C63-00039344DCA8@nyu.edu> I use this as well. On Sunday, October 27, 2002, at 10:16 PM, John B. Murphy wrote: > Kaan > > We have been using ipowerweb.com has that and more for 7.95/mo > > > john > > > On Sunday, October 27, 2002, at 09:20 PM, Kaan Gunay wrote: > >> >> >> Does anyone know a good hosting company with php and mysql support. >> It should be either free or cheap since I am a student. I need to use >> it >> to test my application on the web. >> >> Thank you very much >> >> Kaan >> >> >> >> >> >> >> > > > > --- Unsubscribe at http://nyphp.org/list --- > > > MZ _________________ Matthew Zimmerman Humanities Computing Group, NYU Tel: 212.998.3038 Fax: 212.995.4120 From jim at bizcomputinginc.com Mon Oct 28 07:25:54 2002 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Mon, 28 Oct 2002 07:25:54 -0500 Subject: Sun and LAMP References: <200210281150.g9SBogqn033555@parsec.nyphp.org> Message-ID: <00c301c27e7d$298a3390$6401a8c0@Notebook> Thought you all would get a hoot out of this: http://www.theopenenterprise.com/story/TOE20021025S0001 So, how many of you who are LAMP are also Java as Sun seems to think? I'll start by saying I'm a Java programmer who has added LAMP/WAMP to my repetoir. Jim _____________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ From emm at scriptdigital.com Mon Oct 28 09:37:46 2002 From: emm at scriptdigital.com (Emmanuel. M. Decarie) Date: Mon, 28 Oct 2002 09:37:46 -0500 Subject: [nycphp-talk] Hosting In-Reply-To: <200210281150.g9SBogqn033555@parsec.nyphp.org> References: <200210281150.g9SBogqn033555@parsec.nyphp.org> Message-ID: http://www.cornerhost.com Start at $5/month. I've been we cornerhost.com for six months and I'm more than satisfied. Cheers -Emmanuel -- ______________________________________________________________________ Emmanuel D?carie / Programmation pour le Web - Programming for the Web Frontier - Perl - PHP - Javascript - XML From nyphp at jimbishop.org Mon Oct 28 10:21:00 2002 From: nyphp at jimbishop.org (nyphp at jimbishop.org) Date: Mon, 28 Oct 2002 07:21:00 -0800 (PST) Subject: Commercial-grade Hosting In-Reply-To: <200210281225.g9SCPxqn033606@parsec.nyphp.org> Message-ID: Now that we've heard all (1) of the realy cheap places to host your AMP site (2), does anyone have recommendations for ISPs that are good for fully or partially managed servers? co-location? I work for a small dev shop, and we are constantly shuttling between all of these little companies to fine a good deal. I've been trying to persuade the group to invest in a managed or a colo server recently. One of our clients has a managed server with AT&T. The service is impeccable, but the price tag is close to $5k/month which is a little high. I would appreciate all of your responses. I've done some research myself, but all of these companies say they do the same thing with a varying array of pricing structures. So tell me your experiences with these guys. Thanks in advance, Jim Bishop ================================================================== 1 jtlnet.com hostvelocity.com ipowerweb.com phpwebhosting.com thehostingcompany.us hostingmatters.com eperfect.net loadedweb.com cornerhost.com 2 I use http://www.he.net, and they rock. From fields at surgam.net Mon Oct 28 10:38:37 2002 From: fields at surgam.net (Adam Fields) Date: Mon, 28 Oct 2002 09:38:37 -0600 Subject: [nycphp-talk] Sun and LAMP In-Reply-To: <200210281225.g9SCPxqn033606@parsec.nyphp.org> References: <200210281225.g9SCPxqn033606@parsec.nyphp.org> Message-ID: <20021028153837.GH14105@eye.surgam.net> On Mon, Oct 28, 2002 at 07:25:59AM -0500, Jim Hendricks wrote: > Thought you all would get a hoot out of this: > > http://www.theopenenterprise.com/story/TOE20021025S0001 > > So, how many of you who are LAMP are also Java as Sun seems to think? > > I'll start by saying I'm a Java programmer who has added LAMP/WAMP to my > repetoir. As always, the right tool for the right job. PHP and Java are >not< competitors. I'm finding that PHP is, in addition to being a decent open application platform, an appropriate tool for rapid prototyping of Java applications. As long as you use classes, it's not terribly difficult to port PHP apps to Java. This would be made much much easier with two features which PHP lacks (which have just become my top two feature requests): 1) Server-side request forwarding. 2) Private and protected instance variables. -- - 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 jim at bizcomputinginc.com Mon Oct 28 10:48:23 2002 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Mon, 28 Oct 2002 10:48:23 -0500 Subject: [nycphp-talk] Commercial-grade Hosting References: <200210281521.g9SFL4qn033794@parsec.nyphp.org> Message-ID: <016101c27e99$732b9f90$6401a8c0@Notebook> I believe www.hostvelocity.com does co-lo, but I don't know what his prices are etc. for that since I go with just the hosting service. I also know that Host Velocity also does service reselling so if NYPHP wanted to provide hosting service, they could be a Host Velocity reseller and not have to worry about the majority of the headache of managing the hosting. Jim ----- Original Message ----- From: To: "NYPHP Talk" Sent: Monday, October 28, 2002 10:21 AM Subject: [nycphp-talk] Commercial-grade Hosting > > Now that we've heard all (1) of the realy cheap places to host your AMP > site (2), does anyone have recommendations for ISPs that are good for > fully or partially managed servers? co-location? I work for a small dev > shop, and we are constantly shuttling between all of these little > companies to fine a good deal. > > I've been trying to persuade the group to invest in a managed or a colo > server recently. One of our clients has a managed server with AT&T. The > service is impeccable, but the price tag is close to $5k/month which is a > little high. I would appreciate all of your responses. I've done some > research myself, but all of these companies say they do the same thing > with a varying array of pricing structures. > > So tell me your experiences with these guys. > > > Thanks in advance, > > Jim Bishop > > > > ================================================================== > > 1 jtlnet.com > hostvelocity.com > ipowerweb.com > phpwebhosting.com > thehostingcompany.us > hostingmatters.com > eperfect.net > loadedweb.com > cornerhost.com > > 2 I use http://www.he.net, and they rock. > > > > --- Unsubscribe at http://nyphp.org/list --- > > > > > From danielc at analysisandsolutions.com Mon Oct 28 11:10:50 2002 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 28 Oct 2002 11:10:50 -0500 Subject: [nycphp-talk] Commercial-grade Hosting In-Reply-To: <200210281521.g9SFL4qn033794@parsec.nyphp.org> References: <200210281521.g9SFL4qn033794@parsec.nyphp.org> Message-ID: <20021028161050.GA6080@panix.com> Hi Jim: On Mon, Oct 28, 2002 at 10:21:04AM -0500, nyphp at jimbishop.org wrote: > > Now that we've heard all (1) of the realy cheap places to host your AMP > site (2), does anyone have recommendations for ISPs that are good for > fully or partially managed servers? A client of mine uses Pair for a dedicated server. They've been pretty responsive. No major snafus. Enjoy, --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From nyphp at altunergil.com Mon Oct 28 11:22:00 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Mon, 28 Oct 2002 11:22:00 -0500 Subject: [nycphp-talk] Commercial-grade Hosting In-Reply-To: <200210281521.g9SFL4qn033794@parsec.nyphp.org> References: <200210281521.g9SFL4qn033794@parsec.nyphp.org> Message-ID: <20021028112200.0a415281.nyphp@altunergil.com> I work for Datapipe.. (www.datapipe.com). Although we do colo, it's not our specialty. We do provide dedicated, security managed (we apply all security related patches without you having to do anything), and fully managed ( you tell us what to do and it will get done immediately). We provide both Unix and Windows based solutions and have very knowladgeable support personnel for both. (I was one of those hehe). Anyway. Let me know if you have any questions or would like a contact name from our sales department. oktay On Mon, 28 Oct 2002 10:21:04 -0500 nyphp at jimbishop.org wrote: > > Now that we've heard all (1) of the realy cheap places to host your AMP > site (2), does anyone have recommendations for ISPs that are good for > fully or partially managed servers? co-location? I work for a small dev > shop, and we are constantly shuttling between all of these little > companies to fine a good deal. > > I've been trying to persuade the group to invest in a managed or a colo > server recently. One of our clients has a managed server with AT&T. The > service is impeccable, but the price tag is close to $5k/month which is a > little high. I would appreciate all of your responses. I've done some > research myself, but all of these companies say they do the same thing > with a varying array of pricing structures. > > So tell me your experiences with these guys. > > > Thanks in advance, > > Jim Bishop > > > > ================================================================== > > 1 jtlnet.com > hostvelocity.com > ipowerweb.com > phpwebhosting.com > thehostingcompany.us > hostingmatters.com > eperfect.net > loadedweb.com > cornerhost.com > > 2 I use http://www.he.net, and they rock. > > > > --- Unsubscribe at http://nyphp.org/list --- > > From sailer at bnl.gov Mon Oct 28 11:25:40 2002 From: sailer at bnl.gov (Tim Sailer) Date: Mon, 28 Oct 2002 11:25:40 -0500 Subject: [nycphp-talk] Commercial-grade Hosting In-Reply-To: <200210281611.g9SGBFqn033894@parsec.nyphp.org> References: <200210281611.g9SGBFqn033894@parsec.nyphp.org> Message-ID: <20021028162540.GD16838@bnl.gov> http://www.gothambus.com/ and ask for Drew. Tell him that I pointed you in his direction. He'll take care of you. Tim On Mon, Oct 28, 2002 at 11:11:15AM -0500, Analysis & Solutions wrote: > Hi Jim: > > On Mon, Oct 28, 2002 at 10:21:04AM -0500, nyphp at jimbishop.org wrote: > > > > Now that we've heard all (1) of the realy cheap places to host your AMP > > site (2), does anyone have recommendations for ISPs that are good for > > fully or partially managed servers? > > A client of mine uses Pair for a dedicated server. They've been pretty > responsive. No major snafus. > > Enjoy, > > --Dan > > -- > PHP classes that make web design easier > SQL Solution | Layout Solution | Form Solution > sqlsolution.info | layoutsolution.info | formsolution.info > 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 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > --- Unsubscribe at http://nyphp.org/list --- > > > -- Tim Sailer Application Services Information Technology Division Brookhaven National Laboratory (631) 344-3001 From fields at surgam.net Mon Oct 28 11:45:59 2002 From: fields at surgam.net (Adam Fields) Date: Mon, 28 Oct 2002 10:45:59 -0600 Subject: [nycphp-talk] unserialize_callback_func In-Reply-To: <200210280217.g9S2H2qn032503@parsec.nyphp.org> References: <200210280217.g9S2H2qn032503@parsec.nyphp.org> Message-ID: <20021028164558.GJ14105@eye.surgam.net> On Sun, Oct 27, 2002 at 09:17:02PM -0500, Adam Fields wrote: > > I'm trying to use unserialize_callback_func to set up an autoloader > function to be called if an object is unserialized and the class > hasn't been defined yet. > > However, it doesn't seem to work - the callback function isn't getting > called. I found the problem. Apparently, this setting doesn't exist in versions prior to 4.2, and the documentation listing applicable versions is wrong. -- - 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 zaunere at yahoo.com Mon Oct 28 11:53:48 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Mon, 28 Oct 2002 08:53:48 -0800 (PST) Subject: [nycphp-talk] unserialize_callback_func In-Reply-To: <200210280217.g9S2H2qn032503@parsec.nyphp.org> Message-ID: <20021028165348.32794.qmail@web12802.mail.yahoo.com> --- Adam Fields wrote: > > I'm trying to use unserialize_callback_func to set up an autoloader > function to be called if an object is unserialized and the class > hasn't been defined yet. > > However, it doesn't seem to work - the callback function isn't > getting called. > > I tried ini_set and setting the value explicitly in the php.ini, but > it doesn't call the function. > > Drawing on the example from the docs: > > ------------------- > function __unser($class) > { > die ("Callback"); > } > ini_set('unserialize_callback_func','__unser'); > $serialized_object='O:1:"a":1:{s:5:"value";s:3:"100";}'; > print_r (unserialize($serialized_object)); > ------------------- > > should print "Callback", but instead, it prints (as expected without > the callback) "Array ( ) __PHP_Incomplete_Class Object ( > [__PHP_Incomplete_Class_Name] => a [value] => 100 ) ". > > Has anyone used this successfully? Yeah, I'm using this right now. The example looks like it should work, however consider a couple things: -- Drop the underscores from the function's name (use a plain-jane function name initially for testing). -- Instead of die() in the callback, use trigger_error(), as dieing might not act as expected when within a callback. > Also, assuming there's a way to do this, does anyone know if this > callback can be a class method for a singleton class instead of a > regular function? Not sure, but I can't think of why not. ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ From zaunere at yahoo.com Mon Oct 28 11:59:51 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Mon, 28 Oct 2002 08:59:51 -0800 (PST) Subject: [nycphp-talk] Executing from the command line In-Reply-To: <200210251938.g9PJcMqn026426@parsec.nyphp.org> Message-ID: <20021028165951.21849.qmail@web12808.mail.yahoo.com> --- Clay Givens wrote: > Hello, > I'm trying to run a program from the command line using the > passthru() function. I'm using phptriad on an NT machine. I can get > the passthru() function to execut basic DOS commands like "dir" etc, > but as soon as I try to execute a program, my browser spins. Can you tell if the program is ever getting executed? Maybe you have some path/permission problems? I'm not sure about NT so much, but popen() and proc_open() may work better for you. H > I'm adding an extra layer even, by running the program through a c > command line parser that I wrote. Still no good. The command line > argument is executed, but it starts a rogue process or something > because the programs are running in my task manager, but the browser > never comes back. If the program expects input from stdin or output via stderr/stdout you'll need to write/read, otherwise it will hang with either an empty or filled buffer. This is where popen() might be good, or better yet, proc_open() if available. H > > So this is quite a situation for me now... I'm wondering if anyone > has > experience running command lines from a PHP page. > > Thanks a lot! > Clay > > For your reference, here is my php code: > > > print("Click the button to execute SilkTest locally
"); > print("
\ "); > print("\ "); > print("\ "); > print("
\ "); > > if($go == 1){ > //execute local c program > //$command = "sys_run.exe > c://progra~1/Segue/SilkTest/partner.exe"; > //$command = "/apache/htdocs/pats/sys_run.exe > /progra~1/Segue/SilkTest/partner.exe -r > /apache/htdocs/pats/pats_individual_template.t > output.txt"; > $command = "/apache/htdocs/pats/sys_run.exe > /progra~1/Segue/SilkTest/partner.exe -q -resexport -r > /apache/htdocs/pats/pats_testplan.pln"; > //$command = "/apache/htdocs/pats/sys_run.exe > /progra~1/Segue/SilkTest/partner.exe"; > //$command = "/apache/htdocs/pats/sys_run.exe dir"; //works > //$return = exec($command); > //$return = system($command); > > //$return = exec("c://progra~1/Segue/SilkTest/partner.exe -r > c://apache/htdocs/pats/pats_individual_template.t"); > print("
");
> 		passthru($command);
> 	print("
"); > } > > ?> > > and here is my c program sys_run.c that is using a system() command > with > the parsed > arguments in argv[]: > > #include > #include > #include > > int main(int argc, char * argv[]){ > int a, b, c; > char CmdLn[5200]; > > if(argc < 2){ > printf("please specify a system command (with optional > arguments) as an argument"); > return 0; > } > > printf("argc = %d\ ", argc); > > for(a=1, b=2, c=argc; b<=c; a++, b++){ > if(b == 2){ > strcpy(CmdLn, argv[a]); > strcat(CmdLn, " "); > } > if( (b > 2) && (b < c) ){ > strcat(CmdLn, argv[a]); > strcat(CmdLn, " "); > } > if(b == c){ > strcat(CmdLn, argv[a]); > } > printf("loop: CmdLn = %s\ ", CmdLn); > } > > //"c://progra~1/Segue/SilkTest/partner.exe -r > c://apache/htdocs/pats/pats_individual_template.t" > > printf("final: CmdLn = %s\ ", CmdLn); > > system(CmdLn); > > return 0; > } > > > > > --- Unsubscribe at http://nyphp.org/list --- > > ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? Y! Web Hosting - Let the expert host your web site http://webhosting.yahoo.com/ From sharpwit at hotmail.com Mon Oct 28 13:42:22 2002 From: sharpwit at hotmail.com ((kris)janis p gale) Date: Mon, 28 Oct 2002 13:42:22 -0500 Subject: [nycphp-talk] Commercial-grade Hosting References: <200210281521.g9SFL4qn033794@parsec.nyphp.org> Message-ID: i use ControlQuest (www.cqhost.com) to host my site (krisgale.com) and i haven't even begun to tap all the features they offer... for $12.50 a month you get 100mb storage, a mysql db, and support for just about every scripting language + platform you can imagine... php (4.22), jsp (resin 2.14 and jdk 1.4), asp (chilisoft + spicepack), frontpage extensions, coldfusion (mx), and php (4.22)... you can use all of these interchangably from the same shared volume - i honestly don't know how they got all six coexisting peacefully on the same config but it does make for one hell of a development/test suite... besides the $12.50 a month "cherokee" server, they have plans ranging from there for more corporate purposes... it's been my experience that they respond to trouble tickets Quite rapidly, and are even technical enough to read YOUR source code to offer help and possible solutions to problems... i recommend them without hesitation. From billpatterson48 at netscape.net Tue Oct 29 07:35:50 2002 From: billpatterson48 at netscape.net (please reply to "patterson@computer.org") Date: Tue, 29 Oct 2002 07:35:50 -0500 Subject: [nycphp-talk] Hosting Message-ID: <153AA6C5.3D3169CB.C9B8F45B@netscape.net> I have had good experiences with them also. Jeffrey Konikowski wrote: >I have used phpwebhosting.com and have had good experiences in both the uptime of their servers and responses from customer service. > ? >Jeffrey > >-----Original Message----- > >Does anyone know a good hosting company with php and mysql support. >It should be either free or cheap since I am a student. I need to use it >to test my application on the web. > >Thank you very much > >Kaan > > > > > > > >--- Unsubscribe at http://nyphp.org/list --- > > > __________________________________________________________________ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ From billpatterson48 at netscape.net Tue Oct 29 07:58:49 2002 From: billpatterson48 at netscape.net (please reply to "patterson@computer.org") Date: Tue, 29 Oct 2002 07:58:49 -0500 Subject: [nycphp-talk] Commercial-grade Hosting Message-ID: <00494558.0DDD7399.C9B8F45B@netscape.net> Here is a site that evaluate web hosts: http://www.hostindex.com/ Bill nyphp at jimbishop.org wrote: > >Now that we've heard all (1) of the realy cheap places to host your AMP >site (2), does anyone have recommendations for ISPs that are good for >fully or partially managed servers? ?co-location? ?I work for a small dev >shop, and we are constantly shuttling between all of these little >companies to fine a good deal. ? > >I've been trying to persuade the group to invest in a managed or a colo >server recently. ?One of our clients has a managed server with AT&T. ?The >service is impeccable, but the price tag is close to $5k/month which is a >little high. ?I would appreciate all of your responses. ?I've done some >research myself, but all of these companies say they do the same thing >with a varying array of pricing structures. > >So tell me your experiences with these guys. > > >Thanks in advance, > >Jim Bishop > > > >================================================================== > >1 jtlnet.com > ?hostvelocity.com > ?ipowerweb.com > ?phpwebhosting.com > ?thehostingcompany.us > ?hostingmatters.com > ?eperfect.net > ?loadedweb.com > ?cornerhost.com > >2 I use http://www.he.net, and they rock. > > > >--- Unsubscribe at http://nyphp.org/list --- > > > -- [please send replies to "patterson at computer.org"] __________________________________________________________________ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ From liquidm3 at hotmail.com Tue Oct 29 08:27:51 2002 From: liquidm3 at hotmail.com (Liquid M3) Date: Tue, 29 Oct 2002 08:27:51 -0500 Subject: CQHost and JSP vs. PHP Message-ID: I had an extremely bad experience with CQHost. Poor uptime, poor communication. My site was down for days at a time. I was drawn to CQHost by the JSP support (and, in fact, I'm writing a JSP version of LiquidClassifiedsXML right now - and have nowhere to host it, now that I'm letting my CQHost account expire). Ever wonder why PHP support is widely available while JSP support is offered by relatively few hosts on hosting plans that cost less than $15/month? (even though JSP appears to be far more popular with employers) CQHost blamed its uptime problems on Resin, which it said was causing resource utilization problems. This seems plausible enough to me - I can see that with client-side apps that Java tends to be a memory and processor hog, and I believe that it behaves similarly on the server-side (see http://www.chamas.com/bench/index.html and look, especially, at the red bars indicating memory usage). But I don't want to give the appearance of claiming that PHP is good while JSP is bad. My belief is that PHP tends to be better suited for small websites/companies while JSP/servlets/EJBs tend to be better suited for large websites/companies, particularly ones for which data loss or downtime can have catastrophic implications. I would use JSP/servlets/EJBs if I needed things like failover and message queueing - probably important if I am processing trades. I wouldn't want to lose a few Soros Fund trades just because the server went down temporarily (rather, I'd like them to go into a message queue, to be processed later when the server comes back up). I would use PHP if I needed to make a quick and cheap website that primarily serves information as opposed to processing financial transactions. But this is just my opinion; no doubt, lots of people on this list will disagree with me. And I'll note, before other people point this out, that at least one large company appears to be adopting PHP: http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm But as far as I can tell, the major Wall Street firms are big JSP/servlet/EJB users rather than PHP users. Ted LiquidMarkets Financial data and free classifieds http://www.liquidmarkets.com _________________________________________________________________ Get a speedy connection with MSN Broadband.? Join now! http://resourcecenter.msn.com/access/plans/freeactivation.asp From prest5 at preston-campbell.com Tue Oct 29 09:28:02 2002 From: prest5 at preston-campbell.com (Brian Preston-Campbell) Date: Tue, 29 Oct 2002 9:28:02 -0500 Subject: [nycphp-talk] CQHost and JSP vs. PHP Message-ID: <200210291428.g9TES2o27214@hera.domainnameservers.net> Large companies may choose JSP simply because Sun is a publicly traded company that sells enterprise scale servers with JSP included and provides active support for their products. Brand name goes a long way in the corporate world -- "What company is behind PHP? Trust our sensitive data and transactions to an open source product? We should stick with what we know." In trying to convince a company to migrate to a LAMP server I was recentky asked those very questions, so until IBM, Corel and the other "big names" make some headway in their Linux campaigns, big business as a whole may not be ready for PHP. Brian --------- Original message -------- From: Liquid M3 To: NYPHP Talk Subject: [nycphp-talk] CQHost and JSP vs. PHP Date: 10-29-02 08:42 > I had an extremely bad experience with CQHost. Poor uptime, poor communication. My site was down for days at a time. I was drawn to CQHost by the JSP support (and, in fact, I'm writing a JSP version of LiquidClassifiedsXML right now - and have nowhere to host it, now that I'm letting my CQHost account expire). Ever wonder why PHP support is widely available while JSP support is offered by relatively few hosts on hosting plans that cost less than $15/month? (even though JSP appears to be far more popular with employers) CQHost blamed its uptime problems on Resin, which it said was causing resource utilization problems. This seems plausible enough to me - I can see that with client-side apps that Java tends to be a memory and processor hog, and I believe that it behaves similarly on the server-side (see http://www.chamas.com/bench/index.html and look, especially, at the red bars indicating memory usage). But I don't want to give the appearance of claiming that PHP is good while JSP is bad. My belief is that PHP tends to be better suited for small websites/companies while JSP/servlets/EJBs tend to be better suited for large websites/companies, particularly ones for which data loss or downtime can have catastrophic implications. I would use JSP/servlets/EJBs if I needed things like failover and message queueing - probably important if I am processing trades. I wouldn't want to lose a few Soros Fund trades just because the server went down temporarily (rather, I'd like them to go into a message queue, to be processed later when the server comes back up). I would use PHP if I needed to make a quick and cheap website that primarily serves information as opposed to processing financial transactions. But this is just my opinion; no doubt, lots of people on this list will disagree with me. And I'll note, before other people point this out, that at least one large company appears to be adopting PHP: http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm But as far as I can tell, the major Wall Street firms are big JSP/servlet/EJB users rather than PHP users. Ted LiquidMarkets Financial data and free classifieds http://www.liquidmarkets.com _________________________________________________________________ Get a speedy connection with MSN Broadband. Join now! http://resourcecenter.msn.com/access/plans/freeactivation.asp --- Unsubscribe at http://nyphp.org/list --- From zaunere at yahoo.com Tue Oct 29 09:59:24 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 29 Oct 2002 06:59:24 -0800 (PST) Subject: More Client-Side Grief Message-ID: <20021029145924.46180.qmail@web12805.mail.yahoo.com> Hi folks, This isn't so much a problem with PHP, but I hope someone can help out with some JavaScript issues I'm having. With IE6 (this app only needs to support IE6) I have Window 1 (main browser window) and Window 2 (popup). The user enters some information into the popup and submits the form, which PHP then processes and sends a header('Location: http://somewhere/whatever'); back to the popup. The problem is, I need to get the parent window (Window 1) to be redirected, while the popup (Window 2) closes. Any ideas on how to either: 1) Have the popup send it's new location (from the PHP form processor) back to it's parent. 2) Or, have the parent see where the popup would be redirected to, and redirect itself? 3) Or something else. I've looked at MS's JScript and DOM/etc pages, but I don't see anything useful. If this isn't possible (I suppose it could be a security problem) I'll have to figure some other way of doing it. Any ideas would be greatly appreciated, as I'm about to go back to text-based browsers :) Thanks, H ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From nyphp at altunergil.com Tue Oct 29 09:57:02 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Tue, 29 Oct 2002 09:57:02 -0500 Subject: [nycphp-talk] CQHost and JSP vs. PHP In-Reply-To: <200210291327.g9TDRulV026156@parsec.nyphp.org> References: <200210291327.g9TDRulV026156@parsec.nyphp.org> Message-ID: <20021029095702.654f7f47.nyphp@altunergil.com> It's not worth all the support calls for less than $15 :) Seriously.. you mentioned that JSP/Servlets is more popular with employees. My observation is that people who want to deal with JSP/Servlets/Java are ready to pay the price for it. Because you actually do need faster hardware and much much more support. oktay On Tue, 29 Oct 2002 08:27:56 -0500 Liquid M3 wrote: > I had an extremely bad experience with CQHost. Poor uptime, poor > communication. My site was down for days at a time. > > I was drawn to CQHost by the JSP support (and, in fact, I'm writing a JSP > version of LiquidClassifiedsXML right now - and have nowhere to host it, now > that I'm letting my CQHost account expire). > > Ever wonder why PHP support is widely available while JSP support is offered > by relatively few hosts on hosting plans that cost less than $15/month? > (even though JSP appears to be far more popular with employers) > > CQHost blamed its uptime problems on Resin, which it said was causing > resource utilization problems. This seems plausible enough to me - I can > see that with client-side apps that Java tends to be a memory and processor > hog, and I believe that it behaves similarly on the server-side (see > http://www.chamas.com/bench/index.html and look, especially, at the red bars > indicating memory usage). > > But I don't want to give the appearance of claiming that PHP is good while > JSP is bad. > > My belief is that PHP tends to be better suited for small websites/companies > while JSP/servlets/EJBs tend to be better suited for large > websites/companies, particularly ones for which data loss or downtime can > have catastrophic implications. > > I would use JSP/servlets/EJBs if I needed things like failover and message > queueing - probably important if I am processing trades. I wouldn't want to > lose a few Soros Fund trades just because the server went down temporarily > (rather, I'd like them to go into a message queue, to be processed later > when the server comes back up). > > I would use PHP if I needed to make a quick and cheap website that primarily > serves information as opposed to processing financial transactions. > > But this is just my opinion; no doubt, lots of people on this list will > disagree with me. > > And I'll note, before other people point this out, that at least one large > company appears to be adopting PHP: > http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm > > But as far as I can tell, the major Wall Street firms are big > JSP/servlet/EJB users rather than PHP users. > > > Ted > > LiquidMarkets > Financial data and free classifieds > http://www.liquidmarkets.com > > _________________________________________________________________ > Get a speedy connection with MSN Broadband.? Join now! > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > > > --- Unsubscribe at http://nyphp.org/list --- > > From nyphp at altunergil.com Tue Oct 29 10:04:26 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Tue, 29 Oct 2002 10:04:26 -0500 Subject: --OFF LIST -- Re: [nycphp-talk] CQHost and JSP vs. PHP In-Reply-To: <200210291327.g9TDRulV026156@parsec.nyphp.org> References: <200210291327.g9TDRulV026156@parsec.nyphp.org> Message-ID: <20021029100426.2fe82608.nyphp@altunergil.com> See if this might work for you guys. http://datapipe.com/jsp.asp Oktay On Tue, 29 Oct 2002 08:27:56 -0500 Liquid M3 wrote: > I had an extremely bad experience with CQHost. Poor uptime, poor > communication. My site was down for days at a time. > > I was drawn to CQHost by the JSP support (and, in fact, I'm writing a JSP > version of LiquidClassifiedsXML right now - and have nowhere to host it, now > that I'm letting my CQHost account expire). > > Ever wonder why PHP support is widely available while JSP support is offered > by relatively few hosts on hosting plans that cost less than $15/month? > (even though JSP appears to be far more popular with employers) > > CQHost blamed its uptime problems on Resin, which it said was causing > resource utilization problems. This seems plausible enough to me - I can > see that with client-side apps that Java tends to be a memory and processor > hog, and I believe that it behaves similarly on the server-side (see > http://www.chamas.com/bench/index.html and look, especially, at the red bars > indicating memory usage). > > But I don't want to give the appearance of claiming that PHP is good while > JSP is bad. > > My belief is that PHP tends to be better suited for small websites/companies > while JSP/servlets/EJBs tend to be better suited for large > websites/companies, particularly ones for which data loss or downtime can > have catastrophic implications. > > I would use JSP/servlets/EJBs if I needed things like failover and message > queueing - probably important if I am processing trades. I wouldn't want to > lose a few Soros Fund trades just because the server went down temporarily > (rather, I'd like them to go into a message queue, to be processed later > when the server comes back up). > > I would use PHP if I needed to make a quick and cheap website that primarily > serves information as opposed to processing financial transactions. > > But this is just my opinion; no doubt, lots of people on this list will > disagree with me. > > And I'll note, before other people point this out, that at least one large > company appears to be adopting PHP: > http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm > > But as far as I can tell, the major Wall Street firms are big > JSP/servlet/EJB users rather than PHP users. > > > Ted > > LiquidMarkets > Financial data and free classifieds > http://www.liquidmarkets.com > > _________________________________________________________________ > Get a speedy connection with MSN Broadband.? Join now! > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > > > --- Unsubscribe at http://nyphp.org/list --- > > From jim at bizcomputinginc.com Tue Oct 29 10:10:40 2002 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Tue, 29 Oct 2002 10:10:40 -0500 Subject: [nycphp-talk] More Client-Side Grief References: <200210291459.g9TExTlV026267@parsec.nyphp.org> Message-ID: <024401c27f5d$5884f5f0$6401a8c0@Notebook> I don't know if I follow your problem correctly, but if I do, here's what I do: I never have a popup submit to the server, the form button on the popup always passes the data from the popup form to the parent window form through hidden fields, then submits on the parent and closes itself. Is this any help? Jim ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Tuesday, October 29, 2002 9:59 AM Subject: [nycphp-talk] More Client-Side Grief > > Hi folks, > > This isn't so much a problem with PHP, but I hope someone can help out > with some JavaScript issues I'm having. > > With IE6 (this app only needs to support IE6) I have Window 1 (main > browser window) and Window 2 (popup). The user enters some information > into the popup and submits the form, which PHP then processes and sends > a header('Location: http://somewhere/whatever'); back to the popup. > > The problem is, I need to get the parent window (Window 1) to be > redirected, while the popup (Window 2) closes. Any ideas on how to > either: > > 1) Have the popup send it's new location (from the PHP form processor) > back to it's parent. > > 2) Or, have the parent see where the popup would be redirected to, and > redirect itself? > > 3) Or something else. > > I've looked at MS's JScript and DOM/etc pages, but I don't see anything > useful. If this isn't possible (I suppose it could be a security > problem) I'll have to figure some other way of doing it. > > Any ideas would be greatly appreciated, as I'm about to go back to > text-based browsers :) > > Thanks, > > H > > > ===== > Hans Zaunere > New York PHP > http://nyphp.org > hans at nyphp.org > > __________________________________________________ > Do you Yahoo!? > HotJobs - Search new jobs daily now > http://hotjobs.yahoo.com/ > > > --- Unsubscribe at http://nyphp.org/list --- > > > > > From nyphp at websapp.com Tue Oct 29 10:23:26 2002 From: nyphp at websapp.com (Daniel Kushner) Date: Tue, 29 Oct 2002 10:23:26 -0500 Subject: [nycphp-talk] More Client-Side Grief In-Reply-To: <200210291459.g9TExTlV026267@parsec.nyphp.org> Message-ID: Try finding ALL javashit answers here: http://developer.irt.org/script/script.htm Great resource. :) --Daniel > -----Original Message----- > From: Hans Zaunere [mailto:zaunere at yahoo.com] > Sent: Tuesday, October 29, 2002 9:59 AM > To: NYPHP Talk > Subject: [nycphp-talk] More Client-Side Grief > > > > Hi folks, > > This isn't so much a problem with PHP, but I hope someone can help out > with some JavaScript issues I'm having. > > With IE6 (this app only needs to support IE6) I have Window 1 (main > browser window) and Window 2 (popup). The user enters some information > into the popup and submits the form, which PHP then processes and sends > a header('Location: http://somewhere/whatever'); back to the popup. > > The problem is, I need to get the parent window (Window 1) to be > redirected, while the popup (Window 2) closes. Any ideas on how to > either: > > 1) Have the popup send it's new location (from the PHP form processor) > back to it's parent. > > 2) Or, have the parent see where the popup would be redirected to, and > redirect itself? > > 3) Or something else. > > I've looked at MS's JScript and DOM/etc pages, but I don't see anything > useful. If this isn't possible (I suppose it could be a security > problem) I'll have to figure some other way of doing it. > > Any ideas would be greatly appreciated, as I'm about to go back to > text-based browsers :) > > Thanks, > > H > > > ===== > Hans Zaunere > New York PHP > http://nyphp.org > hans at nyphp.org > > __________________________________________________ > Do you Yahoo!? > HotJobs - Search new jobs daily now > http://hotjobs.yahoo.com/ > > > --- Unsubscribe at http://nyphp.org/list --- > From sharpwit at hotmail.com Tue Oct 29 10:33:19 2002 From: sharpwit at hotmail.com ((kris)janis p gale) Date: Tue, 29 Oct 2002 10:33:19 -0500 Subject: --OFF LIST -- Re: [nycphp-talk] CQHost and JSP vs. PHP References: <200210291510.g9TFA5lV026295@parsec.nyphp.org> Message-ID: > See if this might work for you guys. > > http://datapipe.com/jsp.asp something about that url makes me... a little ill... :) anyways, sorry to hear you had a bad experience, Ted. i've had nothing but a fine time with cqhost... From fields at surgam.net Tue Oct 29 10:38:02 2002 From: fields at surgam.net (Adam Fields) Date: Tue, 29 Oct 2002 09:38:02 -0600 Subject: [nycphp-talk] More Client-Side Grief In-Reply-To: <200210291459.g9TExTlV026267@parsec.nyphp.org> References: <200210291459.g9TExTlV026267@parsec.nyphp.org> Message-ID: <20021029153802.GC11945@eye.surgam.net> On Tue, Oct 29, 2002 at 09:59:29AM -0500, Hans Zaunere wrote: > This isn't so much a problem with PHP, but I hope someone can help out > with some JavaScript issues I'm having. > > With IE6 (this app only needs to support IE6) I have Window 1 (main > browser window) and Window 2 (popup). The user enters some information > into the popup and submits the form, which PHP then processes and sends > a header('Location: http://somewhere/whatever'); back to the popup. > > The problem is, I need to get the parent window (Window 1) to be > redirected, while the popup (Window 2) closes. Any ideas on how to > either: > > 1) Have the popup send it's new location (from the PHP form processor) > back to it's parent. > > 2) Or, have the parent see where the popup would be redirected to, and > redirect itself? > > 3) Or something else. I use this for reloading the base window and closing the popup. I can't think of any reason why you couldn't use something similar to redirect the base window to another url. Basically, I have a generic save page that detects if it was called as a popup (right now, I pass this value in, but I should probably ultimately be getting it from the browser). If not, it reloads itself to some other appropriate url (I'm working on a system for carrying a stack of jumpback urls through a window thread - it's not quite there yet). If yes, then it does this: print ''; Or were you looking for something else? -- - 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 nyphp at altunergil.com Tue Oct 29 10:37:18 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Tue, 29 Oct 2002 10:37:18 -0500 Subject: --OFF LIST -- Re: [nycphp-talk] CQHost and JSP vs. PHP In-Reply-To: <200210291510.g9TFA5lV026295@parsec.nyphp.org> References: <200210291510.g9TFA5lV026295@parsec.nyphp.org> Message-ID: <20021029103718.5d5f62b3.nyphp@altunergil.com> I really did mean for this to be off-list .. lol.. sorry about that. :) oktay On Tue, 29 Oct 2002 10:10:05 -0500 Oktay Altunergil wrote: > See if this might work for you guys. > > http://datapipe.com/jsp.asp > > Oktay > > On Tue, 29 Oct 2002 08:27:56 -0500 > Liquid M3 wrote: > > > I had an extremely bad experience with CQHost. Poor uptime, poor > > communication. My site was down for days at a time. > > > > I was drawn to CQHost by the JSP support (and, in fact, I'm writing a JSP > > version of LiquidClassifiedsXML right now - and have nowhere to host it, now > > that I'm letting my CQHost account expire). > > > > Ever wonder why PHP support is widely available while JSP support is offered > > by relatively few hosts on hosting plans that cost less than $15/month? > > (even though JSP appears to be far more popular with employers) > > > > CQHost blamed its uptime problems on Resin, which it said was causing > > resource utilization problems. This seems plausible enough to me - I can > > see that with client-side apps that Java tends to be a memory and processor > > hog, and I believe that it behaves similarly on the server-side (see > > http://www.chamas.com/bench/index.html and look, especially, at the red bars > > indicating memory usage). > > > > But I don't want to give the appearance of claiming that PHP is good while > > JSP is bad. > > > > My belief is that PHP tends to be better suited for small websites/companies > > while JSP/servlets/EJBs tend to be better suited for large > > websites/companies, particularly ones for which data loss or downtime can > > have catastrophic implications. > > > > I would use JSP/servlets/EJBs if I needed things like failover and message > > queueing - probably important if I am processing trades. I wouldn't want to > > lose a few Soros Fund trades just because the server went down temporarily > > (rather, I'd like them to go into a message queue, to be processed later > > when the server comes back up). > > > > I would use PHP if I needed to make a quick and cheap website that primarily > > serves information as opposed to processing financial transactions. > > > > But this is just my opinion; no doubt, lots of people on this list will > > disagree with me. > > > > And I'll note, before other people point this out, that at least one large > > company appears to be adopting PHP: > > http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm > > > > But as far as I can tell, the major Wall Street firms are big > > JSP/servlet/EJB users rather than PHP users. > > > > > > Ted > > > > LiquidMarkets > > Financial data and free classifieds > > http://www.liquidmarkets.com > > > > _________________________________________________________________ > > Get a speedy connection with MSN Broadband.? Join now! > > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From punktoad at oddpost.com Tue Oct 29 10:39:03 2002 From: punktoad at oddpost.com (Jeffrey Konikowski) Date: Tue, 29 Oct 2002 07:39:03 -0800 Subject: [nycphp-talk] More Client-Side Grief Message-ID: <200210291543.g9TFhvlV026397@parsec.nyphp.org> Have you tried something like writing some javascript to the popup page when it reloads that redirects the main window and closes the popup. Something like: window.opener.location.href = ''; //sends window1 to new location window.close(); //closes window2 -----Original Message----- Hi folks, This isn't so much a problem with PHP, but I hope someone can help out with some JavaScript issues I'm having. With IE6 (this app only needs to support IE6) I have Window 1 (main browser window) and Window 2 (popup). The user enters some information into the popup and submits the form, which PHP then processes and sends a header('Location: http://somewhere/whatever'); back to the popup. The problem is, I need to get the parent window (Window 1) to be redirected, while the popup (Window 2) closes. Any ideas on how to either: 1) Have the popup send it's new location (from the PHP form processor) back to it's parent. 2) Or, have the parent see where the popup would be redirected to, and redirect itself? 3) Or something else. I've looked at MS's JScript and DOM/etc pages, but I don't see anything useful. If this isn't possible (I suppose it could be a security problem) I'll have to figure some other way of doing it. Any ideas would be greatly appreciated, as I'm about to go back to text-based browsers :) Thanks, H ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ --- Unsubscribe at http://nyphp.org/list --- From zaunere at yahoo.com Tue Oct 29 10:44:47 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 29 Oct 2002 07:44:47 -0800 (PST) Subject: [nycphp-talk] More Client-Side Grief In-Reply-To: <200210291510.g9TFAllV026300@parsec.nyphp.org> Message-ID: <20021029154447.59432.qmail@web12801.mail.yahoo.com> --- Jim Hendricks wrote: > I never have a popup submit to the server, the form button on the > popup always passes the data from the popup form to the parent window > form through hidden fields, then submits on the parent and closes > itself. > > Is this any help? Well, it certainly seems like it would solve the problem (ie, the parent window would be doing the actual submitting to the server, and thus would get the redirect properly). However, I had no idea that you could submit one window to another :) By chance could you post (attach a text file if it'd be messy in an email) a quick example? Thanks Jim, H > > Jim > > ----- Original Message ----- > From: "Hans Zaunere" > To: "NYPHP Talk" > Sent: Tuesday, October 29, 2002 9:59 AM > Subject: [nycphp-talk] More Client-Side Grief > > > > > > Hi folks, > > > > This isn't so much a problem with PHP, but I hope someone can help > out > > with some JavaScript issues I'm having. > > > > With IE6 (this app only needs to support IE6) I have Window 1 (main > > browser window) and Window 2 (popup). The user enters some > information > > into the popup and submits the form, which PHP then processes and > sends > > a header('Location: http://somewhere/whatever'); back to the popup. > > > > The problem is, I need to get the parent window (Window 1) to be > > redirected, while the popup (Window 2) closes. Any ideas on how to > > either: > > > > 1) Have the popup send it's new location (from the PHP form > processor) > > back to it's parent. > > > > 2) Or, have the parent see where the popup would be redirected to, > and > > redirect itself? > > > > 3) Or something else. > > > > I've looked at MS's JScript and DOM/etc pages, but I don't see > anything > > useful. If this isn't possible (I suppose it could be a security > > problem) I'll have to figure some other way of doing it. > > > > Any ideas would be greatly appreciated, as I'm about to go back to > > text-based browsers :) > > > > Thanks, > > > > H > > > > > > ===== > > Hans Zaunere > > New York PHP > > http://nyphp.org > > hans at nyphp.org > > > > __________________________________________________ > > Do you Yahoo!? > > HotJobs - Search new jobs daily now > > http://hotjobs.yahoo.com/ > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From tfreedma at ubspw.com Tue Oct 29 10:45:27 2002 From: tfreedma at ubspw.com (Freedman, Tom S.) Date: Tue, 29 Oct 2002 10:45:27 -0500 Subject: [nycphp-talk] More Client-Side Grief Message-ID: You could do something like: in the result page sent to the pop-up. This would only work, of course, if you can just get the href, and not the entire header (leaving off the "Location:" chunk). -----Original Message----- From: Hans Zaunere [mailto:zaunere at yahoo.com] Sent: Tuesday, October 29, 2002 9:59 AM To: NYPHP Talk Subject: [nycphp-talk] More Client-Side Grief Hi folks, This isn't so much a problem with PHP, but I hope someone can help out with some JavaScript issues I'm having. With IE6 (this app only needs to support IE6) I have Window 1 (main browser window) and Window 2 (popup). The user enters some information into the popup and submits the form, which PHP then processes and sends a header('Location: http://somewhere/whatever'); back to the popup. The problem is, I need to get the parent window (Window 1) to be redirected, while the popup (Window 2) closes. Any ideas on how to either: 1) Have the popup send it's new location (from the PHP form processor) back to it's parent. 2) Or, have the parent see where the popup would be redirected to, and redirect itself? 3) Or something else. I've looked at MS's JScript and DOM/etc pages, but I don't see anything useful. If this isn't possible (I suppose it could be a security problem) I'll have to figure some other way of doing it. Any ideas would be greatly appreciated, as I'm about to go back to text-based browsers :) Thanks, H ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ --- Unsubscribe at http://nyphp.org/list --- From nyphp at altunergil.com Tue Oct 29 10:40:32 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Tue, 29 Oct 2002 10:40:32 -0500 Subject: --OFF LIST -- Re: [nycphp-talk] CQHost and JSP vs. PHP In-Reply-To: <200210291537.g9TFbElV026377@parsec.nyphp.org> References: <200210291537.g9TFbElV026377@parsec.nyphp.org> Message-ID: <20021029104032.740000d3.nyphp@altunergil.com> I hope it's the jsp - asp part :) oktay On Tue, 29 Oct 2002 10:37:14 -0500 janis p gale wrote: > > See if this might work for you guys. > > > > http://datapipe.com/jsp.asp > > something about that url makes me... a little ill... > :) > > > anyways, sorry to hear you had a bad experience, Ted. > i've had nothing but a fine time with cqhost... > > > --- Unsubscribe at http://nyphp.org/list --- > > From sharpwit at hotmail.com Tue Oct 29 10:47:16 2002 From: sharpwit at hotmail.com ((kris)janis p gale) Date: Tue, 29 Oct 2002 10:47:16 -0500 Subject: [nycphp-talk] More Client-Side Grief References: <200210291459.g9TExTlV026267@parsec.nyphp.org> Message-ID: > The problem is, I need to get the parent window (Window 1) to be > redirected, while the popup (Window 2) closes. Any ideas on how to > either: > > 1) Have the popup send it's new location (from the PHP form processor) > back to it's parent. > > 2) Or, have the parent see where the popup would be redirected to, and > redirect itself? > > 3) Or something else. here's some ideas that will work with browsers as ancient or as fresh as you choose to use... as someone else suggested (deleted the message already or else i'd give credit where it's due), you could duplicate the form fields somewhere in the parent as hidden fields, and create an onsubmit handler in the child that does nothing more than copy the .value's of its form fields to the parent's hidden ones, does a .submit() of the form in the parent, and closes itself via self.close(). OR if you are determined to have the popup submit itself, and then redirect the parent as needed, you could still do that... have the parent pop up the child window, as usual, the form in the child submits as any other form would (i assume with a php script as the action=), and the script that acts on that form could include a very basic html document with a bit of javascript that is an onload handler for the body tag... [html] [head] [script type="text/javascript"] function allDone() { parent.location = "newlocation/fortheparent.php"; self.close(); } [/script] [/head] [body onload="allDone()"]   [/body] [/html] either method will work well, but the second route doesn't require the redudant hidden fields and whatnot. hope this helps! - kris From jim at bizcomputinginc.com Tue Oct 29 10:57:47 2002 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Tue, 29 Oct 2002 10:57:47 -0500 Subject: [nycphp-talk] More Client-Side Grief References: <200210291544.g9TFirlV026406@parsec.nyphp.org> Message-ID: <027101c27f63$f05e7fd0$6401a8c0@Notebook> I'll have to try and find some of my source for this. Don't get me wrong, I don't submit the one window to the other. The submit button on the popup executes a java script which does: opener.someform.somehiddenfield.value = mypopup.someform.sometextfield.value for each field. Then opener.someform.submit(); Jim ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Tuesday, October 29, 2002 10:44 AM Subject: Re: [nycphp-talk] More Client-Side Grief > > --- Jim Hendricks wrote: > > I never have a popup submit to the server, the form button on the > > popup always passes the data from the popup form to the parent window > > form through hidden fields, then submits on the parent and closes > > itself. > > > > Is this any help? > > Well, it certainly seems like it would solve the problem (ie, the > parent window would be doing the actual submitting to the server, and > thus would get the redirect properly). However, I had no idea that you > could submit one window to another :) By chance could you post (attach > a text file if it'd be messy in an email) a quick example? > > Thanks Jim, > > H > > > > > > > Jim > > > > ----- Original Message ----- > > From: "Hans Zaunere" > > To: "NYPHP Talk" > > Sent: Tuesday, October 29, 2002 9:59 AM > > Subject: [nycphp-talk] More Client-Side Grief > > > > > > > > > > Hi folks, > > > > > > This isn't so much a problem with PHP, but I hope someone can help > > out > > > with some JavaScript issues I'm having. > > > > > > With IE6 (this app only needs to support IE6) I have Window 1 (main > > > browser window) and Window 2 (popup). The user enters some > > information > > > into the popup and submits the form, which PHP then processes and > > sends > > > a header('Location: http://somewhere/whatever'); back to the popup. > > > > > > The problem is, I need to get the parent window (Window 1) to be > > > redirected, while the popup (Window 2) closes. Any ideas on how to > > > either: > > > > > > 1) Have the popup send it's new location (from the PHP form > > processor) > > > back to it's parent. > > > > > > 2) Or, have the parent see where the popup would be redirected to, > > and > > > redirect itself? > > > > > > 3) Or something else. > > > > > > I've looked at MS's JScript and DOM/etc pages, but I don't see > > anything > > > useful. If this isn't possible (I suppose it could be a security > > > problem) I'll have to figure some other way of doing it. > > > > > > Any ideas would be greatly appreciated, as I'm about to go back to > > > text-based browsers :) > > > > > > Thanks, > > > > > > H > > > > > > > > > ===== > > > Hans Zaunere > > > New York PHP > > > http://nyphp.org > > > hans at nyphp.org > > > > > > __________________________________________________ > > > Do you Yahoo!? > > > HotJobs - Search new jobs daily now > > > http://hotjobs.yahoo.com/ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > __________________________________________________ > Do you Yahoo!? > HotJobs - Search new jobs daily now > http://hotjobs.yahoo.com/ > > > --- Unsubscribe at http://nyphp.org/list --- > > > > > From cahoyos at us.ibm.com Tue Oct 29 11:02:12 2002 From: cahoyos at us.ibm.com (Carlos A Hoyos) Date: Tue, 29 Oct 2002 11:02:12 -0500 Subject: [nycphp-talk] More Client-Side Grief Message-ID: Just call this from the pop up window, to reload/refresh your parent window with a new url window.opener.location= 'http://your_refresh_url' another function that is usefull is parent.reload(); this will reload the parent window Hans Zaunere m> cc: Subject: [nycphp-talk] More Client-Side Grief 10/29/2002 09:59 AM Please respond to talk Hi folks, This isn't so much a problem with PHP, but I hope someone can help out with some JavaScript issues I'm having. With IE6 (this app only needs to support IE6) I have Window 1 (main browser window) and Window 2 (popup). The user enters some information into the popup and submits the form, which PHP then processes and sends a header('Location: http://somewhere/whatever'); back to the popup. The problem is, I need to get the parent window (Window 1) to be redirected, while the popup (Window 2) closes. Any ideas on how to either: 1) Have the popup send it's new location (from the PHP form processor) back to it's parent. 2) Or, have the parent see where the popup would be redirected to, and redirect itself? 3) Or something else. I've looked at MS's JScript and DOM/etc pages, but I don't see anything useful. If this isn't possible (I suppose it could be a security problem) I'll have to figure some other way of doing it. Any ideas would be greatly appreciated, as I'm about to go back to text-based browsers :) Thanks, H ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ --- Unsubscribe at http://nyphp.org/list --- From fields at surgam.net Tue Oct 29 11:27:21 2002 From: fields at surgam.net (Adam Fields) Date: Tue, 29 Oct 2002 10:27:21 -0600 Subject: [nycphp-talk] More Client-Side Grief In-Reply-To: <200210291557.g9TFvxlV026477@parsec.nyphp.org> References: <200210291557.g9TFvxlV026477@parsec.nyphp.org> Message-ID: <20021029162720.GD12475@eye.surgam.net> On Tue, Oct 29, 2002 at 10:57:59AM -0500, Jim Hendricks wrote: > I'll have to try and find some of my source for this. Don't get me wrong, I > don't submit the one window to the other. The submit button on the popup > executes a java script which does: > > opener.someform.somehiddenfield.value = mypopup.someform.sometextfield.value > > for each field. Then opener.someform.submit(); Two things about this: 1) You often won't want to hardcode the name of the form or the field - you can pass these values to the popup window (via PHP) to make your life easier. I randomly generate the name of every form (again, using PHP) so I can do this using multiple forms and fields and every popup knows which form and field it goes with. 2) As a point of interest, you can absolutely put the results of a form in another window. You can do this by setting the target attribute of the form, either directly in the form tag or with javascript - it's a property of the form object. document.someform.target = 'formtargetwindow'; or some such. When you submit the form, the results will appear in formtargetwindow. -- - 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 JMKing at ipro.org Tue Oct 29 11:24:52 2002 From: JMKing at ipro.org (Jaz-Michael King) Date: Tue, 29 Oct 2002 11:24:52 -0500 Subject: [nycphp-talk] Commercial-grade Hosting Message-ID: We use viaVerio (viaverio.com) and rackshack (rackshack.net) vv has way more to offer, but more expensive j ****************************** Jaz-Michael King Online Services Manager IPRO http://ipro.org ****************************** >>> nyphp at jimbishop.org 10/28/02 10:21AM >>> Now that we've heard all (1) of the realy cheap places to host your AMP site (2), does anyone have recommendations for ISPs that are good for fully or partially managed servers? co-location? I work for a small dev shop, and we are constantly shuttling between all of these little companies to fine a good deal. I've been trying to persuade the group to invest in a managed or a colo server recently. One of our clients has a managed server with AT&T. The service is impeccable, but the price tag is close to $5k/month which is a little high. I would appreciate all of your responses. I've done some research myself, but all of these companies say they do the same thing with a varying array of pricing structures. So tell me your experiences with these guys. Thanks in advance, Jim Bishop ================================================================== 1 jtlnet.com hostvelocity.com ipowerweb.com phpwebhosting.com thehostingcompany.us hostingmatters.com eperfect.net loadedweb.com cornerhost.com 2 I use http://www.he.net, and they rock. --- Unsubscribe at http://nyphp.org/list --- From dkrook at hotmail.com Tue Oct 29 12:09:26 2002 From: dkrook at hotmail.com (D C Krook) Date: Tue, 29 Oct 2002 12:09:26 -0500 Subject: [nycphp-talk] More Client-Side Grief Message-ID: Hans, I'm currently using this script myself for that purpose: >From a link: Go >From a button: // Close the popup and go to a new URL in the parent. function closeNewURL (winPop, strURL) { winPop.opener.location.href = strURL; winPop.close(); } I've also got a library of functions for this same project available here: http://krook.org/js/functions.js _________________________________________________________________ Unlimited Internet access for only $21.95/month.? Try MSN! http://resourcecenter.msn.com/access/plans/2monthsfree.asp From sharpwit at hotmail.com Tue Oct 29 12:11:32 2002 From: sharpwit at hotmail.com (krisjanis gale) Date: Tue, 29 Oct 2002 17:11:32 +0000 Subject: --OFF LIST -- Re: [nycphp-talk] CQHost and JSP vs. PHP Message-ID: yes, that :) reminds me of when i was in a training session for futuretense openmarket and all the online docs and education materials were coded in coldfusion... oi! ;-) >From: Oktay Altunergil >Reply-To: talk at nyphp.org >To: NYPHP Talk >Subject: Re: --OFF LIST -- Re: [nycphp-talk] CQHost and JSP vs. PHP >Date: Tue, 29 Oct 2002 10:46:11 -0500 > >I hope it's the jsp - asp part :) > >oktay > > >On Tue, 29 Oct 2002 10:37:14 -0500 >janis p gale wrote: > > > > See if this might work for you guys. > > > > > > http://datapipe.com/jsp.asp > > > > something about that url makes me... a little ill... > > :) > > > > > > anyways, sorry to hear you had a bad experience, Ted. > > i've had nothing but a fine time with cqhost... > > > > > > > > > > > > >--- Unsubscribe at http://nyphp.org/list --- _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From sharpwit at hotmail.com Tue Oct 29 12:16:35 2002 From: sharpwit at hotmail.com (krisjanis gale) Date: Tue, 29 Oct 2002 17:16:35 +0000 Subject: [nycphp-talk] More Client-Side Grief Message-ID: this is ABSOLUTELY *NOT* a cross-browser solution... only things that work in all browsers without any issues are either copying values to a set a hidden fields in the parent and having the child submit that form in the parent and then close itself, OR to have the child redirect the parent then close itself using an onload handler as part of the script that deals with the submitted form... i *wish* setting the form target (either dynamically with javascript or statically using the target= attribute of form) but it isn't support unequivocally, and it's not likely that it ever will be. >2) As a point of interest, you can absolutely put the results of a >form in another window. > >You can do this by setting the target attribute of the form, either >directly in the form tag or with javascript - it's a property of the >form object. _________________________________________________________________ Unlimited Internet access -- and 2 months free!? Try MSN. http://resourcecenter.msn.com/access/plans/2monthsfree.asp From dkrook at hotmail.com Tue Oct 29 12:21:14 2002 From: dkrook at hotmail.com (D C Krook) Date: Tue, 29 Oct 2002 12:21:14 -0500 Subject: [nycphp-talk] More Client-Side Grief Message-ID: Hans, Sorry, this one may be more useful. You can set the flag by putting "submit=true" in the form action if you are POSTing, or in a hidden form field if you are GETting: Call: // Check the URL for the submit flag, close the window, and reload the parent window. function submitClose (winPop) { var strPath = location.href; if (strPath.search("submit") > -1) { closeReload(winPop); } } _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp From fields at surgam.net Tue Oct 29 12:56:01 2002 From: fields at surgam.net (Adam Fields) Date: Tue, 29 Oct 2002 11:56:01 -0600 Subject: [nycphp-talk] More Client-Side Grief In-Reply-To: <200210291716.g9THGelV026698@parsec.nyphp.org> References: <200210291716.g9THGelV026698@parsec.nyphp.org> Message-ID: <20021029175600.GD6310@eye.surgam.net> On Tue, Oct 29, 2002 at 12:16:40PM -0500, krisjanis gale wrote: > this is ABSOLUTELY *NOT* a cross-browser solution... > only things that work in all browsers without any issues > are either copying values to a set a hidden fields in the parent > and having the child submit that form in the parent and then close > itself, OR to have the child redirect the parent then close itself > using an onload handler as part of the script that deals with the > submitted form... i *wish* setting the form target (either > dynamically with javascript or statically using the target= > attribute of form) but it isn't support unequivocally, > and it's not likely that it ever will be. Interesting. It's part of the HTML 4.01 spec. http://www.htmlref.com/reference/AppA/form.htm http://www.w3.org/TR/html4/present/frames.html#h-16.3 What browsers don't support this? > >2) As a point of interest, you can absolutely put the results of a > >form in another window. > > > >You can do this by setting the target attribute of the form, either > >directly in the form tag or with javascript - it's a property of the > >form object. -- - 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 sharpwit at hotmail.com Tue Oct 29 14:50:16 2002 From: sharpwit at hotmail.com ((kris)janis p gale) Date: Tue, 29 Oct 2002 14:50:16 -0500 Subject: [nycphp-talk] More Client-Side Grief References: <200210291756.g9THu7lV026777@parsec.nyphp.org> Message-ID: > Interesting. It's part of the HTML 4.01 spec. > > http://www.htmlref.com/reference/AppA/form.htm > http://www.w3.org/TR/html4/present/frames.html#h-16.3 > > What browsers don't support this? it's common knowledge that browsers often don't conform to specs :) i recall having difficulty with form target'ing in netscape 3 and 4... dunno if this is fixed with the advent of the most recent mozilla. not sure about others... opera, aol browser, etc. From fields at surgam.net Tue Oct 29 15:19:17 2002 From: fields at surgam.net (Adam Fields) Date: Tue, 29 Oct 2002 14:19:17 -0600 Subject: [nycphp-talk] More Client-Side Grief In-Reply-To: <200210291954.g9TJsHlV026905@parsec.nyphp.org> References: <200210291954.g9TJsHlV026905@parsec.nyphp.org> Message-ID: <20021029201917.GH9951@eye.surgam.net> On Tue, Oct 29, 2002 at 02:54:17PM -0500, janis p gale wrote: > > Interesting. It's part of the HTML 4.01 spec. > > > > http://www.htmlref.com/reference/AppA/form.htm > > http://www.w3.org/TR/html4/present/frames.html#h-16.3 > > > > What browsers don't support this? > > it's common knowledge that browsers often don't conform to specs :) Too true, but I was under the impression that all of the modern browsers had come up to speed on HTML 4.01. Unless demanded by a client, I've pretty much given up on trying to get any real functionality out of older browsers and will generally settle for "degrade gracefully". At least on the delivery side. On the editing side, you can usually dictate browser platform. > i recall having difficulty with form target'ing in netscape 3 and 4... > dunno if this is fixed with the advent of the most recent mozilla. Don't know. I don't think it should really be a surprise that old browsers don't have the same capabilities as newer ones... :) > not sure about others... opera, aol browser, etc. Opera 6 claims to, although I haven't tested it: http://www.opera.com/docs/specs/ -- - 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 zaunere at yahoo.com Tue Oct 29 16:36:15 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 29 Oct 2002 13:36:15 -0800 (PST) Subject: [nycphp-talk] More Client-Side Grief In-Reply-To: <200210291459.g9TExTlV026267@parsec.nyphp.org> Message-ID: <20021029213615.26751.qmail@web12807.mail.yahoo.com> > This isn't so much a problem with PHP, but I hope someone can help > out with some JavaScript issues I'm having. Wow, thanks for the all the responses. After picking bits from each post, I've finally done something like: -- the PHP script that handles the form POST prints this to the popup: where $next is where I want the main browser window to go. I had considered passing the next URL in through the JavaScript call to create the popup (and this does seem to give the most flexibility), but really wanted to maintain my redirects from the server (I have a DB of "if posted from there, you now go here" that changes frequently). This isn't as direct as sending a HTTP header, but heck, it seems to work (and still covers non-popups). Ideally, I would have wished there was a way to read the HTTP headers sent from PHP into JavaScript/JScript and then act on them. Supposedly there is (http://msdn.microsoft.com/workshop/author/dhtml/reference/constants/response_headers.asp) but as with so much client-side, I could never get them to do anything. :) Thanks again, H __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From fields at surgam.net Tue Oct 29 17:08:25 2002 From: fields at surgam.net (Adam Fields) Date: Tue, 29 Oct 2002 16:08:25 -0600 Subject: [nycphp-talk] More Client-Side Grief In-Reply-To: <200210292136.g9TLaKlV027028@parsec.nyphp.org> References: <200210292136.g9TLaKlV027028@parsec.nyphp.org> Message-ID: <20021029220825.GO9951@eye.surgam.net> On Tue, Oct 29, 2002 at 04:36:20PM -0500, Hans Zaunere wrote: > After picking bits from each post, I've finally done something like: > > -- the PHP script that handles the form POST prints this to the popup: > > I have one further enhancement to suggest, drawn from a function I use elsewhere. In the latter case, if the headers have not yet been sent, you'll want to use PHP to generate a redirect header for you instead of loading the page and redirecting with javascript. This is basically what I'm thinking, although I have yet to test it to see if it works consistently: -------------------- function REDIRECT ($url) { if (substr($url, 0, 7) != 'http://') { if (substr($url, 0, 1) == '/') { $url = 'http://'.$_SERVER['HTTP_HOST'].$url; } else { $url = 'http://'.$_SERVER['HTTP_HOST'].'/'.$url; } } if (!headers_sent()) { header('Location: '.$url); } else { print ''; } } > where $next is where I want the main browser window to go. I had > considered passing the next URL in through the JavaScript call to > create the popup (and this does seem to give the most flexibility), but > really wanted to maintain my redirects from the server (I have a DB of > "if posted from there, you now go here" that changes frequently). This > isn't as direct as sending a HTTP header, but heck, it seems to work > (and still covers non-popups). I got most of the functionality of my session-based jumpback stack working today. Don't know if that'll help you at all. > Ideally, I would have wished there was a way to read the HTTP headers > sent from PHP into JavaScript/JScript and then act on them. Supposedly > there is > (http://msdn.microsoft.com/workshop/author/dhtml/reference/constants/response_headers.asp) > but as with so much client-side, I could never get them to do anything. > :) > > Thanks again, > > H > > > > __________________________________________________ > Do you Yahoo!? > HotJobs - Search new jobs daily now > http://hotjobs.yahoo.com/ > > > --- Unsubscribe at http://nyphp.org/list --- > > > -- - 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 dorgan at optonline.net Tue Oct 29 17:11:02 2002 From: dorgan at optonline.net (Donald J. Organ IV) Date: Tue, 29 Oct 2002 17:11:02 -0500 Subject: dynamic DNS service References: <200210281611.g9SGBFqn033894@parsec.nyphp.org> Message-ID: <003401c27f98$120bb970$0700020a@laptop01> Does anyone know of a free dynamic DNS service that also route ports like dns2go used to??? From soazine at erols.com Tue Oct 29 17:20:47 2002 From: soazine at erols.com (Phil Powell) Date: Tue, 29 Oct 2002 17:20:47 -0500 Subject: [nycphp-talk] dynamic DNS service References: <200210292213.g9TMDilV027086@parsec.nyphp.org> Message-ID: <020401c27f99$6ecc1eb0$dcbe6444@scandinawa1bo6> try www.dyndns.org and see what they have to offer, that's all I can think of right now.. Phil http://valsignalandet.com ----- Original Message ----- From: "Donald J. Organ IV" To: "NYPHP Talk" Sent: Tuesday, October 29, 2002 5:13 PM Subject: [nycphp-talk] dynamic DNS service > Does anyone know of a free dynamic DNS service that also route ports like > dns2go used to??? > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > From Marty.Hickey at ogilvy.com Tue Oct 29 17:30:47 2002 From: Marty.Hickey at ogilvy.com (Marty.Hickey at ogilvy.com) Date: Tue, 29 Oct 2002 17:30:47 -0500 Subject: Yahoo! Switches To PHP Message-ID: I don't know if you have seen on http://www.slashdot.org that the lead article is that Yahoo has switched their backend to PHP. Here's the main presentation given at PHPCon. http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm Marty Adam Fields on 10/29/2002 05:08:33 PM Please respond to talk at nyphp.org To: NYPHP Talk cc: Subject: Re: [nycphp-talk] More Client-Side Grief On Tue, Oct 29, 2002 at 04:36:20PM -0500, Hans Zaunere wrote: > After picking bits from each post, I've finally done something like: > > -- the PHP script that handles the form POST prints this to the popup: > > I have one further enhancement to suggest, drawn from a function I use elsewhere. In the latter case, if the headers have not yet been sent, you'll want to use PHP to generate a redirect header for you instead of loading the page and redirecting with javascript. This is basically what I'm thinking, although I have yet to test it to see if it works consistently: -------------------- function REDIRECT ($url) { if (substr($url, 0, 7) != 'http://') { if (substr($url, 0, 1) == '/') { $url = 'http://'.$_SERVER['HTTP_HOST'].$url; } else { $url = 'http://'.$_SERVER['HTTP_HOST'].'/'.$url; } } if (!headers_sent()) { header('Location: '.$url); } else { print ''; } } > where $next is where I want the main browser window to go. I had > considered passing the next URL in through the JavaScript call to > create the popup (and this does seem to give the most flexibility), but > really wanted to maintain my redirects from the server (I have a DB of > "if posted from there, you now go here" that changes frequently). This > isn't as direct as sending a HTTP header, but heck, it seems to work > (and still covers non-popups). I got most of the functionality of my session-based jumpback stack working today. Don't know if that'll help you at all. > Ideally, I would have wished there was a way to read the HTTP headers > sent from PHP into JavaScript/JScript and then act on them. Supposedly > there is > ( http://msdn.microsoft.com/workshop/author/dhtml/reference/constants/response_headers.asp ) > but as with so much client-side, I could never get them to do anything. > :) > > Thanks again, > > H > > > > __________________________________________________ > Do you Yahoo!? > HotJobs - Search new jobs daily now > http://hotjobs.yahoo.com/ > > > > > > -- - 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 --- Unsubscribe at http://nyphp.org/list --- -------------- next part -------------- ----------------------------------------- (on bravo) Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of the Ogilvy Group shall be understood as neither given nor endorsed by it. --------------------------------------------------------- From jon at corporatelords.org Tue Oct 29 12:59:44 2002 From: jon at corporatelords.org (Jon Britton) Date: 29 Oct 2002 17:59:44 +0000 Subject: [nycphp-talk] Yahoo! Switches To PHP In-Reply-To: <200210292240.g9TMeTlV048820@parsec.nyphp.org> References: <200210292240.g9TMeTlV048820@parsec.nyphp.org> Message-ID: <1035914416.1055.235.camel@widowmaker.localdomain> On Tue, 2002-10-29 at 22:40, Marty.Hickey at ogilvy.com wrote: > ----------------------------------------- (on bravo) > > Privileged/Confidential Information may be contained in this message. > If you are not So, was the "---" confidential, or was it the "----"? :) Incidentally, here's the presentation: http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm - Jon From brian at artizendesign.com Tue Oct 29 18:16:40 2002 From: brian at artizendesign.com (Brian Preston-Campbell) Date: Tue, 29 Oct 2002 18:16:40 -0500 Subject: [nycphp-talk] Yahoo! Switches To PHP References: <200210292259.g9TMxvlV052831@parsec.nyphp.org> Message-ID: <001901c27fa1$3ea10f40$6500a8c0@brian> I'd like to make the case for pointless frames in an online presentation. ----- Original Message ----- From: "Jon Britton" To: "NYPHP Talk" Sent: Tuesday, October 29, 2002 5:59 PM Subject: Re: [nycphp-talk] Yahoo! Switches To PHP > On Tue, 2002-10-29 at 22:40, Marty.Hickey at ogilvy.com wrote: > > ----------------------------------------- (on bravo) > > > > Privileged/Confidential Information may be contained in this message. > > If you are not > > So, was the "---" confidential, or was it the "----"? :) > > Incidentally, here's the presentation: > http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm > > > - Jon > > > > > --- Unsubscribe at http://nyphp.org/list --- > > > From zaunere at yahoo.com Tue Oct 29 19:02:15 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 29 Oct 2002 16:02:15 -0800 (PST) Subject: [nycphp-talk] More Client-Side Grief In-Reply-To: <200210292208.g9TM8XlV027075@parsec.nyphp.org> Message-ID: <20021030000215.53672.qmail@web12803.mail.yahoo.com> --- Adam Fields wrote: > On Tue, Oct 29, 2002 at 04:36:20PM -0500, Hans Zaunere wrote: > > After picking bits from each post, I've finally done something > like: > > > > -- the PHP script that handles the form POST prints this to the > popup: > > > > > > I have one further enhancement to suggest, drawn from a function I > use elsewhere. In the latter case, if the headers have not yet been > sent, you'll want to use PHP to generate a redirect header for you > instead of loading the page and redirecting with javascript. This is > basically what I'm thinking, although I have yet to test it to see if > it works consistently: > > -------------------- > > function REDIRECT ($url) > { > if (substr($url, 0, 7) != 'http://') { > if (substr($url, 0, 1) == '/') { > $url = 'http://'.$_SERVER['HTTP_HOST'].$url; > } else { > $url = 'http://'.$_SERVER['HTTP_HOST'].'/'.$url; > } > } > if (!headers_sent()) { > header('Location: '.$url); > } else { > print ''; > } > } Originally I had been using this technique, and of course it works great. However, when the headers are sent back to the popup (which is where the form submit happens) I can't find a way to detect that in JavaScript and use the new URL to refresh the main window. As far as I could tell, all the obvious stuff doesn't work, ie: when executing from the popup, document.location.href always refers to the originally requested URL. > I got most of the functionality of my session-based jumpback stack > working today. Don't know if that'll help you at all. Sure, I'd be interested in seeing it. > > Ideally, I would have wished there was a way to read the HTTP > headers sent from PHP into JavaScript/JScript and then act on them. > Supposedly there is (http://msdn.microsoft.com/workshop/author/dhtml/reference/constants/response_headers.asp) > > but as with so much client-side, I could never get them to do > anything. It's frustrating, after reading the above link, that there's no way to see the "Location" header that gets sent to a window. If you run into anything else I'd be curious. H __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From zaunere at yahoo.com Tue Oct 29 19:03:07 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 29 Oct 2002 16:03:07 -0800 (PST) Subject: [nycphp-talk] dynamic DNS service In-Reply-To: <200210292213.g9TMDilV027086@parsec.nyphp.org> Message-ID: <20021030000307.57752.qmail@web12801.mail.yahoo.com> --- "Donald J. Organ IV" wrote: > Does anyone know of a free dynamic DNS service that also route ports > like dns2go used to??? I believe www.zoneedit.com might cover this. H __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From zaunere at yahoo.com Tue Oct 29 19:06:34 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 29 Oct 2002 16:06:34 -0800 (PST) Subject: [nycphp-talk] Yahoo! Switches To PHP In-Reply-To: <200210292259.g9TMxvlV052831@parsec.nyphp.org> Message-ID: <20021030000634.58477.qmail@web12802.mail.yahoo.com> > Incidentally, here's the presentation: > http://public.yahoo.com/~radwin/talks/yahoo-phpcon2002.htm Wow, this is incredible. I hadn't heard about this. ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From aginzburg at datapeer.com Wed Oct 30 10:35:59 2002 From: aginzburg at datapeer.com (Alex Ginzburg) Date: Wed, 30 Oct 2002 10:35:59 -0500 Subject: [nycphp-talk] dynamic DNS service In-Reply-To: <200210292222.g9TMMplV027104@parsec.nyphp.org> References: <200210292222.g9TMMplV027104@parsec.nyphp.org> Message-ID: <200210301035.59312.aginzburg@datapeer.com> I use no-ip.com and very happy with it. They also let you use your own domain name for $24 a year. On Tuesday 29 October 2002 05:22 pm, Phil Powell wrote: > try www.dyndns.org and see what they have to offer, that's all I can think > of right now.. > > Phil > http://valsignalandet.com > > ----- Original Message ----- > From: "Donald J. Organ IV" > To: "NYPHP Talk" > Sent: Tuesday, October 29, 2002 5:13 PM > Subject: [nycphp-talk] dynamic DNS service > > > Does anyone know of a free dynamic DNS service that also route ports like > > dns2go used to??? > > --- Unsubscribe at http://nyphp.org/list --- From stranger at eightbits.com Wed Oct 30 11:11:29 2002 From: stranger at eightbits.com (AG) Date: Wed, 30 Oct 2002 11:11:29 -0500 Subject: [nycphp-talk] dynamic DNS service In-Reply-To: <200210292222.g9TMMplV027104@parsec.nyphp.org> References: <200210292222.g9TMMplV027104@parsec.nyphp.org> Message-ID: <200210301035.59312.aginzburg@datapeer.com> I use no-ip.com and very happy with it. With redirect service you can route to any port you are listening on. They also let you use your own domain name for $24 a year. On Tuesday 29 October 2002 05:22 pm, Phil Powell wrote: > try www.dyndns.org and see what they have to offer, that's all I can think > of right now.. > > Phil > http://valsignalandet.com > > ----- Original Message ----- > From: "Donald J. Organ IV" > To: "NYPHP Talk" > Sent: Tuesday, October 29, 2002 5:13 PM > Subject: [nycphp-talk] dynamic DNS service > > > Does anyone know of a free dynamic DNS service that also route ports like > > dns2go used to??? > > --- Unsubscribe at http://nyphp.org/list --- From zaunere at yahoo.com Wed Oct 30 11:28:20 2002 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 30 Oct 2002 08:28:20 -0800 (PST) Subject: There's that word again.... In-Reply-To: <200210300006.g9U06clV053031@parsec.nyphp.org> Message-ID: <20021030162820.81277.qmail@web12801.mail.yahoo.com> http://jeremy.zawodny.com/mysql/scaling-mysql-and-php.html and a brief writeup at http://nyphp.org ===== Hans Zaunere New York PHP http://nyphp.org hans at nyphp.org __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From nyphp at altunergil.com Wed Oct 30 16:59:11 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Wed, 30 Oct 2002 16:59:11 -0500 Subject: PHP Inventory Management software ? Message-ID: <20021030165911.1d51694c.nyphp@altunergil.com> Can anybody recommend a good Inventory Management software ? Specifically for servers/computers and related spare parts. I've been searching freshmeat and the web and the best I can find is IRM ( http://irm.schoenefeld.org/ ). It doesn't seem to do parts. Only configured systems. Anybody know anything better? Thanks. oktay PS: I'm looking for an open source one.. PHP (preferred) or Perl.. From JayeshSh at netscape.net Wed Oct 30 17:27:34 2002 From: JayeshSh at netscape.net (Jayesh Sheth) Date: Wed, 30 Oct 2002 17:27:34 -0500 Subject: [nycphp-talk] PHP Inventory Management software ? Message-ID: <39A996FD.6FE001A3.00765763@netscape.net> Hello Oktay, Have you heard of the new open source ERP company, Openmfg ? Their solution may be a little too elaborate, though, for just a simple inventory system. http://www.openmfg.com/ Regards, - Jay Sheth Oktay Altunergil wrote: >Can anybody recommend a good Inventory Management software ? Specifically for servers/computers and related spare parts. > >I've been searching freshmeat and the web and the best I can find is IRM ( http://irm.schoenefeld.org/ ). It doesn't seem to do parts. Only configured systems. > >Anybody know anything better? > >Thanks. > >oktay > >PS: I'm looking for an open source one.. PHP (preferred) or Perl.. > > > >--- Unsubscribe at http://nyphp.org/list --- > > > __________________________________________________________________ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ From joshmccormack at travelersdiary.com Wed Oct 30 22:29:18 2002 From: joshmccormack at travelersdiary.com (Josh McCormack) Date: Wed, 30 Oct 2002 22:29:18 -0500 Subject: [nycphp-talk] PHP Inventory Management software ? References: <200210302205.g9UM54lV024483@parsec.nyphp.org> Message-ID: <3DC0A38E.4020305@travelersdiary.com> I'd be interested in something like this too. Would really help with a project I've been thinking of. There are a couple of other projects that came up on Freshmeat when I searched. What did you think of these? phpInv is a small yet highly configurable inventory script written in PHP with a MySQL backend. It features unlimited categories, unlimited depth of sub-categories, customizable columns per category, an administration control panel, access permissions (user and group), easy configuration, a template system, and searching. http://freshmeat.net/projects/phpinv/?topic_id=66%2C92%2C129%2C253 PgWebInventory is a complete home inventory database and interface. The declarations for the tables are included along with the PHP interface scripts. Once installed, the database can be accessed and updated via any Web browser. http://freshmeat.net/projects/pgwebinventory/?topic_id=66%2C68 Josh Oktay Altunergil wrote: >Can anybody recommend a good Inventory Management software ? Specifically for servers/computers and related spare parts. > >I've been searching freshmeat and the web and the best I can find is IRM ( http://irm.schoenefeld.org/ ). It doesn't seem to do parts. Only configured systems. > >Anybody know anything better? > >Thanks. > >oktay > >PS: I'm looking for an open source one.. PHP (preferred) or Perl.. > > > >--- Unsubscribe at http://nyphp.org/list --- > > > > From chalu at flatiron.egenius.com Wed Oct 30 17:41:23 2002 From: chalu at flatiron.egenius.com (Chalu Kim) Date: Wed, 30 Oct 2002 17:41:23 -0500 Subject: [nycphp-talk] PHP Inventory Management software ? References: <200210302205.g9UM54lV024483@parsec.nyphp.org> Message-ID: <010e01c28065$793824d0$5c00a8c0@mothergoose> Try NOLA from Noguska It is good for Bechtel and should be good enough for many. It has got a PDF generation so that your system is not tied to any printer, important thing in outdoor and warehouse situation. Look around for whether the package has been around long enough.. Good way to know if it has been used. Good luck. ----- Original Message ----- From: "Oktay Altunergil" To: "NYPHP Talk" Sent: Wednesday, October 30, 2002 5:05 PM Subject: [nycphp-talk] PHP Inventory Management software ? > Can anybody recommend a good Inventory Management software ? Specifically for servers/computers and related spare parts. > > I've been searching freshmeat and the web and the best I can find is IRM ( http://irm.schoenefeld.org/ ). It doesn't seem to do parts. Only configured systems. > > Anybody know anything better? > > Thanks. > > oktay > > PS: I'm looking for an open source one.. PHP (preferred) or Perl.. > > > > --- Unsubscribe at http://nyphp.org/list --- > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.408 / Virus Database: 230 - Release Date: 10/25/2002 From nyphp at altunergil.com Thu Oct 31 09:00:07 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Thu, 31 Oct 2002 09:00:07 -0500 Subject: [nycphp-talk] PHP Inventory Management software ? In-Reply-To: <200210302229.g9UMTUlV024522@parsec.nyphp.org> References: <200210302229.g9UMTUlV024522@parsec.nyphp.org> Message-ID: <20021031090007.1a320f5c.nyphp@altunergil.com> Yes. I've come accross these too. 'phpInv is small [...] inventory script'. Well. it's too small for our purposes. the other one.. PgWebInventory " is a simple way to inventory your books, movies, and music at home. ", and no it doesn't look like it would work if customized it. In short.. everything that is out there for free seem to be too simplistice. The best of the lot is IRM. oktay On Wed, 30 Oct 2002 17:29:30 -0500 Josh McCormack wrote: > I'd be interested in something like this too. Would really help with a > project I've been thinking of. There are a couple of other projects that > came up on Freshmeat when I searched. What did you think of these? > > phpInv is a small yet highly configurable inventory script written in > PHP with a MySQL backend. It features unlimited categories, unlimited > depth of sub-categories, customizable columns per category, an > administration control panel, access permissions (user and group), easy > configuration, a template system, and searching. > http://freshmeat.net/projects/phpinv/?topic_id=66%2C92%2C129%2C253 > > PgWebInventory is a complete home inventory database and interface. The > declarations for the tables are included along with the PHP interface > scripts. Once installed, the database can be accessed and updated via > any Web browser. > http://freshmeat.net/projects/pgwebinventory/?topic_id=66%2C68 > > Josh > > > > Oktay Altunergil wrote: > > >Can anybody recommend a good Inventory Management software ? Specifically for servers/computers and related spare parts. > > > >I've been searching freshmeat and the web and the best I can find is IRM ( http://irm.schoenefeld.org/ ). It doesn't seem to do parts. Only configured systems. > > > >Anybody know anything better? > > > >Thanks. > > > >oktay > > > >PS: I'm looking for an open source one.. PHP (preferred) or Perl.. > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list --- > > From nyphp at altunergil.com Thu Oct 31 09:04:51 2002 From: nyphp at altunergil.com (Oktay Altunergil) Date: Thu, 31 Oct 2002 09:04:51 -0500 Subject: [nycphp-talk] PHP Inventory Management software ? In-Reply-To: <200210302229.g9UMT4lV024517@parsec.nyphp.org> References: <200210302229.g9UMT4lV024517@parsec.nyphp.org> Message-ID: <20021031090451.0c1f6695.nyphp@altunergil.com> I will still keep looking at the software, but I wanted to let you know that their license is NOT open source. They might call it that but it does not comply with the open source definition. It's definetely *NOT* free software either. http://www.openmfg.com/about/license.php oktay On Wed, 30 Oct 2002 17:29:04 -0500 JayeshSh at netscape.net wrote: > Hello Oktay, > > Have you heard of the new open source ERP company, Openmfg ? Their solution may be a little too elaborate, though, for just a simple inventory system. > > http://www.openmfg.com/ > > Regards, > > - Jay Sheth > Oktay Altunergil wrote: > > >Can anybody recommend a good Inventory Management software ? Specifically for servers/computers and related spare parts. > > > >I've been searching freshmeat and the web and the best I can find is IRM ( http://irm.schoenefeld.org/ ). It doesn't seem to do parts. Only configured systems. > > > >Anybody know anything better? > > > >Thanks. > > > >oktay > > > >PS: I'm looking for an open source one.. PHP (preferred) or Perl.. > > > > > > > > > > > > > > > > __________________________________________________________________ > The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp > > Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ > > > --- Unsubscribe at http://nyphp.org/list --- > > From fields at surgam.net Thu Oct 31 11:48:22 2002 From: fields at surgam.net (Adam Fields) Date: Thu, 31 Oct 2002 10:48:22 -0600 Subject: [nycphp-talk] More Client-Side Grief In-Reply-To: <200210300002.g9U02KlV053017@parsec.nyphp.org> References: <200210300002.g9U02KlV053017@parsec.nyphp.org> Message-ID: <20021031164822.GQ22882@eye.surgam.net> On Tue, Oct 29, 2002 at 07:02:20PM -0500, Hans Zaunere wrote: > Originally I had been using this technique, and of course it works > great. However, when the headers are sent back to the popup (which is > where the form submit happens) I can't find a way to detect that in > JavaScript and use the new URL to refresh the main window. As far as I > could tell, all the obvious stuff doesn't work, ie: when executing from > the popup, document.location.href always refers to the originally > requested URL. True. I've been pairing this with another redirector page that tests if you're in a popup, and then doesn't do this for popups. -- - 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 Thu Oct 31 11:57:19 2002 From: fields at surgam.net (Adam Fields) Date: Thu, 31 Oct 2002 10:57:19 -0600 Subject: [nycphp-talk] There's that word again.... In-Reply-To: <200210301629.g9UGT0lV024016@parsec.nyphp.org> References: <200210301629.g9UGT0lV024016@parsec.nyphp.org> Message-ID: <20021031165719.GR22882@eye.surgam.net> On Wed, Oct 30, 2002 at 11:28:55AM -0500, Hans Zaunere wrote: > > http://jeremy.zawodny.com/mysql/scaling-mysql-and-php.html and a brief > writeup at http://nyphp.org Any idea if there's an OS tool to put out slides like that, or is Powerpoint the only choice still? -- - 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 JayeshSh at netscape.net Thu Oct 31 12:51:13 2002 From: JayeshSh at netscape.net (Jayesh Sheth) Date: Thu, 31 Oct 2002 12:51:13 -0500 Subject: [nycphp-talk] There's that word again.... References: <200210311657.g9VGvRlV049506@parsec.nyphp.org> Message-ID: <3DC16D91.6000606@netscape.net> Hello Adam, While I was writing a JavaScript based slide show tool, I searched on sourceforge.net and came up with many different php powered slide show tools. I wrote a small, simple JavaScript slideshow script which works differently from (complex) php / database driven ones: First place the index.html for the slideshow page in your slideshow directory: e.g.: www.yourname.com/slides/index.html; then just put pictures named image0, image1, image2 and so in an "images" subdirectory, e.g. : www.yourname.com/slides/images . Then change the number of total slides in the script (a variable), edit a series of paragraph tags in the index.html, and you're ready to go. I have been thinking about releasing this script under the GPL license for some time now - because it might be of use to other people. Regards, - Jay Adam Fields wrote: >On Wed, Oct 30, 2002 at 11:28:55AM -0500, Hans Zaunere wrote: > > >>http://jeremy.zawodny.com/mysql/scaling-mysql-and-php.html and a brief >>writeup at http://nyphp.org >> >> > >Any idea if there's an OS tool to put out slides like that, or is >Powerpoint the only choice still? > > > > -- Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop at Netscape! http://shopnow.netscape.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jon at corporatelords.org Thu Oct 31 08:04:55 2002 From: jon at corporatelords.org (Jon Britton) Date: 31 Oct 2002 13:04:55 +0000 Subject: [nycphp-talk] There's that word again.... In-Reply-To: <200210311751.g9VHpIlV071278@parsec.nyphp.org> References: <200210311751.g9VHpIlV071278@parsec.nyphp.org> Message-ID: <1036069531.1066.11.camel@widowmaker.localdomain> On Thu, 2002-10-31 at 17:51, Jayesh Sheth wrote: > > I have been thinking about releasing this script under the GPL license > for some time now - because it might be of use to other people. We also might be able to improve your code. Then you'll benefit :) To Adam: OpenOffice has an HTML export feature in their Powerpoint replacement, though I haven't played with it much. - Jon From mao_sucks at nocommies.org.nyphp.org Thu Oct 31 20:18:32 2002 From: mao_sucks at nocommies.org.nyphp.org (mao_sucks at nocommies.org.nyphp.org) Date: Thu, 31 Oct 2002 17:18:32 -0800 Subject: Flag of inconvenience Message-ID: <200211010118.RAA06605@cobrand.salon.com> An HTML attachment was scrubbed... URL: