From soazine at erols.com Sun Jun 1 02:15:14 2003 From: soazine at erols.com (Phil Powell) Date: Sun, 1 Jun 2003 02:15:14 -0400 Subject: Best practice for comparing IP addresses Message-ID: <0da201c32805$2a6426e0$2aaf6244@scandinawa1bo6> Consider the following lines of code: if ($hasEnteredNick == 1 && file_exists("$pathStart/banned_ips.xml")) { $fileID = fopen("$pathStart/banned_ips.xml") or die("Cannot open file $pathStart/banned_ips.xml"); $stuff = fread($fileID, filesize("$pathStart/banned_ips.xml")); fclose($fileID); $parser = xml_parser_create(); xml_parse_into_struct($parser, $stuff, $bannedIPArray, $extraStuff); xml_parser_free($parser); $yourIPArray = explode(".", $REMOTE_ADDR); for ($i = 0; $i < sizeOf($bannedIPArray); $i++) { $ipArray = explode($bannedIPArray[$i][attributes][IP], "."); if (($bannedIPArray[$i][attributes][NICK] === $nick || implode(".", array_pop($yourIPArray)) == implode(".", array_pop($ipArray)) ) && $bannedIPArray[$i][attributes][NICK] !== "admin" ) { // NICKNAME FOUND IN banned_ips.xml FILE - THEY HAVE BEEN BANNED FROM CHATROOM $hasEnteredNick = 0; if ($bannedIPArray[$i][attributes][NICK] === $nick) { $errorMsg = "You are using a banned nickname, please select another"; } else { $errorMsg = "The user at this machine ($REMOTE_ADDR) has been banned from the chatroom"; } break; } } } What I want to do is compare an IP address from a parsed XML file with the user's IP address. If a match is found only in the first three numbers (xx.xx.xx.*) then action is taken. I thought about using the following algorithm to do so, but does anyone else have a better suggestion? I am not accustomed to either implode, explode or array_pop, so I am not sure if they are being used properly w/o extensive testing. Thanx Phil -------------- next part -------------- An HTML attachment was scrubbed... URL: From as867 at columbia.edu Sun Jun 1 09:07:40 2003 From: as867 at columbia.edu (Sicular, Alexander) Date: Sun, 1 Jun 2003 09:07:40 -0400 Subject: [nycphp-talk] Best practice for comparing IP addresses Message-ID: <526804E77BD5324DA6A026378FD5A73E029B0A@exchange2k.neuro.columbia.edu> Phil, I gather there are many ways to accomplish this... This is just one that may work for you... >From within your for loop... if(intval($yourIPArray[0].$yourIPArray[1].$yourIPArray[2])==intval($ipAr ray[0].$ipArray[1].$ipArray[2])){ Do stuff } The explode should take your ip address and make it an array with 4 items in it. I think the items will be text. Using the '.' to concatenate the first three values and intval() to turn them into a number you should be able to see if they match. Of course a regex maybe more robust... Good luck, alex -----Original Message----- From: Phil Powell [mailto:soazine at erols.com] Sent: Sunday, June 01, 2003 2:19 AM To: NYPHP Talk Subject: [nycphp-talk] Best practice for comparing IP addresses Consider the following lines of code: if ($hasEnteredNick == 1 && file_exists("$pathStart/banned_ips.xml")) { $fileID = fopen("$pathStart/banned_ips.xml") or die("Cannot open file $pathStart/banned_ips.xml"); $stuff = fread($fileID, filesize("$pathStart/banned_ips.xml")); fclose($fileID); $parser = xml_parser_create(); xml_parse_into_struct($parser, $stuff, $bannedIPArray, $extraStuff); xml_parser_free($parser); $yourIPArray = explode(".", $REMOTE_ADDR); for ($i = 0; $i < sizeOf($bannedIPArray); $i++) { $ipArray = explode($bannedIPArray[$i][attributes][IP], "."); if (($bannedIPArray[$i][attributes][NICK] === $nick || implode(".", array_pop($yourIPArray)) == implode(".", array_pop($ipArray)) ) && $bannedIPArray[$i][attributes][NICK] !== "admin" ) { // NICKNAME FOUND IN banned_ips.xml FILE - THEY HAVE BEEN BANNED FROM CHATROOM $hasEnteredNick = 0; if ($bannedIPArray[$i][attributes][NICK] === $nick) { $errorMsg = "You are using a banned nickname, please select another"; } else { $errorMsg = "The user at this machine ($REMOTE_ADDR) has been banned from the chatroom"; } break; } } } What I want to do is compare an IP address from a parsed XML file with the user's IP address. If a match is found only in the first three numbers (xx.xx.xx.*) then action is taken. I thought about using the following algorithm to do so, but does anyone else have a better suggestion? I am not accustomed to either implode, explode or array_pop, so I am not sure if they are being used properly w/o extensive testing. Thanx Phil --- Unsubscribe at http://nyphp.org/list/ --- ----------------------------------- This transmission is confidential and intended solely for the person or organization to whom it is addressed. It may contain privileged and confidential information. If you are not the intended recipient, you should not copy, distribute or take any action in reliance on it. If you believe you received this transmission in error, please notify the sender. -------------------------------- From chris at psydeshow.org Sun Jun 1 10:50:47 2003 From: chris at psydeshow.org (Chris Snyder) Date: Sun, 01 Jun 2003 10:50:47 -0400 Subject: [nycphp-talk] Best practice for comparing IP addresses In-Reply-To: <200306010619.h516IUYR099263@parsec.nyphp.org> References: <200306010619.h516IUYR099263@parsec.nyphp.org> Message-ID: <3EDA12C7.5090405@psydeshow.org> Phil Powell wrote: >What I want to do is compare an IP address from a parsed XML file with the user's IP address. If a match is found only in the first three numbers (xx.xx.xx.*) then action is taken. I thought about using the following algorithm to do so, but does anyone else have a better suggestion? I am not accustomed to either implode, explode or array_pop, so I am not sure if they are being used properly w/o extensive testing. > > > I think you've already found a pretty elegant solution. The only other way I can think of to do it would be: $lastdot= strrpos($ipaddress, "."); $network= substr($ipaddress, 0, $lastdot); Or even $network= substr( $ipaddress, 0, strrpos ($ipaddress, ".") ); which would displense with the arrays. chris. From zaunere at yahoo.com Sun Jun 1 13:31:18 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Sun, 1 Jun 2003 10:31:18 -0700 (PDT) Subject: [nycphp-talk] Best practice for comparing IP addresses In-Reply-To: <200306010619.h516IUXN099263@parsec.nyphp.org> Message-ID: <20030601173118.23076.qmail@web12804.mail.yahoo.com> --- Phil Powell wrote: > Consider the following lines of code: > > if ($hasEnteredNick == 1 && file_exists("$pathStart/banned_ips.xml")) { > $fileID = fopen("$pathStart/banned_ips.xml") or die("Cannot open file > $pathStart/banned_ips.xml"); > $stuff = fread($fileID, filesize("$pathStart/banned_ips.xml")); > fclose($fileID); > $parser = xml_parser_create(); > xml_parse_into_struct($parser, $stuff, $bannedIPArray, $extraStuff); > xml_parser_free($parser); > $yourIPArray = explode(".", $REMOTE_ADDR); > for ($i = 0; $i < sizeOf($bannedIPArray); $i++) { > $ipArray = explode($bannedIPArray[$i][attributes][IP], "."); > if (($bannedIPArray[$i][attributes][NICK] === $nick || > implode(".", array_pop($yourIPArray)) == implode(".", > array_pop($ipArray)) > ) && > $bannedIPArray[$i][attributes][NICK] !== "admin" > ) { > // NICKNAME FOUND IN banned_ips.xml FILE - THEY HAVE BEEN BANNED FROM > CHATROOM > $hasEnteredNick = 0; > if ($bannedIPArray[$i][attributes][NICK] === $nick) { > $errorMsg = "You are using a banned nickname, please select > another"; > } else { > $errorMsg = "The user at this machine ($REMOTE_ADDR) has been banned > from the chatroom"; > } > break; > } > } > > } > > What I want to do is compare an IP address from a parsed XML file with the > user's IP address. If a match is found only in the first three numbers > (xx.xx.xx.*) then action is taken. I thought about using the following > algorithm to do so, but does anyone else have a better suggestion? I am > not accustomed to either implode, explode or array_pop, so I am not sure if > they are being used properly w/o extensive testing. This may be a handy function, http://www.php.net/manual/en/function.ip2long.php and the usernotes for that page are very nice, too. Nevertheless, another potential pCom! :) H From David.SextonJr at ubspw.com Mon Jun 2 09:26:40 2003 From: David.SextonJr at ubspw.com (Sexton, David) Date: Mon, 2 Jun 2003 09:26:40 -0400 Subject: [nycphp-talk] Sessions & Functions question Message-ID: <18D7B8CAA5284F478470828806DB124603789E4B@psle01.xchg.pwj.com> Depeneding on the version you're using, you could just use the $_SESSION['varname'] superglobal... no global keyword required. Just be careful with it before version 4.3.1 - I had some issues with it on 4.1.2. -----Original Message----- From: Christopher R. Merlo [mailto:cmerlo at turing.matcmp.ncc.edu] Sent: Saturday, May 31, 2003 6:25 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Sessions & Functions question On 2003-05-31 18:05 -0400, Christopher R. Merlo wrote: > Here's a weird one: Never mind. :) After some debugging and RTFMing, I realized that I need to use "global" within functions, for stuff that was declared outside. -- cmerlo at turing.matcmp.ncc.edu http://turing.matcmp.ncc.edu/~cmerlo Windows: More than enough rope. --- Unsubscribe at http://nyphp.org/list/ --- From soazine at pop.mail.rcn.net Mon Jun 2 15:33:04 2003 From: soazine at pop.mail.rcn.net (soazine@pop.erols.com) Date: Mon, 2 Jun 2003 15:33:04 -0400 Subject: To cache or not to cache... Message-ID: <184670-2200361219334507@M2W085.mail2web.com> One of my websites contains varying changing data; some of it changes randomly daily, others change according to XML-entered timed data; some never changes. Nearly all on the homepage are imported as PHP scripts via a CGI stub executable. I'm interested in a caching solution for the page for efficiency sake. Based on this scenario, what would you all recommend I do? Thanx Phil -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . From lists at ny-tech.net Mon Jun 2 19:32:57 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Mon, 2 Jun 2003 19:32:57 -0400 (Eastern Daylight Time) Subject: Stream Error with include( ) Message-ID: <3EDBDEA9.000003.04056@main> Hi all, I work for a webhost. Recently we upgraded a few of our servers to PHP 4.3.2 However, now when a user tries to include a remote file using a full URL. The following error is generated: Warning: main(): stream does not support seeking in /home/username/public_html/file.php on line ## It does not happen if the file being included is on the same server and is included using FS. I have not been able to figure out how to avoid it. Any ideas? - Nasir From gmalcolm at professionalcredit.com Mon Jun 2 19:37:54 2003 From: gmalcolm at professionalcredit.com (Malcolm, Gary) Date: Mon, 2 Jun 2003 16:37:54 -0700 Subject: [nycphp-talk] Stream Error with include Message-ID: <715DAA079998D3118B8B00508B2C071D453DA7@pcsnet> from: http://php.lamphost.net/manual/en/features.remote-files.php "As long as allow_url_fopen is enabled in php.ini, you can use HTTP and FTP URLs with most of the functions that take a filename as a parameter. " gary > -----Original Message----- > From: Nasir Zubair [mailto:lists at ny-tech.net] > Sent: Monday, 02 June, 2003 4:33 PM > To: NYPHP Talk > Subject: [nycphp-talk] Stream Error with include > > > Hi all, > > I work for a webhost. Recently we upgraded a few of our > servers to PHP 4.3.2 > However, now when a user tries to include a remote file > using a full URL. > The following error is generated: > > Warning: main(): stream does not support seeking in > /home/username/public_html/file.php on line ## > > It does not happen if the file being included is on the same > server and is > included using FS. I have not been able to figure out how to > avoid it. Any > ideas? > > - Nasir > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at ny-tech.net Mon Jun 2 19:54:13 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Mon, 2 Jun 2003 19:54:13 -0400 (Eastern Daylight Time) Subject: [nycphp-talk] Stream Error with include References: <200306022338.h52Nc0Wv055898@parsec.nyphp.org> Message-ID: <3EDBE3A5.000001.03760@main> Ok, Take a look at these documents. http://100megs13.com/phpinfo.php http://100megs13.com/test.php http://100megs13.com/test.phps - Nasir -------Original Message------- From: talk at nyphp.org Date: Monday, June 02, 2003 7:38:25 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Stream Error with include from: http://php.lamphost.net/manual/en/features.remote-files.php "As long as allow_url_fopen is enabled in php.ini, you can use HTTP and FTP URLs with most of the functions that take a filename as a parameter. " gary > -----Original Message----- > From: Nasir Zubair [mailto:lists at ny-tech.net] > Sent: Monday, 02 June, 2003 4:33 PM > To: NYPHP Talk > Subject: [nycphp-talk] Stream Error with include > > > Hi all, > > I work for a webhost. Recently we upgraded a few of our > servers to PHP 4.3.2 > However, now when a user tries to include a remote file > using a full URL. > The following error is generated: > > Warning: main(): stream does not support seeking in > /home/username/public_html/file.php on line ## > > It does not happen if the file being included is on the same > server and is > included using FS. I have not been able to figure out how to > avoid it. Any > ideas? > > - Nasir > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- . From lists at ny-tech.net Mon Jun 2 20:19:36 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Mon, 2 Jun 2003 20:19:36 -0400 (Eastern Daylight Time) Subject: [nycphp-talk] Stream Error with include References: <200306022338.h52Nc0Wv055898@parsec.nyphp.org> Message-ID: <3EDBE998.000001.01712@main> * another msg lost * Here is what I sent back earlier: Ok, Take a look at these documents. http://100megs13.com/phpinfo.php http://100megs13.com/test.php http://100megs13.com/test.phps - Nasir -------Original Message------- From: talk at nyphp.org Date: Monday, June 02, 2003 7:38:25 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Stream Error with include from: http://php.lamphost.net/manual/en/features.remote-files.php "As long as allow_url_fopen is enabled in php.ini, you can use HTTP and FTP URLs with most of the functions that take a filename as a parameter. " gary From louie at zibi.co.il Mon Jun 2 21:03:10 2003 From: louie at zibi.co.il (louie) Date: Mon, 2 Jun 2003 21:03:10 -0400 Subject: [nycphp-talk] Stream Error with include References: <200306030020.h530Jkcb057533@parsec.nyphp.org> Message-ID: <002501c3296b$e72a3b90$7552fea9@w3j5c4> greetings! i think this is your problem: read this: http://us4.php.net/function.main best regards, louie. ----- Original Message ----- From: "Nasir Zubair" To: "NYPHP Talk" Sent: Monday, June 02, 2003 8:19 PM Subject: RE: [nycphp-talk] Stream Error with include > * another msg lost * > > Here is what I sent back earlier: > > Ok, > > Take a look at these documents. > > http://100megs13.com/phpinfo.php > http://100megs13.com/test.php > http://100megs13.com/test.phps > > - Nasir > > -------Original Message------- > > From: talk at nyphp.org > Date: Monday, June 02, 2003 7:38:25 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] Stream Error with include > > from: > http://php.lamphost.net/manual/en/features.remote-files.php > > "As long as allow_url_fopen is enabled in php.ini, you can use HTTP and FTP > URLs with most of the functions that take a filename as a parameter. " > > gary > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > > From nyphp at enobrev.com Tue Jun 3 10:41:46 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Tue, 3 Jun 2003 10:41:46 -0400 Subject: Multiple Language Application... Message-ID: <00b501c329de$426d6550$e1951d18@enobrev> Good morning and Happy Tuesday New Yorkers... I'm working on an application that requires the interface (as well as the content) to be in English and Chinese. Unfortunately, I have ZERO experience in such things. I have some ideas as how to accomplish this. OSCommerce does it by including a php language file in their configure files, which i think seems to be a good way. I also figured maybe something with XML or from the database (using php / mysql / apache) Can anyone here reccommend an efficient way or something to look at / for to help me move in the right direction? Thanks!!! Mark Armendariz -------------- next part -------------- An HTML attachment was scrubbed... URL: From nygini at yahoo.com Tue Jun 3 10:53:13 2003 From: nygini at yahoo.com (elvire dardier) Date: Tue, 3 Jun 2003 07:53:13 -0700 (PDT) Subject: Segmentation Fault, "Document contains no data" error In-Reply-To: <200306031444.h53Efsbx074769@parsec.nyphp.org> Message-ID: <20030603145313.81443.qmail@web41315.mail.yahoo.com> Hi everybody! I installed Apache 2 (--enable-so) with PHP (--with-gd --with-oci8 --with-oracle). I also installed Oracle9i. My problem is that php doesn't work with Oracle9i properly. It connects once or twice and next time I open php web page with connection to Oracle it gives me the error message "Document contains no data" and "Segmentation fault (11)" in Apache's error log. Does enybody have the idea what's going on? I'm shure that the php page works on Apache-PHP-Oracle8i. I think that php has some problem with connection to Oracle9i. Was enybody able to get it work with Oracle9i at all? Thank you all in advance, Elena __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com From chris at psydeshow.org Tue Jun 3 12:54:19 2003 From: chris at psydeshow.org (Chris Snyder) Date: Tue, 03 Jun 2003 12:54:19 -0400 Subject: [nycphp-talk] Multiple Language Application... In-Reply-To: <200306031443.h53EfsYL074769@parsec.nyphp.org> References: <200306031443.h53EfsYL074769@parsec.nyphp.org> Message-ID: <3EDCD2BB.5060802@psydeshow.org> I'm relatively new to this myself. If you can use Unicode instead of one of the more specialised encodings, I recommend Tim Bray's intro: http://tbray.org/ongoing/When/200x/2003/04/06/Unicode And also Unicode's FAQ at: http://www.unicode.org/unicode/faq/ MySQL supports UTF-8, but I haven't been able to determine if that is out of the box, or whether you need to compile it --with-extra-charsets=complex. Other multibyte character-sets are available, see http://www.mysql.com/doc/en/Localisation.html PHP also supports UTF-8. For multibyte character support, see the mbstring extension: http://us3.php.net/mbstring This is just basic research I've been doing into making sure that the apps I design can handle international deployment-- I have yet to actually deal with real world data in anything other than ISO-8859-1. And your client probably has a specific character-set they want to support, which might make it easier to find a solution. chris. Mark Armendariz wrote: >Good morning and Happy Tuesday New Yorkers... > >I'm working on an application that requires the interface (as well as >the content) to be in English and Chinese. Unfortunately, I have ZERO >experience in such things. I have some ideas as how to accomplish this. >OSCommerce does it by including a php language file in their configure >files, which i think seems to be a good way. I also figured maybe >something with XML or from the database (using php / mysql / apache) > >Can anyone here reccommend an efficient way or something to look at / >for to help me move in the right direction? > >Thanks!!! > >Mark Armendariz > > > >--- Unsubscribe at http://nyphp.org/list/ --- > > > > > From jonbaer at jonbaer.net Tue Jun 3 13:13:43 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Tue, 3 Jun 2003 10:13:43 -0700 Subject: Anyway to report errors back from includes/requires? Message-ID: <00d701c329f3$7cb82320$6400a8c0@FlipWilson> I know PHP 5 will have common try/catch block is there anyway to do it < 5.0? I did some tests with set_error_handler and realize the error does not come up the chain ... how would an example like this translate (from Java to PHP): try { queryPoll(); // does SQL and *may* timeout } catch (Exception e) { System.out.println("Sorry, the poll was not available."); } I was thinking this would do it in PHP: error_reporting(0); set_error_handler("handle_error"); include("poll.php"); function handle_error ($errno, $errmsg, $filename, $linenum, $vars) { if ($filename == "poll.php") { echo "Sorry, the poll was not available."; } } I don't think Im understanding error reporting correctly. - Jon From heli_travel at yahoo.com Tue Jun 3 14:08:13 2003 From: heli_travel at yahoo.com (LIAO YANG) Date: Tue, 3 Jun 2003 11:08:13 -0700 (PDT) Subject: [nycphp-talk] Multiple Language Application... In-Reply-To: <200306031444.h53Efsbf074769@parsec.nyphp.org> Message-ID: <20030603180813.35365.qmail@web12206.mail.yahoo.com> There are mainly two sets of Chinese characters. One is GB2312 system, another is Big5 system. GB2312 is mainly used by MainLand China, Big5 is mainly used by Chinese overseas, Taiwan, Hongkong. so you need to make decision where is your marketplace and which one is suitable, or you want to handle them all. But I guess you need both, since more more Mainland Chinese people are come to aboard, it will be very soon to become the majority of Chinese overseas. IE can handle both Chinese character sets, for Netscape you may need a third party encoding software to handle the display, but those are free. Here is one you may use: http://www.njstar.com . Msql database has no problem to handle chinese Character. There are two ways to handle those two Chinese Character sets. 1)Dynamic interface handling, you may need a convert program to convert those Char sets each other, there are some programs are free to download, but I don't know where. Usually it is perl or c++ program. 2)Static web contents. This is the easy one, you can prepare two sets of your web contents, and disply them seperately. So totally will be three sets of them, 2 Chinese and 1 English. There is the way OSCommerce handles multiple languages. Hope it may help little bit! LY --- Mark Armendariz wrote: > Good morning and Happy Tuesday New Yorkers... > > I'm working on an application that requires the interface (as > well as > the content) to be in English and Chinese. Unfortunately, I > have ZERO > experience in such things. I have some ideas as how to > accomplish this. > OSCommerce does it by including a php language file in their > configure > files, which i think seems to be a good way. I also figured > maybe > something with XML or from the database (using php / mysql / > apache) > > Can anyone here reccommend an efficient way or something to > look at / > for to help me move in the right direction? > > Thanks!!! > > Mark Armendariz > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com From ophir at prusak.com Tue Jun 3 15:39:23 2003 From: ophir at prusak.com (Ophir Prusak) Date: Tue, 3 Jun 2003 15:39:23 -0400 Subject: [nycphp-talk] Anyway to report errors back from includes/requires? References: <200306031715.h53HEGYH080007@parsec.nyphp.org> Message-ID: <00a101c32a07$d6127f60$0200a8c0@866w2k> see http://www.php.net/manual/en/ref.errorfunc.php for more info on how to catch errors. also you can add the at sign "@" before the function call. do this (copied from http://us2.php.net/manual/en/function.include.php) $success = @include($yourinclude); if (!$success) { print "Can't find page $yourinclude"; } Ophir Hire me :) ----- Original Message ----- From: "Jon Baer" To: "NYPHP Talk" Sent: Tuesday, June 03, 2003 1:14 PM Subject: [nycphp-talk] Anyway to report errors back from includes/requires? > I know PHP 5 will have common try/catch block is there anyway to do it < > 5.0? > > I did some tests with set_error_handler and realize the error does not come > up the chain ... how would an example like this translate (from Java to > PHP): > > try { > queryPoll(); // does SQL and *may* timeout > } catch (Exception e) { > System.out.println("Sorry, the poll was not available."); > } > > I was thinking this would do it in PHP: > > error_reporting(0); > set_error_handler("handle_error"); > include("poll.php"); > > function handle_error ($errno, $errmsg, $filename, $linenum, $vars) { > if ($filename == "poll.php") { echo "Sorry, the poll was not > available."; } > } > > I don't think Im understanding error reporting correctly. > > - Jon > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From nyphp at enobrev.com Tue Jun 3 16:46:57 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Tue, 3 Jun 2003 16:46:57 -0400 Subject: [nycphp-talk] Multiple Language Application... In-Reply-To: <200306031808.h53I8GTD081817@parsec.nyphp.org> Message-ID: <013d01c32a11$460be0a0$e1951d18@enobrev> Fantastic answers, both of you!! It turns out it's to be displayed in big5. I'm going to get to reading.. Thank you both for helping me get a head start!! Mark -----Original Message----- From: LIAO YANG [mailto:heli_travel at yahoo.com] Sent: Tuesday, June 03, 2003 2:08 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Multiple Language Application... There are mainly two sets of Chinese characters. One is GB2312 system, another is Big5 system. GB2312 is mainly used by MainLand China, Big5 is mainly used by Chinese overseas, Taiwan, Hongkong. so you need to make decision where is your marketplace and which one is suitable, or you want to handle them all. But I guess you need both, since more more Mainland Chinese people are come to aboard, it will be very soon to become the majority of Chinese overseas. IE can handle both Chinese character sets, for Netscape you may need a third party encoding software to handle the display, but those are free. Here is one you may use: http://www.njstar.com . Msql database has no problem to handle chinese Character. There are two ways to handle those two Chinese Character sets. 1)Dynamic interface handling, you may need a convert program to convert those Char sets each other, there are some programs are free to download, but I don't know where. Usually it is perl or c++ program. 2)Static web contents. This is the easy one, you can prepare two sets of your web contents, and disply them seperately. So totally will be three sets of them, 2 Chinese and 1 English. There is the way OSCommerce handles multiple languages. Hope it may help little bit! LY --- Mark Armendariz wrote: > Good morning and Happy Tuesday New Yorkers... > > I'm working on an application that requires the interface (as well as > the content) to be in English and Chinese. Unfortunately, I > have ZERO > experience in such things. I have some ideas as how to > accomplish this. > OSCommerce does it by including a php language file in their > configure > files, which i think seems to be a good way. I also figured > maybe > something with XML or from the database (using php / mysql / > apache) > > Can anyone here reccommend an efficient way or something to look at / > for to help me move in the right direction? > > Thanks!!! > > Mark Armendariz > > > > > > __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com --- Unsubscribe at http://nyphp.org/list/ --- From cmerlo at turing.matcmp.ncc.edu Wed Jun 4 07:50:36 2003 From: cmerlo at turing.matcmp.ncc.edu (Christopher R. Merlo) Date: Wed, 4 Jun 2003 07:50:36 -0400 Subject: Big MySQL Problem Message-ID: <20030604075036.A28655@turing.matcmp.ncc.edu> Folks: I'm not quite sure what to do about this one. Hopefully you guys can help. MySQL on my server is running at 99% CPU, as reported by top. Anything that tries to access it (my web site, mysqldump, mysqladmin) waits forever. I rebooted the server, and MySQL is still eating up the CPU. I only found one log file in /usr/local/mysql/var, and it's dated from 2002. How can I figure out what's wrong, fix the problem, and or restart MySQL so that it will work properly? TIA, -Chris -- cmerlo at turing.matcmp.ncc.edu http://turing.matcmp.ncc.edu/~cmerlo We're sorry, but the number you have dialed is imaginary. Please rotate your phone ninety degrees and try again. Thank you. From jonbaer at jonbaer.net Wed Jun 4 08:50:01 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Wed, 4 Jun 2003 05:50:01 -0700 Subject: [nycphp-talk] Big MySQL Problem References: <200306041151.h54BodVZ099604@parsec.nyphp.org> Message-ID: <002601c32a97$d1307cf0$6400a8c0@FlipWilson> Try to download a sniffer (www.ethereal.com) and see if there is anything else going on with your MySQL port. Otherwise try the MySQL list to see if someone with the same config is having the same problem. - Jon ----- Original Message ----- From: "Christopher R. Merlo" To: "NYPHP Talk" Sent: Wednesday, June 04, 2003 4:50 AM Subject: [nycphp-talk] Big MySQL Problem > Folks: > I'm not quite sure what to do about this one. Hopefully you guys can > help. > > MySQL on my server is running at 99% CPU, as reported by top. > Anything that tries to access it (my web site, mysqldump, mysqladmin) > waits forever. I rebooted the server, and MySQL is still eating up > the CPU. I only found one log file in /usr/local/mysql/var, and it's > dated from 2002. How can I figure out what's wrong, fix the problem, > and or restart MySQL so that it will work properly? > > TIA, > -Chris > > -- > cmerlo at turing.matcmp.ncc.edu http://turing.matcmp.ncc.edu/~cmerlo > > We're sorry, but the number you have dialed is imaginary. Please > rotate your phone ninety degrees and try again. Thank you. > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From zaunere at yahoo.com Wed Jun 4 09:21:22 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 4 Jun 2003 06:21:22 -0700 (PDT) Subject: [nycphp-talk] Big MySQL Problem In-Reply-To: <200306041152.h54BodXH099604@parsec.nyphp.org> Message-ID: <20030604132122.89832.qmail@web12808.mail.yahoo.com> --- "Christopher R. Merlo" wrote: > Folks: > I'm not quite sure what to do about this one. Hopefully you guys can > help. > > MySQL on my server is running at 99% CPU, as reported by top. RedHat assuming, and installed via RPMs? > Anything that tries to access it (my web site, mysqldump, mysqladmin) > waits forever. I rebooted the server, and MySQL is still eating up > the CPU. I only found one log file in /usr/local/mysql/var, and it's > dated from 2002. How can I figure out what's wrong, fix the problem, > and or restart MySQL so that it will work properly? If you've installed from RPM and/or source/binary packages from mysql.com you might be running multiple instances. I think that MySQL generally installs to /usr/* from RPM and /usr/local/ from binary/source. Look for a /etc/init.d/mysql.server or similar file in /usr/local/etc. Then, something like mysql.server stop should shut it down, and using the appropiate my.cnf (which should also be in /etc) you could disable certain aspects of it (like disable the TCP listener) and turn on extensive logging, pointing to a know location. H > > TIA, > -Chris > > -- > cmerlo at turing.matcmp.ncc.edu http://turing.matcmp.ncc.edu/~cmerlo > > We're sorry, but the number you have dialed is imaginary. Please > rotate your phone ninety degrees and try again. Thank you. > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From cmerlo at turing.matcmp.ncc.edu Wed Jun 4 11:50:01 2003 From: cmerlo at turing.matcmp.ncc.edu (Christopher R. Merlo) Date: Wed, 4 Jun 2003 11:50:01 -0400 Subject: [nycphp-talk] Big MySQL Problem In-Reply-To: <200306041322.h54DLQa7003868@parsec.nyphp.org>; from zaunere@yahoo.com on Wed, Jun 04, 2003 at 09:21:26AM -0400 References: <200306041322.h54DLQa7003868@parsec.nyphp.org> Message-ID: <20030604115001.A5623@turing.matcmp.ncc.edu> On 2003-06-04 09:21 -0400, Hans Zaunere wrote: > If you've installed from RPM and/or source/binary packages from mysql.com you > might be running multiple instances. Not sure how to tell if there are multiple instances or not. It's built from source on an OpenBSD 2.8 system. > Then, something > like mysql.server stop should shut it down, I got the helpful message "gave up waiting!" This doesn't sound good. -c -- cmerlo at turing.matcmp.ncc.edu http://turing.matcmp.ncc.edu/~cmerlo We're sorry, but the number you have dialed is imaginary. Please rotate your phone ninety degrees and try again. Thank you. From zaunere at yahoo.com Wed Jun 4 12:00:58 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 4 Jun 2003 09:00:58 -0700 (PDT) Subject: [nycphp-talk] Big MySQL Problem In-Reply-To: <200306041551.h54Fo6XF007148@parsec.nyphp.org> Message-ID: <20030604160058.67662.qmail@web12810.mail.yahoo.com> --- "Christopher R. Merlo" wrote: > On 2003-06-04 09:21 -0400, Hans Zaunere wrote: > > > If you've installed from RPM and/or source/binary packages from mysql.com > you > > might be running multiple instances. > > Not sure how to tell if there are multiple instances or not. It's > built from source on an OpenBSD 2.8 system. Ahh, good ol' OBSD. You probably don't have multiple instances then, unless you compiled from source multiple times :) > > Then, something > > like mysql.server stop should shut it down, > > I got the helpful message "gave up waiting!" This doesn't sound good. Hmm. Does MySQL enter this neverending spin state just when it starts, or only after a query is run against it? Perhaps just a bad query somewhere? H From cmerlo at turing.matcmp.ncc.edu Wed Jun 4 12:06:27 2003 From: cmerlo at turing.matcmp.ncc.edu (Christopher R. Merlo) Date: Wed, 4 Jun 2003 12:06:27 -0400 Subject: [nycphp-talk] Big MySQL Problem In-Reply-To: <200306041602.h54G14a7008161@parsec.nyphp.org>; from zaunere@yahoo.com on Wed, Jun 04, 2003 at 12:01:04PM -0400 References: <200306041602.h54G14a7008161@parsec.nyphp.org> Message-ID: <20030604120627.A16472@turing.matcmp.ncc.edu> On 2003-06-04 12:01 -0400, Hans Zaunere wrote: > Ahh, good ol' OBSD. You probably don't have multiple instances then, unless > you compiled from source multiple times :) Nope. :) I should mention that the entire system has been running just fine, and then I noticed this last night. It *could* be due to some kind of badness in my web site, since I made the redesign live late last week, but you'd figure I would have caught that before now. As far as I remember (and I'll get the fine-toothed comb out soon), everything's in a require_once. It might be a bad query, but off the top of my head I can't think of what that would be. > Hmm. Does MySQL enter this neverending spin state just when it starts, or > only after a query is run against it? Perhaps just a bad query somewhere? I will reboot again, and rename my web directory, to see if it comes up normally. That ought to narrow things down a bit. -- cmerlo at turing.matcmp.ncc.edu http://turing.matcmp.ncc.edu/~cmerlo It is practically impossible to teach good programming style to students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5 From cmerlo at turing.matcmp.ncc.edu Wed Jun 4 12:10:46 2003 From: cmerlo at turing.matcmp.ncc.edu (Christopher R. Merlo) Date: Wed, 4 Jun 2003 12:10:46 -0400 Subject: [nycphp-talk] Big MySQL Problem In-Reply-To: <200306041607.h54G6Ta7009120@parsec.nyphp.org>; from cmerlo@turing.matcmp.ncc.edu on Wed, Jun 04, 2003 at 12:06:29PM -0400 References: <200306041607.h54G6Ta7009120@parsec.nyphp.org> Message-ID: <20030604121046.A10002@turing.matcmp.ncc.edu> On 2003-06-04 12:06 -0400, Christopher R. Merlo wrote: > I will reboot again, and rename my web directory, to see if it comes > up normally. That ought to narrow things down a bit. And, so far, it's running just fine. Damn, I guess it really *is* pilot error. OK, off to debug PHP. :) -- cmerlo at turing.matcmp.ncc.edu http://turing.matcmp.ncc.edu/~cmerlo It is practically impossible to teach good programming style to students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5 From markert at optonline.net Wed Jun 4 12:14:54 2003 From: markert at optonline.net (John W. Markert) Date: Wed, 04 Jun 2003 12:14:54 -0400 Subject: mysql question Message-ID: <002301c32ab4$6f7abb20$0200a8c0@dads> Please advise, is the following possible in mysql or is one limited to joining 2 tables. $query = "select * from advlistings, valsec, valprim where ((advlistings.advId=$advId) and (valsec.SecID=advlistings.secId) and (valprim.primeId=valsec.primeID))"; assume all table names are corect and .variables are correct. the error that I get is: Unknown column 'valprim.primeId' in 'where clause' Thanks, John ___________________________________________ John W. Markert 14 Joanna Way Kinnelon, NJ 07405 Phone: (973)838-8956 Cell: (201)788-1740 Fax: (973)838-4561 email: markert at optonline.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From zaunere at yahoo.com Wed Jun 4 12:20:27 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 4 Jun 2003 09:20:27 -0700 (PDT) Subject: [nycphp-talk] Segmentation Fault, "Document contains no data" error In-Reply-To: <200306031454.h53ErHXH075688@parsec.nyphp.org> Message-ID: <20030604162027.87006.qmail@web12806.mail.yahoo.com> --- elvire dardier wrote: > Hi everybody! > I installed Apache 2 (--enable-so) with PHP (--with-gd > --with-oci8 --with-oracle). I also installed Oracle9i. > My problem is that php doesn't work with Oracle9i > properly. It connects once or twice and next time I > open php web page with connection to Oracle it gives > me the error message "Document contains no data" and > "Segmentation fault (11)" in Apache's error log. Does I think there may be some issues with 9i. Maybe this thread is useful: http://marc.theaimsgroup.com/?l=php-dev&m=105401894714175&w=2 > enybody have the idea what's going on? I'm shure that > the php page works on Apache-PHP-Oracle8i. I think > that php has some problem with connection to Oracle9i. > Was enybody able to get it work with Oracle9i at all? I haven't worked with 9i yet, but I think it's generally recommended to compile PHP --enable-sigchild. Also, if you're using persistent connections, use non-persistent connections and see if that helps at all. Granted, you may need persistent connections, but it may be possible to get around it: http://bugs.php.net/bug.php?id=15390 H > > Thank you all in advance, > > Elena > > > __________________________________ > Do you Yahoo!? > Yahoo! Calendar - Free online calendar with sync to Outlook(TM). > http://calendar.yahoo.com > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From zaunere at yahoo.com Wed Jun 4 12:25:27 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 4 Jun 2003 09:25:27 -0700 (PDT) Subject: [nycphp-talk] Big MySQL Problem In-Reply-To: <200306041611.h54GAnXF009955@parsec.nyphp.org> Message-ID: <20030604162527.31732.qmail@web12803.mail.yahoo.com> --- "Christopher R. Merlo" wrote: > On 2003-06-04 12:06 -0400, Christopher R. Merlo > wrote: > > > I will reboot again, and rename my web directory, to see if it comes > > up normally. That ought to narrow things down a bit. > > And, so far, it's running just fine. Damn, I guess it really *is* > pilot error. OK, off to debug PHP. :) The only thing, could be thread related: http://www.mysql.com/doc/en/OpenBSD_2.8.html Which would be a bit harder to track down and deal with :) H > > -- > cmerlo at turing.matcmp.ncc.edu http://turing.matcmp.ncc.edu/~cmerlo > > It is practically impossible to teach good programming style to students > that have had prior exposure to BASIC: as potential programmers they are > mentally mutilated beyond hope of regeneration. > -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5 > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From php at greggboyle.com Wed Jun 4 12:29:27 2003 From: php at greggboyle.com (php at greggboyle.com) Date: Wed, 4 Jun 2003 12:29:27 -0400 Subject: php_oci8.dll and 9iAS Message-ID: <1054744167.3ede1e67ef43b@greggboyle.com> I have an Oracle 9i Application server running on a WIN2K machine. We installed PHP 4.3.1 (with no extentions) on it with no problems, and now I need to load the php_oic8.dll extention. I have done this on other windows machines without a problem, but this one seems to be a bit different. I installed the oracle 8.1.7 client on the machine, uncommented out the extention in the php.ini file, and set the extention directory path. Now if a page is called that contains one of the oci8 functions, it just displays a blank white page. After some reasearch, I have realized that the webserver is using the 9i OCI.dll that is associated with the 9iAS's %ORACLE_HOME% . Is there a way to hardcode in which % ORACLE_HOME% you want php to use? From zaunere at yahoo.com Wed Jun 4 12:32:02 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 4 Jun 2003 09:32:02 -0700 (PDT) Subject: [nycphp-talk] mysql question In-Reply-To: <200306041615.h54GF5XF010770@parsec.nyphp.org> Message-ID: <20030604163202.14168.qmail@web12801.mail.yahoo.com> --- "John W. Markert" wrote: > Please advise, is the following possible in mysql or is one limited to > joining 2 tables. > > $query = "select * from advlistings, valsec, valprim > where ((advlistings.advId=$advId) > and (valsec.SecID=advlistings.secId) > and (valprim.primeId=valsec.primeID))"; > > assume all table names are corect and .variables are correct. Hmm, looks ok. Just rewriting so I see things clearer: $query = "SELECT * FROM advlistings, valsec, valprim WHERE advlistings.advId=$advId AND valsec.SecID=advlistings.secId AND valprim.primeId=valsec.primeID"; > the error that I get is: > Unknown column 'valprim.primeId' in 'where clause' Do you have multiple MySQL links open? Perhaps case-sensitivity is an issue? It's always a good idea to specify the MySQL link resource in mysql_query() IMO. H From zaunere at yahoo.com Wed Jun 4 12:36:14 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 4 Jun 2003 09:36:14 -0700 (PDT) Subject: Fwd: Re: [PHP-DEV] Benchmarking 4.3.2 vs 4.1.2 Message-ID: <20030604163614.10590.qmail@web12809.mail.yahoo.com> Knowing how performance hungry we all are, some useful info and performance tips below. --- Rasmus Lerdorf wrote: > Date: Wed, 4 Jun 2003 09:21:55 -0700 (PDT) > From: Rasmus Lerdorf > To: Jeff Moore > CC: internals at lists.php.net > Subject: Re: [PHP-DEV] Benchmarking 4.3.2 vs 4.1.2 > > Uh, the number of open() calls really shouldn't change. Are you sure you > are comparing the same code? And how are you testing? Attach strace or > truss to your running httpd process and hit your script a single time. > Then look at the output and compare them. Some of the keys to reducing > syscalls: > > - don't use open_basedir or safe_mode restrictions > - always include/require files by their absolute paths (./foo.inc is ok) > - if you have to use include_path includes, make sure the dir you > hit most often is first in the include_path (even before .) > - optimize your code. ie. don't use while(!feof($fp)) to loop through > a file, check the return of your fgets() instead, for example. > > In your example, you can of course replace your code with a single call to > file_get_contents() which is a new function in 4.3 and should > significantly reduce your syscall overhead. > > 4.3.3 will have Sascha's fd-patch which gets rid of a stat() call > associated with every file open, so if you are really keen on reducing > your syscalls even further, you can grab a snapshot. > > I also have some hacks we use here at Yahoo that eliminate a bunch of > other calls, but they aren't exactly generic in that they break various > aspects of PHP that in my controlled environment here I am fine with. I > have been pondering whether to add some sort of --broken-but-fast compile > switch an commit those changes, but it would likely cause a whole lot of > confusion. > > -Rasmus > > On Wed, 4 Jun 2003, Jeff Moore wrote: > > > I remember a discussion about system calls here earlier. What is the > > status of that? > > > > I've been doing some tests and have found that this code runs about 2.5 > > times slower under 4.3.2 than it did on 4.1.2 on the same machine > > (running OS X): > > > > > $filename = 'file.html'; > > $fd = fopen($filename, 'rb'); > > $content = fread($fd, filesize($filename)); > > fclose($fd); > > echo $content; > > ?> > > > > I did some tests with fs_usage to check file system calls and found > > that for a zero length test.php file, 4.3.2 makes the following > > additional calls beyond 4.1.2: > > > > 1 chdir /Library/WebServer/Documents/rot/bench > > 1 fchdir > > 12 fstat > > 5 fstatfs > > 5 getdirentries > > 7 lseek O=0x00000000 > > 1 lstat test.php > > 6 lstat (., .., ../.., etc. > > 6 open (., .., ../.., etc) > > 1 stat > > > > The fread example above made the following additional calls in 4.3.2 > > beyond 4.1.2: > > > > 2 chdir /Library/WebServer/Documents/rot/bench > > 2 fchdir > > 32 fstat > > 15 fstatfs > > 15 getdirentries > > 16 lseek O=0x00000000 > > 1 lstat file.html > > 1 lstat test.php > > 18 lstat (., .., ../.., etc.) > > 17 open (., .., ../.., etc) > > 4 stat > > 1 stat . > > > > some of my counts my be slightly off - I counted them by hand. > > > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > From danielc at analysisandsolutions.com Wed Jun 4 14:04:11 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Wed, 4 Jun 2003 14:04:11 -0400 Subject: [nycphp-talk] mysql question In-Reply-To: <200306041615.h54GF5R1010770@parsec.nyphp.org> References: <200306041615.h54GF5R1010770@parsec.nyphp.org> Message-ID: <20030604180411.GA20738@panix.com> On Wed, Jun 04, 2003 at 12:15:05PM -0400, John W. Markert wrote: > > $query = "select * from advlistings, valsec, valprim > where ((advlistings.advId=$advId) > and (valsec.SecID=advlistings.secId) > and (valprim.primeId=valsec.primeID))"; > > the error that I get is: > Unknown column 'valprim.primeId' in 'where clause' Why are you using different capitalization on field names? SecID is not the same as secId primeId is not the same as primeID If you retyped this rather than cutting/pasting your code, you just proved why it's important to use the actual code. If you did use the actual code here, did you mistype the cases of field names in your query? If those are the actual field name cases in the table structures, you really should make your life easier in the long run and come up with a field naming convention. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From markert at optonline.net Wed Jun 4 16:07:23 2003 From: markert at optonline.net (John W. Markert) Date: Wed, 04 Jun 2003 16:07:23 -0400 Subject: Fw: [nycphp-talk] mysql question Message-ID: <003f01c32ad4$f30043a0$0200a8c0@dads> Thanks to Hans and Dan for responding in my time of blindness. Yes, it was a misspelling and I do have to conform the variable names that I used at differnt times. ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Wednesday, June 04, 2003 2:04 PM Subject: Re: [nycphp-talk] mysql question > On Wed, Jun 04, 2003 at 12:15:05PM -0400, John W. Markert wrote: > > > > $query = "select * from advlistings, valsec, valprim > > where ((advlistings.advId=$advId) > > and (valsec.SecID=advlistings.secId) > > and (valprim.primeId=valsec.primeID))"; > > > > the error that I get is: > > Unknown column 'valprim.primeId' in 'where clause' > > Why are you using different capitalization on field names? > > SecID is not the same as secId > primeId is not the same as primeID > > If you retyped this rather than cutting/pasting your code, you just proved > why it's important to use the actual code. > > If you did use the actual code here, did you mistype the cases of field > names in your query? > > If those are the actual field name cases in the table structures, you > really should make your life easier in the long run and come up with a > field naming convention. > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From dorgan at optonline.net Thu Jun 5 01:00:01 2003 From: dorgan at optonline.net (Donald J. Organ IV) Date: Thu, 05 Jun 2003 01:00:01 -0400 Subject: CPanel Alternatives References: <200306041805.h54I4EXd020709@parsec.nyphp.org> Message-ID: <000c01c32b1f$5240b9e0$0900020a@dj> Does anyone know fo any CPanel Alternatives, maybe even some free ones or just even a place that may offer a tutorial on how to start making something like CPanel? From andrew at digitalpulp.com Thu Jun 5 11:58:04 2003 From: andrew at digitalpulp.com (Andrew Yochum) Date: Thu, 5 Jun 2003 11:58:04 -0400 Subject: [nycphp-talk] CPanel Alternatives In-Reply-To: <200306050501.h5551FSR013696@parsec.nyphp.org> References: <200306050501.h5551FSR013696@parsec.nyphp.org> Message-ID: <20030605155759.GC5643@thighmaster.digitalpulp.com> On Thu, Jun 05, 2003 at 01:01:15AM -0400, Donald J. Organ IV wrote: > Does anyone know fo any CPanel Alternatives, maybe even some free ones or > just even a place that may offer a tutorial on how to start making something > like CPanel? There are a few alternatives, but IMO, CPanel is the best of all evils. It is not perfect, nor cheap, but it does a better job at shared hosting than everything else I've used (from a admin and end-user perspective). Some of the others off the top of my head: web://cp (Open Source) http://webcp.can-host.com/ Webmin (Open Source) http://www.webmin.com/ Plesk (Commercial) http://www.plesk.com/ H-Sphere (Commercial) http://www.psoft.net/ Ensim (Commercial) http://www.ensim.com/ As far as roll-your-own, the general idea is that you are automating system-administration tasks with a web-based GUI, so I'd imagine books like "Perl for System Administration" (O'Reilly) would be of use. -- Andrew Yochum Digital Pulp, Inc. 212.679.0676x255 andrew at digitalpulp.com From emm at scriptdigital.com Thu Jun 5 12:27:52 2003 From: emm at scriptdigital.com (Emmanuel. M. Decarie) Date: Thu, 05 Jun 2003 12:27:52 -0400 Subject: [nycphp-talk] Adding
and

to a text In-Reply-To: <200305221436.h4MEZxYr077239@parsec.nyphp.org> References: <200305221436.h4MEZxYr077239@parsec.nyphp.org> Message-ID: Hello there, I posted on my blog a little function that will translate accented characters to html entities, and add

and
to the text that is passed to it. I though that it might be helpful for someone else than me. Cheers -Emmanuel -- ______________________________________________________________________ Emmanuel D?carie / Programmation pour le Web - Programming for the Web Radio UserLand/Frontier - Perl - PHP - Javascript Blog: - AIM: scriptdigital From dorgan at optonline.net Thu Jun 5 14:14:12 2003 From: dorgan at optonline.net (Donald J. Organ IV) Date: Thu, 05 Jun 2003 14:14:12 -0400 Subject: [nycphp-talk] CPanel Alternatives References: <200306051554.h55FrOXd024747@parsec.nyphp.org> Message-ID: <000601c32b8e$44e8be40$0900020a@dj> thankyou Andrew the information you provided was very helpful. ----- Original Message ----- From: "Andrew Yochum" To: "NYPHP Talk" Sent: Thursday, June 05, 2003 11:53 AM Subject: Re: [nycphp-talk] CPanel Alternatives > On Thu, Jun 05, 2003 at 01:01:15AM -0400, Donald J. Organ IV wrote: > > Does anyone know fo any CPanel Alternatives, maybe even some free ones or > > just even a place that may offer a tutorial on how to start making something > > like CPanel? > > There are a few alternatives, but IMO, CPanel is the best of all evils. It is > not perfect, nor cheap, but it does a better job at shared hosting than > everything else I've used (from a admin and end-user perspective). > > Some of the others off the top of my head: > web://cp (Open Source) http://webcp.can-host.com/ > Webmin (Open Source) http://www.webmin.com/ > Plesk (Commercial) http://www.plesk.com/ > H-Sphere (Commercial) http://www.psoft.net/ > Ensim (Commercial) http://www.ensim.com/ > > As far as roll-your-own, the general idea is that you are automating > system-administration tasks with a web-based GUI, so I'd imagine books like > "Perl for System Administration" (O'Reilly) would be of use. > > -- > Andrew Yochum > Digital Pulp, Inc. > 212.679.0676x255 > andrew at digitalpulp.com > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From webapprentice at onemain.com Thu Jun 5 12:08:07 2003 From: webapprentice at onemain.com (Stephen Tang) Date: Thu, 5 Jun 2003 12:08:07 -0400 (GMT) Subject: [nycphp-talk] Adding
and

to a text Message-ID: <5451092.1054840087621.JavaMail.nobody@dewey.psp.pas.earthlink.net> I hate these webmail readers. They keep rendering the HTML tags. All I saw was "...and add and to the text..." -------Original Message------- From: "Emmanuel. M. Decarie" Sent: 06/05/03 12:28 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Adding
and

to a text > > Hello there, I posted on my blog a little function that will translate accented characters to html entities, and add

and
to the text that is passed to it. I though that it might be helpful for someone else than me. Cheers -Emmanuel -- ______________________________________________________________________ Emmanuel D.carie / Programmation pour le Web - Programming for the Web Radio UserLand/Frontier - Perl - PHP - Javascript Blog: - AIM: scriptdigital --- Unsubscribe at http://nyphp.org/list/ --- > From emm at scriptdigital.com Thu Jun 5 15:15:14 2003 From: emm at scriptdigital.com (Emmanuel. M. Decarie) Date: Thu, 05 Jun 2003 15:15:14 -0400 Subject: [nycphp-talk] Adding
and

to a text In-Reply-To: <200306051909.h55J8CYl062824@parsec.nyphp.org> References: <200306051909.h55J8CYl062824@parsec.nyphp.org> Message-ID: Hello, Not sure what is the problem you are referring to, but I checked in Safari (OS X), Phoenix (Win 2000) and IE 6 (Win 2000) and everything looks good to me. But this post doesn't display well in Radio UserLand (OS X) and NetNewsWire (OS X) which are RSS readers. Cheers -Emmanuel >I hate these webmail readers. They keep rendering the HTML tags. > >All I saw was "...and add and to the text..." > >-------Original Message------- >From: "Emmanuel. M. Decarie" >Sent: 06/05/03 12:28 PM >To: NYPHP Talk >Subject: Re: [nycphp-talk] Adding
and

to a text > >> >> Hello there, > >I posted on my blog a little function that will translate accented >characters to html entities, and add

and
to the text that >is passed to it. > >I though that it might be helpful for someone else than me. > > -- ______________________________________________________________________ Emmanuel D?carie / Programmation pour le Web - Programming for the Web Radio UserLand/Frontier - Perl - PHP - Javascript Blog: - AIM: scriptdigital From emm at scriptdigital.com Thu Jun 5 15:43:26 2003 From: emm at scriptdigital.com (Emmanuel. M. Decarie) Date: Thu, 05 Jun 2003 15:43:26 -0400 Subject: [nycphp-talk] Adding
and

to a text In-Reply-To: <200306051917.h55JGWYl063650@parsec.nyphp.org> References: <200306051917.h55JGWYl063650@parsec.nyphp.org> Message-ID: Ugh, I got it. You are not talking about the web page but about this very email. Ok, its good to know about this limitation of webmail readers. Cheers -Emmanuel ? (At) 15:16 -0400 05/06/03, Emmanuel. M. Decarie ?crivait (wrote) : >Hello, > >Not sure what is the problem you are referring to, but I checked in >Safari (OS X), Phoenix (Win 2000) and IE 6 (Win 2000) and everything >looks good to me. > >But this post doesn't display well in Radio UserLand (OS X) and >NetNewsWire (OS X) which are RSS readers. > >Cheers >-Emmanuel > >>I hate these webmail readers. They keep rendering the HTML tags. >> > >All I saw was "...and add and to the text..." -- ______________________________________________________________________ Emmanuel D?carie / Programmation pour le Web - Programming for the Web Radio UserLand/Frontier - Perl - PHP - Javascript Blog: - AIM: scriptdigital From james at surgam.net Thu Jun 5 16:55:33 2003 From: james at surgam.net (James Wetterau) Date: Thu, 5 Jun 2003 15:55:33 -0500 Subject: old mail reappeared today Message-ID: <000501c32ba4$cef66130$550e6c42@BURDEN> I just want to note that an old mail I sent that had previously appeared on this list reappeared today. I have no idea why. I hadn't sent any other mail from that account today, in fact. So please ignore any new mail that appears from me on the "sanitizing user-submitted html" issue. Someone has a bug somewhere. From danielc at analysisandsolutions.com Thu Jun 5 19:52:53 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 5 Jun 2003 19:52:53 -0400 Subject: [nycphp-talk] Adding
and

to a text In-Reply-To: <200306051908.h55J8CR1062824@parsec.nyphp.org> References: <200306051908.h55J8CR1062824@parsec.nyphp.org> Message-ID: <20030605235253.GA10461@panix.com> Hi: On Thu, Jun 05, 2003 at 03:08:12PM -0400, Stephen Tang wrote: > I hate these webmail readers. They keep rendering the HTML tags. Cool. So, now we can send you some JavaScript to perform some cross site scripting vulnerabilities! Which web mailer are you using? It should be reported: http://www.securityfocus.com/popups/forums/bugtraq/faq.shtml#0.1.8 --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From webapprentice at onemain.com Thu Jun 5 21:36:39 2003 From: webapprentice at onemain.com (Webapprentice) Date: Thu, 05 Jun 2003 21:36:39 -0400 Subject: [nycphp-talk] Adding
and

to a text In-Reply-To: <200306051917.h55JGWXT063650@parsec.nyphp.org> References: <200306051917.h55JGWXT063650@parsec.nyphp.org> Message-ID: <3EDFF027.9070407@onemain.com> Hi, I'm using Mozilla's mail reader, and it renders in HTML. Thus, it rendered any HTML tags in your email as such. Emmanuel. M. Decarie wrote: > Hello, > > Not sure what is the problem you are referring to, but I checked in > Safari (OS X), Phoenix (Win 2000) and IE 6 (Win 2000) and everything > looks good to me. > > But this post doesn't display well in Radio UserLand (OS X) and > NetNewsWire (OS X) which are RSS readers. > > Cheers > -Emmanuel > > >>I hate these webmail readers. They keep rendering the HTML tags. >> >>All I saw was "...and add and to the text..." From webapprentice at onemain.com Thu Jun 5 21:38:51 2003 From: webapprentice at onemain.com (Webapprentice) Date: Thu, 05 Jun 2003 21:38:51 -0400 Subject: Email readers Re: [nycphp-talk] Adding
and

to a text In-Reply-To: <200306052353.h55NquXT071287@parsec.nyphp.org> References: <200306052353.h55NquXT071287@parsec.nyphp.org> Message-ID: <3EDFF0AB.9040105@onemain.com> I'm using Mozilla's mail program. Is there a way to force plain text? I disabled Javascript for mail (at least I think so), so you can't send such things to me. But it still renders HTML tags. Analysis & Solutions wrote: > Hi: > > On Thu, Jun 05, 2003 at 03:08:12PM -0400, Stephen Tang wrote: > >>I hate these webmail readers. They keep rendering the HTML tags. > > > Cool. So, now we can send you some JavaScript to perform some cross site > scripting vulnerabilities! > > Which web mailer are you using? It should be reported: > http://www.securityfocus.com/popups/forums/bugtraq/faq.shtml#0.1.8 > > --Dan > From chris at psydeshow.org Thu Jun 5 21:29:37 2003 From: chris at psydeshow.org (Chris Snyder) Date: Thu, 05 Jun 2003 21:29:37 -0400 Subject: Email readers Re: [nycphp-talk] Adding
and

to a text In-Reply-To: <200306060135.h561YeYJ073867@parsec.nyphp.org> References: <200306060135.h561YeYJ073867@parsec.nyphp.org> Message-ID: <3EDFEE81.5000403@psydeshow.org> Waittaminit-- I use Mozilla Mail and I saw the tags just fine-- what version are you using? The messages from nyphp-talk always display as plain text for me, in fact, they don't *have* an HTML part. Is this a Mailman setting, Hans? Webapprentice wrote: >I'm using Mozilla's mail program. >Is there a way to force plain text? > >I disabled Javascript for mail (at least I think so), so you can't send >such things to me. >But it still renders HTML tags. > > From webapprentice at onemain.com Thu Jun 5 22:32:26 2003 From: webapprentice at onemain.com (Webapprentice) Date: Thu, 05 Jun 2003 22:32:26 -0400 Subject: Oops, I'm confusing myself! Re: [nycphp-talk] Adding
and

to a text In-Reply-To: <200306060153.h561qhXT074806@parsec.nyphp.org> References: <200306060153.h561qhXT074806@parsec.nyphp.org> Message-ID: <3EDFFD3A.8070304@onemain.com> I'm sorry. Doh! I was referring to the webmail interface to my POP3 mail account. Mozilla mail is FINE. No EXPLOITS in Mozilla! Doh! Chris Snyder wrote: > Waittaminit-- I use Mozilla Mail and I saw the tags just fine-- what > version are you using? > > The messages from nyphp-talk always display as plain text for me, in > fact, they don't *have* an HTML part. > Is this a Mailman setting, Hans? > > > Webapprentice wrote: > > >>I'm using Mozilla's mail program. >>Is there a way to force plain text? >> >>I disabled Javascript for mail (at least I think so), so you can't send >>such things to me. >>But it still renders HTML tags. >> >> > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From delta at rochester.rr.com Fri Jun 6 00:43:29 2003 From: delta at rochester.rr.com (deedee) Date: Fri, 6 Jun 2003 00:43:29 -0400 Subject: Hooray for the Linux super villians References: <200304180346.h3I3ji0t045440@parsec.nyphp.org> Message-ID: <007b01c32be6$2d5ce140$fc00fe0a@KEITZWS2> please forgive me as a deviate from our php discussion to cheer for LAMP, specifically Linux. news from www.cnn.com -> technology.... "Microsoft CEO: Linux is a challenger" http://money.cnn.com/2003/06/04/technology/microsoft_linux.reut/index.htm?cn n=yes i smiled when i read the line about the 'competitive threat by Linux'. cheers! deedee From carlos at sprout.net Fri Jun 6 08:07:24 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Fri, 6 Jun 2003 08:07:24 -0400 Subject: [nycphp-talk] GD and t1lib on win32 and IIS Message-ID: <49A9DEB886049242BA28C484A36C03F12CB8C7@email.sprout.net> Hi all, have any of you had to add the "t1lib" to use with the GD library on Win32 using IIS? I am having the worse time trying to find information on this. Do we need to recompile GD? Or PHP? Any clues are very appreciated, thanks. Carlos Chiossone From jsiegel1 at optonline.net Fri Jun 6 10:02:11 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 06 Jun 2003 10:02:11 -0400 Subject: Secure/insecure items Message-ID: <000b01c32c34$3a9b3e80$6501a8c0@EZDSDELL> This seems to be an intermittent problem...not sure if it's a code issue, configuration issue, or browser issue (or all of the above??). On the site I'm building, a user clicks on a link which sends them to a secure page. Sometimes a message pops up saying that there are secure and insecure items. I'm not sure what could be causing it? Could it be, perhaps, that there is no cert for the site? Jeff From David.SextonJr at ubspw.com Fri Jun 6 10:09:14 2003 From: David.SextonJr at ubspw.com (Sexton, David) Date: Fri, 6 Jun 2003 10:09:14 -0400 Subject: [nycphp-talk] Secure/insecure items Message-ID: <18D7B8CAA5284F478470828806DB124603789E6A@psle01.xchg.pwj.com> Sounds like their browser is just alerting them that they are about to moved to a secured connection, or to an insecure connection. They should have an option to turn that warning off in their browser. -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Friday, June 06, 2003 10:03 AM To: NYPHP Talk Subject: [nycphp-talk] Secure/insecure items This seems to be an intermittent problem...not sure if it's a code issue, configuration issue, or browser issue (or all of the above??). On the site I'm building, a user clicks on a link which sends them to a secure page. Sometimes a message pops up saying that there are secure and insecure items. I'm not sure what could be causing it? Could it be, perhaps, that there is no cert for the site? Jeff --- Unsubscribe at http://nyphp.org/list/ --- From dkrook at hotmail.com Fri Jun 6 10:10:08 2003 From: dkrook at hotmail.com (D C Krook) Date: Fri, 06 Jun 2003 10:10:08 -0400 Subject: [nycphp-talk] Secure/insecure items Message-ID: Jeff, The most likely cause for this is images, CSS, or JavaScript files that are referenced absolutely, e.g., hardcoded by using "http://" or in some cases even "/img/some.gif" A solution is to use "//img/some.gif" to maintain protocol state (https://) -Dan >This seems to be an intermittent problem...not sure if it's a code >issue, configuration issue, or browser issue (or all of the above??). > >On the site I'm building, a user clicks on a link which sends them to a >secure page. Sometimes a message pops up saying that there are secure >and insecure items. I'm not sure what could be causing it? Could it be, >perhaps, that there is no cert for the site? > >Jeff > _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From lists at ny-tech.net Fri Jun 6 10:10:20 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Fri, 6 Jun 2003 10:10:20 -0400 (Eastern Daylight Time) Subject: [nycphp-talk] Secure/insecure items References: <200306061403.h56E2dWt086212@parsec.nyphp.org> Message-ID: <3EE0A0CC.000001.03748@main> In my experience, it usually happens when a secure page is including content via regular (in secure) URLs. Prime example would be banners or other images/css/js with absolute URL. Check to see if you any such thing happening in your page. - Nasir -------Original Message------- From: talk at nyphp.org Date: Friday, June 06, 2003 10:03:13 AM To: NYPHP Talk Subject: [nycphp-talk] Secure/insecure items This seems to be an intermittent problem...not sure if it's a code issue, configuration issue, or browser issue (or all of the above??). On the site I'm building, a user clicks on a link which sends them to a secure page. Sometimes a message pops up saying that there are secure and insecure items. I'm not sure what could be causing it? Could it be, perhaps, that there is no cert for the site? Jeff --- Unsubscribe at http://nyphp.org/list/ --- . From chris at psydeshow.org Fri Jun 6 10:10:54 2003 From: chris at psydeshow.org (Chris Snyder) Date: Fri, 06 Jun 2003 10:10:54 -0400 Subject: [nycphp-talk] Secure/insecure items In-Reply-To: <200306061403.h56E2dYJ086212@parsec.nyphp.org> References: <200306061403.h56E2dYJ086212@parsec.nyphp.org> Message-ID: <3EE0A0EE.8090807@psydeshow.org> Are you including stylesheets, images, javascript from the http: site? Any item on the page not coming from https will trigger that alert, a pet peeve of mine as it means absolutely nothing in terms of the security of the information you are entering on the form. chris. Jeff wrote: >This seems to be an intermittent problem...not sure if it's a code >issue, configuration issue, or browser issue (or all of the above??). > >On the site I'm building, a user clicks on a link which sends them to a >secure page. Sometimes a message pops up saying that there are secure >and insecure items. I'm not sure what could be causing it? Could it be, >perhaps, that there is no cert for the site? > >Jeff > > > >--- Unsubscribe at http://nyphp.org/list/ --- > > > > > From nyphp at websapp.com Fri Jun 6 10:19:19 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Fri, 6 Jun 2003 10:19:19 -0400 Subject: [nycphp-talk] Secure/insecure items In-Reply-To: <200306061411.h56EABb5087698@parsec.nyphp.org> Message-ID: Krook, Can you tell us more about the //img/some.gif syntax? I have never seen it before. Is it documented anywhere? Thanks, Daniel > -----Original Message----- > From: D C Krook [mailto:dkrook at hotmail.com] > Sent: Friday, June 06, 2003 10:10 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Secure/insecure items > > > Jeff, > > The most likely cause for this is images, CSS, or JavaScript > files that are > referenced absolutely, e.g., hardcoded by using "http://" or in > some cases > even "/img/some.gif" > > A solution is to use "//img/some.gif" to maintain protocol state > (https://) > > > -Dan > > > > >This seems to be an intermittent problem...not sure if it's a code > >issue, configuration issue, or browser issue (or all of the above??). > > > >On the site I'm building, a user clicks on a link which sends them to a > >secure page. Sometimes a message pops up saying that there are secure > >and insecure items. I'm not sure what could be causing it? Could it be, > >perhaps, that there is no cert for the site? > > > >Jeff > > > > _________________________________________________________________ > Protect your PC - get McAfee.com VirusScan Online > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > > --- Unsubscribe at http://nyphp.org/list/ --- > From dkrook at hotmail.com Fri Jun 6 10:54:40 2003 From: dkrook at hotmail.com (D C Krook) Date: Fri, 06 Jun 2003 10:54:40 -0400 Subject: [nycphp-talk] Secure/insecure items Message-ID: >Can you tell us more about the //img/some.gif syntax? I have never seen it >before. Is it documented anywhere? Kushner, I had never used the syntax prior to my current job, but it is apparently a long standing spec in HTTP 1.0 and HTTP 1.1. My experience is limited in its use and quirks, but it seems to work for the browsers we support: IE 5+, Mozilla, Netscape 4-7 (View source of http://www.ibm.com/ to see how it's implemented) Essentially what this syntax allows you to do is specfiy a an absolute path to a resource on a different hostname, but force the protocol to remain the same. So, if your images are hosted on a separate server, you could link to them securely from your standard file web server like so: On http://server.ibm.com/index.jsp: img src="//images.ibm.com/some.gif" img src="//img/some.gif" Following is some cryptic info on the spec, but which seems to prove that it's been around a while: http://web.access.net.au/felixadv/files/output/book/x3288.html http://www.w3.org/Protocols/rfc2068/rfc2068.txt 3.2.1 General Syntax URIs in HTTP can be represented in absolute form or relative to some known base URI, depending upon the context of their use. The two forms are differentiated by the fact that absolute URIs always begin with a scheme name followed by a colon. URI = ( absoluteURI | relativeURI ) [ "#" fragment ] absoluteURI = scheme ":" *( uchar | reserved ) relativeURI = net_path | abs_path | rel_path net_path = "//" net_loc [ abs_path ] abs_path = "/" rel_path rel_path = [ path ] [ ";" params ] [ "?" query ] path = fsegment *( "/" segment ) fsegment = 1*pchar segment = *pchar params = param *( ";" param ) param = *( pchar | "/" ) _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From jsiegel1 at optonline.net Fri Jun 6 10:55:02 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 06 Jun 2003 10:55:02 -0400 Subject: [nycphp-talk] Secure/insecure items In-Reply-To: <200306061411.h56EAuXl088310@parsec.nyphp.org> Message-ID: <002301c32c3b$9e2b5b40$6501a8c0@EZDSDELL> It's more than likely the being caused by *all* of the items mentioned - stylesheets, images, javascript. Looks like this may now be one of *my* pet peeves. :) Jeff -----Original Message----- From: Chris Snyder [mailto:chris at psydeshow.org] Sent: Friday, June 06, 2003 9:11 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Secure/insecure items Are you including stylesheets, images, javascript from the http: site? Any item on the page not coming from https will trigger that alert, a pet peeve of mine as it means absolutely nothing in terms of the security of the information you are entering on the form. chris. Jeff wrote: >This seems to be an intermittent problem...not sure if it's a code >issue, configuration issue, or browser issue (or all of the above??). > >On the site I'm building, a user clicks on a link which sends them to a >secure page. Sometimes a message pops up saying that there are secure >and insecure items. I'm not sure what could be causing it? Could it be, >perhaps, that there is no cert for the site? > >Jeff > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From jsiegel1 at optonline.net Fri Jun 6 10:55:02 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 06 Jun 2003 10:55:02 -0400 Subject: [nycphp-talk] Secure/insecure items In-Reply-To: <200306061410.h56EABXl087698@parsec.nyphp.org> Message-ID: <002201c32c3b$9c0e2090$6501a8c0@EZDSDELL> Dan, Everything uses a relative path. Jeff -----Original Message----- From: D C Krook [mailto:dkrook at hotmail.com] Sent: Friday, June 06, 2003 9:10 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Secure/insecure items Jeff, The most likely cause for this is images, CSS, or JavaScript files that are referenced absolutely, e.g., hardcoded by using "http://" or in some cases even "/img/some.gif" A solution is to use "//img/some.gif" to maintain protocol state (https://) -Dan >This seems to be an intermittent problem...not sure if it's a code >issue, configuration issue, or browser issue (or all of the above??). > >On the site I'm building, a user clicks on a link which sends them to a >secure page. Sometimes a message pops up saying that there are secure >and insecure items. I'm not sure what could be causing it? Could it be, >perhaps, that there is no cert for the site? > >Jeff > _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 --- Unsubscribe at http://nyphp.org/list/ --- From lists at redibishosting.com Fri Jun 6 11:07:24 2003 From: lists at redibishosting.com (Deidra McIntyre) Date: Fri, 6 Jun 2003 11:07:24 -0400 (EDT) Subject: [nycphp-talk] Secure/insecure items In-Reply-To: <200306061457.h56EulYX091861@parsec.nyphp.org> References: <200306061457.h56EulYX091861@parsec.nyphp.org> Message-ID: <1632.172.164.27.172.1054912044.squirrel@www.myhostingadmin.com> Don't use a relative path. Hardcode everything with the absolute URL, i.e. https://... etc. I know that the way our files are setup; all of the files (secure and unsecure) are in the same directory. However, to use them for a secure page, I have to call the files through a secure server using absolute URLS. If I forget an element and leave it relative, i.e. javascript include, then I receive those "some items are insecure" messages. --> Deidra ******* Red Ibis Hosting http://www.redibishosting.com > Dan, > > Everything uses a relative path. > > Jeff > > -----Original Message----- > From: D C Krook [mailto:dkrook at hotmail.com] > Sent: Friday, June 06, 2003 9:10 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Secure/insecure items > > > Jeff, > > The most likely cause for this is images, CSS, or JavaScript files that > are > referenced absolutely, e.g., hardcoded by using "http://" or in some > cases > even "/img/some.gif" > > A solution is to use "//img/some.gif" to maintain protocol state > (https://) > > > -Dan > > > >>This seems to be an intermittent problem...not sure if it's a code >> issue, configuration issue, or browser issue (or all of the above??). >> >>On the site I'm building, a user clicks on a link which sends them to a >> secure page. Sometimes a message pops up saying that there are secure >> and insecure items. I'm not sure what could be causing it? Could it be, >> perhaps, that there is no cert for the site? >> >>Jeff >> > > _________________________________________________________________ > Protect your PC - get McAfee.com VirusScan Online > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From jsiegel1 at optonline.net Fri Jun 6 11:27:14 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 06 Jun 2003 11:27:14 -0400 Subject: [nycphp-talk] Secure/insecure items In-Reply-To: <200306061508.h56F7SXl092820@parsec.nyphp.org> Message-ID: <002f01c32c40$1bb82d50$6501a8c0@EZDSDELL> Deidra, The only "issue" I have with that is that the page in question is part of a set of DreamWeaver templates so...if my client decides to change the template then this particular page would have to be changed by hand. However, if this is the only way to eliminate the problem...so be it. Thank you and everyone for your speedy replies. Jeff -----Original Message----- From: Deidra McIntyre [mailto:lists at redibishosting.com] Sent: Friday, June 06, 2003 10:07 AM To: NYPHP Talk Subject: RE: [nycphp-talk] Secure/insecure items Don't use a relative path. Hardcode everything with the absolute URL, i.e. https://... etc. I know that the way our files are setup; all of the files (secure and unsecure) are in the same directory. However, to use them for a secure page, I have to call the files through a secure server using absolute URLS. If I forget an element and leave it relative, i.e. javascript include, then I receive those "some items are insecure" messages. --> Deidra ******* Red Ibis Hosting http://www.redibishosting.com > Dan, > > Everything uses a relative path. > > Jeff > > -----Original Message----- > From: D C Krook [mailto:dkrook at hotmail.com] > Sent: Friday, June 06, 2003 9:10 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Secure/insecure items > > > Jeff, > > The most likely cause for this is images, CSS, or JavaScript files that > are > referenced absolutely, e.g., hardcoded by using "http://" or in some > cases > even "/img/some.gif" > > A solution is to use "//img/some.gif" to maintain protocol state > (https://) > > > -Dan > > > >>This seems to be an intermittent problem...not sure if it's a code >> issue, configuration issue, or browser issue (or all of the above??). >> >>On the site I'm building, a user clicks on a link which sends them to a >> secure page. Sometimes a message pops up saying that there are secure >> and insecure items. I'm not sure what could be causing it? Could it be, >> perhaps, that there is no cert for the site? >> >>Jeff >> > > _________________________________________________________________ > Protect your PC - get McAfee.com VirusScan Online > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From dkrook at hotmail.com Fri Jun 6 11:29:27 2003 From: dkrook at hotmail.com (D C Krook) Date: Fri, 06 Jun 2003 11:29:27 -0400 Subject: [nycphp-talk] Secure/insecure items Message-ID: >Can you tell us more about the //img/some.gif syntax? I have never seen it >before. Is it documented anywhere? As a follow up, this syntax is most usefull when you are using shared HTML templates for both http and https sessions. For example, if you use the same page for general users but also change protocol when registered users log in, you avoid the pitfalls of having to hard code "https" or "http" in the links. _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail From delta at rochester.rr.com Fri Jun 6 14:15:41 2003 From: delta at rochester.rr.com (deedee) Date: Fri, 6 Jun 2003 14:15:41 -0400 Subject: [nycphp-talk] Secure/insecure items References: <200306061403.h56E2dYb086212@parsec.nyphp.org> Message-ID: <004c01c32c57$a3dbe520$fc00fe0a@KEITZWS2> here are a couple of microsoft discussions worth reading with the perspective of understanding why IE 5 or IE 6 presents the message "This page contains secure and non-secure items"...thanks Jeff for mentioning it. regards, deedee Incorrect Error Message When Connecting to Secure Web Sites [Q273903] http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q273903 PRB: Security Warning Message Occurs When You Browse to a Page [Q261188] http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q261188 ----- Original Message ----- From: "Jeff" To: "NYPHP Talk" Sent: Friday, June 06, 2003 10:02 AM Subject: [nycphp-talk] Secure/insecure items > This seems to be an intermittent problem...not sure if it's a code > issue, configuration issue, or browser issue (or all of the above??). > > On the site I'm building, a user clicks on a link which sends them to a > secure page. Sometimes a message pops up saying that there are secure > and insecure items. I'm not sure what could be causing it? Could it be, > perhaps, that there is no cert for the site? > > Jeff > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From emm at scriptdigital.com Fri Jun 6 14:25:47 2003 From: emm at scriptdigital.com (Emmanuel. M. Decarie) Date: Fri, 06 Jun 2003 14:25:47 -0400 Subject: [nycphp-talk] Secure/insecure items In-Reply-To: <200306061528.h56FRgYl093768@parsec.nyphp.org> References: <200306061528.h56FRgYl093768@parsec.nyphp.org> Message-ID: Jeff, Can you call these files dynamically and tell PHP to add 'http://' or 'https://' when required? This what I have done in another project (not a PHP project) a while ago and it was working well for me. In the session, I had set a value telling me if I was on a secure page, and then switched from: http://www.myserver.com/style.css to: https://www.myserver.com/style.css HTH Cheers -Emmanuel >The only "issue" I have with that is that the page in question is part >of a set of DreamWeaver templates so...if my client decides to change >the template then this particular page would have to be changed by hand. >However, if this is the only way to eliminate the problem...so be it. > >Thank you and everyone for your speedy replies. > >Jeff -- ______________________________________________________________________ Emmanuel D?carie / Programmation pour le Web - Programming for the Web Radio UserLand/Frontier - Perl - PHP - Javascript Blog: - AIM: scriptdigital From delta at rochester.rr.com Fri Jun 6 14:27:01 2003 From: delta at rochester.rr.com (deedee) Date: Fri, 6 Jun 2003 14:27:01 -0400 Subject: [nycphp-talk] Secure/insecure items References: <200306061409.h56E9IYb087027@parsec.nyphp.org> Message-ID: <006201c32c59$38f2e5e0$fc00fe0a@KEITZWS2> if the client is so inclined to remove this annoying message in IE6, you can turn on that warning by tools-> internet options -> security tab -> Custom Level button -> Miscellaneous section allows users to display mixed content: disable, enable or prompt. the default is prompt, giving the user control to continue into the website or not. ----- Original Message ----- From: "Sexton, David" To: "NYPHP Talk" Sent: Friday, June 06, 2003 10:09 AM Subject: RE: [nycphp-talk] Secure/insecure items > Sounds like their browser is just alerting them that they are about to moved > to a secured connection, or to an insecure connection. They should have an > option to turn that warning off in their browser. > > -----Original Message----- > From: Jeff [mailto:jsiegel1 at optonline.net] > Sent: Friday, June 06, 2003 10:03 AM > To: NYPHP Talk > Subject: [nycphp-talk] Secure/insecure items > > > This seems to be an intermittent problem...not sure if it's a code > issue, configuration issue, or browser issue (or all of the above??). > > On the site I'm building, a user clicks on a link which sends them to a > secure page. Sometimes a message pops up saying that there are secure > and insecure items. I'm not sure what could be causing it? Could it be, > perhaps, that there is no cert for the site? > > Jeff > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From delta at rochester.rr.com Fri Jun 6 14:55:10 2003 From: delta at rochester.rr.com (deedee) Date: Fri, 6 Jun 2003 14:55:10 -0400 Subject: [nycphp-talk] GD and t1lib on win32 and IIS References: <200306061217.h56CGAYb084355@parsec.nyphp.org> Message-ID: <008001c32c5d$27fe1710$fc00fe0a@KEITZWS2> carlos, there is a pretty good detail in http://us3.php.net/install.windows what version of php are you using? there were some recent changes according to the php extension chart php_gd.dll; GD library image functions; Removed in PHP 4.3.2 looks like the replacement is php_gd2.dll good luck with this regards, deedee ----- Original Message ----- From: "Carlos G. Chiossone" To: "NYPHP Talk" Sent: Friday, June 06, 2003 8:16 AM Subject: RE: [nycphp-talk] GD and t1lib on win32 and IIS > Hi all, have any of you had to add the "t1lib" to use with the GD library on Win32 using IIS? > > I am having the worse time trying to find information on this. > > Do we need to recompile GD? > Or PHP? > > Any clues are very appreciated, thanks. > > Carlos Chiossone > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From jsiegel1 at optonline.net Fri Jun 6 15:15:05 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 06 Jun 2003 15:15:05 -0400 Subject: [nycphp-talk] Secure/insecure items In-Reply-To: <200306061816.h56IFtXl097062@parsec.nyphp.org> Message-ID: <005401c32c5f$f0c39290$6501a8c0@EZDSDELL> Thanks for sending along these links. I *love* the official Microsoft response: "Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article." Jeff -----Original Message----- From: deedee [mailto:delta at rochester.rr.com] Sent: Friday, June 06, 2003 1:16 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Secure/insecure items here are a couple of microsoft discussions worth reading with the perspective of understanding why IE 5 or IE 6 presents the message "This page contains secure and non-secure items"...thanks Jeff for mentioning it. regards, deedee Incorrect Error Message When Connecting to Secure Web Sites [Q273903] http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q273903 PRB: Security Warning Message Occurs When You Browse to a Page [Q261188] http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q261188 ----- Original Message ----- From: "Jeff" To: "NYPHP Talk" Sent: Friday, June 06, 2003 10:02 AM Subject: [nycphp-talk] Secure/insecure items > This seems to be an intermittent problem...not sure if it's a code > issue, configuration issue, or browser issue (or all of the above??). > > On the site I'm building, a user clicks on a link which sends them to a > secure page. Sometimes a message pops up saying that there are secure > and insecure items. I'm not sure what could be causing it? Could it be, > perhaps, that there is no cert for the site? > > Jeff > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From jsiegel1 at optonline.net Fri Jun 6 15:15:05 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 06 Jun 2003 15:15:05 -0400 Subject: [nycphp-talk] Secure/insecure items In-Reply-To: <200306061826.h56IQ6Xl097913@parsec.nyphp.org> Message-ID: <005601c32c5f$f5328570$6501a8c0@EZDSDELL> I'd love to be able to do it but...at this stage it ain't that easy. Because the website needed to be "update-able" by the client (who uses DreamWeaver) I had to work with the DreamWeaver template concept. However, since there are about 80 search-engine optimized pages that all required fixed paths, etc., adding one additional page to their task list of pages to update (in the event of a template change) probably won't kill them. Jeff -----Original Message----- From: Emmanuel. M. Decarie [mailto:emm at scriptdigital.com] Sent: Friday, June 06, 2003 1:26 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Secure/insecure items Jeff, Can you call these files dynamically and tell PHP to add 'http://' or 'https://' when required? This what I have done in another project (not a PHP project) a while ago and it was working well for me. In the session, I had set a value telling me if I was on a secure page, and then switched from: http://www.myserver.com/style.css to: https://www.myserver.com/style.css HTH Cheers -Emmanuel >The only "issue" I have with that is that the page in question is part >of a set of DreamWeaver templates so...if my client decides to change >the template then this particular page would have to be changed by hand. >However, if this is the only way to eliminate the problem...so be it. > >Thank you and everyone for your speedy replies. > >Jeff -- ______________________________________________________________________ Emmanuel D?carie / Programmation pour le Web - Programming for the Web Radio UserLand/Frontier - Perl - PHP - Javascript Blog: - AIM: scriptdigital --- Unsubscribe at http://nyphp.org/list/ --- From jsiegel1 at optonline.net Fri Jun 6 15:15:05 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 06 Jun 2003 15:15:05 -0400 Subject: [nycphp-talk] Secure/insecure items In-Reply-To: <200306061827.h56IREXl098657@parsec.nyphp.org> Message-ID: <005501c32c5f$f2f3e010$6501a8c0@EZDSDELL> I like this idea! Tell the client to fix it! ;) Jeff -----Original Message----- From: deedee [mailto:delta at rochester.rr.com] Sent: Friday, June 06, 2003 1:27 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Secure/insecure items if the client is so inclined to remove this annoying message in IE6, you can turn on that warning by tools-> internet options -> security tab -> Custom Level button -> Miscellaneous section allows users to display mixed content: disable, enable or prompt. the default is prompt, giving the user control to continue into the website or not. ----- Original Message ----- From: "Sexton, David" To: "NYPHP Talk" Sent: Friday, June 06, 2003 10:09 AM Subject: RE: [nycphp-talk] Secure/insecure items > Sounds like their browser is just alerting them that they are about to moved > to a secured connection, or to an insecure connection. They should have an > option to turn that warning off in their browser. > > -----Original Message----- > From: Jeff [mailto:jsiegel1 at optonline.net] > Sent: Friday, June 06, 2003 10:03 AM > To: NYPHP Talk > Subject: [nycphp-talk] Secure/insecure items > > > This seems to be an intermittent problem...not sure if it's a code > issue, configuration issue, or browser issue (or all of the above??). > > On the site I'm building, a user clicks on a link which sends them to a > secure page. Sometimes a message pops up saying that there are secure > and insecure items. I'm not sure what could be causing it? Could it be, > perhaps, that there is no cert for the site? > > Jeff > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From carlos at sprout.net Fri Jun 6 16:20:47 2003 From: carlos at sprout.net (Carlos G. Chiossone) Date: Fri, 6 Jun 2003 16:20:47 -0400 Subject: [nycphp-talk] GD and t1lib on win32 and IIS Message-ID: <49A9DEB886049242BA28C484A36C03F11456@email.sprout.net> Hi deedee, thanks. Yes we have read that. But have also heard that there is a way to do it without Visual Basic, using CygWin or other interpreter. Now GD2 only supports FreeType2, which is supposed to be pretty good but not as good as postscript using t1lib. Even with PHP 4.3.2 installed I am not being able to do the anti-aliasing of GD2, so just went for the t1lib. We are now installing it on the Linux box and see if we can use a cross-compiler to compile a Win32 version from there. Thanks for your help. Any more clues people??? Please :) Carlos -----Original Message----- From: deedee [mailto:delta at rochester.rr.com] Sent: Friday, June 06, 2003 2:55 PM To: NYPHP Talk Subject: Re: [nycphp-talk] GD and t1lib on win32 and IIS carlos, there is a pretty good detail in http://us3.php.net/install.windows what version of php are you using? there were some recent changes according to the php extension chart php_gd.dll; GD library image functions; Removed in PHP 4.3.2 looks like the replacement is php_gd2.dll good luck with this regards, deedee ----- Original Message ----- From: "Carlos G. Chiossone" To: "NYPHP Talk" Sent: Friday, June 06, 2003 8:16 AM Subject: RE: [nycphp-talk] GD and t1lib on win32 and IIS > Hi all, have any of you had to add the "t1lib" to use with the GD library on Win32 using IIS? > > I am having the worse time trying to find information on this. > > Do we need to recompile GD? > Or PHP? > > Any clues are very appreciated, thanks. > > Carlos Chiossone > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From jsiegel1 at optonline.net Fri Jun 6 17:37:01 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 06 Jun 2003 17:37:01 -0400 Subject: Crypt issue?? Message-ID: <006601c32c73$c42ef9e0$6501a8c0@EZDSDELL> Not sure how to handle this one. I have a simple function using crypt for storing passwords: function EncryptString($strToEncrypt){ $tmp = crypt(trim($strToEncrypt),"MYSALT"); //One way encryption return $tmp; } When a user creates a new password it returns one value. When a user tries to log in (and I call this function again) it returns a different value yet...if I edit the user's record using one of my forms, THEN everything works fine (that is, then the user can log in). What seems to be happening is that when adding a new record crypt returns a different value than when I'm editing that record. This doesn't really make sense. It's probably a code issue but I can't see any differences in the way I'm calling the function. When it encodes the password '12345' when adding the record it generates "WOjDi2e3GGR4U" But when I test the login function it generates "WOxvmVFSIQUTU" In both cases I'm using this to call the function: $tmpPwd = EncryptString($_POST['DU_sPwd']); Any clues? Jeff From jsiegel1 at optonline.net Fri Jun 6 17:42:41 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 06 Jun 2003 17:42:41 -0400 Subject: Great thing about writing an email Message-ID: <006901c32c74$8fad65c0$6501a8c0@EZDSDELL> Of course I solved the problem...sometimes the very act of writing and sending that email helps you find the solution. The "solution" of course, is so embarrassing...well...I'll tell ya anyway. The post var is called "DU_sPwd" but in the form the element was named DL_sPwd. I realized this as soon as I did the following: echo 'pwd' . $_POST['DU_sPwd']; and it came back with nothing! So...do I thank everyone on the list or do I thank myself?? ;) Have a great weekend everyone!! Jeff From pl at eskimo.com Fri Jun 6 18:21:57 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 6 Jun 2003 18:21:57 -0400 Subject: windows version of mysql user question Message-ID: <008901c32c7a$0f7d2d80$f90708d8@default> I noticed in the table 'users' on mysql windows version '3.23.49-max-debug' that besides 'localhost' there is also a '%' host. mysql> select Host, User,Password from user; +-----------+------+------------------+ | Host | User | Password | +-----------+------+------------------+ | localhost | root | 7a29160226fc5443 | | % | root | | | % | | | +-----------+------+------------------+ 3 rows in set (0.04 sec) What is Host '%'? When I try logging on I get: C:\\>mysqlc -h % ERROR 2005: Unknown MySQL Server Host (%) (1) Do you know why the mysql windows version creates host '%' in the user table? Peter Lehrer From danielc at analysisandsolutions.com Fri Jun 6 21:14:50 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Fri, 6 Jun 2003 21:14:50 -0400 Subject: [nycphp-talk] Crypt issue?? In-Reply-To: <200306062137.h56LbRR1005644@parsec.nyphp.org> References: <200306062137.h56LbRR1005644@parsec.nyphp.org> Message-ID: <20030607011450.GA1773@panix.com> Hey Jeff: On Fri, Jun 06, 2003 at 05:37:27PM -0400, Jeff wrote: > When it encodes the password '12345' when adding the record it generates > "WOjDi2e3GGR4U" > But when I test the login function it generates "WOxvmVFSIQUTU" > > In both cases I'm using this to call the function: > $tmpPwd = EncryptString($_POST['DU_sPwd']); Is this user creation and login procedures contained in the same script? If not, is the EncryptString() function EXACTLY the same in each script, including the same salt? You might want to simplify things by using md5(). Anyway, put an echo statement inside the function: echo ">$stringtoencrypt<"; and see if the actual input is the same. Perhaps something is modifying your input before it gets submitted to the function. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From danielc at analysisandsolutions.com Fri Jun 6 21:19:52 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Fri, 6 Jun 2003 21:19:52 -0400 Subject: [nycphp-talk] windows version of mysql user question In-Reply-To: <200306062224.h56MO6R1008066@parsec.nyphp.org> References: <200306062224.h56MO6R1008066@parsec.nyphp.org> Message-ID: <20030607011952.GB1773@panix.com> Hi Peter: On Fri, Jun 06, 2003 at 06:24:06PM -0400, Peter Lehrer wrote: > > mysql> select Host, User,Password from user; > +-----------+------+------------------+ > | Host | User | Password | > +-----------+------+------------------+ > | localhost | root | 7a29160226fc5443 | > | % | root | | > | % | | | > +-----------+------+------------------+ > > What is Host '%'? When I try logging on I get: "%" is a wildcard. So the second record says root can log in from anywhere without a password and the third record means anonymous access is granted from anywhere. Not too secure. For more info on how to tighten these permissions up, and for MySQL/Windows stuff in general, check out my tutorial: http://www.analysisandsolutions.com/code/mybasic.htm#tighten Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From nyphp at NewAgeWeb.com Fri Jun 6 21:43:10 2003 From: nyphp at NewAgeWeb.com (Jerry Kapron) Date: Fri, 06 Jun 2003 21:43:10 -0400 Subject: [nycphp-talk] windows version of mysql user question Message-ID: <010201c32c96$27c45280$de01a8c0@duron.lan.newageweb.com> Peter, The 'Host' column in the 'user' table contains the *client* hosts from which corresponding users are allowed to connect to your MySQL server. The '%' character is a SQL wildcard. It matches any string, including empty string. Go to http://www.mysql.com/doc/en/Connection_access.html and http://www.mysql.com/doc/en/String_syntax.html#IDX968 for more info. Jerry -- 42.7% of all statistics are made up on the spot. -----Original Message----- From: Peter Lehrer To: NYPHP Talk Date: Friday, June 06, 2003 6:24 PM Subject: [nycphp-talk] windows version of mysql user question >I noticed in the table 'users' on mysql windows version '3.23.49-max-debug' >that besides 'localhost' there is also a '%' host. > >mysql> select Host, User,Password from user; >+-----------+------+------------------+ >| Host | User | Password | >+-----------+------+------------------+ >| localhost | root | 7a29160226fc5443 | >| % | root | | >| % | | | >+-----------+------+------------------+ >3 rows in set (0.04 sec) > > > What is Host '%'? When I try logging on I get: > >C:\\>mysqlc -h % >ERROR 2005: Unknown MySQL Server Host (%) (1) > >Do you know why the mysql windows version creates host '%' in the user >table? > > >Peter Lehrer > > > >--- Unsubscribe at http://nyphp.org/list/ --- > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nyphp at NewAgeWeb.com Fri Jun 6 21:55:36 2003 From: nyphp at NewAgeWeb.com (Jerry Kapron) Date: Fri, 06 Jun 2003 21:55:36 -0400 Subject: [nycphp-talk] windows version of mysql user question Message-ID: <011101c32c97$e3db74c0$de01a8c0@duron.lan.newageweb.com> I just realized that I did not really answer your questions. > What is Host '%'? It means "from any host". > Do you know why the mysql windows version creates host '%' in the user > table? All versions do that. > When I try logging on I get: > C:\\>mysqlc -h % > ERROR 2005: Unknown MySQL Server Host (%) (1) '%' does not identify any specific host. Use 'localhost' if you are connecting from the same machine. Jerry >Peter, >The 'Host' column in the 'user' table contains the *client* hosts from which corresponding users are allowed to connect to your MySQL server. >The '%' character is a SQL wildcard. It matches any string, including empty string. >Go to http://www.mysql.com/doc/en/Connection_access.html >and http://www.mysql.com/doc/en/String_syntax.html#IDX968 for more info. > >Jerry > >-- >42.7% of all statistics are made up on the spot. > > >-----Original Message----- >From: Peter Lehrer >To: NYPHP Talk >Date: Friday, June 06, 2003 6:24 PM >Subject: [nycphp-talk] windows version of mysql user question > > >>I noticed in the table 'users' on mysql windows version '3.23.49-max-debug' >>that besides 'localhost' there is also a '%' host. >> >>mysql> select Host, User,Password from user; >>+-----------+------+------------------+ >>| Host | User | Password | >>+-----------+------+------------------+ >>| localhost | root | 7a29160226fc5443 | >>| % | root | | >>| % | | | >>+-----------+------+------------------+ >>3 rows in set (0.04 sec) >> >> >> What is Host '%'? When I try logging on I get: >> >>C:\\>mysqlc -h % >>ERROR 2005: Unknown MySQL Server Host (%) (1) >> >>Do you know why the mysql windows version creates host '%' in the user >>table? >> >> >>Peter Lehrer >> >> >> >> >> >> > > > >--- Unsubscribe at http://nyphp.org/list/ --- > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsiegel1 at optonline.net Fri Jun 6 22:39:11 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 06 Jun 2003 22:39:11 -0400 Subject: [nycphp-talk] Crypt issue?? In-Reply-To: <200306070115.h571ErXl011294@parsec.nyphp.org> Message-ID: <000501c32c9d$fadbeaf0$6501a8c0@EZDSDELL> Thanks for your input but as I noted in a subsequent post (actually...the answer came to me 30 seconds after shooting out the email)....it was really a darned typo that caused the error! I did exactly as you suggested...put in an echo statement...that's when the light bulb went off (or was it the dope slap?). What's the advantage of MD5 vis-a-vis crypt? Jeff -----Original Message----- From: Analysis & Solutions [mailto:danielc at analysisandsolutions.com] Sent: Friday, June 06, 2003 8:15 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Crypt issue?? Hey Jeff: On Fri, Jun 06, 2003 at 05:37:27PM -0400, Jeff wrote: > When it encodes the password '12345' when adding the record it generates > "WOjDi2e3GGR4U" > But when I test the login function it generates "WOxvmVFSIQUTU" > > In both cases I'm using this to call the function: > $tmpPwd = EncryptString($_POST['DU_sPwd']); Is this user creation and login procedures contained in the same script? If not, is the EncryptString() function EXACTLY the same in each script, including the same salt? You might want to simplify things by using md5(). Anyway, put an echo statement inside the function: echo ">$stringtoencrypt<"; and see if the actual input is the same. Perhaps something is modifying your input before it gets submitted to the function. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 --- Unsubscribe at http://nyphp.org/list/ --- From pl at eskimo.com Fri Jun 6 22:41:11 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 6 Jun 2003 22:41:11 -0400 Subject: [nycphp-talk] windows version of mysql user question References: <200306062224.h56MO6TJ008066@parsec.nyphp.org> Message-ID: <014601c32c9e$435c8e60$f90708d8@default> Jerry, Dan thanks for the information. It was very helpful. -Peter ----- Original Message ----- From: "Peter Lehrer" To: "NYPHP Talk" Sent: Friday, June 06, 2003 6:24 PM Subject: [nycphp-talk] windows version of mysql user question > I noticed in the table 'users' on mysql windows version '3.23.49-max-debug' > that besides 'localhost' there is also a '%' host. > > mysql> select Host, User,Password from user; > +-----------+------+------------------+ > | Host | User | Password | > +-----------+------+------------------+ > | localhost | root | 7a29160226fc5443 | > | % | root | | > | % | | | > +-----------+------+------------------+ > 3 rows in set (0.04 sec) > > > What is Host '%'? When I try logging on I get: > > C:\\>mysqlc -h % > ERROR 2005: Unknown MySQL Server Host (%) (1) > > Do you know why the mysql windows version creates host '%' in the user > table? > > > Peter Lehrer > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From pl at eskimo.com Fri Jun 6 23:00:13 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 6 Jun 2003 23:00:13 -0400 Subject: problem with count() function Message-ID: <016001c32ca0$ecb54cc0$f90708d8@default> I noticed when using count() on an array fetched from a mysql db, it returns twice the amount of elements in the array. For instance: $Count will equal 10 instead of 5. Has anyone else noticed this behaviour? --peter From chris at psydeshow.org Fri Jun 6 23:05:28 2003 From: chris at psydeshow.org (Chris Snyder) Date: Fri, 06 Jun 2003 23:05:28 -0400 Subject: [nycphp-talk] problem with count function In-Reply-To: <200306070302.h5732CYJ017544@parsec.nyphp.org> References: <200306070302.h5732CYJ017544@parsec.nyphp.org> Message-ID: <3EE15678.1040508@psydeshow.org> That's cause mysql_fetch_array creates both indexed (numeric) and associative (column names) keys -- so for every column in your result set there are actually two keys-- do print_r($row) to see this. Take a look at mysql_fetch_assoc() in the manual, too, it might be what you want. chris. Peter Lehrer wrote: >I noticed when using count() on an array fetched from a mysql db, it returns >twice the amount of elements in the array. > >For instance: >$stmt = "SELECT element1,element2,element3,element4,element5 FROM $table"; >$sth = mysql_query($stmt, $dbh); > >$row = mysql_fetch_array($sth); > >$Count = count($count); >?> > >$Count will equal 10 instead of 5. Has anyone else noticed this behaviour? > >--peter > > > >--- Unsubscribe at http://nyphp.org/list/ --- > > > > > From pl at eskimo.com Fri Jun 6 23:39:11 2003 From: pl at eskimo.com (Peter Lehrer) Date: Fri, 6 Jun 2003 23:39:11 -0400 Subject: [nycphp-talk] problem with count function References: <200306070305.h5735QTJ018341@parsec.nyphp.org> Message-ID: <016701c32ca6$5e46d700$f90708d8@default> thanks ----- Original Message ----- From: "Chris Snyder" To: "NYPHP Talk" Sent: Friday, June 06, 2003 11:05 PM Subject: Re: [nycphp-talk] problem with count function > That's cause mysql_fetch_array creates both indexed (numeric) and > associative (column names) keys -- so for every column in your result > set there are actually two keys-- do print_r($row) to see this. > > Take a look at mysql_fetch_assoc() in the manual, too, it might be what > you want. > > chris. > > Peter Lehrer wrote: > > >I noticed when using count() on an array fetched from a mysql db, it returns > >twice the amount of elements in the array. > > > >For instance: > > >$stmt = "SELECT element1,element2,element3,element4,element5 FROM $table"; > >$sth = mysql_query($stmt, $dbh); > > > >$row = mysql_fetch_array($sth); > > > >$Count = count($count); > >?> > > > >$Count will equal 10 instead of 5. Has anyone else noticed this behaviour? > > > >--peter > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From nyphp at enobrev.com Sat Jun 7 03:17:41 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Sat, 7 Jun 2003 03:17:41 -0400 Subject: [nycphp-talk] problem with count function In-Reply-To: <200306070341.h573fCTF019538@parsec.nyphp.org> Message-ID: <004d01c32cc4$e55c00d0$e1951d18@enobrev> Instead of the count, you may want to run a mysql_num_rows right after the query is run, which will return the size of the returned array regardless of MYSQL_ASSOC, MYSQL_NUM, or MYSQL_BOTH (fetch_array types) Excerpt from http://www.php.net/manual/en/function.mysql-num-rows.php ------------ $result = mysql_query("SELECT * FROM table1", $link); $num_rows = mysql_num_rows($result); ----------- Mark -----Original Message----- From: Peter Lehrer [mailto:pl at eskimo.com] Sent: Friday, June 06, 2003 11:41 PM To: NYPHP Talk Subject: Re: [nycphp-talk] problem with count function thanks ----- Original Message ----- From: "Chris Snyder" To: "NYPHP Talk" Sent: Friday, June 06, 2003 11:05 PM Subject: Re: [nycphp-talk] problem with count function > That's cause mysql_fetch_array creates both indexed (numeric) and > associative (column names) keys -- so for every column in your result > set there are actually two keys-- do print_r($row) to see this. > > Take a look at mysql_fetch_assoc() in the manual, too, it might be > what you want. > > chris. > > Peter Lehrer wrote: > > >I noticed when using count() on an array fetched from a mysql db, it returns > >twice the amount of elements in the array. > > > >For instance: > > >$stmt = "SELECT element1,element2,element3,element4,element5 FROM $table"; > >$sth = mysql_query($stmt, $dbh); > > > >$row = mysql_fetch_array($sth); > > > >$Count = count($count); > >?> > > > >$Count will equal 10 instead of 5. Has anyone else noticed this behaviour? > > > >--peter > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From chalu at egenius.com Sat Jun 7 11:07:40 2003 From: chalu at egenius.com (Chalu Kim) Date: Sat, 7 Jun 2003 11:07:40 -0400 (EDT) Subject: Sandro's talk and Zope Users Group meeting Message-ID: Hi everyone There is much to catch up. What great CMS projects you have been doing lately. Steve Bond and I attended the OSCOM in Bostom and it turned out great. Jona and Scott from AbstractEdge were there as well. Sandro Zic was one of speakers at OSCOM and gave a talk there on Sematic web. He will give a talk at eGenius office. The Users group meeting will be on the 12th, coming Thursday at Superfine, Brooklyn on Front street right under the Manhattan bridge. 4 PM Sandro Zic (ZZOSS), a speaker at OSCOM, Semantic web and CMS, please note this can change. 5 PM CMS Users Group at Superfine For more information, call egenius at 718.858.0142 or http://www.egenius.com/contact Let us know by sending email at contact at egenius.com for Sandro so that we know how many people are coming. Thanks We are going to take advantage of Superfine's happy hour till 6 PM. Good brew for cheap and fine food. We invite zopers, phpistas, cms builders, cms seekers, cms enlightenment to come and join us. eGenius - located in dumbo, a historical part of Brooklyn next to the water front. One can get here by taking F train to York. Make right on Jay (downhill to 20 Jay Street, ABC Carpet is here), elevator to 10th floor, make right to Suite 1002. Or you can take A or C train to High. It is tricky. Walk down to Front street towards water, right on Front, left on Jay. Give me a call if you get lost. Superfine - located in dumbo, nice and spacious cafe, Front street, right under Manhattan bridge, Just two blocks up from eGenius office. Happy hour at 4 to 6 everyday. -- Chalu Kim egenius inc, tech co-operative, 20 Jay Street, 1002, brooklyn, new york, 11201, usa (718) 858-0142, (718) 858-2434 fax http://www.egenius.com http://www.pacificoutdoor.org "trips with twists" From chalu at egenius.com Sat Jun 7 11:17:15 2003 From: chalu at egenius.com (Chalu Kim) Date: Sat, 7 Jun 2003 11:17:15 -0400 (EDT) Subject: June 12, 2003 CMS Users Groups and presentation Message-ID: Hi everyone There is much to catch up. What great CMS projects you have been doing lately. Steve Bond and I attended the OSCOM in Bostom and it turned out great. Jona and Scott from AbstractEdge were there as well. June 12, 2003 Sandro Zic was one of speakers at OSCOM and gave a talk there on Sematic web. He will give a talk at eGenius office. The Users group meeting will be on the 12th, coming Thursday at Superfine, Brooklyn on Front street right under the Manhattan Bridge. 4 PM Sandro Zic (ZZOSS), a speaker at OSCOM, Semantic web and CMS, please note this can change. 5 PM CMS Users Group at Superfine For more information, call egenius at 718.858.0142 or http://www.egenius.com/contact for the map. Let us know by sending email at contact at egenius.com for Sandro so that we know how many people are coming. Thanks We are going to take advantage of Superfine's happy hour till 6 PM. Good brew for cheap and fine food. We invite zopers, phpistas, cms builders, cms seekers, cms enlightenment. Come and join us. eGenius - located in dumbo, a historical part of Brooklyn next to the water front. One can get here by taking F train to York. Make right on Jay (downhill to 20 Jay Street, ABC Carpet is here), elevator to 10th floor, make right to Suite 1002. Or you can take A or C train to High. It is tricky. Walk down to Front street towards water, right on Front, left on Jay. Give me a call if you get lost. Superfine - located in dumbo, nice and spacious cafe, Front street, right under Manhattan bridge, Just two blocks up from eGenius office. Happy hour at 4 to 6 everyday. -- Chalu Kim egenius inc, tech co-perative, 20 Jay Street, 1002, brooklyn, new york, 11201, usa (718) 858-0142, (718) 858-2434 fax http://www.egenius.com http://www.pacificoutdoor.org "trips with twists" From danielc at analysisandsolutions.com Sat Jun 7 12:48:46 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Sat, 7 Jun 2003 12:48:46 -0400 Subject: [nycphp-talk] Crypt issue?? In-Reply-To: <200306070239.h572dcR1015484@parsec.nyphp.org> References: <200306070239.h572dcR1015484@parsec.nyphp.org> Message-ID: <20030607164846.GA7400@panix.com> Jeff: On Fri, Jun 06, 2003 at 10:39:38PM -0400, Jeff wrote: > What's the advantage of MD5 vis-a-vis crypt? More fool proof. You might mistakenly use different salts. Or you might use different algorithm types. Also, moving to different computer can change the algorithm, thus altering output. Then, only the first eight characters of input are used, throwing away the value of long passwords. Finally, it seems due to the length of the output, md5 is better at producing unique results. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From evan.heller at alum.rpi.edu Sat Jun 7 13:38:28 2003 From: evan.heller at alum.rpi.edu (evan heller) Date: Sat, 07 Jun 2003 13:38:28 -0400 Subject: For those using windows and apache. Message-ID: <3EE22314.E35FF140@alum.rpi.edu> Ok a bit of cool stuff for you if your using windows, apache 2 and want a nice complete setup INCLUDING mod_ssl, mod_perl, mod_webdav AND mod_authmysql. http://www.apachefriends.org/wampp-en.html As of June 6th it included: Apache 2.0.46, MySQL 4.0.13, PHP 4.3.2 + PEAR, Perl 5.8.0, mod_php 4.3.2, mod_perl 1.99_10, mod_ssl 2.0.46, openssl 0.9.7b, PHPMyAdmin 2.5.1, Webalizer 2.01-10, Mercury Mail Transport System for Win32 and NetWare Systems v3.32, JpGraph 1.12.1, Fastsream NetFile Server 5.6.0.511, (WEB-DAV + MOD AUTH MYSQL experimental); So, I hope you find this as useful as I did. -Evan -- Evan Heller evan.heller at alum.rpi.edu From soazine at pop.mail.rcn.net Sat Jun 7 14:01:09 2003 From: soazine at pop.mail.rcn.net (soazine@pop.erols.com) Date: Sat, 7 Jun 2003 14:01:09 -0400 Subject: Any PHP users here also know TCL? Message-ID: <29950-220036671819421@M2W093.mail2web.com> I could use a hand with a TCL-related problem I'm having on my site! I have a list as follows: id 1 pollID 1 question {How are you?} answerID 1 answer {I'm fine, thanx} id 2 pollID 1 question {How are you?} answerID 2 answer {OK} id 3 pollID 1 question {How are you?} answerID 3 answer {Leave me alone, life sucks!} id 4 pollID 2 question {Do you think there should be a TCL certification exam in Brainbench?} answerID 1 answer {Yes} id 5 pollID 2 question {Do you think there should be a TCL certification exam in Brainbench?} answerID 2 answer {No} I am going to edit this list by doing a change to a part of the question/answer set in, say, pollID 2. I want to them go to the first instance of "pollID 2" and not have to loop as this list can become extremely large (on my live site the XML file that this list is derived from has an id range that goes to 1000!). How then do I use [lsearch] based on this pattern? "pollID $pollID"? [lsearch] fails every combination I tried (returns -1), while [string first] finds it, however, the index is completely wrong for the list functions. Advice? Thanx Phil -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . From james at surgam.net Sat Jun 7 14:14:32 2003 From: james at surgam.net (james at surgam.net) Date: Sat, 7 Jun 2003 14:14:32 -0400 (EDT) Subject: [nycphp-talk] Any PHP users here also know TCL? In-Reply-To: Message from "soazine@pop.erols.com" of "Sat, 07 Jun 2003 14:00:44 EDT." <200306071801.h57I0iZL044197@parsec.nyphp.org> Message-ID: <20030607181432.3EE78D3CEA@mail.surgam.net> "soazine at pop.erols.com" says: > I could use a hand with a TCL-related problem I'm having on my site! > > I have a list as follows: > > id 1 pollID 1 question {How are you?} answerID 1 answer {I'm fine, > thanx} > id 2 pollID 1 question {How are you?} answerID 2 answer {OK} id 3 > pollID 1 > question {How are you?} answerID 3 answer {Leave me alone, life > sucks!} id > 4 pollID 2 question {Do you think there should be a TCL > certification exam > in Brainbench?} answerID 1 answer {Yes} id 5 pollID 2 question {Do > you > think there should be a TCL certification exam in Brainbench?} > answerID 2 > answer {No} > > > I am going to edit this list by doing a change to a part of the > question/answer set in, say, pollID 2. I want to them go to the > first > instance of "pollID 2" and not have to loop as this list can become > extremely large (on my live site the XML file that this list is > derived > from has an id range that goes to 1000!). > > How then do I use [lsearch] based on this pattern? "pollID $pollID"? > [lsearch] fails every combination I tried (returns -1), while > [string > first] finds it, however, the index is completely wrong for the list > functions. > > Advice? Your problem is that pollID and 2 are each elements of your list. If you want them to be treated as one element, you need to quote them. lsearch only searches individual elements. If you want to find the particular element of the list that precedes the numeral "2", you'll have to loop over the elements. Perhaps you would be better off quoting the two strings to create one element, e.g. "pollID 2", when you create the list, instead of when you search it. From jsiegel1 at optonline.net Sat Jun 7 14:44:41 2003 From: jsiegel1 at optonline.net (Jeff) Date: Sat, 07 Jun 2003 14:44:41 -0400 Subject: [nycphp-talk] Crypt issue?? In-Reply-To: <200306071649.h57GmoXl041506@parsec.nyphp.org> Message-ID: <000d01c32d24$dbfd0290$6501a8c0@EZDSDELL> I'm convinced! Thanks for laying out the pluses/minuses. Jeff -----Original Message----- From: Analysis & Solutions [mailto:danielc at analysisandsolutions.com] Sent: Saturday, June 07, 2003 11:49 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Crypt issue?? Jeff: On Fri, Jun 06, 2003 at 10:39:38PM -0400, Jeff wrote: > What's the advantage of MD5 vis-a-vis crypt? More fool proof. You might mistakenly use different salts. Or you might use different algorithm types. Also, moving to different computer can change the algorithm, thus altering output. Then, only the first eight characters of input are used, throwing away the value of long passwords. Finally, it seems due to the length of the output, md5 is better at producing unique results. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 --- Unsubscribe at http://nyphp.org/list/ --- From soazine at pop.mail.rcn.net Sat Jun 7 17:42:34 2003 From: soazine at pop.mail.rcn.net (soazine@pop.erols.com) Date: Sat, 7 Jun 2003 17:42:34 -0400 Subject: [nycphp-talk] Any PHP users here also know TCL? Message-ID: <293580-22003667214234460@M2W078.mail2web.com> Thanx for your solution. Now I have to face another issue. The "pollID $pollID" elements that were joined together into one element in the same list now have to be broken apart within the same list. How do I do that too? Thanx Phil Original Message: ----------------- From: james at surgam.net Date: Sat, 7 Jun 2003 14:14:35 -0400 To: talk at nyphp.org Subject: Re: [nycphp-talk] Any PHP users here also know TCL? "soazine at pop.erols.com" says: > I could use a hand with a TCL-related problem I'm having on my site! > > I have a list as follows: > > id 1 pollID 1 question {How are you?} answerID 1 answer {I'm fine, > thanx} > id 2 pollID 1 question {How are you?} answerID 2 answer {OK} id 3 > pollID 1 > question {How are you?} answerID 3 answer {Leave me alone, life > sucks!} id > 4 pollID 2 question {Do you think there should be a TCL > certification exam > in Brainbench?} answerID 1 answer {Yes} id 5 pollID 2 question {Do > you > think there should be a TCL certification exam in Brainbench?} > answerID 2 > answer {No} > > > I am going to edit this list by doing a change to a part of the > question/answer set in, say, pollID 2. I want to them go to the > first > instance of "pollID 2" and not have to loop as this list can become > extremely large (on my live site the XML file that this list is > derived > from has an id range that goes to 1000!). > > How then do I use [lsearch] based on this pattern? "pollID $pollID"? > [lsearch] fails every combination I tried (returns -1), while > [string > first] finds it, however, the index is completely wrong for the list > functions. > > Advice? Your problem is that pollID and 2 are each elements of your list. If you want them to be treated as one element, you need to quote them. lsearch only searches individual elements. If you want to find the particular element of the list that precedes the numeral "2", you'll have to loop over the elements. Perhaps you would be better off quoting the two strings to create one element, e.g. "pollID 2", when you create the list, instead of when you search it. --- Unsubscribe at http://nyphp.org/list/ --- -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . From james at surgam.net Sat Jun 7 19:45:50 2003 From: james at surgam.net (james at surgam.net) Date: Sat, 7 Jun 2003 19:45:50 -0400 (EDT) Subject: [nycphp-talk] Any PHP users here also know TCL? In-Reply-To: Message from "soazine@pop.erols.com" of "Sat, 07 Jun 2003 17:42:09 EDT." <200306072143.h57Lg9ZL049532@parsec.nyphp.org> Message-ID: <20030607234550.B42DDD3CEF@mail.surgam.net> "soazine at pop.erols.com" says: > Thanx for your solution. Now I have to face another issue. The "pollID > $pollID" elements that were joined together into one element in the same > list now have to be broken apart within the same list. How do I do that > too? I'm not sure what you mean. If you mean you want to create a list where the same element will somehow act both as one element made up of two pieces and also will sometimes act as two separate elements, you can't do that. If you want to put in three elements, you can do that. For example, here's the Tcl to create a list with three such elements: set pollID 15 set lstVar [list "pollID $pollID" pollID $pollID] Now you have a list of three elements. The first one is: pollID 15 The second one is: pollID The third one is: 15 I think this is what you are talking about because, as you asked you have the elements "joined together" and "broken apart within the same list". If you are saying you need a reliable way to split the elements *after* you read them out of the list, you can do it like this: set pollID 15 set lstVar [list thing1 thing2 "something borrowed" "something blue" "pollID $pollID"] set numPollid [lsearch $lstVar "pollID $pollID"] set lstPieces [split [lindex $lstVar $numPollid] { }] In this example, first I created a list with the following five strings as its elements: thing1 thing2 something borrowed something blue pollID 15 Then I found the index of the pollid entry, extracted that entry and split it up on its internal space using the "split" command. You now have a list variable, called lstPieces, that contains the split up pieces of the "pollID 15" element. It contains two elements, numbered 0 and 1. Element # 0 of this small list is the string "pollID" and element # 1 is the number 15. We're sort of getting into the nitty-gritty of introductory Tcl here, so if this is bugging anyone, just drop me a line and I'll refrain from further off-topic emails via the list. HTH, James From fields at surgam.net Sat Jun 7 20:05:18 2003 From: fields at surgam.net (Adam Fields) Date: Sat, 7 Jun 2003 20:05:18 -0400 Subject: [nycphp-talk] Any PHP users here also know TCL? In-Reply-To: <200306072143.h57Lg9ZJ049532@parsec.nyphp.org> References: <200306072143.h57Lg9ZJ049532@parsec.nyphp.org> Message-ID: <20030608000518.GC14199@eye.surgam.net> On Sat, Jun 07, 2003 at 05:42:09PM -0400, soazine at pop.erols.com wrote: > Thanx for your solution. Now I have to face another issue. The "pollID > $pollID" elements that were joined together into one element in the same > list now have to be broken apart within the same list. How do I do that > too? I'd recommend using absolute quoting (braces) instead of double quotes when you build your list in the first place. Braces are technically the sub-list operator. ------------- % set list {{id 1} {pollID 1} {question {How are you?}} {answerID 1} {answer {I'm fine, thanx}} } {id 1} {pollID 1} {question {How are you?}} {answerID 1} {answer {I'm fine, thanx}} % lindex $list 0 id 1 % lindex $list 1 pollID 1 % lindex [lindex $list 1] 1 1 % lrange $list 0 1 {id 1} {pollID 1} % lindex [lrange $list 0 1] 0 id 1 ------------- Does that answer your question? > Thanx > Phil > > Original Message: > ----------------- > From: james at surgam.net > Date: Sat, 7 Jun 2003 14:14:35 -0400 > To: talk at nyphp.org > Subject: Re: [nycphp-talk] Any PHP users here also know TCL? > > > > > "soazine at pop.erols.com" says: > > I could use a hand with a TCL-related problem I'm having on my site! > > > > I have a list as follows: > > > > id 1 pollID 1 question {How are you?} answerID 1 answer {I'm fine, > > thanx} > > id 2 pollID 1 question {How are you?} answerID 2 answer {OK} id 3 > > pollID 1 > > question {How are you?} answerID 3 answer {Leave me alone, life > > sucks!} id > > 4 pollID 2 question {Do you think there should be a TCL > > certification exam > > in Brainbench?} answerID 1 answer {Yes} id 5 pollID 2 question {Do > > you > > think there should be a TCL certification exam in Brainbench?} > > answerID 2 > > answer {No} > > > > > > I am going to edit this list by doing a change to a part of the > > question/answer set in, say, pollID 2. I want to them go to the > > first > > instance of "pollID 2" and not have to loop as this list can become > > extremely large (on my live site the XML file that this list is > > derived > > from has an id range that goes to 1000!). > > > > How then do I use [lsearch] based on this pattern? "pollID $pollID"? > > [lsearch] fails every combination I tried (returns -1), while > > [string > > first] finds it, however, the index is completely wrong for the list > > functions. > > > > Advice? > > Your problem is that pollID and 2 are each elements of your list. If > you want them to be treated as one element, you need to quote them. > lsearch only searches individual elements. If you want to find the > particular element of the list that precedes the numeral "2", you'll > have to loop over the elements. Perhaps you would be better off > quoting the two strings to create one element, e.g. "pollID 2", when > you create the list, instead of when you search it. > > > > > > > -------------------------------------------------------------------- > mail2web - Check your email from the web at > http://mail2web.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 jwjr at extra.surgam.net Sat Jun 7 20:10:39 2003 From: jwjr at extra.surgam.net (James Wetterau) Date: Sat, 7 Jun 2003 20:10:39 -0400 (EDT) Subject: [nycphp-talk] Any PHP users here also know TCL? In-Reply-To: Message from Adam Fields of "Sat, 07 Jun 2003 20:05:26 EDT." <200306080006.h5805QZL053189@parsec.nyphp.org> Message-ID: <20030608001039.2F88AD3D47@mail.surgam.net> From: james at surgam.net --text follows this line-- Adam Fields says: > On Sat, Jun 07, 2003 at 05:42:09PM -0400, soazine at pop.erols.com wrote: > > Thanx for your solution. Now I have to face another issue. The "pollID > > $pollID" elements that were joined together into one element in the same > > list now have to be broken apart within the same list. How do I do that > > too? > > I'd recommend using absolute quoting (braces) instead of double > quotes when you build your list in the first place. Braces are > technically the sub-list operator. The one thing to remember about doing that is that braces don't do variable expansion, so in the case where the value of variable $pollID is 2, {pollID $pollID} expands to a string "pollID $pollID", whereas "pollID $pollID" expands to "pollID 2". I noticed that in some cases Phil was relying on variable expansion. From bogus@does.not.exist.com Sun Jun 8 19:34:30 2003 From: bogus@does.not.exist.com (Sungeun Moon) Date: Sun, 8 Jun 2003 19:34:30 -0400 Subject: question about installation Message-ID: <200306081934.31009.Sungeun Moon <>> I tried to install APM today. I had problem with the httpd.conf file. After I installed everything and tried to start the apache demon, it keep giving me the error, like "Syntax error on line 205 of /www/conf/httpd.conf: Cannot load /www/libexec/libphp3.so into server: /www/libexec/libphp3.so: undefined symbol: mysql_drop_db ./apachectl start: httpd could not be started" What should I do? Please help me... From chalu at egenius.com Sat Jun 7 11:07:40 2003 From: chalu at egenius.com (Chalu Kim) Date: Sat, 7 Jun 2003 11:07:40 -0400 (EDT) Subject: [cms-list] Sandro's talk and Zope Users Group meeting Message-ID: Hi everyone There is much to catch up. What great CMS projects you have been doing lately. Steve Bond and I attended the OSCOM in Bostom and it turned out great. Jona and Scott from AbstractEdge were there as well. Sandro Zic was one of speakers at OSCOM and gave a talk there on Sematic web. He will give a talk at eGenius office. The Users group meeting will be on the 12th, coming Thursday at Superfine, Brooklyn on Front street right under the Manhattan bridge. 4 PM Sandro Zic (ZZOSS), a speaker at OSCOM, Semantic web and CMS, please note this can change. 5 PM CMS Users Group at Superfine For more information, call egenius at 718.858.0142 or http://www.egenius.com/contact Let us know by sending email at contact at egenius.com for Sandro so that we know how many people are coming. Thanks We are going to take advantage of Superfine's happy hour till 6 PM. Good brew for cheap and fine food. We invite zopers, phpistas, cms builders, cms seekers, cms enlightenment to come and join us. eGenius - located in dumbo, a historical part of Brooklyn next to the water front. One can get here by taking F train to York. Make right on Jay (downhill to 20 Jay Street, ABC Carpet is here), elevator to 10th floor, make right to Suite 1002. Or you can take A or C train to High. It is tricky. Walk down to Front street towards water, right on Front, left on Jay. Give me a call if you get lost. Superfine - located in dumbo, nice and spacious cafe, Front street, right under Manhattan bridge, Just two blocks up from eGenius office. Happy hour at 4 to 6 everyday. -- Chalu Kim egenius inc, tech co-operative, 20 Jay Street, 1002, brooklyn, new york, 11201, usa (718) 858-0142, (718) 858-2434 fax http://www.egenius.com http://www.pacificoutdoor.org "trips with twists" -- http://cms-list.org/ more signal, less noise. From chalu at egenius.com Sat Jun 7 11:17:15 2003 From: chalu at egenius.com (Chalu Kim) Date: Sat, 7 Jun 2003 11:17:15 -0400 (EDT) Subject: [cms-list] June 12, 2003 CMS Users Groups and presentation Message-ID: Hi everyone There is much to catch up. What great CMS projects you have been doing lately. Steve Bond and I attended the OSCOM in Bostom and it turned out great. Jona and Scott from AbstractEdge were there as well. June 12, 2003 Sandro Zic was one of speakers at OSCOM and gave a talk there on Sematic web. He will give a talk at eGenius office. The Users group meeting will be on the 12th, coming Thursday at Superfine, Brooklyn on Front street right under the Manhattan Bridge. 4 PM Sandro Zic (ZZOSS), a speaker at OSCOM, Semantic web and CMS, please note this can change. 5 PM CMS Users Group at Superfine For more information, call egenius at 718.858.0142 or http://www.egenius.com/contact for the map. Let us know by sending email at contact at egenius.com for Sandro so that we know how many people are coming. Thanks We are going to take advantage of Superfine's happy hour till 6 PM. Good brew for cheap and fine food. We invite zopers, phpistas, cms builders, cms seekers, cms enlightenment. Come and join us. eGenius - located in dumbo, a historical part of Brooklyn next to the water front. One can get here by taking F train to York. Make right on Jay (downhill to 20 Jay Street, ABC Carpet is here), elevator to 10th floor, make right to Suite 1002. Or you can take A or C train to High. It is tricky. Walk down to Front street towards water, right on Front, left on Jay. Give me a call if you get lost. Superfine - located in dumbo, nice and spacious cafe, Front street, right under Manhattan bridge, Just two blocks up from eGenius office. Happy hour at 4 to 6 everyday. -- Chalu Kim egenius inc, tech co-perative, 20 Jay Street, 1002, brooklyn, new york, 11201, usa (718) 858-0142, (718) 858-2434 fax http://www.egenius.com http://www.pacificoutdoor.org "trips with twists" -- http://cms-list.org/ more signal, less noise. From chris at psydeshow.org Mon Jun 9 10:22:08 2003 From: chris at psydeshow.org (Chris Snyder) Date: Mon, 09 Jun 2003 10:22:08 -0400 Subject: [nycphp-talk] [cms-list] June 12, 2003 CMS Users Groups and presentation In-Reply-To: <200306091409.h59E7qYN087536@parsec.nyphp.org> References: <200306091409.h59E7qYN087536@parsec.nyphp.org> Message-ID: <3EE49810.3040907@psydeshow.org> Is this a list bug, or has their outreach program gone wonky? Chalu Kim wrote: >Hi everyone > >There is much to catch up. What great CMS projects you have been doing >lately. > > From chalu at egenius.com Mon Jun 9 11:05:09 2003 From: chalu at egenius.com (Chalu Kim) Date: Mon, 9 Jun 2003 11:05:09 -0400 (EDT) Subject: [nycphp-talk] [cms-list] June 12, 2003 CMS Users Groups and presentation In-Reply-To: <200306091422.h59EM9Sv089208@parsec.nyphp.org> Message-ID: I am not sure why it sent twice. I did send twice because the date was not in it. The mailman sent out 4 times... Hmmm On Mon, 9 Jun 2003, Chris Snyder wrote: > Is this a list bug, or has their outreach program gone wonky? > > Chalu Kim wrote: > > >Hi everyone > > > >There is much to catch up. What great CMS projects you have been doing > >lately. > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > -- Chalu Kim egenius inc, tech co-perative, 20 Jay Street, 1002, brooklyn, new york, 11201, usa (718) 858-0142, (718) 858-2434 fax http://www.egenius.com http://www.pacificoutdoor.org "trips with twists" From hans at nyphp.org Mon Jun 9 12:38:47 2003 From: hans at nyphp.org (Hans Zaunere) Date: Mon, 9 Jun 2003 09:38:47 -0700 (PDT) Subject: [nycphp-talk] [cms-list] June 12, 2003 CMS Users Groups and presentation In-Reply-To: <200306091616.h59GFqXF091676@parsec.nyphp.org> Message-ID: <20030609163847.57681.qmail@web12801.mail.yahoo.com> --- Chalu Kim wrote: > > I am not sure why it sent twice. I did send twice because the date was not > in it. The mailman sent out 4 times... Hmmm Four separate messages (two identical pairs) were sent to the list; once on Saturday, and once today (notice today's have the added [cms-list] in the subject). Chalu, when sending informational posts to the list, please be sure you get the message written properly the first time, as to avoid this unneeded traffic. Or, better still, informational posts regarding group activities/meetings should not be sent across Talk at all. Such posts should be sent to listmaster at nyphp.org or myself for distribution on the Announce list. Thanks, H From chalu at egenius.com Mon Jun 9 11:49:51 2003 From: chalu at egenius.com (chalu at egenius.com) Date: Mon, 9 Jun 2003 11:49:51 -0400 (EDT) Subject: [nycphp-talk] [cms-list] June 12, 2003 CMS Users Groups and presentation Message-ID: <20030609154951.E9540E035F@virtual.domain.tld> Sure, I did not know you have a separate mailing list. By the way, http://news.nyphp.org does not index page. This is linked from your mailing list. From evan.heller at alum.rpi.edu Mon Jun 9 13:32:26 2003 From: evan.heller at alum.rpi.edu (evan heller) Date: Mon, 09 Jun 2003 13:32:26 -0400 Subject: Upgrading PHP 4.3.0 to 4.3.2 w/ Apache 2 on win32 Message-ID: <3EE4C4AA.A23C1B5@alum.rpi.edu> Ok here's a good question: Has anyone upgraded from php 4.3.0 to 4.3.2 on win32 using Apache 2? Did they change in the apache 2 sapi handler for php cause any problems. I'm now getting a few weird issues on my server. The first being that certain programs now don't work (like Gallery) and I get random PHP warnings even with warnings & errors turned off. Also, some php pages appear randomly with no content while hitting refresh fixes the problem. If I switch back to php 4.3.0 all these problems go away. So, with that in mind what could be causing these problems? Any ideas? -Evan -- Evan Heller evan.heller at alum.rpi.edu From ttoomey at ydnt.com Mon Jun 9 15:49:16 2003 From: ttoomey at ydnt.com (Tim Toomey) Date: Mon, 9 Jun 2003 12:49:16 -0700 Subject: [nycphp-talk] Upgrading PHP 4.3.0 to 4.3.2 w/ Apache 2 on win32 References: <200306091735.h59HY5cT094970@parsec.nyphp.org> Message-ID: <006f01c32ec0$39791160$6401a8c0@timmerslaptop> I'm not entirely sure, but a possibility could be that php 4.3.2 is still in the experimental stages with apache 2, trying switching back to an older version of apache and see what happens. -timmy ----- Original Message ----- From: "evan heller" To: "NYPHP Talk" Sent: Monday, June 09, 2003 10:34 AM Subject: [nycphp-talk] Upgrading PHP 4.3.0 to 4.3.2 w/ Apache 2 on win32 > Ok here's a good question: > > Has anyone upgraded from php 4.3.0 to 4.3.2 on > win32 using Apache 2? Did they change in the > apache 2 sapi handler for php cause any problems. > I'm now getting a few weird issues on my server. > The first being that certain programs now don't > work (like Gallery) and I get random PHP warnings > even with warnings & errors turned off. > > Also, some php pages appear randomly with no > content while hitting refresh fixes the problem. > If I switch back to php 4.3.0 all these problems > go away. So, with that in mind what could be > causing these problems? Any ideas? > > -Evan > -- > > Evan Heller > evan.heller at alum.rpi.edu > > > --- Unsubscribe at http://nyphp.org/list/ --- > From jonbaer at jonbaer.net Mon Jun 9 15:32:26 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Mon, 9 Jun 2003 12:32:26 -0700 Subject: Anyone using/developing on Snort/ACID? Message-ID: <005101c32ebd$dc03d080$6400a8c0@FlipWilson> I was wondering if anyone within the NYPHP group works on IDS projects using Snort/ACID? - Jon From max at idsociety.com Mon Jun 9 15:57:31 2003 From: max at idsociety.com (max goldberg) Date: Mon, 09 Jun 2003 15:57:31 -0400 Subject: [nycphp-talk] Upgrading PHP 4.3.0 to 4.3.2 w/ Apache 2 on win32 In-Reply-To: <200306091734.h59HY5V1094970@parsec.nyphp.org> References: <200306091734.h59HY5V1094970@parsec.nyphp.org> Message-ID: <3EE4E6AB.5070103@idsociety.com> according to http://www.php.net/ChangeLog-4.php : Added a new Apache 2.0 SAPI module (sapi/apache2handler) based on the old version (sapi/apache2filter). (Ian Holsman, Justin Erenkrantz) evan heller wrote: > Ok here's a good question: > > Has anyone upgraded from php 4.3.0 to 4.3.2 on > win32 using Apache 2? Did they change in the > apache 2 sapi handler for php cause any problems. > I'm now getting a few weird issues on my server. > The first being that certain programs now don't > work (like Gallery) and I get random PHP warnings > even with warnings & errors turned off. > > Also, some php pages appear randomly with no > content while hitting refresh fixes the problem. > If I switch back to php 4.3.0 all these problems > go away. So, with that in mind what could be > causing these problems? Any ideas? > > -Evan From jsiegel1 at optonline.net Mon Jun 9 16:19:10 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 09 Jun 2003 16:19:10 -0400 Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? In-Reply-To: <200306091933.h59JWvXj098296@parsec.nyphp.org> Message-ID: <003001c32ec4$63a71d70$6501a8c0@EZDSDELL> Hey! I *used to* snort acid...but those days are long gone. ;) (Sorry...couldn't resist this one) Jeff -----Original Message----- From: Jon Baer [mailto:jonbaer at jonbaer.net] Sent: Monday, June 09, 2003 2:33 PM To: NYPHP Talk Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? I was wondering if anyone within the NYPHP group works on IDS projects using Snort/ACID? - Jon --- Unsubscribe at http://nyphp.org/list/ --- From FWoolsey at ltk.com Mon Jun 9 16:21:19 2003 From: FWoolsey at ltk.com (Woolsey, Fred) Date: Mon, 9 Jun 2003 16:21:19 -0400 Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? Message-ID: <49C27D5DC02B03409C25B3039719955DD1FDDD@exambler.ltk.com> Which? Hydrochloric? Sulfuric? My fave was Prussic... it's ta die for! Fred Woolsey Senior Consultant LTK Engineering Services 100 West Butler Avenue Ambler, PA 19002 Tel: 215-641-8865 Fax: 215-654-9370 fwoolsey at ltk.com -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Monday, June 09, 2003 4:20 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Anyone using/developing on Snort/ACID? Hey! I *used to* snort acid...but those days are long gone. ;) (Sorry...couldn't resist this one) Jeff -----Original Message----- From: Jon Baer [mailto:jonbaer at jonbaer.net] Sent: Monday, June 09, 2003 2:33 PM To: NYPHP Talk Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? I was wondering if anyone within the NYPHP group works on IDS projects using Snort/ACID? - Jon --- Unsubscribe at http://nyphp.org/list/ --- From LarryC at indexstock.com Mon Jun 9 16:31:49 2003 From: LarryC at indexstock.com (Larry Chuon) Date: Mon, 9 Jun 2003 16:31:49 -0400 Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? Message-ID: <86713EAB93BD5F40B94A0C8E604C7C91AEC1E4@index-exchange.indexstock.com> What do you want to know? I used to build an appliance based on this open-source tool. The problem with ACID is that it is very slow especially with the type of network traffic that I was dealing with. Since it works with both MySQL and Postgres + PHP, you can really go crazy with it. It's a nice light weight IDS. You can repurpose your old PII 200 box. :) -----Original Message----- From: Woolsey, Fred [mailto:FWoolsey at ltk.com] Sent: Monday, June 09, 2003 4:21 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Anyone using/developing on Snort/ACID? Which? Hydrochloric? Sulfuric? My fave was Prussic... it's ta die for! Fred Woolsey Senior Consultant LTK Engineering Services 100 West Butler Avenue Ambler, PA 19002 Tel: 215-641-8865 Fax: 215-654-9370 fwoolsey at ltk.com -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Monday, June 09, 2003 4:20 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Anyone using/developing on Snort/ACID? Hey! I *used to* snort acid...but those days are long gone. ;) (Sorry...couldn't resist this one) Jeff -----Original Message----- From: Jon Baer [mailto:jonbaer at jonbaer.net] Sent: Monday, June 09, 2003 2:33 PM To: NYPHP Talk Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? I was wondering if anyone within the NYPHP group works on IDS projects using Snort/ACID? - Jon --- Unsubscribe at http://nyphp.org/list/ --- From chris at psydeshow.org Mon Jun 9 16:37:01 2003 From: chris at psydeshow.org (Chris Snyder) Date: Mon, 09 Jun 2003 16:37:01 -0400 Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? In-Reply-To: <200306091933.h59JWvYL098296@parsec.nyphp.org> References: <200306091933.h59JWvYL098296@parsec.nyphp.org> Message-ID: <3EE4EFED.4010908@psydeshow.org> No, but gosh it looks like fun. I used to run portsentry and logcheck on a DMZ host and watch the nearly constant barrage of portscans trying to discover open IIS and SqlServer ports. Snort looks like it's a bit more industrial strength (and CPU intensive). Unfortunately portsentry seems to have disappeared into the gaping maw of Cisco Systems. Jon Baer wrote: >I was wondering if anyone within the NYPHP group works on IDS projects using >Snort/ACID? > >- Jon > > > From jonbaer at jonbaer.net Mon Jun 9 16:58:52 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Mon, 9 Jun 2003 13:58:52 -0700 Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? References: <200306092032.h59KVvVZ002230@parsec.nyphp.org> Message-ID: <004501c32ec9$ef23f080$6400a8c0@FlipWilson> im using it @ home on a mini-itx + soekris wifi AP and was poking around the ACID app so i thought id ask if anyone else was working on php-based IDS stuff (libpcap or winpcap) ... - jon ----- Original Message ----- From: "Larry Chuon" To: "NYPHP Talk" Sent: Monday, June 09, 2003 1:31 PM Subject: RE: [nycphp-talk] Anyone using/developing on Snort/ACID? > What do you want to know? I used to build an appliance based on this > open-source tool. The problem with ACID is that it is very slow especially > with the type of network traffic that I was dealing with. Since it works > with both MySQL and Postgres + PHP, you can really go crazy with it. It's a > nice light weight IDS. You can repurpose your old PII 200 box. :) > From jsiegel1 at optonline.net Mon Jun 9 17:33:22 2003 From: jsiegel1 at optonline.net (Jeff) Date: Mon, 09 Jun 2003 17:33:22 -0400 Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? In-Reply-To: <200306092021.h59KLLXl001359@parsec.nyphp.org> Message-ID: <003901c32ece$c0f8d720$6501a8c0@EZDSDELL> Vinegar ;) -----Original Message----- From: Woolsey, Fred [mailto:FWoolsey at ltk.com] Sent: Monday, June 09, 2003 3:21 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Anyone using/developing on Snort/ACID? Which? Hydrochloric? Sulfuric? My fave was Prussic... it's ta die for! Fred Woolsey Senior Consultant LTK Engineering Services 100 West Butler Avenue Ambler, PA 19002 Tel: 215-641-8865 Fax: 215-654-9370 fwoolsey at ltk.com -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Monday, June 09, 2003 4:20 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Anyone using/developing on Snort/ACID? Hey! I *used to* snort acid...but those days are long gone. ;) (Sorry...couldn't resist this one) Jeff -----Original Message----- From: Jon Baer [mailto:jonbaer at jonbaer.net] Sent: Monday, June 09, 2003 2:33 PM To: NYPHP Talk Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? I was wondering if anyone within the NYPHP group works on IDS projects using Snort/ACID? - Jon --- Unsubscribe at http://nyphp.org/list/ --- From pl at eskimo.com Mon Jun 9 19:37:24 2003 From: pl at eskimo.com (Peter Lehrer) Date: Mon, 9 Jun 2003 19:37:24 -0400 Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? References: <200306091933.h59JWvTH098296@parsec.nyphp.org> Message-ID: <013f01c32ee0$1955a0e0$640708d8@default> snort/acid sounds like something people did in the '70's. --peter ----- Original Message ----- From: "Jon Baer" To: "NYPHP Talk" Sent: Monday, June 09, 2003 3:32 PM Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? > I was wondering if anyone within the NYPHP group works on IDS projects using > Snort/ACID? > > - Jon > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From jonbaer at jonbaer.net Mon Jun 9 21:06:43 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Mon, 9 Jun 2003 18:06:43 -0700 Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? References: <200306092340.h59NdOVZ007813@parsec.nyphp.org> Message-ID: <000701c32eec$8f6a6520$6400a8c0@FlipWilson> man ... that's the last time i send an email about programs that have drug related names lol :-) Snort - Lightweight IDS http://www.snort.org ACID - Analysis Console for Intrusion Databases - PHP/MySQL http://www.andrew.cmu.edu/~rdanyliw/snort/snortacid.html basically im modifying ACID for more wireless related uses (DHCP, netfilter, SNML) - jon ----- Original Message ----- From: "Peter Lehrer" To: "NYPHP Talk" Sent: Monday, June 09, 2003 4:39 PM Subject: Re: [nycphp-talk] Anyone using/developing on Snort/ACID? > snort/acid sounds like something people did in the '70's. > > --peter > ----- Original Message ----- > From: "Jon Baer" > To: "NYPHP Talk" > Sent: Monday, June 09, 2003 3:32 PM > Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? > > > > I was wondering if anyone within the NYPHP group works on IDS projects > using > > Snort/ACID? > > > > - Jon > > > > From evan.heller at alum.rpi.edu Mon Jun 9 21:51:13 2003 From: evan.heller at alum.rpi.edu (evan heller) Date: Mon, 09 Jun 2003 21:51:13 -0400 Subject: [nycphp-talk] Upgrading PHP 4.3.0 to 4.3.2 w/ Apache 2 on win32 References: <200306091749.h59HnNQv095880@parsec.nyphp.org> Message-ID: <3EE53991.3D469262@alum.rpi.edu> Was php 4.3.0 considered experimental as well? It seems pretty stable to me if was. Anyhow, yeah, when I switch back to 4.3.0 from 4.3.2 all these problems go away. I can't switch to another version of apache at this moment since this is on a production server (apache 2 seems better than apache 1.3x on windows) and I can't leave customers in the dark. It's hard enough trying to restart apache and configuring in short bursts of time so that I don't disturb customer sites. -Evan -- Evan Heller evan.heller at alum.rpi.edu From nestorflorez at earthlink.net Mon Jun 9 22:47:46 2003 From: nestorflorez at earthlink.net (Nestor Florez) Date: Mon, 9 Jun 2003 19:47:46 -0700 (GMT) Subject: multi dimension array sort? Message-ID: <6974491.1055213370423.JavaMail.nobody@thecount.psp.pas.earthlink.net> PHP'ers, I have an array multi associative array row[#]['empname'][dept']['ssn']['location'] I want display them in a list and I want theuser to click on the column name and I will sort it according to the column and then display the array. I have tried using uasort, asort, array_multisort and I am not able to make it work. Can anyone give me a hand on how to do than multi associative array sort. thanks, Nestor :-) From danielc at analysisandsolutions.com Mon Jun 9 23:24:16 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 9 Jun 2003 23:24:16 -0400 Subject: latest vulnerabilities... Message-ID: <20030610032416.GA7605@panix.com> Hey Folks: Here are the highlights from SecurityFocus's latest newsletter... ------------------ PHP Transparent Session ID Cross Site Scripting Vulnerability http://www.securityfocus.com/bid/7761 A cross-site scripting vulnerability has been discovered in PHP version 4.3.1 and earlier. ------------------ Yet another PHP-Nuke vulnerability... PHP-Nuke User/Admin Cookie SQL Injection Vulnerability http://www.securityfocus.com/bid/7762 ------------------ Multiple Mod_Gzip Debug Mode Vulnerabilities http://www.securityfocus.com/bid/7769 Mod_gzip is an Apache web server module that compresses web content before sending it to the client. Mod_gzip is not a standard module for Apache. ------------------ Webfroot Shoutbox Expanded.PHP Remote Command Execution Vulnerability http://www.securityfocus.com/bid/7772 Webfroot Shoutbox is a web application designed to allow web site visitors a chance to leave messages. It is implemented in PHP... ------------------ Webchat Module Path Disclosure Weakness http://www.securityfocus.com/bid/7774 Webchat is a web based chat module designed for use with PHP-Nuke. ------------------ SPChat Module Remote File Include Vulnerability http://www.securityfocus.com/bid/7780 SPChat is a web based chat module designed for use with PHP-Nuke. ------------------ Multiple vulnerabilities in Cafelog b2 http://www.securityfocus.com/bid/7782 http://www.securityfocus.com/bid/7783 http://www.securityfocus.com/bid/7786 CafeLog b2 WebLog Tool allows users to generate news pages and weblogs dynamically. It is implemented in PHP ------------------ multiple Wordpress vulnerabilities http://www.securityfocus.com/bid/7784 http://www.securityfocus.com/bid/7785 Wordpress allows users to generate news pages and weblogs dynamically. It uses PHP and a MySQL database to generate dynamic pages. ------------------ While this isn't PHP related, cPanel was discussed on the list recently... cPanel/Formail-Clone E-Mail Restriction Bypass Vulnerability http://www.securityfocus.com/bid/7758 ------------------ Interesting thing to look out for if you run servers or have scripts which send email... Linux /bin/mail Carbon Copy Field Buffer Overrun Vulnerability http://www.securityfocus.com/bid/7760 Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From danielc at analysisandsolutions.com Mon Jun 9 23:46:40 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 9 Jun 2003 23:46:40 -0400 Subject: [nycphp-talk] multi dimension array sort? In-Reply-To: <200306100249.h5A2nXR1012569@parsec.nyphp.org> References: <200306100249.h5A2nXR1012569@parsec.nyphp.org> Message-ID: <20030610034640.GA7987@panix.com> Nestor: On Mon, Jun 09, 2003 at 10:49:33PM -0400, Nestor Florez wrote: > > row[#]['empname'][dept']['ssn']['location'] You need to run the sort functions on the level of the array you're looking to traverse. So, the two following examples sort different things: asort($row[#]['empname']['dept']['ssn']); asort($row[#]['empname']['dept']); > I want display them in a list and I want theuser to click on the column > name and I will sort it according to the column and then display the > array. Without fully understanding what you're trying to do, it seems you're off track storing all this stuff in one very multidimensional array. If you want further tips, clarify exactly what data you're trying to manipulate, including examples of such data. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From zaunere at yahoo.com Tue Jun 10 08:33:16 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 10 Jun 2003 05:33:16 -0700 (PDT) Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? In-Reply-To: <200306092059.h59KxNXH004046@parsec.nyphp.org> Message-ID: <20030610123316.65398.qmail@web12807.mail.yahoo.com> --- Jon Baer wrote: > im using it @ home on a mini-itx + soekris wifi AP and was poking around > the > ACID app so i thought id ask if anyone else was working on php-based IDS > stuff (libpcap or winpcap) ... On a somewhat similar note, I had begun work on an extension to form/send/recv raw packets, but it's been on the back burner for some time. I guess it could be used to wreak havoc on an IDS :) At work I'm just completing a couple ncurses apps in PHP - were you considering something console based, or strictly web related? H > > - jon > > ----- Original Message ----- > From: "Larry Chuon" > To: "NYPHP Talk" > Sent: Monday, June 09, 2003 1:31 PM > Subject: RE: [nycphp-talk] Anyone using/developing on Snort/ACID? > > > > What do you want to know? I used to build an appliance based on this > > open-source tool. The problem with ACID is that it is very slow > especially > > with the type of network traffic that I was dealing with. Since it works > > with both MySQL and Postgres + PHP, you can really go crazy with it. > It's > a > > nice light weight IDS. You can repurpose your old PII 200 box. :) > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From zaunere at yahoo.com Tue Jun 10 08:36:33 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 10 Jun 2003 05:36:33 -0700 (PDT) Subject: [nycphp-talk] latest vulnerabilities... In-Reply-To: <200306100324.h5A3OJXH013912@parsec.nyphp.org> Message-ID: <20030610123633.78099.qmail@web12809.mail.yahoo.com> --- Analysis & Solutions wrote: > Hey Folks: > > Here are the highlights from SecurityFocus's latest newsletter... *sigh* Like sendmail, I think we need to start a "Don't Blame PHP" campaign. All except one of these issues is application related - not PHP itself. Yet, when talking with "outsiders" about PHP, a common theme is insecurity. H > ------------------ > PHP Transparent Session ID Cross Site Scripting Vulnerability > http://www.securityfocus.com/bid/7761 > > A cross-site scripting vulnerability has been discovered in PHP version > 4.3.1 and earlier. > > ------------------ > Yet another PHP-Nuke vulnerability... > > PHP-Nuke User/Admin Cookie SQL Injection Vulnerability > http://www.securityfocus.com/bid/7762 > > ------------------ > Multiple Mod_Gzip Debug Mode Vulnerabilities > http://www.securityfocus.com/bid/7769 > > Mod_gzip is an Apache web server module that compresses web content before > sending it to the client. Mod_gzip is not a standard module for Apache. > > ------------------ > Webfroot Shoutbox Expanded.PHP Remote Command Execution Vulnerability > http://www.securityfocus.com/bid/7772 > > Webfroot Shoutbox is a web application designed to allow web site visitors > a chance to leave messages. It is implemented in PHP... > > ------------------ > Webchat Module Path Disclosure Weakness > http://www.securityfocus.com/bid/7774 > > Webchat is a web based chat module designed for use with PHP-Nuke. > > ------------------ > SPChat Module Remote File Include Vulnerability > http://www.securityfocus.com/bid/7780 > > SPChat is a web based chat module designed for use with PHP-Nuke. > > ------------------ > Multiple vulnerabilities in Cafelog b2 > http://www.securityfocus.com/bid/7782 > http://www.securityfocus.com/bid/7783 > http://www.securityfocus.com/bid/7786 > > CafeLog b2 WebLog Tool allows users to generate news pages and weblogs > dynamically. It is implemented in PHP > > ------------------ > multiple Wordpress vulnerabilities > http://www.securityfocus.com/bid/7784 > http://www.securityfocus.com/bid/7785 > > Wordpress allows users to generate news pages and weblogs dynamically. It > uses PHP and a MySQL database to generate dynamic pages. > > ------------------ > While this isn't PHP related, cPanel was discussed on the list recently... > > cPanel/Formail-Clone E-Mail Restriction Bypass Vulnerability > http://www.securityfocus.com/bid/7758 > > ------------------ > Interesting thing to look out for if you run servers or have > scripts which send email... > > Linux /bin/mail Carbon Copy Field Buffer Overrun Vulnerability > http://www.securityfocus.com/bid/7760 > > > Enjoy, > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From zaunere at yahoo.com Tue Jun 10 09:10:45 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 10 Jun 2003 06:10:45 -0700 (PDT) Subject: [nycphp-talk] multi dimension array sort? In-Reply-To: <200306100250.h5A2nXXH012569@parsec.nyphp.org> Message-ID: <20030610131045.14001.qmail@web12803.mail.yahoo.com> --- Nestor Florez wrote: > PHP'ers, > > I have an array multi associative array > > row[#]['empname'][dept']['ssn']['location'] > > I want display them in a list and I want theuser to click on the column > name and I will sort it according to the column and then display the array. > > I have tried using uasort, asort, array_multisort and I am not able to make > it work. Can anyone give me a hand on how to do than multi associative > array sort. array_multisort() is probably closest to what you want, but even that isn't *really* what you want since it sorts the columns left to right. You may try something like: array_multisort($row['empname']); To do exactly what you want, I'd highly recommend using a database - SQL's ORDER BY is great, and probably faster in the long run :) Otherwise, consider breaking the multidimensional array into montholithic arrays, which may make them easier to work with, including use in array_multisort(). Typically, hugely multidimensional arrays bring more confusion than anything else :) H From chris at psydeshow.org Tue Jun 10 09:24:06 2003 From: chris at psydeshow.org (Chris Snyder) Date: Tue, 10 Jun 2003 09:24:06 -0400 Subject: [nycphp-talk] latest vulnerabilities... In-Reply-To: <200306101237.h5ACaZYL024728@parsec.nyphp.org> References: <200306101237.h5ACaZYL024728@parsec.nyphp.org> Message-ID: <3EE5DBF6.8010005@psydeshow.org> Hans Zaunere wrote: >Like sendmail, I think we need to start a "Don't Blame PHP" campaign. All >except one of these issues is application related - not PHP itself. Yet, >when talking with "outsiders" about PHP, a common theme is insecurity. > > The blessing and curse of the language is how easy it is for a relative novice to pick it up and cobble together a really powerful application, without knowing or caring about all the different ways that somebody could come along and abuse it. The fact that most PHP code operates in a hostile environment (the internet) compounds the perception problem. Look at it this way-- peer review has just upgraded security on seven different PHP projects! Maybe NYPHP should have review team that pokes at member-submitted apps and checks for things like unescaped UIDs from cookies and cross-site-scripting opportunities. Thanks for posting that summary, Dan! chris. From chris at psydeshow.org Tue Jun 10 09:50:52 2003 From: chris at psydeshow.org (Chris Snyder) Date: Tue, 10 Jun 2003 09:50:52 -0400 Subject: mod_security (was: latest vulnerabilities...) In-Reply-To: <200306101324.h5ADO8YL026957@parsec.nyphp.org> References: <200306101324.h5ADO8YL026957@parsec.nyphp.org> Message-ID: <3EE5E23C.3010206@psydeshow.org> Is anybody on the list using mod_security? Thoughts? Performance? http://www.modsecurity.org It allows you to filter get and post requests before they are handed off to scripts. I wonder if it will do cookies as well? It looks like an excellent way to add an extra layer of security to anything that's being run via Apache. In the latest version you can apparently chroot the environment in which scripts are run: http://www.modsecurity.org/documentation/apache-internal-chroot.html chris. From jonbaer at jonbaer.net Tue Jun 10 11:50:08 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Tue, 10 Jun 2003 08:50:08 -0700 Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? References: <200306101234.h5ACXLVZ023952@parsec.nyphp.org> Message-ID: <00b701c32f67$f82ad740$6400a8c0@FlipWilson> Id be interested in that ... @ the moment Im only using ACID as a web interface for disconnected DHCP clients as it will be pretty much just a package that boots users running P2P or downloading porn over WiFi ... do the ncurses apps also work on Windows w/ Cygwin? I got ettercap to work but I can't seem to compile using ncurses lib. I have not seen sample PHP/ncurses apps but just from reading http://www.zend.com/manual/ref.ncurses.php and it stressing to use the extension @ ur own risk have you had any problems? (major ones I mean) - Jon ----- Original Message ----- From: "Hans Zaunere" > On a somewhat similar note, I had begun work on an extension to > form/send/recv raw packets, but it's been on the back burner for some time. > I guess it could be used to wreak havoc on an IDS :) > > At work I'm just completing a couple ncurses apps in PHP - were you > considering something console based, or strictly web related? From zaunere at yahoo.com Tue Jun 10 12:12:24 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 10 Jun 2003 09:12:24 -0700 (PDT) Subject: [nycphp-talk] mod_security In-Reply-To: <200306101351.h5ADosXD028030@parsec.nyphp.org> Message-ID: <20030610161224.48629.qmail@web12804.mail.yahoo.com> --- Chris Snyder wrote: > Is anybody on the list using mod_security? Thoughts? Performance? > http://www.modsecurity.org I haven't used it first hand, but I'd be happy to share my thoughts on it anyway :) It looks nice and well written, but I'm always biased against mod_something that depends on a series of regex rules - although it does look better than mod_rewrite. >From looking at the functionality it provides, I can't see that it would offer much protection to a well written application. Sure, you can filter "INSERT" and "DELETE FROM" out of requests, but if the application is susecptible to that type of thing anyway, there's more trouble than mod_security can fix. Just seems like a patchy way of doing things (akin to mod_rewrite). But, this directive looks nice: SecFilterByteRange 65 122 Assuming mod_security doesn't have any security issues/overflows itself :) H > It allows you to filter get and post requests before they are handed off > to scripts. I wonder if it will do cookies as well? > > It looks like an excellent way to add an extra layer of security to > anything that's being run via Apache. In the latest version you can > apparently chroot the environment in which scripts are run: > http://www.modsecurity.org/documentation/apache-internal-chroot.html > > chris. > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From zaunere at yahoo.com Tue Jun 10 12:15:55 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 10 Jun 2003 09:15:55 -0700 (PDT) Subject: [nycphp-talk] latest vulnerabilities... In-Reply-To: <200306101324.h5ADO8XF026957@parsec.nyphp.org> Message-ID: <20030610161555.19413.qmail@web12806.mail.yahoo.com> --- Chris Snyder wrote: > Hans Zaunere wrote: > > >Like sendmail, I think we need to start a "Don't Blame PHP" campaign. All > >except one of these issues is application related - not PHP itself. Yet, > >when talking with "outsiders" about PHP, a common theme is insecurity. > > > > > The blessing and curse of the language is how easy it is for a relative > novice to pick it up and cobble together a really powerful application, > without knowing or caring about all the different ways that somebody > could come along and abuse it. The fact that most PHP code operates in a > hostile environment (the internet) compounds the perception problem. > > Look at it this way-- peer review has just upgraded security on seven > different PHP projects! Maybe NYPHP should have review team that pokes > at member-submitted apps and checks for things like unescaped UIDs from > cookies and cross-site-scripting opportunities. This is a great idea. How could this get started? A blog? Forum? New software? H > > Thanks for posting that summary, Dan! > > chris. > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From zaunere at yahoo.com Tue Jun 10 12:22:13 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 10 Jun 2003 09:22:13 -0700 (PDT) Subject: [nycphp-talk] Anyone using/developing on Snort/ACID? In-Reply-To: <200306101551.h5AFoRXD030586@parsec.nyphp.org> Message-ID: <20030610162213.78879.qmail@web12801.mail.yahoo.com> --- Jon Baer wrote: > Id be interested in that ... @ the moment Im only using ACID as a web > interface for disconnected DHCP clients as it will be pretty much just a > package that boots users running P2P or downloading porn over WiFi ... do > the ncurses apps also work on Windows w/ Cygwin? I got ettercap to work > but I can't seem to compile using ncurses lib. Hmm... good question. Theoretically, it should work. If Cygwin has a coherent implementation of ncurses, that is. > I have not seen sample PHP/ncurses apps but just from reading > http://www.zend.com/manual/ref.ncurses.php and it stressing to use the > extension @ ur own risk have you had any problems? (major ones I mean) Honestly, I ditched the bundled ncurses extension and wrote my own. After examining it, I realized that the functions were returning all sorts of different types, and there was just general inconsistency. Plus, there was a lot of stuff I didn't need (pads,menus,etc) that just added complexitity. After the rewrite, I wrapped it in a class so I can do stuff like $mywindow = new Window('Title'); Hey, just like MFC! :) I'm going to be submitting this stuff to PECL at some point. All that said, I don't think there is anything inherently unstable about the provided ncurses library. It was just kind of messy. Nice info here: http://www.zend.com/zend/tut/tut-degan.php H > ----- Original Message ----- > From: "Hans Zaunere" > > On a somewhat similar note, I had begun work on an extension to > > form/send/recv raw packets, but it's been on the back burner for some > time. > > I guess it could be used to wreak havoc on an IDS :) > > > > At work I'm just completing a couple ncurses apps in PHP - were you > > considering something console based, or strictly web related? > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From danielc at analysisandsolutions.com Tue Jun 10 12:25:23 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Tue, 10 Jun 2003 12:25:23 -0400 Subject: [nycphp-talk] mod_security In-Reply-To: <200306101350.h5ADosR1028030@parsec.nyphp.org> References: <200306101350.h5ADosR1028030@parsec.nyphp.org> Message-ID: <20030610162522.GA27754@panix.com> Hi Chris: On Tue, Jun 10, 2003 at 09:50:54AM -0400, Chris Snyder wrote: > Is anybody on the list using mod_security? Thoughts? Performance? > http://www.modsecurity.org Interesting. I just took a look at the site. The documentation, which is unfortunately only in pdf, could provide better detail on how the thing operates. Sanitizing and validating input is so very important, and by the number of items showing up on bugtraq, is too often overlooked. My Form Solution class, http://www.analysisandsolutions.com/software/form/, helps with that a bit. > In the latest version you can > apparently chroot the environment in which scripts are run: > http://www.modsecurity.org/documentation/apache-internal-chroot.html It sounds like they're talking about chrooting Apache itself via this module, without having to rely on chrooting via the operating system. But, what if their module or apache gets circumvented somehow? Then the attacker is home free. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From danielc at analysisandsolutions.com Tue Jun 10 12:28:03 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Tue, 10 Jun 2003 12:28:03 -0400 Subject: [nycphp-talk] mod_security In-Reply-To: <200306101350.h5ADosR1028030@parsec.nyphp.org> References: <200306101350.h5ADosR1028030@parsec.nyphp.org> Message-ID: <20030610162803.GB27754@panix.com> Hey Again: Forgot to mention... I'm wary of an external approach to security because a programmer can then ignore secure programming practices, which bites us all in the long run. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jonbaer at jonbaer.net Tue Jun 10 12:30:12 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Tue, 10 Jun 2003 09:30:12 -0700 Subject: [nycphp-talk] latest vulnerabilities... References: <200306101616.h5AGFwVX032556@parsec.nyphp.org> Message-ID: <00e601c32f6d$913bec30$6400a8c0@FlipWilson> > This is a great idea. How could this get started? A blog? Forum? New > software? > I was in the middle of setting up nycsnort.org for Snort/ACID related user group but seems that alot of people that emailed me were more in tune with doing an "open source security" related group that was more keen to things like pen-testing web apps and other network va stuff. In fact I was a little suprised by how little people did know in regards to SQL injection capabilities + XSS. A good forum is located at http://www.owasp.org/ where you could probably apply PHP to the Top10 and it would make for a good demo, I find people are quick to apply patches and then don't study or go over what was actually done. Then again I always wished this list was kept up to date: http://www.phpadvisory.com/advisories/index.phtml Anyone know what happened to it? - Jon From pl at eskimo.com Tue Jun 10 12:33:12 2003 From: pl at eskimo.com (Peter Lehrer) Date: Tue, 10 Jun 2003 12:33:12 -0400 Subject: [nycphp-talk] multi dimension array sort? References: <200306100249.h5A2nXTH012569@parsec.nyphp.org> Message-ID: <002c01c32f6d$ff410da0$950e08d8@default> Did you try ksort? It will sort by key. --Peter Lehrer ----- Original Message ----- From: "Nestor Florez" To: "NYPHP Talk" Sent: Monday, June 09, 2003 10:49 PM Subject: [nycphp-talk] multi dimension array sort? > PHP'ers, > > I have an array multi associative array > > row[#]['empname'][dept']['ssn']['location'] > > I want display them in a list and I want theuser to click on the column name and I will sort it according to the column and then display the array. > > I have tried using uasort, asort, array_multisort and I am not able to make it work. Can anyone give me a hand on how to do than multi associative array sort. > > thanks, > > Nestor :-) > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From adam at trachtenberg.com Tue Jun 10 12:46:11 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Tue, 10 Jun 2003 12:46:11 -0400 (EDT) Subject: [nycphp-talk] latest vulnerabilities... In-Reply-To: <200306101631.h5AGUUZt035721@parsec.nyphp.org> Message-ID: On Tue, 10 Jun 2003, Jon Baer wrote: > A good forum is located at http://www.owasp.org/ where you could probably > apply PHP to the Top10 and it would make for a good demo, I find people are > quick to apply patches and then don't study or go over what was actually > done. NYPHP member Dave Sklar has actually written a short piece on how you can protect yourself against these when programming in PHP. http://www.sklar.com/page/article/owasp-top-ten -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From nestorflorez at earthlink.net Tue Jun 10 12:55:23 2003 From: nestorflorez at earthlink.net (Nestor Florez) Date: Tue, 10 Jun 2003 09:55:23 -0700 (GMT) Subject: [nycphp-talk] multi dimension array sort? Message-ID: <2010810.1055264224136.JavaMail.nobody@thecount.psp.pas.earthlink.net> I want to sort the values of the array not just the keys I am tryiung the array_multisort, without success. I will continue. Thanks, Nestor :-) -------Original Message------- From: Peter Lehrer Sent: 06/10/03 09:35 AM To: NYPHP Talk Subject: Re: [nycphp-talk] multi dimension array sort? > > Did you try ksort? It will sort by key. --Peter Lehrer ----- Original Message ----- From: "Nestor Florez" To: "NYPHP Talk" Sent: Monday, June 09, 2003 10:49 PM Subject: [nycphp-talk] multi dimension array sort? > PHP'ers, > > I have an array multi associative array > > row[#]['empname'][dept']['ssn']['location'] > > I want display them in a list and I want theuser to click on the column name and I will sort it according to the column and then display the array. > > I have tried using uasort, asort, array_multisort and I am not able to make it work. Can anyone give me a hand on how to do than multi associative array sort. > > thanks, > > Nestor :-) > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > From nestorflorez at earthlink.net Tue Jun 10 13:43:09 2003 From: nestorflorez at earthlink.net (Nestor Florez) Date: Tue, 10 Jun 2003 10:43:09 -0700 (GMT) Subject: [nycphp-talk] multi dimension array sort? Message-ID: <359437.1055267092619.JavaMail.nobody@scooter.psp.pas.earthlink.net> I was using the example in the documentation but one of them is wrong. This is the way I made it work for me. //Sort on 'Dep_Name' foreach ($rows as $val) { $sortarray[] = $val['Dept_Name']; } //this will osrt your multi associative aray by the //column heading you specified array_multisort($sortarray, $rows); Thanks for all the help, Nestor :-) From nestorflorez at earthlink.net Tue Jun 10 13:43:16 2003 From: nestorflorez at earthlink.net (Nestor Florez) Date: Tue, 10 Jun 2003 10:43:16 -0700 (GMT) Subject: [nycphp-talk] multi dimension array sort? Message-ID: <2861328.1055267103703.JavaMail.nobody@scooter.psp.pas.earthlink.net> I was using the example in the documentation but one of them is wrong. This is the way I made it work for me. //Sort on 'Dep_Name' foreach ($rows as $val) { $sortarray[] = $val['Dept_Name']; } //this will osrt your multi associative aray by the //column heading you specified array_multisort($sortarray, $rows); Thanks for all the help, Nestor :-) From pl at eskimo.com Tue Jun 10 13:55:38 2003 From: pl at eskimo.com (Peter Lehrer) Date: Tue, 10 Jun 2003 13:55:38 -0400 Subject: [nycphp-talk] mod_security References: <200306101626.h5AGQcTH034202@parsec.nyphp.org> Message-ID: <009d01c32f79$8338ec80$950e08d8@default> Dan, Is your website down? --Peter ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Tuesday, June 10, 2003 12:26 PM Subject: Re: [nycphp-talk] mod_security > Hi Chris: > > On Tue, Jun 10, 2003 at 09:50:54AM -0400, Chris Snyder wrote: > > Is anybody on the list using mod_security? Thoughts? Performance? > > http://www.modsecurity.org > > Interesting. I just took a look at the site. The documentation, which is > unfortunately only in pdf, could provide better detail on how the thing > operates. > > Sanitizing and validating input is so very important, and by the number of > items showing up on bugtraq, is too often overlooked. My Form Solution > class, http://www.analysisandsolutions.com/software/form/, helps with that > a bit. > > > > In the latest version you can > > apparently chroot the environment in which scripts are run: > > http://www.modsecurity.org/documentation/apache-internal-chroot.html > > It sounds like they're talking about chrooting Apache itself via this > module, without having to rely on chrooting via the operating system. > But, what if their module or apache gets circumvented somehow? Then the > attacker is home free. > > Enjoy, > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From jlacey at ix.netcom.com Tue Jun 10 14:21:10 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Tue, 10 Jun 2003 12:21:10 -0600 Subject: [nycphp-talk] mod_security References: <200306101627.h5AGQcVN034202@parsec.nyphp.org> Message-ID: <002a01c32f7d$127ff8e0$0200000a@Pentium700> just curious... what other formats, besides .pdf, do you prefer and why? thanks John ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Tuesday, June 10, 2003 10:26 AM Subject: Re: [nycphp-talk] mod_security Hi Chris: On Tue, Jun 10, 2003 at 09:50:54AM -0400, Chris Snyder wrote: > Is anybody on the list using mod_security? Thoughts? Performance? > http://www.modsecurity.org Interesting. I just took a look at the site. The documentation, which is unfortunately only in pdf, could provide better detail on how the thing operates. Sanitizing and validating input is so very important, and by the number of items showing up on bugtraq, is too often overlooked. My Form Solution class, http://www.analysisandsolutions.com/software/form/, helps with that a bit. > In the latest version you can > apparently chroot the environment in which scripts are run: > http://www.modsecurity.org/documentation/apache-internal-chroot.html It sounds like they're talking about chrooting Apache itself via this module, without having to rely on chrooting via the operating system. But, what if their module or apache gets circumvented somehow? Then the attacker is home free. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 --- Unsubscribe at http://nyphp.org/list/ --- From danielc at analysisandsolutions.com Tue Jun 10 14:51:40 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Tue, 10 Jun 2003 14:51:40 -0400 Subject: [nycphp-talk] mod_security In-Reply-To: <200306101757.h5AHvbR1041326@parsec.nyphp.org> References: <200306101757.h5AHvbR1041326@parsec.nyphp.org> Message-ID: <20030610185139.GA21426@panix.com> On Tue, Jun 10, 2003 at 01:57:37PM -0400, Peter Lehrer wrote: > Dan, > Is your website down? I don't think so. I just checked and it came up for me. Were you having problems? THANKS! --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From danielc at analysisandsolutions.com Tue Jun 10 14:52:35 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Tue, 10 Jun 2003 14:52:35 -0400 Subject: [nycphp-talk] mod_security In-Reply-To: <200306101821.h5AILRR1042538@parsec.nyphp.org> References: <200306101821.h5AILRR1042538@parsec.nyphp.org> Message-ID: <20030610185235.GB21426@panix.com> On Tue, Jun 10, 2003 at 02:21:27PM -0400, John Lacey wrote: > just curious... what other formats, besides .pdf, do you prefer and why? HTML. Quick, easy to use, text based. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jfreeman at amnh.org Tue Jun 10 17:44:03 2003 From: jfreeman at amnh.org (Joshua S. Freeman) Date: Tue, 10 Jun 2003 17:44:03 -0400 Subject: need help.. Message-ID: I've reached the limit of my abilities with the project I've been working on. A deadline is looming. I don't wish to fail. Is there anyone here who would be willing to help me by letting me mail them the .sql file and the .php3 file that I'm working with and walk me over the last through hurdles?... I can pay SOMETHING.. we can negotiate.. for a skilled person it shouldn't take too long.. i just need to see a couple of examples of what to do... TIA, Please let me know OFF LIST if you'd like to sign up for this hand-holding assignment... Preferably, I'd like to start this evening.. Thanks again. J. From chris at psydeshow.org Tue Jun 10 19:15:51 2003 From: chris at psydeshow.org (Chris Snyder) Date: Tue, 10 Jun 2003 19:15:51 -0400 Subject: OO - when classes are related, who gets which method? Message-ID: <3EE666A7.5080702@psydeshow.org> I've got a question for anyone who's an old hand at object-oriented programming, or for any new hands with opinions: Let's say I have a class named Object, and I want to create another class that is related to it named Related. I figure I can construct Relateds in either of two ways: $related = $object->createRelated(); or $related = new Related; $related->create(&$object); Is there a general rule of thumb that will tell me which is the better way to implement this? The first looks simpler, but something tells me the second is better form, because it keeps the creation method inside the class. chris. From tech_learner at yahoo.com Wed Jun 11 02:38:55 2003 From: tech_learner at yahoo.com (Tracy) Date: Tue, 10 Jun 2003 23:38:55 -0700 (PDT) Subject: [nycphp-talk] need help.. In-Reply-To: <200306102146.h5ALi9c3048049@parsec.nyphp.org> Message-ID: <20030611063855.73706.qmail@web14302.mail.yahoo.com> Shoot them in. if i can i'd definitely do it. i am idle at the moment. no pay plz! Tracy "Joshua S. Freeman" wrote: I've reached the limit of my abilities with the project I've been working on. A deadline is looming. I don't wish to fail. Is there anyone here who would be willing to help me by letting me mail them the .sql file and the php3 file that I'm working with and walk me over the last through hurdles?... I can pay SOMETHING.. we can negotiate.. for a skilled person it shouldn't take too long.. i just need to see a couple of examples of what to do... TIA, Please let me know OFF LIST if you'd like to sign up for this hand-holding assignment... Preferably, I'd like to start this evening.. Thanks again. J. --- Unsubscribe at http://nyphp.org/list/ --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Coming together is a beginning... keeping together is progress... working together is success !!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------- Do you Yahoo!? Free online calendar with sync to Outlook(TM). -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfreeman at amnh.org Wed Jun 11 07:57:20 2003 From: jfreeman at amnh.org (Joshua S. Freeman) Date: Wed, 11 Jun 2003 07:57:20 -0400 Subject: [nycphp-talk] need help.. In-Reply-To: <200306110639.h5B6cxQx057870@parsec.nyphp.org> Message-ID: Hey Tracy, Thanks a million. A friend of mine was working on it last night. Let me see where we're at later this morning and I'll let you know. Thanks again. J. On 6/11/03 2:38 AM, "Tracy" wrote: > > Shoot them in. if i can i'd definitely do it. i am idle at the moment. no pay > plz! > > Tracy > > "Joshua S. Freeman" wrote: > I've reached the limit of my abilities with the project I've been working > on. A deadline is looming. I don't wish to fail. Is there anyone here who > would be willing to help me by letting me mail them the .sql file and the > php3 file that I'm working with and walk me over the last through > hurdles?... I can pay SOMETHING.. we can negotiate.. for a skilled person it > shouldn't take too long.. i just need to see a couple of examples of what to > do... > > TIA, > > Please let me know OFF LIST if you'd like to sign up for this hand-holding > assignment... Preferably, I'd like to start this evening.. > > Thanks again. > > J. > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Coming together is a beginning... > keeping together is progress... > working together is success !!! > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > --------------------------------- > Do you Yahoo!? > Free online calendar with sync to Outlook(TM). > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From jfreeman at amnh.org Wed Jun 11 09:26:16 2003 From: jfreeman at amnh.org (Joshua S. Freeman) Date: Wed, 11 Jun 2003 09:26:16 -0400 Subject: quickie Message-ID: i'm using phpMyAdmin to administer my mysql database. What do i need to do so that people from outside can point their browsers to my laptop here, load a php page and see local databases that are running on my laptop in their browser? Thanks! Joshua J. From mwithington at PLMresearch.com Wed Jun 11 09:40:05 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Wed, 11 Jun 2003 09:40:05 -0400 Subject: [nycphp-talk] quickie Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3586A6215@network.PLMresearch.com> I presume you're running your laptop as a web server on your LAN? If so, other Intranet users can direct their browsers to http://YOURLAPTOPNAME/phpMyAdmin-2.2.1/index.php . You might want to look at Dadabik (www.dadabik.org), I think this is really what you'll want to use rather than phpMyAdmin. -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 http://www.PLMresearch.com Netscape/AOL/MSN IM: PLMresearch mwithington at plmresearch.com Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php -----Original Message----- From: Joshua S. Freeman [mailto:jfreeman at amnh.org] Sent: Wednesday, June 11, 2003 9:26 AM To: NYPHP Talk Subject: [nycphp-talk] quickie i'm using phpMyAdmin to administer my mysql database. What do i need to do so that people from outside can point their browsers to my laptop here, load a php page and see local databases that are running on my laptop in their browser? Thanks! Joshua J. --- Unsubscribe at http://nyphp.org/list/ --- From jfreeman at amnh.org Wed Jun 11 09:49:41 2003 From: jfreeman at amnh.org (Joshua S. Freeman) Date: Wed, 11 Jun 2003 09:49:41 -0400 Subject: [nycphp-talk] quickie In-Reply-To: <200306111340.h5BDeLQx067778@parsec.nyphp.org> Message-ID: Thanks Mark, I'm running a LAMP on my laptop on my LAN and my laptop has a fixed IP address. I want people to come in via the internet and see the php form page. The php form page pulls data out of tables in the mysql database and therefore has to be able to access the database. I hope i'm making sense here. J. On 6/11/03 9:40 AM, "Mark Withington" wrote: > I presume you're running your laptop as a web server on your LAN? If so, > other Intranet users can direct their browsers to > http://YOURLAPTOPNAME/phpMyAdmin-2.2.1/index.php . You might want to look > at Dadabik (www.dadabik.org), I think this is really what you'll want to use > rather than phpMyAdmin. > > -------------------------- > Mark L. Withington > PLMresearch > "eBusiness for the Midsize Enterprise" > PO Box 1354 > Plymouth, MA 02362 > o: 800-310-3992 > f: 508-746-4973 > v: 508-746-2383 > m: 508-801-0181 > http://www.PLMresearch.com > Netscape/AOL/MSN IM: PLMresearch > mwithington at plmresearch.com > Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc > Calendar: http://www.plmresearch.com/calendar.php > > > > -----Original Message----- > From: Joshua S. Freeman [mailto:jfreeman at amnh.org] > Sent: Wednesday, June 11, 2003 9:26 AM > To: NYPHP Talk > Subject: [nycphp-talk] quickie > > > i'm using phpMyAdmin to administer my mysql database. > > What do i need to do so that people from outside can point their browsers to > my laptop here, load a php page and see local databases that are running on > my laptop in their browser? > > Thanks! > > Joshua > > J. > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From mwithington at PLMresearch.com Wed Jun 11 09:56:38 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Wed, 11 Jun 2003 09:56:38 -0400 Subject: [nycphp-talk] quickie Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3586CFCD6@network.PLMresearch.com> If your fixed IP is on the WAN side (e.g. Internet) and not just your LAN (i.e.. 192.168.) folks can direct there browsers to http://your.ip.address.here/index.php . -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 http://www.PLMresearch.com Netscape/AOL/MSN IM: PLMresearch mwithington at plmresearch.com Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php -----Original Message----- From: Joshua S. Freeman [mailto:jfreeman at amnh.org] Sent: Wednesday, June 11, 2003 9:50 AM To: NYPHP Talk Subject: Re: [nycphp-talk] quickie Thanks Mark, I'm running a LAMP on my laptop on my LAN and my laptop has a fixed IP address. I want people to come in via the internet and see the php form page. The php form page pulls data out of tables in the mysql database and therefore has to be able to access the database. I hope i'm making sense here. J. On 6/11/03 9:40 AM, "Mark Withington" wrote: > I presume you're running your laptop as a web server on your LAN? If so, > other Intranet users can direct their browsers to > http://YOURLAPTOPNAME/phpMyAdmin-2.2.1/index.php . You might want to look > at Dadabik (www.dadabik.org), I think this is really what you'll want to use > rather than phpMyAdmin. > > -------------------------- > Mark L. Withington > PLMresearch > "eBusiness for the Midsize Enterprise" > PO Box 1354 > Plymouth, MA 02362 > o: 800-310-3992 > f: 508-746-4973 > v: 508-746-2383 > m: 508-801-0181 > http://www.PLMresearch.com > Netscape/AOL/MSN IM: PLMresearch > mwithington at plmresearch.com > Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc > Calendar: http://www.plmresearch.com/calendar.php > > > > -----Original Message----- > From: Joshua S. Freeman [mailto:jfreeman at amnh.org] > Sent: Wednesday, June 11, 2003 9:26 AM > To: NYPHP Talk > Subject: [nycphp-talk] quickie > > > i'm using phpMyAdmin to administer my mysql database. > > What do i need to do so that people from outside can point their browsers to > my laptop here, load a php page and see local databases that are running on > my laptop in their browser? > > Thanks! > > Joshua > > J. > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From jfreeman at amnh.org Wed Jun 11 09:59:58 2003 From: jfreeman at amnh.org (Joshua S. Freeman) Date: Wed, 11 Jun 2003 09:59:58 -0400 Subject: [nycphp-talk] quickie In-Reply-To: <200306111356.h5BDuhQx069485@parsec.nyphp.org> Message-ID: i thought so too.. but it's not working... ahh.. i see what the problem was... dns wierdness.. i was giving people http://my.ipaddress/... but what is working is http://fqdn/... go figure. J. On 6/11/03 9:56 AM, "Mark Withington" wrote: > If your fixed IP is on the WAN side (e.g. Internet) and not just your LAN > (i.e.. 192.168.) folks can direct there browsers to > http://your.ip.address.here/index.php . > -------------------------- > Mark L. Withington > PLMresearch > "eBusiness for the Midsize Enterprise" > PO Box 1354 > Plymouth, MA 02362 > o: 800-310-3992 > f: 508-746-4973 > v: 508-746-2383 > m: 508-801-0181 > http://www.PLMresearch.com > Netscape/AOL/MSN IM: PLMresearch > mwithington at plmresearch.com > Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc > Calendar: http://www.plmresearch.com/calendar.php > > > -----Original Message----- > From: Joshua S. Freeman [mailto:jfreeman at amnh.org] > Sent: Wednesday, June 11, 2003 9:50 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] quickie > > > Thanks Mark, > > I'm running a LAMP on my laptop on my LAN and my laptop has a fixed IP > address. I want people to come in via the internet and see the php form > page. The php form page pulls data out of tables in the mysql database and > therefore has to be able to access the database. > > I hope i'm making sense here. > > J. > > On 6/11/03 9:40 AM, "Mark Withington" wrote: > >> I presume you're running your laptop as a web server on your LAN? If so, >> other Intranet users can direct their browsers to >> http://YOURLAPTOPNAME/phpMyAdmin-2.2.1/index.php . You might want to look >> at Dadabik (www.dadabik.org), I think this is really what you'll want to > use >> rather than phpMyAdmin. >> >> -------------------------- >> Mark L. Withington >> PLMresearch >> "eBusiness for the Midsize Enterprise" >> PO Box 1354 >> Plymouth, MA 02362 >> o: 800-310-3992 >> f: 508-746-4973 >> v: 508-746-2383 >> m: 508-801-0181 >> http://www.PLMresearch.com >> Netscape/AOL/MSN IM: PLMresearch >> mwithington at plmresearch.com >> Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc >> Calendar: http://www.plmresearch.com/calendar.php >> >> >> >> -----Original Message----- >> From: Joshua S. Freeman [mailto:jfreeman at amnh.org] >> Sent: Wednesday, June 11, 2003 9:26 AM >> To: NYPHP Talk >> Subject: [nycphp-talk] quickie >> >> >> i'm using phpMyAdmin to administer my mysql database. >> >> What do i need to do so that people from outside can point their browsers > to >> my laptop here, load a php page and see local databases that are running > on >> my laptop in their browser? >> >> Thanks! >> >> Joshua >> >> J. >> >> >> >> >> >> >> >> >> >> >> > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From Pinyo.Bhulipongsanon at usa.xerox.com Wed Jun 11 10:11:18 2003 From: Pinyo.Bhulipongsanon at usa.xerox.com (Bhulipongsanon, Pinyo) Date: Wed, 11 Jun 2003 10:11:18 -0400 Subject: PLESK and Web Users Message-ID: Hello, Okay, my host offers web user account and I can set it up in PLESK. I set one up, so now I have http://www.mydomain.com/~mywebuser, but I don't know how to access it via FTP to upload. Can someone help me please? Thank you, Pinyo From bpang at bpang.com Wed Jun 11 11:00:26 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 11 Jun 2003 11:00:26 -0400 Subject: variables_order Message-ID: going back to a topic similar to the "Re: IIS: $_SERVER & referer" of mid-May A server I am using has variables_order set to "no value" when viewed with PHPINFO() Using ini_set("variables_order", "EGPCS") PHPINFO() shows the local value as being changed, yet I am unable to access any values in those arrays. Apparently ini_set is not reliable on all config settings, but I find it strange that PHPINFO() showed the modification. Am I doing something wrong or missing something else here? thanks... p.s. oddly enough, the server has register_globals ON, but no value in variables_order, but my dev box has register_globals off (as it should be) and I need to make smooth transition between the environments From zaunere at yahoo.com Wed Jun 11 11:19:45 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 11 Jun 2003 08:19:45 -0700 (PDT) Subject: [nycphp-talk] OO - when classes are related, who gets which method? In-Reply-To: <200306102316.h5ANFhXD050634@parsec.nyphp.org> Message-ID: <20030611151945.54729.qmail@web12802.mail.yahoo.com> --- Chris Snyder wrote: > I've got a question for anyone who's an old hand at object-oriented > programming, or for any new hands with opinions: That's me! (the latter) > Let's say I have a class named Object, and I want to create another > class that is related to it named Related. I figure I can construct > Relateds in either of two ways: > > $related = $object->createRelated(); > or > $related = new Related; $related->create(&$object); > > Is there a general rule of thumb that will tell me which is the better > way to implement this? > > The first looks simpler, but something tells me the second is better > form, because it keeps the creation method inside the class. But don't they do different things? The first case returns a Related object, while the second associates $object with an object of class Related. I suppose, depending on how the classes operate internally, the result could be the same, but from just reading the snippet of code, my procedural brain would assume something slightly different is happening between the two :) Oddly enough, I've been working a lot with objects, and have contemplated similar things. You're probably aware of this: http://us4.php.net/manual/en/ref.objaggregation.php but it was a new section in the manual for me (just goes to show how long it's been since I've dealt with objects :) H From zaunere at yahoo.com Wed Jun 11 11:29:35 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 11 Jun 2003 08:29:35 -0700 (PDT) Subject: [nycphp-talk] variables_order In-Reply-To: <200306111501.h5BF0aXD072819@parsec.nyphp.org> Message-ID: <20030611152935.56317.qmail@web12802.mail.yahoo.com> --- Brian Pang wrote: > going back to a topic similar to the "Re: IIS: $_SERVER & referer" of > mid-May > > A server I am using has variables_order set to "no value" when viewed > with PHPINFO() > > Using ini_set("variables_order", "EGPCS") PHPINFO() shows the local > value as being changed, yet I am unable to access any values in those > arrays. > > Apparently ini_set is not reliable on all config settings, but I find it > strange that PHPINFO() showed the modification. ini_set() generally has worked well for me, although sometimes things can't be set with it (because of the way variable initialization happens). Even though variables_order is shown as PHP_INI_ALL (http://us3.php.net/ini_set) it might be settable only in php.ini/httpd.conf/.htaccess. See if that makes a difference. H From bpang at bpang.com Wed Jun 11 11:32:48 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 11 Jun 2003 11:32:48 -0400 Subject: variables order Message-ID: Is the list set not to post to the sender? I never saw my original post... I solved my own problem... I'm using HTTP_*_VARS instead, and will inherit all the inconveniences of same but at least it works and is an easy search/replace at a later date for the $_* syntax thanks, me, Brian From bpang at bpang.com Wed Jun 11 11:36:35 2003 From: bpang at bpang.com (Brian Pang) Date: Wed, 11 Jun 2003 11:36:35 -0400 Subject: [nycphp-talk] variables_order Message-ID: Thanks, Hans. that look like: php_value variables_order EGPCS in the .htaccess file? from example on php.net manual page, I rtfm :) > > --- Brian Pang wrote: > > going back to a topic similar to the "Re: IIS: $_SERVER & referer" of > > mid-May > > > > A server I am using has variables_order set to "no value" when viewed > > with PHPINFO() > > > > Using ini_set("variables_order", "EGPCS") PHPINFO() shows the local > > value as being changed, yet I am unable to access any values in those > > arrays. > > > > Apparently ini_set is not reliable on all config settings, but I find it > > strange that PHPINFO() showed the modification. > > ini_set() generally has worked well for me, although sometimes things can't > be set with it (because of the way variable initialization happens). Even > though variables_order is shown as PHP_INI_ALL (http://us3.php.net/ini_set) > it might be settable only in php.ini/httpd.conf/.htaccess. See if that makes > a difference. > > H > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > > From chris at psydeshow.org Wed Jun 11 12:13:42 2003 From: chris at psydeshow.org (Chris Snyder) Date: Wed, 11 Jun 2003 12:13:42 -0400 Subject: [nycphp-talk] OO - when classes are related, who gets which method? In-Reply-To: <200306111520.h5BFJnYJ073938@parsec.nyphp.org> References: <200306111520.h5BFJnYJ073938@parsec.nyphp.org> Message-ID: <3EE75536.9050604@psydeshow.org> Hans Zaunere wrote: >>$related = $object->createRelated(); >>or >>$related = new Related; $related->create(&$object); >> >But don't they do different things? The first case returns a Related object, >while the second associates $object with an object of class Related. > Yep, they do the same thing, because every Related is associated with an Object. I decided to go with my gut and develop $related->create(&$object) because I figure that makes the class more portable. With a little more thought it made sense. In this case, Objects don't care how to create Relateds-- it's really none of their business. :-) Thanks Hans! From dan at dwc.to Wed Jun 11 12:38:51 2003 From: dan at dwc.to (Dan Horning) Date: Wed, 11 Jun 2003 12:38:51 -0400 Subject: [nycphp-talk] PLESK and Web Users In-Reply-To: <200306111413.h5BEDJSd071371@parsec.nyphp.org> Message-ID: <000201c33037$f28801c0$211d9942@dwchome> When you login via ftp as the user you created the only webspace you can see is what would be http://www.mydomain.com/~mywebuser So say ftp://domain.com/ Path = / Username = mywebuser If you need more than that feel free to email more -dan >From the Desk of Dan Horning find out what it means to be only limited by imagination at Dsoundmn's Web Creations PO Box 109, Clifton Park, NY 12065-0109 --------------------------------------------------------------- Online: dsoundmn (AIM / Yahoo) dan at dwc.to (MSN) 14308614 (ICQ) > -----Original Message----- > From: Bhulipongsanon, Pinyo > [mailto:Pinyo.Bhulipongsanon at usa.xerox.com] > Sent: Wednesday, June 11, 2003 10:13 AM > To: NYPHP Talk > Subject: [nycphp-talk] PLESK and Web Users > > > Hello, > > Okay, my host offers web user account and I can set it up in > PLESK. I set one up, so now I have > http://www.mydomain.com/~mywebuser, but I > don't know how to > access it via FTP to upload. Can someone help me please? > > Thank you, > Pinyo > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From Pinyo.Bhulipongsanon at usa.xerox.com Wed Jun 11 12:48:11 2003 From: Pinyo.Bhulipongsanon at usa.xerox.com (Bhulipongsanon, Pinyo) Date: Wed, 11 Jun 2003 12:48:11 -0400 Subject: [nycphp-talk] PLESK and Web Users Message-ID: Thanks. I will give that a try. -----Original Message----- From: Dan Horning [mailto:dan at dwc.to] Sent: Wednesday, June 11, 2003 12:39 PM To: NYPHP Talk Subject: RE: [nycphp-talk] PLESK and Web Users When you login via ftp as the user you created the only webspace you can see is what would be http://www.mydomain.com/~mywebuser So say ftp://domain.com/ Path = / Username = mywebuser If you need more than that feel free to email more -dan >From the Desk of Dan Horning find out what it means to be only limited by imagination at Dsoundmn's Web Creations PO Box 109, Clifton Park, NY 12065-0109 --------------------------------------------------------------- Online: dsoundmn (AIM / Yahoo) dan at dwc.to (MSN) 14308614 (ICQ) > -----Original Message----- > From: Bhulipongsanon, Pinyo > [mailto:Pinyo.Bhulipongsanon at usa.xerox.com] > Sent: Wednesday, June 11, 2003 10:13 AM > To: NYPHP Talk > Subject: [nycphp-talk] PLESK and Web Users > > > Hello, > > Okay, my host offers web user account and I can set it up in > PLESK. I set one up, so now I have > http://www.mydomain.com/~mywebuser, but I > don't know how to > access it via FTP to upload. Can someone help me please? > > Thank you, > Pinyo > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From David.SextonJr at ubs.com Wed Jun 11 13:23:02 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Wed, 11 Jun 2003 13:23:02 -0400 Subject: mktime Message-ID: <18D7B8CAA5284F478470828806DB124603789E75@psle01.xchg.pwj.com> Hi all, I've run into an issue. Supposedly the mktime function will return a UNIX timestamp while factoring in the timezone offset on the host machine (I assume this because there is a gmmktime function as well for passing GMT dates). Anyways, I have written a function that calculates trade dates. I am currently reproducing the function in VB, and I noticed that the timestamp returned by PHP's mktime function is 5 hours ahead of the timestamp returned in VB. The other thing is that I then use the PHP date function to create a formatted date using the UNIX timestamp returned by mktime. This date seems to be correct, and the function is working as designed. So my second question is: If mktime is not factoring the time zone offset on my host, is the date function compensating for it and returning the correct trade date? Anyone have any insight? Thanks! ============================== Here's some code: PHP sample: $month = 12; $day = 26; $year = 2003; $hours = 17; $minutes = 0; $secval = mktime(intval($hours),intval($minutes),0,intval($month),intval($day),intval( $year)); PRINT $secval; //----->(Returns 1072476000) ============================== VB sample month = 12 day = 26 year = 2003 hours = 17 minutes = 0 strDateFormat = month & "/" & day & "/" & year & " " & hours & ":" & minutes secval = DateDiff("s", "1/1/1970", strDateFormat) MsgBox secval '----->(Returns 1072458000) **************************************************************************** Please do not transmit orders and/or instructions regarding a UBS Financial Services Inc. or UBS International Inc. account by email. Unfortunately, orders and/or instructions transmitted by email cannot be accepted by UBS Financial Services Inc. or UBS International Inc., and UBS Financial Inc., and UBS International Inc. will not be responsible for carrying out such orders and/or instructions. Please speak directly with a UBS representative to place an order. ************************************************************************ For your protection, do not include account numbers, social security numbers, credit card numbers, passwords, or other non-public information in your email. ************************************************************************ The information provided in this email or any attachments is not an official transaction confirmation or account statement. The only official confirmation of a transaction will be sent to you via regular mail or be posted online for your viewing if you have an Online Services account. ************************************************************************ UBS Financial Services Inc. and UBS International Inc. reserve the right to monitor and review the content of all email communications sent or received by employees. ************************************************************************ The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify UBS immediately by replying to the message and deleting it from your computer. Thank you. From coling at macmicro.com Wed Jun 11 14:34:53 2003 From: coling at macmicro.com (Colin Goldberg) Date: Wed, 11 Jun 2003 14:34:53 -0400 Subject: [nycphp-talk] mktime In-Reply-To: <200306111723.h5BHNAVx081153@parsec.nyphp.org> Message-ID: <5.2.0.9.0.20030611143330.023c9720@mail.macmicro.com> If you are in the NY timezone, Eastern Time is GMT-5 (not considering Daylight Savings). Colin Goldberg At 01:23 PM 6/11/03 -0400, you wrote: >Hi all, > >I've run into an issue. Supposedly the mktime function will return a UNIX >timestamp while factoring in the timezone offset on the host machine (I >assume this because there is a gmmktime function as well for passing GMT >dates). > >Anyways, I have written a function that calculates trade dates. I am >currently reproducing the function in VB, and I noticed that the timestamp >returned by PHP's mktime function is 5 hours ahead of the timestamp returned >in VB. > >The other thing is that I then use the PHP date function to create a >formatted date using the UNIX timestamp returned by mktime. This date seems >to be correct, and the function is working as designed. So my second >question is: If mktime is not factoring the time zone offset on my host, is >the date function compensating for it and returning the correct trade date? > >Anyone have any insight? Thanks! >============================== >Here's some code: > >PHP sample: > >$month = 12; >$day = 26; >$year = 2003; >$hours = 17; >$minutes = 0; > >$secval = >mktime(intval($hours),intval($minutes),0,intval($month),intval($day),intval( >$year)); > >PRINT $secval; //----->(Returns 1072476000) >============================== >VB sample > >month = 12 >day = 26 >year = 2003 >hours = 17 >minutes = 0 > >strDateFormat = month & "/" & day & "/" & year & " " & hours & ":" & minutes >secval = DateDiff("s", "1/1/1970", strDateFormat) > >MsgBox secval '----->(Returns 1072458000) > > >**************************************************************************** > >Please do not transmit orders and/or instructions regarding a UBS Financial >Services Inc. or UBS International Inc. account by email. Unfortunately, >orders and/or instructions transmitted by email cannot be accepted by UBS >Financial Services Inc. or UBS International Inc., and UBS Financial Inc., >and UBS International Inc. will not be responsible for carrying out such >orders and/or instructions. Please speak directly with a UBS representative >to place an order. > >************************************************************************ > >For your protection, do not include account numbers, social security >numbers, credit card numbers, passwords, or other non-public information in >your email. > >************************************************************************ > >The information provided in this email or any attachments is not an official >transaction confirmation or account statement. The only official >confirmation of a transaction will be sent to you via regular mail or be >posted online for your viewing if you have an Online Services account. > >************************************************************************ > >UBS Financial Services Inc. and UBS International Inc. reserve the right to >monitor and review the content of all email communications sent or received >by employees. > >************************************************************************ > >The information contained in this message may be privileged and confidential >and protected from disclosure. If the reader of this message is not the >intended recipient, or an employee or agent responsible for delivering this >message to the intended recipient, you are hereby notified that any >dissemination, distribution or copying of this communication is strictly >prohibited. If you have received this communication in error, please notify >UBS immediately by replying to the message and deleting it from your >computer. Thank you. > > > > >--- Unsubscribe at http://nyphp.org/list/ --- From zaunere at yahoo.com Wed Jun 11 14:55:41 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Wed, 11 Jun 2003 11:55:41 -0700 (PDT) Subject: [nycphp-talk] mktime In-Reply-To: <200306111724.h5BHNAXD081153@parsec.nyphp.org> Message-ID: <20030611185541.63209.qmail@web12807.mail.yahoo.com> --- "Sexton, David" wrote: > Hi all, > > I've run into an issue. Supposedly the mktime function will return a UNIX > timestamp while factoring in the timezone offset on the host machine (I > assume this because there is a gmmktime function as well for passing GMT > dates). Note that factoring of the timezone concerns the date *given* and not the timestamp returned. UNIX timestamps have no timezone. > Anyways, I have written a function that calculates trade dates. I am > currently reproducing the function in VB, and I noticed that the timestamp > returned by PHP's mktime function is 5 hours ahead of the timestamp > returned in VB. As it should be, I believe. VB is probably in the wrong here, and returns a timestamp that is offset by your timezone. Nevertheless, VB's version of the date() function probably expects this behavior, and so usually there aren't any problems. ( note that NY is of course -0200 ) > The other thing is that I then use the PHP date function to create a > formatted date using the UNIX timestamp returned by mktime. This date seems > to be correct, and the function is working as designed. So my second > question is: If mktime is not factoring the time zone offset on my host, is > the date function compensating for it and returning the correct trade date? Exactly. That's the great thing about UNIX timestamps - they aren't timezone specific, and so timezone adjustments are done only when creating a human readable date and time. Plus, heck, VB is on Windows, how could you expect it to handle UNIX timestamps correctly :) Just out of curiosity, is PHP running on Windows or a UNIX flavor during these tests? H From David.SextonJr at ubs.com Wed Jun 11 15:55:52 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Wed, 11 Jun 2003 15:55:52 -0400 Subject: mktime Message-ID: <18D7B8CAA5284F478470828806DB124603789E78@psle01.xchg.pwj.com> Exactly. That's the great thing about UNIX timestamps - they aren't timezone specific, and so timezone adjustments are done only when creating a human readable date and time. Plus, heck, VB is on Windows, how could you expect it to handle UNIX timestamps correctly :) Just out of curiosity, is PHP running on Windows or a UNIX flavor during these tests? ======= Thanks Hans! That makes more sense now. These tests were performed on Windows. **************************************************************************** Please do not transmit orders and/or instructions regarding a UBS Financial Services Inc. or UBS International Inc. account by email. Unfortunately, orders and/or instructions transmitted by email cannot be accepted by UBS Financial Services Inc. or UBS International Inc., and UBS Financial Inc., and UBS International Inc. will not be responsible for carrying out such orders and/or instructions. Please speak directly with a UBS representative to place an order. ************************************************************************ For your protection, do not include account numbers, social security numbers, credit card numbers, passwords, or other non-public information in your email. ************************************************************************ The information provided in this email or any attachments is not an official transaction confirmation or account statement. The only official confirmation of a transaction will be sent to you via regular mail or be posted online for your viewing if you have an Online Services account. ************************************************************************ UBS Financial Services Inc. and UBS International Inc. reserve the right to monitor and review the content of all email communications sent or received by employees. ************************************************************************ The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify UBS immediately by replying to the message and deleting it from your computer. Thank you. From anthony at emr.net Wed Jun 11 16:20:29 2003 From: anthony at emr.net (Anthony Tanzola) Date: Wed, 11 Jun 2003 13:20:29 -0700 Subject: Error connecting to Access using asp Message-ID: Hey List! Has anyone come across this error: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'SOFTWARE\\ODBC\\Brazos volatile counter'. I am receiving the error when trying to query an access database using an dns-less connection in asp. The web server is IIS 5. Any help would be appreciated! Anthony Tanzola EMR Data Services Phone: 623.581.2875 Fax: 623.582.5499 anthony at emr.net EMR Internet A Serious Internet Experience ** 56K Dial-up ** DSL ** Web-hosting ** ** Co-location ** T1s ** ISDN ** ** High-Speed Fiber Backbone ** Linux powered ** ** Support for all Windows & Linux platforms ** ** Custom Web Design ** Site Development ** ** Search Engine Placement & Web Consultation ** **** Visit us at http://www.emr.net! **** Ask about our reseller programs! From anthony at tanzola.com Wed Jun 11 16:27:13 2003 From: anthony at tanzola.com (Anthony Tanzola) Date: Wed, 11 Jun 2003 13:27:13 -0700 Subject: [nycphp-talk] Error connecting to Access using asp In-Reply-To: <200306112017.h5BKGfZX086947@parsec.nyphp.org> Message-ID: Hey Sorry! Sent this to the wrong list. Meant to send it to the NYAccessVB list. Please ignore this. >-----Original Message----- >From: Anthony Tanzola [mailto:anthony at emr.net] >Sent: Wednesday, June 11, 2003 1:17 PM >To: NYPHP Talk >Subject: [nycphp-talk] Error connecting to Access using asp > > >Hey List! > >Has anyone come across this error: > >Microsoft OLE DB Provider for ODBC Drivers error '80004005' > >[Microsoft][ODBC Microsoft Access Driver]General error Unable to open >registry key 'SOFTWARE\\ODBC\\Brazos volatile counter'. > >I am receiving the error when trying to query an access database using an >dns-less connection in asp. The web server is IIS 5. > > >Any help would be appreciated! > >Anthony Tanzola >EMR Data Services >Phone: 623.581.2875 >Fax: 623.582.5499 >anthony at emr.net > > > EMR Internet > A Serious Internet Experience > > >** 56K Dial-up ** DSL ** Web-hosting ** >** Co-location ** T1s ** ISDN ** >** High-Speed Fiber Backbone ** Linux powered ** >** Support for all Windows & Linux platforms ** >** Custom Web Design ** Site Development ** >** Search Engine Placement & Web Consultation ** >**** Visit us at http://www.emr.net! **** > > >Ask about our reseller programs! > > > >--- Unsubscribe at http://nyphp.org/list/ --- > > > > From soazine at pop.mail.rcn.net Wed Jun 11 19:19:53 2003 From: soazine at pop.mail.rcn.net (soazine@pop.erols.com) Date: Wed, 11 Jun 2003 19:19:53 -0400 Subject: Help trying to put email address into filename Message-ID: <157240-220036311231953973@M2W085.mail2web.com> Weird but necessary request.. I have to put an email address into a filename. Here is my code that I THOUGHT would do so: foreach (array('.', '_') as $key => $val) { $safeEmail = preg_replace("/\\\\$val/e", '%' . ord($val), $email); // YOU HAVE TO REPLACE . AND _ WITH ASCII NUMBERS } This, however, breaks nastily: Parse error: parse error in /users/ppowell/web/repository.php(89) : regexp code on line 1 Fatal error: Failed evaluating code: @m? in /users/ppowell/web/repository.php on line 89 Any ideas, anyone? Thanx Phil -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . From jfreeman at amnh.org Wed Jun 11 22:17:14 2003 From: jfreeman at amnh.org (Joshua S. Freeman) Date: Wed, 11 Jun 2003 22:17:14 -0400 Subject: images into database Message-ID: can someone please provide the correct information on how to write an insert that does this: I have a form, included in the form is this: for submitting an image... basically, i need php code that will take the image, put it into a directory on my filesystem and then put a link of some kind in the right field in my main table in my database so that we can find the image again... Any ideas? TIA! J. From mwithington at PLMresearch.com Wed Jun 11 22:23:56 2003 From: mwithington at PLMresearch.com (Mark Withington) Date: Wed, 11 Jun 2003 22:23:56 -0400 Subject: [nycphp-talk] images into database Message-ID: <1F3CD8DDFB6A9B4C9B8DD06E4A7DE3586CFD13@network.PLMresearch.com> Joshua, If you haven't already done so, I _strongly_ suggest looking at Dadabik (www.dadabik.org). Seems like you might be reinventing the wheel. -------------------------- Mark L. Withington PLMresearch "eBusiness for the Midsize Enterprise" PO Box 1354 Plymouth, MA 02362 o: 800-310-3992 f: 508-746-4973 v: 508-746-2383 m: 508-801-0181 http://www.PLMresearch.com Netscape/AOL/MSN IM: PLMresearch mwithington at plmresearch.com Public Key: http://www.PLMresearch.com/html/MLW_public_key.asc Calendar: http://www.plmresearch.com/calendar.php -----Original Message----- From: Joshua S. Freeman [mailto:jfreeman at amnh.org] Sent: Wednesday, June 11, 2003 10:17 PM To: NYPHP Talk Subject: [nycphp-talk] images into database can someone please provide the correct information on how to write an insert that does this: I have a form, included in the form is this: for submitting an image... basically, i need php code that will take the image, put it into a directory on my filesystem and then put a link of some kind in the right field in my main table in my database so that we can find the image again... Any ideas? TIA! J. --- Unsubscribe at http://nyphp.org/list/ --- From jfreeman at amnh.org Wed Jun 11 22:38:34 2003 From: jfreeman at amnh.org (Joshua S. Freeman) Date: Wed, 11 Jun 2003 22:38:34 -0400 Subject: [nycphp-talk] images into database In-Reply-To: <200306120224.h5C2O0Qx095549@parsec.nyphp.org> Message-ID: thanks Mark, I'll definitely check out dadabik when I have more time... it looks very interesting on first inspection... The problem is that I'm on the tail end of this project.. this is the last part of the insert activity I have to work out... so.. hopefully, someone here has something I can use to get started (or finished)... :-) J. On 6/11/03 10:24 PM, "Mark Withington" wrote: > www.dadabik.org) From sailer at bnl.gov Wed Jun 11 23:32:11 2003 From: sailer at bnl.gov (Tim Sailer) Date: Wed, 11 Jun 2003 23:32:11 -0400 Subject: [nycphp-talk] images into database In-Reply-To: <200306120238.h5C2ceRj096447@parsec.nyphp.org> References: <200306120238.h5C2ceRj096447@parsec.nyphp.org> Message-ID: <20030612033211.GA26068@bnl.gov> >From the php site: http://us3.php.net/manual/en/features.file-upload.php If you want some examples of actually writing the images into the database, take a look at the mail archives on liphp.org. I posted some sample code there a while back. Tim On Wed, Jun 11, 2003 at 10:38:40PM -0400, Joshua S. Freeman wrote: > thanks Mark, > > I'll definitely check out dadabik when I have more time... it looks very > interesting on first inspection... The problem is that I'm on the tail end > of this project.. this is the last part of the insert activity I have to > work out... so.. hopefully, someone here has something I can use to get > started (or finished)... > > :-) > > J. > > On 6/11/03 10:24 PM, "Mark Withington" wrote: > > > www.dadabik.org) > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > -- Tim Sailer Brookhaven National Laboratory (631) 344-3001 From as867 at columbia.edu Thu Jun 12 01:33:10 2003 From: as867 at columbia.edu (Sicular, Alexander) Date: Thu, 12 Jun 2003 01:33:10 -0400 Subject: [nycphp-talk] images into database Message-ID: <526804E77BD5324DA6A026378FD5A73EB471AC@exchange2k.neuro.columbia.edu> Phpbuilder.com has an article on this. With code. Gl, alex -----Original Message----- From: Joshua S. Freeman [mailto:jfreeman at amnh.org] Sent: Wednesday, June 11, 2003 10:17 PM To: NYPHP Talk Subject: [nycphp-talk] images into database can someone please provide the correct information on how to write an insert that does this: I have a form, included in the form is this: for submitting an image... basically, i need php code that will take the image, put it into a directory on my filesystem and then put a link of some kind in the right field in my main table in my database so that we can find the image again... Any ideas? TIA! J. --- Unsubscribe at http://nyphp.org/list/ --- ----------------------------------- This transmission is confidential and intended solely for the person or organization to whom it is addressed. It may contain privileged and confidential information. If you are not the intended recipient, you should not copy, distribute or take any action in reliance on it. If you believe you received this transmission in error, please notify the sender. -------------------------------- From danielc at analysisandsolutions.com Thu Jun 12 02:39:42 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 12 Jun 2003 02:39:42 -0400 Subject: [nycphp-talk] Help trying to put email address into filename In-Reply-To: <200306112318.h5BNISR1091352@parsec.nyphp.org> References: <200306112318.h5BNISR1091352@parsec.nyphp.org> Message-ID: <20030612063942.GA4054@panix.com> Phil: On Wed, Jun 11, 2003 at 07:18:28PM -0400, soazine at pop.erols.com wrote: > > foreach (array('.', '_') as $key => $val) { > $safeEmail = preg_replace("/\\\\$val/e", '%' . ord($val), $email); // YOU > HAVE TO REPLACE . AND _ WITH ASCII NUMBERS > } I'm guessing the parse error is due to misusing the "e" modifier. But, forget about that, since there are a bunch of other things awry here... On a minor point, you don't need the $key, since you don't really care about the key. You'd just need this: foreach (array('.', '_') as $val) { But, your approach is flawed, since you reassign the output to $safeEmail from $email, $safeEmail will only have the replacements for the last element in the input array. You'd need to use $email as both input and output for this approach to work. Finally, a simpler way to do what you're trying to do is via strtr(). For efficiency sake, I reused $email. $repl = array( '.' => '%46', '_' => '%95' ); $email = strtr($email, $repl); --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From tech_learner at yahoo.com Thu Jun 12 02:44:43 2003 From: tech_learner at yahoo.com (Tracy) Date: Wed, 11 Jun 2003 23:44:43 -0700 (PDT) Subject: [nycphp-talk] images into database In-Reply-To: <200306120218.h5C2HOc7094722@parsec.nyphp.org> Message-ID: <20030612064443.65192.qmail@web14302.mail.yahoo.com> Hi, u;d need to modify some lines accordingly. this was enough for my work... Tracy "Joshua S. Freeman" wrote: can someone please provide the correct information on how to write an insert that does this: I have a form, included in the form is this: [input] enctype="multipart-form-data"> for submitting an image... basically, i need php code that will take the image, put it into a directory on my filesystem and then put a link of some kind in the right field in my main table in my database so that we can find the image again... Any ideas? TIA! J. --- Unsubscribe at http://nyphp.org/list/ --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Coming together is a beginning... keeping together is progress... working together is success !!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------- Do you Yahoo!? Free online calendar with sync to Outlook(TM). -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: images.zip Type: application/x-zip-compressed Size: 3334 bytes Desc: images.zip URL: From alfonso at ruboskizo.com Thu Jun 12 07:03:38 2003 From: alfonso at ruboskizo.com (=?iso-8859-1?Q?Alfonso_S=E1nchez-Paus_D=EDaz?=) Date: Thu, 12 Jun 2003 13:03:38 +0200 Subject: [nycphp-talk] images into database References: <200306120218.h5C2HOYh094722@parsec.nyphp.org> Message-ID: <002801c330d2$476d32b0$0900a8c0@pablo> Oki dokim so i am going to post here to very nice filers that i have used for a long time for uploading, saving and storing the images in the database. Hope it works out for you... First one: do_upload.php. This one puts the file on your server: //-------------------------------------------------------------------------- ------------------------------------------- 496000) return "Error

Atenci?n: Debes seleccionar un fichero menor de 496Kb.

volver

"; else{ //$realname = str_replace("\\ ","_",$realname); $realname = str_replace(" ","_",$realname); copy($HTTP_POST_FILES['img1']['tmp_name'],$dir.$realname); $tipo_foto = GetImageSize($dir.$realname); if( $tipo_foto[2] != 2){ unlink($dir.$realname); return "Error

Warning: You must select a picture in JPEG format.

volver

"; }else{ @chmod($dir.$realname,0777); return "Success

You sent: ".$realname.", with".$filesize." bytes.

Close window

"; } } } else { return "Error

Warning: You must select a file.

back

"; } } ?> Fotos Enviadas

SELECT FILE

//-------------------------------------------------------------------------- ------------------------------------------- Second file that you need: select_file.php (I use it as a pop-up window) //-------------------------------------------------------------------------- ------------------------------------------- Upload your poictures

SELECT FILE

//-------------------------------------------------------------------------- ------------------------------------------- So here is how it works: You pass the position on a form of the text input where you are going to load the image (the select_file.php will fill the form in that position with the name of the uploaded file). You can have a button next to the text input saying "Send file...", this should have an onClick event that would open the select_file.php window. Remember to pass the position of the picture input text where you want the name of the picture to be filled. You can look at how this works in : http://www.fotosprivadas.com/formulario.php It is spanish sorry, but you can see the fundamentals of this. Once you upload the files, you can save the data on your database when you submit your form. Regards, Alfie From daniel at nyphp.org Thu Jun 12 09:30:21 2003 From: daniel at nyphp.org (Daniel Kushner) Date: Thu, 12 Jun 2003 09:30:21 -0400 Subject: New JSR Reinforces PHP's Importance For Web Development Message-ID: Good morning NYC, Some interesting news: http://www.zend.com/news/pr.php?id=63 Have a good one, Daniel Kushner Vice President, New York PHP http://nyphp.org/ daniel at nyphp.org From chalu at egenius.com Thu Jun 12 08:28:15 2003 From: chalu at egenius.com (Chalu Kim) Date: Thu, 12 Jun 2003 08:28:15 -0400 (EDT) Subject: [nycphp-talk] New JSR Reinforces PHP's Importance For Web Development In-Reply-To: <200306121332.h5CDW6Sr012746@parsec.nyphp.org> Message-ID: Where is Zend going with all these? Little late would you say? I suppose interop is a good thing now. On Thu, 12 Jun 2003, Daniel Kushner wrote: > Good morning NYC, > > Some interesting news: > http://www.zend.com/news/pr.php?id=63 > > Have a good one, > Daniel Kushner > Vice President, New York PHP > http://nyphp.org/ > daniel at nyphp.org > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > -- Chalu Kim egenius inc, tech co-perative, 20 Jay Street, 1002, brooklyn, new york, 11201, usa (718) 858-0142, (718) 858-2434 fax http://www.egenius.com http://www.pacificoutdoor.org "trips with twists" From daniel at nyphp.org Thu Jun 12 09:44:53 2003 From: daniel at nyphp.org (Daniel Kushner) Date: Thu, 12 Jun 2003 09:44:53 -0400 Subject: [nycphp-talk] New JSR Reinforces PHP's Importance For Web Development In-Reply-To: <200306121340.h5CDd2b5013577@parsec.nyphp.org> Message-ID: > Where is Zend going with all these? ? what ? > Little late would you say? why? > I suppose interop is a good thing now. you do? :) --Daniel From jonbaer at jonbaer.net Thu Jun 12 10:35:57 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Thu, 12 Jun 2003 07:35:57 -0700 Subject: [nycphp-talk] New JSR Reinforces PHP's Importance For Web Development References: <200306121332.h5CDW6VX012746@parsec.nyphp.org> Message-ID: <002901c330ef$f0a8b0d0$6400a8c0@FlipWilson> Great ... knowing how fast JSR's work we should see PHP 5.0 by late next year ... :-\\ - Jon ----- Original Message ----- From: "Daniel Kushner" To: "NYPHP Talk" Sent: Thursday, June 12, 2003 6:32 AM Subject: [nycphp-talk] New JSR Reinforces PHP's Importance For Web Development > Good morning NYC, > > Some interesting news: > http://www.zend.com/news/pr.php?id=63 > > Have a good one, > Daniel Kushner > Vice President, New York PHP > http://nyphp.org/ > daniel at nyphp.org > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From palexanderbalogh at yahoo.com Thu Jun 12 11:40:56 2003 From: palexanderbalogh at yahoo.com (Peter Balogh) Date: Thu, 12 Jun 2003 08:40:56 -0700 (PDT) Subject: Something better than session variables? In-Reply-To: <200306120645.h5C6imc1003352@parsec.nyphp.org> Message-ID: <20030612154056.15583.qmail@web40305.mail.yahoo.com> Hello all-- We have multiple users accessing a big tree of data that's very expensive to calculate each time. Ideally, it would be great to have the tree drawn once and then have all the other users access it as though it were a global SESSION variable visible to all users. First of all, is there such a thing as a SESSION variable that's visible to all? And then, to send the pie even further into the sky, is there a way to have a SESSION variable that's held in RAM instead of written to a flat file? (Yes, I'm getting greedy in terms of speeding things up.) Any information and/or links would be very appreciated. Thanks, Peter __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com From markert at optonline.net Thu Jun 12 12:19:40 2003 From: markert at optonline.net (John W. Markert) Date: Thu, 12 Jun 2003 12:19:40 -0400 Subject: [nycphp-talk] Something better than session variables? References: <200306121542.h5CFf0Xl018017@parsec.nyphp.org> Message-ID: <005601c330fe$6db94270$0200a8c0@dads> Microsoft's IIS has Application Variables which, if I recall correctly, are specific to an application. Here are 2 links which may be of help. The first covers Application variables in an IIS environment; the second covers how someone converted an IIS applicaion to a PHP environment. Hope this is useful. ----- Original Message ----- From: "Peter Balogh" To: "NYPHP Talk" Sent: Thursday, June 12, 2003 11:41 AM Subject: [nycphp-talk] Something better than session variables? > Hello all-- > > We have multiple users accessing a big tree of data that's very > expensive to calculate each time. Ideally, it would be great to have > the tree drawn once and then have all the other users access it as > though it were a global SESSION variable visible to all users. > > First of all, is there such a thing as a SESSION variable that's > visible to all? > > And then, to send the pie even further into the sky, is there a way to > have a SESSION variable that's held in RAM instead of written to a flat > file? (Yes, I'm getting greedy in terms of speeding things up.) > > Any information and/or links would be very appreciated. > > Thanks, > > Peter > > __________________________________ > Do you Yahoo!? > Yahoo! Calendar - Free online calendar with sync to Outlook(TM). > http://calendar.yahoo.com > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From markert at optonline.net Thu Jun 12 12:21:33 2003 From: markert at optonline.net (John W. Markert) Date: Thu, 12 Jun 2003 12:21:33 -0400 Subject: [nycphp-talk] Something better than session variables? Message-ID: <005f01c330fe$b0d6f610$0200a8c0@dads> Sorry..forgot the links... http://coveryourasp.com/Application.asp http://www.leosolutions.com/resources/phpapp/ ----- Original Message ----- From: "John W. Markert" To: Sent: Thursday, June 12, 2003 12:19 PM Subject: Re: [nycphp-talk] Something better than session variables? > Microsoft's IIS has Application Variables which, if I recall correctly, are > specific to an application. Here are 2 links which may be of help. > The first covers Application variables in an IIS environment; the second > covers how someone converted an IIS applicaion to a PHP environment. Hope > this is useful. > > > ----- Original Message ----- > From: "Peter Balogh" > To: "NYPHP Talk" > Sent: Thursday, June 12, 2003 11:41 AM > Subject: [nycphp-talk] Something better than session variables? > > > > Hello all-- > > > > We have multiple users accessing a big tree of data that's very > > expensive to calculate each time. Ideally, it would be great to have > > the tree drawn once and then have all the other users access it as > > though it were a global SESSION variable visible to all users. > > > > First of all, is there such a thing as a SESSION variable that's > > visible to all? > > > > And then, to send the pie even further into the sky, is there a way to > > have a SESSION variable that's held in RAM instead of written to a flat > > file? (Yes, I'm getting greedy in terms of speeding things up.) > > > > Any information and/or links would be very appreciated. > > > > Thanks, > > > > Peter > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! Calendar - Free online calendar with sync to Outlook(TM). > > http://calendar.yahoo.com > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > > > From jsiegel1 at optonline.net Thu Jun 12 12:45:41 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 12 Jun 2003 12:45:41 -0400 Subject: Advice on shopping cart and U.P.S. Message-ID: <006001c33102$102483f0$6501a8c0@EZDSDELL> I have to price out a project that requires a shopping cart and a tie-in to United Parcel Service. I'm hoping that people can make some recommendations based on your experience. TIA, Jeff From ttoomey at ydnt.com Thu Jun 12 14:49:13 2003 From: ttoomey at ydnt.com (Tim Toomey) Date: Thu, 12 Jun 2003 11:49:13 -0700 Subject: [nycphp-talk] Advice on shopping cart and U.P.S. References: <200306121647.h5CGkDcR021426@parsec.nyphp.org> Message-ID: <001f01c33113$55485810$8b00a8c0@timmerslaptop> http://www.oscommerce.com An open-source phop shopping cart that I was thinking about using for a future project as well. It's free and updated quite often. This is only if you're not looking to code the entire thing yourself. It has pricing options for UPS built into it as well as a bunch of other neat features. -timmers ----- Original Message ----- From: "Jeff" To: "NYPHP Talk" Sent: Thursday, June 12, 2003 9:46 AM Subject: [nycphp-talk] Advice on shopping cart and U.P.S. > I have to price out a project that requires a shopping cart and a tie-in > to United Parcel Service. I'm hoping that people can make some > recommendations based on your experience. > > TIA, > > Jeff > > > > --- Unsubscribe at http://nyphp.org/list/ --- > From palexanderbalogh at yahoo.com Thu Jun 12 13:28:21 2003 From: palexanderbalogh at yahoo.com (Peter Balogh) Date: Thu, 12 Jun 2003 10:28:21 -0700 (PDT) Subject: [nycphp-talk] Something better than session variables? In-Reply-To: <200306121622.h5CGLxc1020319@parsec.nyphp.org> Message-ID: <20030612172821.11197.qmail@web40303.mail.yahoo.com> John: This is extremely helpful. Thanks! The only nagging doubt I have is whether a serialized variable stored in flat file format is going to incur a major performance hit if it happens to be, say, an enormous associative array. But then, that's another issue entirely--and the performance can't really be any worse than we're currently getting from thousands of database calls... Thanks again, Peter --- "John W. Markert" wrote: > Sorry..forgot the links... > > http://coveryourasp.com/Application.asp > > http://www.leosolutions.com/resources/phpapp/ > > ----- Original Message ----- > From: "John W. Markert" > To: > Sent: Thursday, June 12, 2003 12:19 PM > Subject: Re: [nycphp-talk] Something better than session variables? > > > > Microsoft's IIS has Application Variables which, if I recall > correctly, > are > > specific to an application. Here are 2 links which may be of help. > > The first covers Application variables in an IIS environment; the > second > > covers how someone converted an IIS applicaion to a PHP > environment. Hope > > this is useful. > > > > > > ----- Original Message ----- > > From: "Peter Balogh" > > To: "NYPHP Talk" > > Sent: Thursday, June 12, 2003 11:41 AM > > Subject: [nycphp-talk] Something better than session variables? > > > > > > > Hello all-- > > > > > > We have multiple users accessing a big tree of data that's very > > > expensive to calculate each time. Ideally, it would be great to > have > > > the tree drawn once and then have all the other users access it > as > > > though it were a global SESSION variable visible to all users. > > > > > > First of all, is there such a thing as a SESSION variable that's > > > visible to all? > > > > > > And then, to send the pie even further into the sky, is there a > way to > > > have a SESSION variable that's held in RAM instead of written to > a flat > > > file? (Yes, I'm getting greedy in terms of speeding things up.) > > > > > > Any information and/or links would be very appreciated. > > > > > > Thanks, > > > > > > Peter > > > > > > __________________________________ > > > Do you Yahoo!? > > > Yahoo! Calendar - Free online calendar with sync to Outlook(TM). > > > http://calendar.yahoo.com > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com From adam at trachtenberg.com Thu Jun 12 13:54:20 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Thu, 12 Jun 2003 13:54:20 -0400 (EDT) Subject: [nycphp-talk] Something better than session variables? In-Reply-To: <200306121542.h5CFf0Zv018017@parsec.nyphp.org> Message-ID: On Thu, 12 Jun 2003, Peter Balogh wrote: > And then, to send the pie even further into the sky, is there a way to > have a SESSION variable that's held in RAM instead of written to a flat > file? (Yes, I'm getting greedy in terms of speeding things up.) > > Any information and/or links would be very appreciated. I believe these extensions will help you out: Shared Memory: http://www.php.net/shmop SRM: http://www.vl-srm.net/ -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From bpang at bpang.com Thu Jun 12 14:02:23 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 12 Jun 2003 14:02:23 -0400 Subject: mounting mac cd in linux Message-ID: sorry, not quite a php question, but is there any way to mount a mac (os 9) cd in linux? I guess, that's not a php question at all... :-| thanks From brent at landover.com Thu Jun 12 14:06:58 2003 From: brent at landover.com (Brent Baisley) Date: Thu, 12 Jun 2003 14:06:58 -0400 Subject: [nycphp-talk] mounting mac cd in linux In-Reply-To: <200306121802.h5CI2UVf025870@parsec.nyphp.org> Message-ID: Depends on the file format on the CD. If the person who made it formatted it as HFS+ (or HFS), then you would need a driver that can read that format. Since it's probably proprietary and confidential, I don't there is a driver. But nobody should format it using HFS+. What error are you getting? On Thursday, June 12, 2003, at 02:02 PM, Brian Pang wrote: > > > sorry, not quite a php question, but is there any way to mount a mac > (os > 9) cd in linux? > > I guess, that's not a php question at all... :-| > > thanks > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 From jsiegel1 at optonline.net Thu Jun 12 14:07:25 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 12 Jun 2003 14:07:25 -0400 Subject: [nycphp-talk] Advice on shopping cart and U.P.S. In-Reply-To: <200306121649.h5CGnHXj022195@parsec.nyphp.org> Message-ID: <006501c3310d$808bfe60$6501a8c0@EZDSDELL> Thanks!! Anyone familiar with Xcart? http://www.x-cart.com/ Jeff -----Original Message----- From: Tim Toomey [mailto:ttoomey at ydnt.com] Sent: Thursday, June 12, 2003 11:49 AM To: NYPHP Talk Subject: Re: [nycphp-talk] Advice on shopping cart and U.P.S. http://www.oscommerce.com An open-source phop shopping cart that I was thinking about using for a future project as well. It's free and updated quite often. This is only if you're not looking to code the entire thing yourself. It has pricing options for UPS built into it as well as a bunch of other neat features. -timmers ----- Original Message ----- From: "Jeff" To: "NYPHP Talk" Sent: Thursday, June 12, 2003 9:46 AM Subject: [nycphp-talk] Advice on shopping cart and U.P.S. > I have to price out a project that requires a shopping cart and a tie-in > to United Parcel Service. I'm hoping that people can make some > recommendations based on your experience. > > TIA, > > Jeff > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From SHOLMES at SPORTCRAFT.COM Thu Jun 12 14:12:58 2003 From: SHOLMES at SPORTCRAFT.COM (SHOLMES at SPORTCRAFT.COM) Date: Thu, 12 Jun 2003 14:12:58 -0400 Subject: PHP Calling AS400 Stored procedures Message-ID: I don't know if anyone here has any AS400 experience but I have a collection of SQL stored procedures which I don't want to have to recreate in a PHP based application so I was wondering if anyone has any tips on calling these procedures from PHP Scott Holmes Sportcraft, Ltd. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpang at bpang.com Thu Jun 12 14:15:58 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 12 Jun 2003 14:15:58 -0400 Subject: [nycphp-talk] mounting mac cd in linux Message-ID: thanks, it worked to specify -t hfs had to become root, but that was easy enough.. I just didn't know what the filetype was > Depends on the file format on the CD. If the person who made it > formatted it as HFS+ (or HFS), then you would need a driver that can > read that format. Since it's probably proprietary and confidential, I > don't there is a driver. But nobody should format it using HFS+. What > error are you getting? > > > On Thursday, June 12, 2003, at 02:02 PM, Brian Pang wrote: > > > > > > > sorry, not quite a php question, but is there any way to mount a mac > > (os > > 9) cd in linux? > > > > I guess, that's not a php question at all... :-| > > > > thanks > > > > > > > > > > > > > > > -- > Brent Baisley > Systems Architect > Landover Associates, Inc. > Search & Advisory Services for Advanced Technology Environments > p: 212.759.6400/800.759.0577 > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > > From lance.listserv at optimost.com Thu Jun 12 14:18:14 2003 From: lance.listserv at optimost.com (Lance Lovette) Date: Thu, 12 Jun 2003 14:18:14 -0400 Subject: [nycphp-talk] Something better than session variables? In-Reply-To: <200306121542.h5CFf0XX018017@parsec.nyphp.org> Message-ID: <003101c3310e$feda2c00$0a11010a@lance> If you have the ability to compile extensions into PHP and you're not running under Windows you may find useful an extension I wrote. It can currently only cache scalar values though and it sounds like arrays might prove more useful in your case. http://pwee.sourceforge.net/ Lance -----Original Message----- From: Peter Balogh [mailto:palexanderbalogh at yahoo.com] Sent: Thursday, June 12, 2003 11:41 AM To: NYPHP Talk Subject: [nycphp-talk] Something better than session variables? Hello all-- We have multiple users accessing a big tree of data that's very expensive to calculate each time. Ideally, it would be great to have the tree drawn once and then have all the other users access it as though it were a global SESSION variable visible to all users. First of all, is there such a thing as a SESSION variable that's visible to all? And then, to send the pie even further into the sky, is there a way to have a SESSION variable that's held in RAM instead of written to a flat file? (Yes, I'm getting greedy in terms of speeding things up.) Any information and/or links would be very appreciated. Thanks, Peter __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com --- Unsubscribe at http://nyphp.org/list/ --- From bpang at bpang.com Thu Jun 12 14:23:21 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 12 Jun 2003 14:23:21 -0400 Subject: [nycphp-talk] Advice on shopping cart and U.P.S. Message-ID: I've looked at it and contemplated intending to use it for a project,, but I didn't land the gig. I've read some complaints about the manual being less than adequate, however, I was considering hiring xcarts services to make modifications that I wasn't able to complete myself... if anyone has actual experience with xcart I'd also be interested to hear... also if you used them to make changes for you,,, to get an idea of their degree of responsiveness. > Thanks!! > > Anyone familiar with Xcart? http://www.x-cart.com/ > > Jeff > > -----Original Message----- > From: Tim Toomey [mailto:ttoomey at ydnt.com] > Sent: Thursday, June 12, 2003 11:49 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Advice on shopping cart and U.P.S. > > > http://www.oscommerce.com > > An open-source phop shopping cart that I was thinking about using for a > future project as well. It's free and updated quite often. This is only > if > you're not looking to code the entire thing yourself. It has pricing > options > for UPS built into it as well as a bunch of other neat features. > > -timmers > > ----- Original Message ----- > From: "Jeff" > To: "NYPHP Talk" > Sent: Thursday, June 12, 2003 9:46 AM > Subject: [nycphp-talk] Advice on shopping cart and U.P.S. > > > > I have to price out a project that requires a shopping cart and a > tie-in > > to United Parcel Service. I'm hoping that people can make some > > recommendations based on your experience. > > > > TIA, > > > > Jeff > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > > From palexanderbalogh at yahoo.com Thu Jun 12 14:44:18 2003 From: palexanderbalogh at yahoo.com (Peter Balogh) Date: Thu, 12 Jun 2003 11:44:18 -0700 (PDT) Subject: [nycphp-talk] Something better than session variables? In-Reply-To: <200306121755.h5CHsOc1024815@parsec.nyphp.org> Message-ID: <20030612184418.27935.qmail@web40311.mail.yahoo.com> Adam, Those are very exciting. Hopefully we'll be able to convince our (staid) client to go for something this far off the beaten path we've traveled thus far... --- Adam Maccabee Trachtenberg wrote: > On Thu, 12 Jun 2003, Peter Balogh wrote: > > > And then, to send the pie even further into the sky, is there a way > to > > have a SESSION variable that's held in RAM instead of written to a > flat > > file? (Yes, I'm getting greedy in terms of speeding things up.) > > > > Any information and/or links would be very appreciated. > > I believe these extensions will help you out: > > Shared Memory: http://www.php.net/shmop > > SRM: http://www.vl-srm.net/ > > -adam > > -- > adam at trachtenberg.com > author of o'reilly's php cookbook > avoid the holiday rush, buy your copy today! > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com From jsiegel1 at optonline.net Thu Jun 12 14:52:36 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 12 Jun 2003 14:52:36 -0400 Subject: [nycphp-talk] Advice on shopping cart and U.P.S. In-Reply-To: <200306121824.h5CINSXj030591@parsec.nyphp.org> Message-ID: <006801c33113$ca8fb0a0$6501a8c0@EZDSDELL> The feature that caught my eye was the tie-in to U.P.S., FedEx, etc. I'd also be interested in "real-life" experience. Any takers? -----Original Message----- From: Brian Pang [mailto:bpang at bpang.com] Sent: Thursday, June 12, 2003 1:23 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Advice on shopping cart and U.P.S. I've looked at it and contemplated intending to use it for a project,, but I didn't land the gig. I've read some complaints about the manual being less than adequate, however, I was considering hiring xcarts services to make modifications that I wasn't able to complete myself... if anyone has actual experience with xcart I'd also be interested to hear... also if you used them to make changes for you,,, to get an idea of their degree of responsiveness. > Thanks!! > > Anyone familiar with Xcart? http://www.x-cart.com/ > > Jeff > > -----Original Message----- > From: Tim Toomey [mailto:ttoomey at ydnt.com] > Sent: Thursday, June 12, 2003 11:49 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Advice on shopping cart and U.P.S. > > > http://www.oscommerce.com > > An open-source phop shopping cart that I was thinking about using for a > future project as well. It's free and updated quite often. This is only > if > you're not looking to code the entire thing yourself. It has pricing > options > for UPS built into it as well as a bunch of other neat features. > > -timmers > > ----- Original Message ----- > From: "Jeff" > To: "NYPHP Talk" > Sent: Thursday, June 12, 2003 9:46 AM > Subject: [nycphp-talk] Advice on shopping cart and U.P.S. > > > > I have to price out a project that requires a shopping cart and a > tie-in > > to United Parcel Service. I'm hoping that people can make some > > recommendations based on your experience. > > > > TIA, > > > > Jeff > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From zaunere at yahoo.com Thu Jun 12 15:49:24 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Thu, 12 Jun 2003 12:49:24 -0700 (PDT) Subject: [nycphp-talk] Advice on shopping cart and U.P.S. In-Reply-To: <200306121853.h5CIr7XF032490@parsec.nyphp.org> Message-ID: <20030612194924.71147.qmail@web12808.mail.yahoo.com> --- Jeff wrote: > The feature that caught my eye was the tie-in to U.P.S., FedEx, etc. > > I'd also be interested in "real-life" experience. Any takers? I've never dealt directly with X-Cart from a development standpoint, but I do administer servers and support clients that use it (our hosting company is one listed on http://www.x-cart.com/webhosting_companies.html). So far, it's been fairly easy to support and the clients always seem satisfied. H > > -----Original Message----- > From: Brian Pang [mailto:bpang at bpang.com] > Sent: Thursday, June 12, 2003 1:23 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] Advice on shopping cart and U.P.S. > > > I've looked at it and contemplated intending to use it for a project,, > but I didn't land the gig. > > I've read some complaints about the manual being less than adequate, > however, I was considering hiring xcarts services to make modifications > that I wasn't able to complete myself... > > if anyone has actual experience with xcart I'd also be interested to > hear... also if you used them to make changes for you,,, to get an idea > of their degree of responsiveness. > > > > > Thanks!! > > > > Anyone familiar with Xcart? http://www.x-cart.com/ > > > > Jeff > > > > -----Original Message----- > > From: Tim Toomey [mailto:ttoomey at ydnt.com] > > Sent: Thursday, June 12, 2003 11:49 AM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Advice on shopping cart and U.P.S. > > > > > > http://www.oscommerce.com > > > > An open-source phop shopping cart that I was thinking about using for > a > > future project as well. It's free and updated quite often. This is > only > > if > > you're not looking to code the entire thing yourself. It has pricing > > options > > for UPS built into it as well as a bunch of other neat features. > > > > -timmers > > > > ----- Original Message ----- > > From: "Jeff" > > To: "NYPHP Talk" > > Sent: Thursday, June 12, 2003 9:46 AM > > Subject: [nycphp-talk] Advice on shopping cart and U.P.S. > > > > > > > I have to price out a project that requires a shopping cart and a > > tie-in > > > to United Parcel Service. I'm hoping that people can make some > > > recommendations based on your experience. > > > > > > TIA, > > > > > > Jeff > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From hans at nyphp.org Thu Jun 12 16:07:11 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 12 Jun 2003 13:07:11 -0700 (PDT) Subject: [nycphp-talk] Something better than session variables? In-Reply-To: <200306121542.h5CFf0XF018017@parsec.nyphp.org> Message-ID: <20030612200711.96711.qmail@web12807.mail.yahoo.com> --- Peter Balogh wrote: > Hello all-- > > We have multiple users accessing a big tree of data that's very > expensive to calculate each time. Ideally, it would be great to have > the tree drawn once and then have all the other users access it as > though it were a global SESSION variable visible to all users. Hmmm... > First of all, is there such a thing as a SESSION variable that's > visible to all? Sure; application variables, as mentioned. But the reason I say 'Hmmm' is because application variables, regardless of how they are stored/implemented, probably aren't the best way to go for large amounts of data. If you're dealing with a big tree of data, and the issue is the expense of calculating it for every request, I'd very much prefer using it in a cooked format. For instance, every 1000 hits (or time based, doesn't matter) a special query is run that cooks the raw data (the large set) into a calculated, more manageable form. This cooked form is then stored in an optimized database schema, or even HEAP tables, for example, if you're really worried. Some call it a data mart, others data mining, and still other's just logical architecture. We do it here on a nightly basis for much of our data, and then several times a day for more volitale items. > And then, to send the pie even further into the sky, is there a way to > have a SESSION variable that's held in RAM instead of written to a flat > file? (Yes, I'm getting greedy in terms of speeding things up.) Sure. This, again, is essentially an application variable (in other languages, they are stored in RAM by default). If you wanted true SESSION variables (per user) to be stored in RAM, then you can use PHP's session_handler functions. For application scope, shared memory is always fun: http://phpnow.net/src/ I haven't gotten around to finishing it yet, but you're welcome to use whatever. Also, don't forget the kernel will cache files for you, which is unbeatable as far as performance (especially with small amounts of data). Or, implement application variables via MySQL - persistent connections, indexed HEAP tables, and queries based on integers is damn hard to beat. H ===== Hans Zaunere President, New York PHP http://nyphp.org hans at nyphp.org From hans at nyphp.org Thu Jun 12 16:13:00 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 12 Jun 2003 13:13:00 -0700 (PDT) Subject: [nycphp-talk] PHP Calling AS400 Stored procedures In-Reply-To: <200306121813.h5CIDTXF028239@parsec.nyphp.org> Message-ID: <20030612201300.75556.qmail@web12808.mail.yahoo.com> --- SHOLMES at SPORTCRAFT.COM wrote: > I don't know if anyone here has any AS400 experience but I have a > collection of SQL stored procedures which I don't want to have to recreate > in a PHP based application so I was wondering if anyone has any tips on > calling these procedures from PHP You'll be hitting a DB2 server, no? I haven't done it myself, so all I can say is: http://us2.php.net/manual/en/ref.odbc.php http://www.iodbc.org/ and godspeed. H From brian at preston-campbell.com Thu Jun 12 16:23:46 2003 From: brian at preston-campbell.com (Brian) Date: Thu, 12 Jun 2003 16:23:46 -0400 Subject: [nycphp-talk] PHP Calling AS400 Stored procedures In-Reply-To: <200306122013.h5CKD3YD036266@parsec.nyphp.org> References: <200306122013.h5CKD3YD036266@parsec.nyphp.org> Message-ID: <200306121623.46649.brian@preston-campbell.com> Or there is always ADODB. http://php.weblogs.com/ADODB Brian On Thursday 12 June 2003 04:13 pm, Hans Zaunere wrote: > --- SHOLMES at SPORTCRAFT.COM wrote: > > I don't know if anyone here has any AS400 experience but I have a > > collection of SQL stored procedures which I don't want to have to > > recreate in a PHP based application so I was wondering if anyone > > has any tips on calling these procedures from PHP > > You'll be hitting a DB2 server, no? I haven't done it myself, so > all I can say is: > > http://us2.php.net/manual/en/ref.odbc.php > http://www.iodbc.org/ > > and godspeed. > > H > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From jsiegel1 at optonline.net Thu Jun 12 16:55:14 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 12 Jun 2003 16:55:14 -0400 Subject: Is it better to use $_Session vars as opposed to $GLOBALS? Message-ID: <007901c33124$ec3e37b0$6501a8c0@EZDSDELL> I think the subject line says it all. :) Jeff From jsiegel1 at optonline.net Thu Jun 12 17:00:02 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 12 Jun 2003 17:00:02 -0400 Subject: [nycphp-talk] Advice on shopping cart and U.P.S. In-Reply-To: <200306121950.h5CJnSXj034207@parsec.nyphp.org> Message-ID: <007a01c33125$98cc6970$6501a8c0@EZDSDELL> Thanks Hans. That's an endorsement!! Jeff -----Original Message----- From: Hans Zaunere [mailto:zaunere at yahoo.com] Sent: Thursday, June 12, 2003 2:49 PM To: NYPHP Talk Subject: RE: [nycphp-talk] Advice on shopping cart and U.P.S. --- Jeff wrote: > The feature that caught my eye was the tie-in to U.P.S., FedEx, etc. > > I'd also be interested in "real-life" experience. Any takers? I've never dealt directly with X-Cart from a development standpoint, but I do administer servers and support clients that use it (our hosting company is one listed on http://www.x-cart.com/webhosting_companies.html). So far, it's been fairly easy to support and the clients always seem satisfied. H > > -----Original Message----- > From: Brian Pang [mailto:bpang at bpang.com] > Sent: Thursday, June 12, 2003 1:23 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] Advice on shopping cart and U.P.S. > > > I've looked at it and contemplated intending to use it for a project,, > but I didn't land the gig. > > I've read some complaints about the manual being less than adequate, > however, I was considering hiring xcarts services to make modifications > that I wasn't able to complete myself... > > if anyone has actual experience with xcart I'd also be interested to > hear... also if you used them to make changes for you,,, to get an idea > of their degree of responsiveness. > > > > > Thanks!! > > > > Anyone familiar with Xcart? http://www.x-cart.com/ > > > > Jeff > > > > -----Original Message----- > > From: Tim Toomey [mailto:ttoomey at ydnt.com] > > Sent: Thursday, June 12, 2003 11:49 AM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] Advice on shopping cart and U.P.S. > > > > > > http://www.oscommerce.com > > > > An open-source phop shopping cart that I was thinking about using for > a > > future project as well. It's free and updated quite often. This is > only > > if > > you're not looking to code the entire thing yourself. It has pricing > > options > > for UPS built into it as well as a bunch of other neat features. > > > > -timmers > > > > ----- Original Message ----- > > From: "Jeff" > > To: "NYPHP Talk" > > Sent: Thursday, June 12, 2003 9:46 AM > > Subject: [nycphp-talk] Advice on shopping cart and U.P.S. > > > > > > > I have to price out a project that requires a shopping cart and a > > tie-in > > > to United Parcel Service. I'm hoping that people can make some > > > recommendations based on your experience. > > > > > > TIA, > > > > > > Jeff > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From ttoomey at ydnt.com Thu Jun 12 19:42:03 2003 From: ttoomey at ydnt.com (Tim Toomey) Date: Thu, 12 Jun 2003 16:42:03 -0700 Subject: parse error Message-ID: <001501c3313c$3f5268b0$8b00a8c0@timmerslaptop> I'm having trouble with this simple little script I have to delete a row from mysql. Users click on the delete link, then have a chance to make sure they want to delete the row and if they click the "yes" radio it executes this portion of the script: if (isset($_POST['delete_yes'])) { $_POST['id'] = $id $delete_query = "DELETE * FROM products WHERE id = '$id'"; $do_delete_query = mysql_query($delete_query) or die(mysql_error()); echo ("Successfully deleted product.

"); echo ("Return to Product DB Admin."); } the $_POST['id'] is just a hidden field that grabs the id from the get variable ID. This looks a little odd to me, but I still can't understand why it won't work I've tried changing the $delete_query to $delete_query = DELETE * FROM products WHERE id = $_POST['id']; but then I get T_Variable parse errors. Anyone know how to fix this? -timmy -------------- next part -------------- An HTML attachment was scrubbed... URL: From jlacey at ix.netcom.com Thu Jun 12 17:56:36 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Thu, 12 Jun 2003 15:56:36 -0600 Subject: [nycphp-talk] parse error References: <200306122142.h5CLgAVN040674@parsec.nyphp.org> Message-ID: <008801c3312d$7fdaa230$0200000a@Pentium700> well, if you didn't cut and paste the code, there's a missing semicolon at the end of the $_POST['id'] = $id statement... ----- Original Message ----- From: "Tim Toomey" To: "NYPHP Talk" Sent: Thursday, June 12, 2003 3:42 PM Subject: [nycphp-talk] parse error I'm having trouble with this simple little script I have to delete a row from mysql. Users click on the delete link, then have a chance to make sure they want to delete the row and if they click the "yes" radio it executes this portion of the script: if (isset($_POST['delete_yes'])) { $_POST['id'] = $id $delete_query = "DELETE * FROM products WHERE id = '$id'"; $do_delete_query = mysql_query($delete_query) or die(mysql_error()); echo ("Successfully deleted product.

"); echo ("Return to Product DB Admin."); } the $_POST['id'] is just a hidden field that grabs the id from the get variable ID. This looks a little odd to me, but I still can't understand why it won't work I've tried changing the $delete_query to $delete_query = DELETE * FROM products WHERE id = $_POST['id']; but then I get T_Variable parse errors. Anyone know how to fix this? -timmy --- Unsubscribe at http://nyphp.org/list/ --- From ttoomey at ydnt.com Thu Jun 12 20:06:38 2003 From: ttoomey at ydnt.com (Tim Toomey) Date: Thu, 12 Jun 2003 17:06:38 -0700 Subject: [nycphp-talk] parse error References: <200306122158.h5CLutcR041609@parsec.nyphp.org> Message-ID: <001d01c3313f$af76b940$8b00a8c0@timmerslaptop> my god, I can't believe it, see I changed that part like 3 times and maybe I just missed it. Thing is I get this error after that (and this was happening before as well) its a mysql error at the first line of my mysql You have an error in your SQL syntax near '* FROM products WHERE id = '41'' at line 1 it works properly, gets the right number but then I get mysql error wait, I forgot, I typed in SELECT instead of DELETE geez its been one of those days. thanks guys, -timmy ----- Original Message ----- From: "John Lacey" To: "NYPHP Talk" Sent: Thursday, June 12, 2003 2:56 PM Subject: Re: [nycphp-talk] parse error > well, if you didn't cut and paste the code, there's a missing semicolon > at the end of the > $_POST['id'] = $id > statement... > > > ----- Original Message ----- > From: "Tim Toomey" > To: "NYPHP Talk" > Sent: Thursday, June 12, 2003 3:42 PM > Subject: [nycphp-talk] parse error > > > I'm having trouble with this simple little script I have to delete a row > from mysql. Users click on the delete link, then have a chance to make > sure they want to delete the row and if they click the "yes" radio it > executes this portion of the script: > > if (isset($_POST['delete_yes'])) { > $_POST['id'] = $id > $delete_query = "DELETE * FROM products WHERE id = '$id'"; > $do_delete_query = mysql_query($delete_query) or die(mysql_error()); > echo ("Successfully deleted product.

"); > echo ("Return to Product DB Admin."); > } > > the $_POST['id'] is just a hidden field that grabs the id from the get > variable ID. This looks a little odd to me, but I still can't understand > why it won't work > > I've tried changing the $delete_query to > $delete_query = DELETE * FROM products WHERE id = $_POST['id']; but then > I get T_Variable parse errors. > > Anyone know how to fix this? > > -timmy > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > From lists at ny-tech.net Thu Jun 12 18:20:44 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Thu, 12 Jun 2003 18:20:44 -0400 (Eastern Daylight Time) Subject: [nycphp-talk] parse error References: <200306122142.h5CLgAWt040674@parsec.nyphp.org> Message-ID: <3EE8FCBC.000001.02920@main> I believe your your $_POST['id']=$id; line is incorrect. Should you not be getting data into $id from $_POST? i.e. $id = $_POST['id']; -------Original Message------- From: talk at nyphp.org Date: Thursday, June 12, 2003 5:42:21 PM To: NYPHP Talk Subject: [nycphp-talk] parse error I'm having trouble with this simple little script I have to delete a row from mysql. Users click on the delete link, then have a chance to make sure they want to delete the row and if they click the "yes" radio it executes this portion of the script: if (isset($_POST['delete_yes'])) { $_POST['id'] = $id $delete_query = "DELETE * FROM products WHERE id = '$id'"; $do_delete_query = mysql_query($delete_query) or die(mysql_error()); echo ("Successfully deleted product.

"); echo ("Return to Product DB Admin."); } the $_POST['id'] is just a hidden field that grabs the id from the get variable ID. This looks a little odd to me, but I still can't understand why it won't work I've tried changing the $delete_query to $delete_query = DELETE * FROM products WHERE id = $_POST['id']; but then I get T_Variable parse errors. Anyone know how to fix this? -timmy --- Unsubscribe at http://nyphp.org/list/ --- . From lists at ny-tech.net Thu Jun 12 18:22:40 2003 From: lists at ny-tech.net (Nasir Zubair) Date: Thu, 12 Jun 2003 18:22:40 -0400 (Eastern Daylight Time) Subject: [nycphp-talk] parse error References: <200306122142.h5CLgAWt040674@parsec.nyphp.org> Message-ID: <3EE8FD30.000003.02920@main> Ooops, missed your delete syntax error. A delete query is in this format: DELETE FROM table_name WHERE condition='something' No * between DELETE and FROM. HTH - Nasir -------Original Message------- From: talk at nyphp.org Date: Thursday, June 12, 2003 5:42:21 PM To: NYPHP Talk Subject: [nycphp-talk] parse error I'm having trouble with this simple little script I have to delete a row from mysql. Users click on the delete link, then have a chance to make sure they want to delete the row and if they click the "yes" radio it executes this portion of the script: if (isset($_POST['delete_yes'])) { $_POST['id'] = $id $delete_query = "DELETE * FROM products WHERE id = '$id'"; $do_delete_query = mysql_query($delete_query) or die(mysql_error()); echo ("Successfully deleted product.

"); echo ("Return to Product DB Admin."); } the $_POST['id'] is just a hidden field that grabs the id from the get variable ID. This looks a little odd to me, but I still can't understand why it won't work I've tried changing the $delete_query to $delete_query = DELETE * FROM products WHERE id = $_POST['id']; but then I get T_Variable parse errors. Anyone know how to fix this? -timmy --- Unsubscribe at http://nyphp.org/list/ --- . From betenoir at echonyc.com Thu Jun 12 18:24:25 2003 From: betenoir at echonyc.com (betenoir at echonyc.com) Date: Thu, 12 Jun 2003 18:24:25 -0400 Subject: Bad Request (PHP) In-Reply-To: <200306122142.h5CLgASp040674@parsec.nyphp.org> Message-ID: I was playing with some scripts which were working OK. I hit back a few times and got this error: -------------------------------------------------------------------------------- ------------- Bad Request Your browser sent a request that this server could not understand. Size of a request header field exceeds server limit. -------------------------------------------------------------------------------- ------------- Using MSIE 5.1.6 on the Mac I get this error for every page on the site even if it's not a PHP page. I've tried requesting a"clear.php" page to unregister all the variables with no effect. Suggestions? Clyde -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 698 bytes Desc: not available URL: From zaunere at yahoo.com Thu Jun 12 20:46:07 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Thu, 12 Jun 2003 17:46:07 -0700 (PDT) Subject: [nycphp-talk] Is it better to use $_Session vars as opposed to $GLOBALS? In-Reply-To: <200306122056.h5CKtjXF038338@parsec.nyphp.org> Message-ID: <20030613004607.70513.qmail@web12805.mail.yahoo.com> --- Jeff wrote: > I think the subject line says it all. :) When in Rome, do as the Romans - when in sessions, do as $_SESSION :) H From zaunere at yahoo.com Thu Jun 12 20:50:17 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Thu, 12 Jun 2003 17:50:17 -0700 (PDT) Subject: [nycphp-talk] Bad Request In-Reply-To: <200306122225.h5CMOWXF043744@parsec.nyphp.org> Message-ID: <20030613005017.58878.qmail@web12803.mail.yahoo.com> --- betenoir at echonyc.com wrote: > I was playing with some scripts which were working OK. I hit back a few > times and got this error: > > -------------------------------------------------------------------------------- > ------------- > > Bad Request > Your browser sent a request that this server could not understand. > > Size of a request header field exceeds server limit. > > -------------------------------------------------------------------------------- > ------------- > > Using MSIE 5.1.6 on the Mac I get this error for every page on the site > even if it's not a PHP page. I've tried requesting a"clear.php" page to > unregister all the variables with no effect. I've seen this error when passing large strings as GET requests. Typically, 4k will stop Apache by default. Other than that, it's either a server misconfiguration, or wacky browser behavior, although I'm not sure why. H From jsiegel1 at optonline.net Thu Jun 12 21:02:59 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 12 Jun 2003 21:02:59 -0400 Subject: [nycphp-talk] Is it better to use $_Session vars as opposed to $GLOBALS? In-Reply-To: <200306130046.h5D0kAXj046589@parsec.nyphp.org> Message-ID: <000001c33147$88ab42b0$6501a8c0@EZDSDELL> Well...on to Rome! ;) -----Original Message----- From: Hans Zaunere [mailto:zaunere at yahoo.com] Sent: Thursday, June 12, 2003 7:46 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Is it better to use $_Session vars as opposed to $GLOBALS? --- Jeff wrote: > I think the subject line says it all. :) When in Rome, do as the Romans - when in sessions, do as $_SESSION :) H --- Unsubscribe at http://nyphp.org/list/ --- From smanes at magpie.com Thu Jun 12 21:40:14 2003 From: smanes at magpie.com (Steve Manes) Date: Thu, 12 Jun 2003 21:40:14 -0400 Subject: ERD builder Message-ID: <3EE92B7E.2050004@magpie.com> I'm looking for a decent, free/open source database schema design tool. Anyone have any recommendations? From betenoir at echonyc.com Thu Jun 12 23:53:49 2003 From: betenoir at echonyc.com (betenoir at echonyc.com) Date: Thu, 12 Jun 2003 23:53:49 -0400 Subject: [nycphp-talk] Bad Request In-Reply-To: <200306130050.h5D0oKSp047378@parsec.nyphp.org> Message-ID: >--- betenoir at echonyc.com wrote: >> I was playing with some scripts which were working OK. I hit back a few >> times and got this error: >> >> >------------------------------------------------------------------------------- >- >> ------------- >> >> Bad Request >> Your browser sent a request that this server could not understand. >> >> Size of a request header field exceeds server limit. >> >> >------------------------------------------------------------------------------- >- >> ------------- >> >> Using MSIE 5.1.6 on the Mac I get this error for every page on the site >> even if it's not a PHP page. I've tried requesting a"clear.php" page to >> unregister all the variables with no effect. > >I've seen this error when passing large strings as GET requests. Typically, >4k will stop Apache by default. That makes sense -- except that I get the message no matter what page I'm requesting. Is there a way to clear the header? Other than that, it's either a server >misconfiguration, or wacky browser behavior, although I'm not sure why. Wacky browser for sure, as I don't have the problem with Netscape. Clyde From dmintz at panix.com Sat Jun 14 13:02:08 2003 From: dmintz at panix.com (David Mintz) Date: Sat, 14 Jun 2003 13:02:08 -0400 (EDT) Subject: setting up AMP w/ RH 9.0 (need advice!) In-Reply-To: <200306121620.h5CGK8Xx019561@parsec.nyphp.org> References: <200306121620.h5CGK8Xx019561@parsec.nyphp.org> Message-ID: Hello I've been hacking PHP for a while but I am a RedHat system administration rookie, trying to migrate from Windows 2K (tho I sometimes wonder why). The goal here is get a development machine working, and serve some personal stuff to the world just for kicks. This RH9 comes with Mysql 3.32.56 and Apache 2.0.40 and PHP 4.2.2 right out of the box and everything appeared fine at first. Then I tried connecting to a mysql database with PEAR. Spent a couple hours going crazy wondering why pear kept saying "DB extension not found", messing with include_path() and require() and so forth till I finally decided, hey, try connecting to mysql the traditional way. Guess what: Fatal error: Call to undefined function: mysql_connect() in .... Then I recalled again that people say apache 2.x has security as well as compatibilty problems (while The Apache folks tells us 2.x is the latest and greatest). So here's the question (thanx for your patience): what do you experienced and wise folks recommend as a general strategy for this? Upgrade PHP or downgrade Apache? Build either or both from source, or get RPMs somewhere? Very gratefully, David --- David Mintz http://davidmintz.org/ "You want me to pour the beer, Frank?" From chris at psydeshow.org Sat Jun 14 14:34:16 2003 From: chris at psydeshow.org (Chris Snyder) Date: Sat, 14 Jun 2003 14:34:16 -0400 Subject: [nycphp-talk] setting up AMP w/ RH 9.0 In-Reply-To: <200306141703.h5EH2CYJ096114@parsec.nyphp.org> References: <200306141703.h5EH2CYJ096114@parsec.nyphp.org> Message-ID: <3EEB6AA8.9080900@psydeshow.org> When it comes to PHP and Apache, it is well worth the learning curve to build them from source -- neither is particularly difficult and you'll have the option of including all sorts of extras that aren't necessarily available in RPM. Plus you'll know that you can get new versions within minutes of their release, rather than waiting for the packages to hit the RH Network. Your standard Red Hat system might not have all of the tools and development libraries required to compile from source. This can be frustrating. If you didn't install the Development Tools along with the system, and you're not short on disk space, you might want to stop and upgade before you try to build anything. Keep the CDs handy for the odd thing you might need to add as you go along. One other note, I'm not sure if it still holds, but the general consensus around NYPHP has been to use Apache 1.3.27 rather than Apache 2.x. Latest isn't always greatest. BTW, I'm running AMP on a RH8 box, and it works great. Please don't hesitate to ask when you run up against RH's sometimes bizarre administration practices. chris. David Mintz wrote: >Hello > >I've been hacking PHP for a while but I am a RedHat system administration >rookie, trying to migrate from Windows 2K (tho I sometimes wonder why). >The goal here is get a development machine working, and serve some >personal stuff to the world just for kicks. > > > From zaunere at yahoo.com Sat Jun 14 14:45:32 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Sat, 14 Jun 2003 11:45:32 -0700 (PDT) Subject: [nycphp-talk] setting up AMP w/ RH 9.0 In-Reply-To: <200306141703.h5EH2CXD096114@parsec.nyphp.org> Message-ID: <20030614184532.59243.qmail@web12803.mail.yahoo.com> --- David Mintz wrote: > > Hello > > I've been hacking PHP for a while but I am a RedHat system administration > rookie, trying to migrate from Windows 2K (tho I sometimes wonder why). > The goal here is get a development machine working, and serve some > personal stuff to the world just for kicks. > > This RH9 comes with Mysql 3.32.56 and Apache 2.0.40 and PHP 4.2.2 right > out of the box and everything appeared fine at first. Then I tried > connecting to a mysql database with PEAR. Heh, that's an evil combination of versions - bad RedHat, no bone. > Spent a couple hours going crazy wondering why pear kept saying "DB > extension not found", messing with include_path() and require() and so > forth till I finally decided, hey, try connecting to mysql the traditional > way. Guess what: > > Fatal error: Call to undefined function: mysql_connect() in .... > > Then I recalled again that people say apache 2.x has security as well as > compatibilty problems (while The Apache folks tells us 2.x is the latest > and greatest). There are certainly stability/sanity issues with apache 2.x (IMHO anyway). I've had success compiling everything from source, but wouldn't want to do it again. > So here's the question (thanx for your patience): what do you experienced > and wise folks recommend as a general strategy for this? Upgrade PHP or > downgrade Apache? Build either or both from source, or get RPMs somewhere? If you want the full ecstasy of AMP, I'd downgrade Apache to 1.3, upgrade PHP to the latest, and install mysql.com's binary package of 4.0.13. Personally, I always like to compile everything from source (except MySQL) but if you can find the proper RPMs then it'd probably work just as well. That said, your specific problem is related to the versions so much as it is the RPM packages. For whatever reason, the PHP package doesn't seem to be loading the MySQL extension. Check your php.ini to ensure that it's getting loaded somewhere (although I have no idea why RH wouldn't just compile it in staticly). H From dmintz at panix.com Sat Jun 14 15:42:20 2003 From: dmintz at panix.com (David Mintz) Date: Sat, 14 Jun 2003 15:42:20 -0400 (EDT) Subject: [nycphp-talk] setting up AMP w/ RH 9.0 In-Reply-To: <200306141846.h5EIjZXv099030@parsec.nyphp.org> References: <200306141846.h5EIjZXv099030@parsec.nyphp.org> Message-ID: Thanks for the replies. I think I'll try building both php 4.3 and apache 1.3.27 from source. QUESTION: should I first remove Apache 2.x and if so, how? I tried rpm --erase httpd-2.0.40-21.3 and got lots of warnings about failed dependencies -- I take it to mean things that would break if I remove the package [output appended]. QUESTION: should I also try to get rid of httpd-manual-2.0.40-21.3 and httpd-2.0.40-21.3? These seem to be friends of httpd-2.0[xxxx] that I found by grepping the output of rpm ---qa Thanks again! ----- > rpm --erase httpd-2.0.40-21.3 error: Failed dependencies: httpd-mmn = 20020628 is needed by (installed) mod_perl-1.99_07-5 httpd-mmn = 20020628 is needed by (installed) mod_python-3.0.1-3 httpd-mmn = 20020628 is needed by (installed) php-4.2.2-17 httpd-mmn = 20020628 is needed by (installed) mod_ssl-2.0.40-21.3 libapr.so.0 is needed by (installed) mod_perl-1.99_07-5 libaprutil.so.0 is needed by (installed) mod_perl-1.99_07-5 webserver is needed by (installed) webalizer-2.01_10-11 httpd >= 2.0.40 is needed by (installed) mod_perl-1.99_07-5 httpd >= 2.0.40 is needed by (installed) mod_python-3.0.1-3 httpd is needed by (installed) redhat-config-httpd-1.0.1-18 httpd is needed by (installed) mod_ssl-2.0.40-21.3 From chris at psydeshow.org Sat Jun 14 16:03:26 2003 From: chris at psydeshow.org (Chris Snyder) Date: Sat, 14 Jun 2003 16:03:26 -0400 Subject: [nycphp-talk] setting up AMP w/ RH 9.0 In-Reply-To: <200306141943.h5EJgNYJ000714@parsec.nyphp.org> References: <200306141943.h5EJgNYJ000714@parsec.nyphp.org> Message-ID: <3EEB7F8E.3020103@psydeshow.org> Two ways to answer that-- if you don't need them, go ahead and get rid of them. Google on the name of any package you don't know the use of, all of the packages listed can be installed separately against Apache 1.3 if you need them. There's certainly nothing crucial to system operation in that list. Or... Find out where Red Hat installed Apache 2.0 and install 1.3 in a different place (/usr/local for instance). But then you have to worry about making sure that 2.0 isn't running when you want to run 1.3, etc etc. David Mintz wrote: >>rpm --erase httpd-2.0.40-21.3 >> >> > >error: Failed dependencies: > httpd-mmn = 20020628 is needed by (installed) mod_perl-1.99_07-5 > httpd-mmn = 20020628 is needed by (installed) mod_python-3.0.1-3 > httpd-mmn = 20020628 is needed by (installed) php-4.2.2-17 > httpd-mmn = 20020628 is needed by (installed) mod_ssl-2.0.40-21.3 > libapr.so.0 is needed by (installed) mod_perl-1.99_07-5 > libaprutil.so.0 is needed by (installed) mod_perl-1.99_07-5 > webserver is needed by (installed) webalizer-2.01_10-11 > httpd >= 2.0.40 is needed by (installed) mod_perl-1.99_07-5 > httpd >= 2.0.40 is needed by (installed) mod_python-3.0.1-3 > httpd is needed by (installed) redhat-config-httpd-1.0.1-18 > httpd is needed by (installed) mod_ssl-2.0.40-21.3 > > > >--- Unsubscribe at http://nyphp.org/list/ --- > > > > > From dmintz at panix.com Sat Jun 14 16:38:23 2003 From: dmintz at panix.com (David Mintz) Date: Sat, 14 Jun 2003 16:38:23 -0400 (EDT) Subject: [nycphp-talk] setting up AMP w/ RH 9.0 In-Reply-To: <200306142004.h5EK3SXv001895@parsec.nyphp.org> References: <200306142004.h5EK3SXv001895@parsec.nyphp.org> Message-ID: Woohoooo this is exciting. I have obliterated apache2.0 and everything that depended on it, so now I'm committed to Plan A. Thanks again, and in advance if there's a next time I come a-crying for help (which I'm determined to avoid). David On Sat, 14 Jun 2003, Chris Snyder wrote: > Two ways to answer [how to remove apache 2]-- if you don't need them, go > ahead and get rid > of them. Google on the name of any package you don't know the use of, > all of the packages listed can be installed separately against Apache > 1.3 if you need them. There's certainly nothing crucial to system > operation in that list. > > Or... > > Find out where Red Hat installed Apache 2.0 and install 1.3 in a > different place (/usr/local for instance). But then you have to worry > about making sure that 2.0 isn't running when you want to run 1.3, etc etc. > > From dmintz at panix.com Sat Jun 14 18:51:39 2003 From: dmintz at panix.com (David Mintz) Date: Sat, 14 Jun 2003 18:51:39 -0400 (EDT) Subject: [nycphp-talk] setting up AMP w/ RH 9.0 In-Reply-To: <200306142004.h5EK3SXv001895@parsec.nyphp.org> References: <200306142004.h5EK3SXv001895@parsec.nyphp.org> Message-ID: Wow. Building PHP with lots of bells and whistles (i.e., --with-this and --with-that) on a RH 9.0 system when you don't really know what your doing is HARD. It finally worked with a bare minimal configure command. Woulda been easy if I'd tried it that way first, and tried the heroics later (much later). Building Apache 1.3.27 was astoundingly easy. Thank you, "Programming PHP" (Lerdorf & Tatroe, O'Reilly). My fellow rookies, take heart. Thanks again for the help. --- David Mintz http://davidmintz.org/ "You want me to pour the beer, Frank?" From pl at eskimo.com Sat Jun 14 22:45:54 2003 From: pl at eskimo.com (Peter Lehrer) Date: Sat, 14 Jun 2003 22:45:54 -0400 Subject: primary keys Message-ID: <003301c332e8$3f990420$332d0242@default> Is it possible to have two primary keys in one table, such as primary key 1 and primary key 2, or is that a contradiction in terms? Would second primary key have to be a "unique"? Peter Lehrer From dmintz at panix.com Sat Jun 14 23:40:42 2003 From: dmintz at panix.com (David Mintz) Date: Sat, 14 Jun 2003 23:40:42 -0400 (EDT) Subject: [nycphp-talk] primary keys In-Reply-To: <200306150248.h5F2lkXv009932@parsec.nyphp.org> References: <200306150248.h5F2lkXv009932@parsec.nyphp.org> Message-ID: On Sat, 14 Jun 2003, Peter Lehrer wrote: > Is it possible to have two primary keys in one table, such as primary key 1 > and primary key 2, or is that a contradiction in terms? Would second primary > key have to be a "unique"? You can only have one primary key. If you're thinking about a unique index on multiple columns, yes you can do that, and indeed there are situations where you do. You might not need any primary key in that case. I'll give you an example. I have a table called 'interpreter' (of languages) and a table called 'language'. Some interpreters have multiple working languages; lots of languages are spoken by more than one interpreter. You resolve the many-to-many relationship with a third table called interpreter_language which looks something like this (English is asumed in this particular application, so I only one the 'foreign' language to store each interpreters' language pair). Note the unique key: CREATE TABLE interpreter_language ( interpreter_id smallint(5) unsigned NOT NULL default '0', language_id smallint(5) unsigned NOT NULL default '0', UNIQUE KEY idx1 (interp_id,lang_id) ) TYPE=MyISAM; Insertion fails if somebody tries to enter a duplicate record. HTH! --- David Mintz http://davidmintz.org/ "You want me to pour the beer, Frank?" From pl at eskimo.com Sun Jun 15 00:09:49 2003 From: pl at eskimo.com (Peter Lehrer) Date: Sun, 15 Jun 2003 00:09:49 -0400 Subject: [nycphp-talk] primary keys References: <200306150340.h5F3ejTF011943@parsec.nyphp.org> Message-ID: <008701c332f3$f8c4e1c0$332d0242@default> I see. I think I confused a primary key using a combination of columns in a table versus having 2 primary keys in a table, which obviously can't exits. Thanks for your help. Peter ----- Original Message ----- From: "David Mintz" To: "NYPHP Talk" Sent: Saturday, June 14, 2003 11:40 PM Subject: Re: [nycphp-talk] primary keys > On Sat, 14 Jun 2003, Peter Lehrer wrote: > > > Is it possible to have two primary keys in one table, such as primary key 1 > > and primary key 2, or is that a contradiction in terms? Would second primary > > key have to be a "unique"? > > You can only have one primary key. If you're thinking about a unique index > on multiple columns, yes you can do that, and indeed there are situations > where you do. You might not need any primary key in that case. > > I'll give you an example. I have a table called 'interpreter' (of > languages) and a table called 'language'. Some interpreters have multiple > working languages; lots of languages are spoken by more than one > interpreter. You resolve the many-to-many relationship with a third table > called interpreter_language which looks something like this (English is > asumed in this particular application, so I only one the 'foreign' > language to store each interpreters' language pair). Note the unique key: > > CREATE TABLE interpreter_language ( > interpreter_id smallint(5) unsigned NOT NULL default '0', > language_id smallint(5) unsigned NOT NULL default '0', > UNIQUE KEY idx1 (interp_id,lang_id) > ) TYPE=MyISAM; > > Insertion fails if somebody tries to enter a duplicate record. > > HTH! > > > --- > David Mintz > http://davidmintz.org/ > > "You want me to pour the beer, Frank?" > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From nyphp at websapp.com Sun Jun 15 09:35:36 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Sun, 15 Jun 2003 09:35:36 -0400 Subject: [nycphp-talk] primary keys In-Reply-To: <200306150412.h5F4Beb3013228@parsec.nyphp.org> Message-ID: Peter, You can set mutilple fields in a table to be a primary key. In general, the combination of the field makes the key. http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#CRE ATE_TABLE Look at the line: PRIMARY KEY (index_col_name,...) --Daniel > -----Original Message----- > From: Peter Lehrer [mailto:pl at eskimo.com] > Sent: Sunday, June 15, 2003 12:12 AM > To: NYPHP Talk > Subject: Re: [nycphp-talk] primary keys > > > I see. > I think I confused a primary key using a combination of columns in a table > versus having 2 primary keys in a table, which obviously can't exits. > Thanks for your help. > > Peter > > ----- Original Message ----- > From: "David Mintz" > To: "NYPHP Talk" > Sent: Saturday, June 14, 2003 11:40 PM > Subject: Re: [nycphp-talk] primary keys > > > > On Sat, 14 Jun 2003, Peter Lehrer wrote: > > > > > Is it possible to have two primary keys in one table, such as primary > key 1 > > > and primary key 2, or is that a contradiction in terms? Would second > primary > > > key have to be a "unique"? > > > > You can only have one primary key. If you're thinking about a > unique index > > on multiple columns, yes you can do that, and indeed there are > situations > > where you do. You might not need any primary key in that case. > > > > I'll give you an example. I have a table called 'interpreter' (of > > languages) and a table called 'language'. Some interpreters > have multiple > > working languages; lots of languages are spoken by more than one > > interpreter. You resolve the many-to-many relationship with a > third table > > called interpreter_language which looks something like this (English is > > asumed in this particular application, so I only one the 'foreign' > > language to store each interpreters' language pair). Note the > unique key: > > > > CREATE TABLE interpreter_language ( > > interpreter_id smallint(5) unsigned NOT NULL default '0', > > language_id smallint(5) unsigned NOT NULL default '0', > > UNIQUE KEY idx1 (interp_id,lang_id) > > ) TYPE=MyISAM; > > > > Insertion fails if somebody tries to enter a duplicate record. > > > > HTH! > > > > > > --- > > David Mintz > > http://davidmintz.org/ > > > > "You want me to pour the beer, Frank?" > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From pl at eskimo.com Sun Jun 15 19:19:13 2003 From: pl at eskimo.com (Peter Lehrer) Date: Sun, 15 Jun 2003 16:19:13 -0700 (PDT) Subject: [nycphp-talk] primary keys In-Reply-To: <200306151333.h5FDUBTF023206@parsec.nyphp.org> Message-ID: found it. thanks. peter On Sun, 15 Jun 2003, Daniel Kushner wrote: > Peter, > > You can set mutilple fields in a table to be a primary key. In general, the > combination of the field makes the key. > http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#CRE > ATE_TABLE > > Look at the line: > PRIMARY KEY (index_col_name,...) > > --Daniel > > > -----Original Message----- > > From: Peter Lehrer [mailto:pl at eskimo.com] > > Sent: Sunday, June 15, 2003 12:12 AM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] primary keys > > > > > > I see. > > I think I confused a primary key using a combination of columns in a table > > versus having 2 primary keys in a table, which obviously can't exits. > > Thanks for your help. > > > > Peter > > > > ----- Original Message ----- > > From: "David Mintz" > > To: "NYPHP Talk" > > Sent: Saturday, June 14, 2003 11:40 PM > > Subject: Re: [nycphp-talk] primary keys > > > > > > > On Sat, 14 Jun 2003, Peter Lehrer wrote: > > > > > > > Is it possible to have two primary keys in one table, such as primary > > key 1 > > > > and primary key 2, or is that a contradiction in terms? Would second > > primary > > > > key have to be a "unique"? > > > > > > You can only have one primary key. If you're thinking about a > > unique index > > > on multiple columns, yes you can do that, and indeed there are > > situations > > > where you do. You might not need any primary key in that case. > > > > > > I'll give you an example. I have a table called 'interpreter' (of > > > languages) and a table called 'language'. Some interpreters > > have multiple > > > working languages; lots of languages are spoken by more than one > > > interpreter. You resolve the many-to-many relationship with a > > third table > > > called interpreter_language which looks something like this (English is > > > asumed in this particular application, so I only one the 'foreign' > > > language to store each interpreters' language pair). Note the > > unique key: > > > > > > CREATE TABLE interpreter_language ( > > > interpreter_id smallint(5) unsigned NOT NULL default '0', > > > language_id smallint(5) unsigned NOT NULL default '0', > > > UNIQUE KEY idx1 (interp_id,lang_id) > > > ) TYPE=MyISAM; > > > > > > Insertion fails if somebody tries to enter a duplicate record. > > > > > > HTH! > > > > > > > > > --- > > > David Mintz > > > http://davidmintz.org/ > > > > > > "You want me to pour the beer, Frank?" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From dkrook at hotmail.com Mon Jun 16 09:38:27 2003 From: dkrook at hotmail.com (D C Krook) Date: Mon, 16 Jun 2003 09:38:27 -0400 Subject: [nycphp-talk] setting up AMP w/ RH 9.0 Message-ID: David, If you're still having trouble or want to give it another try, here are some instructions I put together a couple of weeks ago for some coworkers. It was put together on a clean workstation build of RH 9. It's not particularly pretty, but it worked for our purposes: RedHat 9.0 I. Download and compile - if necessary - Apache, MySQL, and PHP. 1. Download Apache 1.3.27 source to '/usr/local' and compile. (current version: 1.3.27) http://apache.org/dist/httpd/ shell> ./configure --prefix=/usr/local/apache --enable-module=most --enable-shared=max shell> make shell> make install shell> /user/local/apache/bin/apachectl start 2. Install binary version of 4.0.12 MySQL. (current version: 4.0.12) http://www.mysql.com/downloads/mysql-4.0.html Change to the '/usr/local' directory and extract the MySQL tar.gz into this directory. Then create a symbolic link to it like so: 'ln -s mysql-standard-4.0.12-pc-linux-i686 mysql' Now, change to the '/usr/local/mysql' directory and run the following commands: shell> groupadd mysql shell> useradd -g mysql mysql shell> scripts/mysql_install_db shell> chown -R root . shell> chown -R mysql data shell> chgrp -R mysql . shell> bin/mysqld_safe --user=mysql & 3. Download PHP 4.3.x source to '/usr/local' and compile. (current version: 4.3.1) http://php.net/downloads.php Use the following build flags: shell> ./configure --prefix=/usr/local --with-apxs=/usr/local/apache/bin/apxs --enable-inline-optimization --enable-magic-quotes --enable-track-vars --enable-bcmath --with-mysql=/usr/local/mysql --with-xml shell> make shell> make install 4. Configure Apache and PHP: Open up '/usr/local/apache/conf/httpd.conf' and add the following lines: LoadModule php4_module libexec/libphp4.so AddModule mod_php4.c AddType application/x-httpd-php .php >Wow. Building PHP with lots of bells and whistles (i.e., --with-this and >--with-that) on a RH 9.0 system when you don't really know what your doing >is HARD. It finally worked with a bare minimal configure command. Woulda >been easy if I'd tried it that way first, and tried the heroics later >(much later). _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From dmintz at panix.com Mon Jun 16 10:31:34 2003 From: dmintz at panix.com (David Mintz) Date: Mon, 16 Jun 2003 10:31:34 -0400 (EDT) Subject: [nycphp-talk] setting up AMP w/ RH 9.0 In-Reply-To: <200306161340.h5GDcWXx047710@parsec.nyphp.org> References: <200306161340.h5GDcWXx047710@parsec.nyphp.org> Message-ID: Thanks, I will treat this like the priceless treasure that it is (-: Actually I did get my AMP going but I want to try again with more cool stuff enabled, so this may prove quite helpful. On Mon, 16 Jun 2003, D C Krook wrote: > David, > > If you're still having trouble or want to give it another try, here are some > instructions I put together a couple of weeks ago for some coworkers. > > It was put together on a clean workstation build of RH 9. It's not > particularly pretty, but it worked for our purposes: > > From danielc at analysisandsolutions.com Mon Jun 16 15:41:12 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Mon, 16 Jun 2003 15:41:12 -0400 Subject: latest SecurityFocus Message-ID: <20030616194112.GA1590@panix.com> Hi: Here's the latest... Sun Microsystems Java Virtual Machine Insecure Temporary File Vulnerability http://www.securityfocus.com/bid/7848 Spyke PHP Board Information Disclosure Vulnerability http://www.securityfocus.com/bid/7856 XMB Forum Member.PHP U2U Private Message HTML Injection Vulnerability http://www.securityfocus.com/bid/7869 XMB Forum Member.PHP Location Field HTML Injection Vulnerability http://www.securityfocus.com/bid/7870 MySQL libmysqlclient Library mysql_real_connect() Buffer Overrun Vulnerability http://www.securityfocus.com/bid/7887 This is said to impact versions 4.0.0 through 4.0.13. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From tech_learner at yahoo.com Tue Jun 17 01:20:18 2003 From: tech_learner at yahoo.com (Tracy) Date: Mon, 16 Jun 2003 22:20:18 -0700 (PDT) Subject: Discussion: more about keys In-Reply-To: <200306170419.h5H4Gnc9065199@parsec.nyphp.org> Message-ID: <20030617052018.64302.qmail@web14306.mail.yahoo.com> http://www.engr.csulb.edu/~jewett/dbdesign/dbdesign.php?page=keys.php&imgsize=medium i think ther was a post on primary keys last week some time. may this might help in some presentation of tutorial... Tracy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Coming together is a beginning... keeping together is progress... working together is success !!! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------- Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! -------------- next part -------------- An HTML attachment was scrubbed... URL: From chendry at nyc.rr.com Tue Jun 17 11:04:18 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Tue, 17 Jun 2003 11:04:18 -0400 Subject: watching external URL traffic Message-ID: Here's the situation: I've got a client that books sales through an external frameset. This client also drives traffic from an affiliate, which utilizes links through commission junction and also wraps the same frameset that my client uses directly. There is the possibility that this affiliate is screwing around on us - possibly manipulating queries passed to the frameset (which does the sales). Are there any ways I can watch his website and the traffic, or requests? Anything would be helpful. Thanks, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Tue Jun 17 11:16:09 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Tue, 17 Jun 2003 11:16:09 -0400 Subject: [nycphp-talk] watching external URL traffic In-Reply-To: <200306171504.h5HF4cR1096223@parsec.nyphp.org> References: <200306171504.h5HF4cR1096223@parsec.nyphp.org> Message-ID: <20030617151609.GA12068@panix.com> Hey Chris: On Tue, Jun 17, 2003 at 11:04:38AM -0400, Christopher Hendry wrote: > > Are there any ways I can watch his website and the traffic, or requests? $_SERVER['HTTP_REFERER'] $_SERVER['REMOTE_ADDR'] They can be used to help identify who's requesting the page. Use these bits as you're logging the variable values you care about in your application. Enjoy, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From chendry at nyc.rr.com Tue Jun 17 11:31:06 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Tue, 17 Jun 2003 11:31:06 -0400 Subject: [nycphp-talk] watching external URL traffic In-Reply-To: <200306171516.h5HFGCX3097188@parsec.nyphp.org> Message-ID: yes, but the problem is this is someone else's website, linking to a third party site. I'm wondering if there are any tools out there that can help me watch the site from the outside. ??? -> -----Original Message----- -> From: Analysis & Solutions [mailto:danielc at analysisandsolutions.com] -> Sent: Tuesday, June 17, 2003 11:16 AM -> To: NYPHP Talk -> Subject: Re: [nycphp-talk] watching external URL traffic -> -> -> Hey Chris: -> -> On Tue, Jun 17, 2003 at 11:04:38AM -0400, Christopher Hendry wrote: -> > -> > Are there any ways I can watch his website and the traffic, or -> requests? -> -> $_SERVER['HTTP_REFERER'] -> $_SERVER['REMOTE_ADDR'] -> -> They can be used to help identify who's requesting the page. Use these -> bits as you're logging the variable values you care about in your -> application. -> -> Enjoy, -> -> --Dan -> -> -- -> FREE scripts that make web and database programming easier -> http://www.analysisandsolutions.com/software/ -> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y -> 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -> -> -> --- Unsubscribe at http://nyphp.org/list/ --- -> -> -> From zaunere at yahoo.com Tue Jun 17 11:35:22 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 17 Jun 2003 08:35:22 -0700 (PDT) Subject: [nycphp-talk] watching external URL traffic In-Reply-To: <200306171505.h5HF4cXF096223@parsec.nyphp.org> Message-ID: <20030617153522.82360.qmail@web12802.mail.yahoo.com> --- Christopher Hendry wrote: > Here's the situation: > > I've got a client that books sales through an external frameset. This > client also drives traffic from an affiliate, which utilizes links through > commission junction and also wraps the same frameset that my client uses > directly. > > There is the possibility that this affiliate is screwing around on us - > possibly manipulating queries passed to the frameset (which does the > sales). > > Are there any ways I can watch his website and the traffic, or requests? > Anything would be helpful. Sure... key in you CC number to 1-800-CRACKER and someone will be in touch shortly :) So you want to see what hits his site is getting and then passing to you, and compare it with what he says he's getting and passing to you? Well, baring anything devious, I can't think of a foolproof way to do that really. Depending on how determined he might be, you can of course check REFERER, or put hidden keys of some sort in the framesets. If you have the ability to rotate these keys at some level, you might be able to catch if he's synthesizing requests. That's a bit amorphous, I know. H From chendry at nyc.rr.com Tue Jun 17 11:42:13 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Tue, 17 Jun 2003 11:42:13 -0400 Subject: [nycphp-talk] watching external URL traffic In-Reply-To: <200306171535.h5HFZQX3098939@parsec.nyphp.org> Message-ID: yes, I'd like to compare what he says versus the actual. Unfortunately, I can't even put anything in the frameset...he's simply using my client's link to the source. Perhaps the best solution is to change the way he interacts with us. I had heard someone mention once that there was a way to watch a site and see what errors it throws, 404s et al. Did I dream this? -> -----Original Message----- -> From: Hans Zaunere [mailto:zaunere at yahoo.com] -> Sent: Tuesday, June 17, 2003 11:35 AM -> To: NYPHP Talk -> Subject: Re: [nycphp-talk] watching external URL traffic -> -> -> -> --- Christopher Hendry wrote: -> > Here's the situation: -> > -> > I've got a client that books sales through an external frameset. This -> > client also drives traffic from an affiliate, which utilizes -> links through -> > commission junction and also wraps the same frameset that my -> client uses -> > directly. -> > -> > There is the possibility that this affiliate is screwing around on us - -> > possibly manipulating queries passed to the frameset (which does the -> > sales). -> > -> > Are there any ways I can watch his website and the traffic, or -> requests? -> > Anything would be helpful. -> -> Sure... key in you CC number to 1-800-CRACKER and someone will -> be in touch -> shortly :) -> -> So you want to see what hits his site is getting and then -> passing to you, and -> compare it with what he says he's getting and passing to you? -> -> Well, baring anything devious, I can't think of a foolproof way -> to do that -> really. Depending on how determined he might be, you can of course check -> REFERER, or put hidden keys of some sort in the framesets. If -> you have the -> ability to rotate these keys at some level, you might be able to catch if -> he's synthesizing requests. -> -> That's a bit amorphous, I know. -> -> H -> -> -> -> --- Unsubscribe at http://nyphp.org/list/ --- -> -> -> From jonbaer at jonbaer.net Tue Jun 17 11:57:12 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Tue, 17 Jun 2003 08:57:12 -0700 Subject: [nycphp-talk] watching external URL traffic References: <200306171531.h5HFVQVZ098143@parsec.nyphp.org> Message-ID: <011101c334e9$1df95650$6500a8c0@FlipWilson> not really unless you do have access to that machine for netcat, rmon w/ethereal,etc. or you can use ur imagination to poison the dns for the site and ip forward all the traffic along to his site but last time i checked u end up in jail for that type of stuff :-) i know there are things like urlminder that can watch page modification for you but you can probably also attempt this with ur own scripts (if you are looking for hidden field changes or something) w/ php/curl/wget/etc. - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: "Christopher Hendry" To: "NYPHP Talk" Sent: Tuesday, June 17, 2003 8:31 AM Subject: RE: [nycphp-talk] watching external URL traffic > yes, but the problem is this is someone else's website, linking to a third > party site. > > I'm wondering if there are any tools out there that can help me watch the > site from the outside. > > ??? > > -> -----Original Message----- > -> From: Analysis & Solutions [mailto:danielc at analysisandsolutions.com] > -> Sent: Tuesday, June 17, 2003 11:16 AM > -> To: NYPHP Talk > -> Subject: Re: [nycphp-talk] watching external URL traffic > -> > -> > -> Hey Chris: > -> > -> On Tue, Jun 17, 2003 at 11:04:38AM -0400, Christopher Hendry wrote: > -> > > -> > Are there any ways I can watch his website and the traffic, or > -> requests? > -> > -> $_SERVER['HTTP_REFERER'] > -> $_SERVER['REMOTE_ADDR'] > -> > -> They can be used to help identify who's requesting the page. Use these > -> bits as you're logging the variable values you care about in your > -> application. > -> > -> Enjoy, > -> > -> --Dan > -> > -> -- > -> FREE scripts that make web and database programming easier > -> http://www.analysisandsolutions.com/software/ > -> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > -> 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > -> > -> > -> > -> > -> > -> > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From nyphp at websapp.com Tue Jun 17 16:28:26 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Tue, 17 Jun 2003 16:28:26 -0400 Subject: PHP Job in NYC Message-ID: I came in contact with a company that is looking for a good PHP Developer. Please reply to jobs03 at rightmedia.com. Regards, Daniel Kushner Vice President, New York PHP http://nyphp.org/ daniel at nyphp.org Internet marketing startup in NYC is looking for a full-time application developer with PHP and MySQL experience for developing a system to: - manage customers - book and track orders - control ad-delivery engine - analyze campaign delivery - interface with accounting software - and more... The application is partially implemented using an object-oriented framework. Must have 3+ years of development experience. Skills Required: PHP Linux (Red Hat), Apache, MySQL JavaScript web-database applications XML/SOAP Skills Desired (but not Required): web design: XHTML, CSS, graphics, Flash, rich-media, UI design, etc. Experience with any ad-serving or ad-management systems Java Please send brief cover letter and resume to jobs03 at rightmedia.com From jfreeman at amnh.org Tue Jun 17 21:32:12 2003 From: jfreeman at amnh.org (Joshua S. Freeman) Date: Tue, 17 Jun 2003 21:32:12 -0400 Subject: question about retrieving records.. Message-ID: My friend is doing some development on my box. When he returns a row from a query, it isn't coming back as a hash (i.e. $row['field_name']), but only as an array (i.e. $row[n]). He tells me that all versions of php he's worked with have done this automatically. Is there some config setting I need to change on my system to manage this behavior? ... TIA, J. From zaunere at yahoo.com Tue Jun 17 21:48:22 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 17 Jun 2003 18:48:22 -0700 (PDT) Subject: [nycphp-talk] watching external URL traffic In-Reply-To: <200306171543.h5HFgWXF099785@parsec.nyphp.org> Message-ID: <20030618014822.12278.qmail@web12801.mail.yahoo.com> --- Christopher Hendry wrote: > yes, I'd like to compare what he says versus the actual. > > Unfortunately, I can't even put anything in the frameset...he's simply > using my client's link to the source. > > Perhaps the best solution is to change the way he interacts with us. If he's just linking to a static link on your client's page, then it'll be tough. However, if you could enforce something on his side (for instance a call-ahead or dynamic link of sorts) that may make it tougher for him to fiddle with things, albeit far from bulletproof. A direct solution may be to simple examine the IP that is referred from him - is it ping'able, traceroute'able - does it seem like an average user (you'd end up with IPs from many different subnets, reverse DNS resolutions, etc.) or is there an odd pattern? > I had heard someone mention once that there was a way to watch a site and > see what errors it throws, 404s et al. > > Did I dream this? See what errors his site throws? Yes, 1-800-CRACKER :) unless of course you can enforce some behavior on his end. H From zaunere at yahoo.com Tue Jun 17 21:50:12 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Tue, 17 Jun 2003 18:50:12 -0700 (PDT) Subject: [nycphp-talk] question about retrieving records.. In-Reply-To: <200306180132.h5I1WIXH011882@parsec.nyphp.org> Message-ID: <20030618015012.30401.qmail@web12803.mail.yahoo.com> --- "Joshua S. Freeman" wrote: > My friend is doing some development on my box. When he returns a row from > a query, it isn't coming back as a hash (i.e. $row['field_name']), but only Must be a Perl programmer :) > as an array (i.e. $row[n]). He tells me that all versions of php he's > worked with have done this automatically. Is there some config setting I > need to change on my system to manage this behavior? ... mysql_fetch_assoc() will return a "hash" or associative array in PHP-speak. H From henry at beewh.com Tue Jun 17 22:57:24 2003 From: henry at beewh.com (Henry Ponce) Date: Tue, 17 Jun 2003 23:57:24 -0300 Subject: [nycphp-talk] question about retrieving records.. In-Reply-To: <200306180132.h5I1WIRb011882@parsec.nyphp.org> References: <200306180132.h5I1WIRb011882@parsec.nyphp.org> Message-ID: <200306172357.24357.henry@beewh.com> $q='select * from table where 1=1'; //is the query you write. $result=mysql_query($q); //to execute the query If he uses this: $row=mysql_fetch_row($result); .....then he'll access a field by $row[n] If he uses this: $row=mysql_fetch_array($result): ....then he'll access a field by $row["field_name"] Hope it helps!! You don't need to change any config setting to manage this, it all depends on the code. Henry. On Tuesday 17 June 2003 22:32, Joshua S. Freeman wrote: > My friend is doing some development on my box. When he returns a row from > a query, it isn't coming back as a hash (i.e. $row['field_name']), but > only as an array (i.e. $row[n]). He tells me that all versions of php he's > worked with have done this automatically. Is there some config setting I > need to change on my system to manage this behavior? ... > > TIA, > > J. > > > > --- Unsubscribe at http://nyphp.org/list/ --- -- An. Henry Ponce Linux Registered User # 303567 Mar del Plata, Argentina Planeta Tierra From xml at aumcomputers.com Wed Jun 18 05:42:42 2003 From: xml at aumcomputers.com (Anirudh Zala) Date: Wed, 18 Jun 2003 15:12:42 +0530 Subject: Child process terminates Message-ID: <02dd01c3357e$035ddba0$3500a8c0@com1> Hello all, I often find from my error log that there exists thousands of lines of errors continuosly, like below. Child process 20456 didn't exist, sent SIGHUP Child process 20460 didn't exist, sent SIGHUP Child process 20476 didn't exist, sent SIGHUP Theoretically I know reason of this error, but i am not Linux or Server expert hence i am not able to find specific practicle reason/s that why this error is making my log file full and what process is causing it. As a temporary solution i have to restart my apache at regular interval otherwise log file gets full with erros. I am using Apache 1.3.27, php 4.3.1, MySql 3.23.55, GD 1.6.2 and higher, Perl 5.8.0 and other packages. I know these info may not be sufficent to find reason of erros, but i hope someone can guide me in proper way. I want to know general or likely reason/s of this error. Whether it is PHP or Apache or Perl or Wrong configuaration of software? that is causing such errors. Thanks, Anirudh Zala ------------------------------------------------------------------------------------------------------ Anirudh Zala (Project Manager), Tel: +91 281 2451894 AUM Computers, Gsm: +91 98981 37727 317, Star Plaza, anirudh at aumcomputers.com Rajkot-360001, Gujarat, INDIA http://www.aumcomputers.com ------------------------------------------------------------------------------------------------------ -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmintz at panix.com Wed Jun 18 09:53:39 2003 From: dmintz at panix.com (David Mintz) Date: Wed, 18 Jun 2003 09:53:39 -0400 (EDT) Subject: [nycphp-talk] question about retrieving records.. In-Reply-To: <200306180132.h5I1WIY1011882@parsec.nyphp.org> References: <200306180132.h5I1WIY1011882@parsec.nyphp.org> Message-ID: Have a look at http://www.php.net/manual/en/ref.mysql.php et seq. You don't say which mysql_fetch_xxxx() function your friend is calling, If it's mysql_fetch_row() he should expect a numerically indexed array. If it's mysql_fetch_array() he can pass in a second argument indicating what he wants: assocative or number indices or both, which is supposed to be the default. See http://www.php.net/manual/en/function.mysql-fetch-array.php HTH. On Tue, 17 Jun 2003, Joshua S. Freeman wrote: > My friend is doing some development on my box. When he returns a row from a > query, it isn't coming back as a hash (i.e. $row['field_name']), but only > as an array (i.e. $row[n]). He tells me that all versions of php he's worked > with have done this automatically. Is there some config setting I need to > change on my system to manage this behavior? ... > > TIA, > > J. > --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "You want me to pour the beer, Frank?" From pete at npgroup.net Thu Jun 19 09:23:37 2003 From: pete at npgroup.net (Pete Czech - New Possibilities Group, LLC) Date: Thu, 19 Jun 2003 09:23:37 -0400 Subject: URL Trick... Message-ID: <003f01c33665$fea63c90$0200a8c0@petedell> Hey all: I want to redirect a user to a page based on a URL, but the URL doesnt exist. IE, if I had: www.xyz.com/123 it would redirect to: www.xyz.com/somepage.php?variable=123 Anyone have any idea how to do it??? Thanks, Pete Czech Director of Technology New Possibilities Group, LLC pete at npgroup.net http://www.npgroup.net -------------- next part -------------- An HTML attachment was scrubbed... URL: From sklar at sklar.com Thu Jun 19 09:38:39 2003 From: sklar at sklar.com (David Sklar) Date: Thu, 19 Jun 2003 09:38:39 -0400 Subject: [nycphp-talk] URL Trick... In-Reply-To: <200306191327.h5JDPOZ1059066@parsec.nyphp.org> Message-ID: How to do this with PHP is explained in this article I wrote: Custom Error Pages with PHP and Apache http://www.onlamp.com/pub/a/onlamp/2003/02/13/davidsklar.html David On Thursday, June 19, 2003 9:25 AM, wrote: > Hey all: > > I want to redirect a user to a page based on a URL, but the URL > doesnt exist. IE, if I had: > > www.xyz.com/123 > > it would redirect to: > > www.xyz.com/somepage.php?variable=123 > > Anyone have any idea how to do it??? > > Thanks, > > Pete Czech > Director of Technology > New Possibilities Group, LLC > pete at npgroup.net > http://www.npgroup.net - From chris at psydeshow.org Thu Jun 19 09:43:55 2003 From: chris at psydeshow.org (Chris Snyder) Date: Thu, 19 Jun 2003 09:43:55 -0400 Subject: [nycphp-talk] URL Trick... In-Reply-To: <200306191327.h5JDPOYR059066@parsec.nyphp.org> References: <200306191327.h5JDPOYR059066@parsec.nyphp.org> Message-ID: <3EF1BE1B.3080909@psydeshow.org> Have you looked at mod_rewrite? Once you get the hang of it, it's pretty easy. I think you'd want something like: RewriteCond %{REQUEST_FILENAME} ^/[0-9]+ RewriteRule ^/([0-9]+) /somepage.php?variable=$1 [L,R] Downsides: you have to read the manual, and you probably have to recompile Apache-- it's not enabled by default. Upsides: people will think you're an Apache guru, and so you shall be. chris. Pete Czech - New Possibilities Group, LLC wrote: >Hey all: > >I want to redirect a user to a page based on a URL, but the URL doesnt exist. IE, if I had: > >www.xyz.com/123 > >it would redirect to: > >www.xyz.com/somepage.php?variable=123 > >Anyone have any idea how to do it??? > >Thanks, > >Pete Czech >Director of Technology >New Possibilities Group, LLC >pete at npgroup.net >http://www.npgroup.net > > > >--- Unsubscribe at http://nyphp.org/list/ --- > > > > > From psaw at pswebcode.com Thu Jun 19 10:13:07 2003 From: psaw at pswebcode.com (pswebcode, nyc) Date: Thu, 19 Jun 2003 10:13:07 -0400 Subject: 2003 IT Salaries Survey Results... Message-ID: <000001c3366c$ea288dc0$4cbdfea9@bronco> Broken out by job titles: http://pswebcode.com/psw_salary2003.php Warmest regards, Peter Sawczynec, Technology Director PSWebcode -- opensource programming for the interactive web psaw at pswebcode.com www.pswebcode.com 718.543.3240 From jsiegel1 at optonline.net Thu Jun 19 10:49:48 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 19 Jun 2003 10:49:48 -0400 Subject: MySQL and spaces in data Message-ID: <002e01c33672$08575a60$6501a8c0@EZDSDELL> How does MySQL handle the following? I'm trying to save a car model called "1600 DUETTO SPIDER." I noticed it saves it with underscores. What happens when I retrieve that data in a query? Does it come back as 1600_DUETTO_SPIDER? Or, if I need to retain the spaces, do I do something like %20 or something like   when I save the data? Jeff From tom at supertom.com Thu Jun 19 10:48:39 2003 From: tom at supertom.com (tom at supertom.com) Date: Thu, 19 Jun 2003 10:48:39 -0400 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306191451.h5JEoPZN065105@parsec.nyphp.org> Message-ID: Jeff, What does your insert query look like, and what type of column are you inserting into? I can't yet see why this would happen (spaces replaced with underscores). Tom -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, June 19, 2003 10:50 AM To: NYPHP Talk Subject: [nycphp-talk] MySQL and spaces in data How does MySQL handle the following? I'm trying to save a car model called "1600 DUETTO SPIDER." I noticed it saves it with underscores. What happens when I retrieve that data in a query? Does it come back as 1600_DUETTO_SPIDER? Or, if I need to retain the spaces, do I do something like %20 or something like   when I save the data? Jeff --- Unsubscribe at http://nyphp.org/list/ --- From jsiegel1 at optonline.net Thu Jun 19 11:11:12 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 19 Jun 2003 11:11:12 -0400 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306191458.h5JEvYXp065935@parsec.nyphp.org> Message-ID: <002f01c33675$0610be60$6501a8c0@EZDSDELL> I'm creating check boxes on the fly. Here's a sample of the output on the form: Now here's the post data: [ALFA-ROMEO|1600_DUETTO_SPIDER] Jeff -----Original Message----- From: tom at supertom.com [mailto:tom at supertom.com] Sent: Thursday, June 19, 2003 9:58 AM To: NYPHP Talk Subject: RE: [nycphp-talk] MySQL and spaces in data Jeff, What does your insert query look like, and what type of column are you inserting into? I can't yet see why this would happen (spaces replaced with underscores). Tom -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, June 19, 2003 10:50 AM To: NYPHP Talk Subject: [nycphp-talk] MySQL and spaces in data How does MySQL handle the following? I'm trying to save a car model called "1600 DUETTO SPIDER." I noticed it saves it with underscores. What happens when I retrieve that data in a query? Does it come back as 1600_DUETTO_SPIDER? Or, if I need to retain the spaces, do I do something like %20 or something like   when I save the data? Jeff --- Unsubscribe at http://nyphp.org/list/ --- From chalu at egenius.com Thu Jun 19 10:54:51 2003 From: chalu at egenius.com (flatiron) Date: Thu, 19 Jun 2003 10:54:51 -0400 Subject: digest mode? References: <200306191457.h5JEvYSx065935@parsec.nyphp.org> Message-ID: <00e801c33672$bcb7ce40$6000a8c0@kimbap.local> Is there a way to get nyphp in digest mode? There are too many newbie questions. From David.SextonJr at ubs.com Thu Jun 19 11:16:53 2003 From: David.SextonJr at ubs.com (Sexton, David) Date: Thu, 19 Jun 2003 11:16:53 -0400 Subject: [nycphp-talk] MySQL and spaces in data Message-ID: <18D7B8CAA5284F478470828806DB124603789E96@psle01.xchg.pwj.com> This might be your problem... spaces are illegal... http://www.w3.org/TR/html4/types.html#type-cdata -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, June 19, 2003 11:12 AM To: NYPHP Talk Subject: RE: [nycphp-talk] MySQL and spaces in data I'm creating check boxes on the fly. Here's a sample of the output on the form: Now here's the post data: [ALFA-ROMEO|1600_DUETTO_SPIDER] Jeff -----Original Message----- From: tom at supertom.com [mailto:tom at supertom.com] Sent: Thursday, June 19, 2003 9:58 AM To: NYPHP Talk Subject: RE: [nycphp-talk] MySQL and spaces in data Jeff, What does your insert query look like, and what type of column are you inserting into? I can't yet see why this would happen (spaces replaced with underscores). Tom -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, June 19, 2003 10:50 AM To: NYPHP Talk Subject: [nycphp-talk] MySQL and spaces in data How does MySQL handle the following? I'm trying to save a car model called "1600 DUETTO SPIDER." I noticed it saves it with underscores. What happens when I retrieve that data in a query? Does it come back as 1600_DUETTO_SPIDER? Or, if I need to retain the spaces, do I do something like %20 or something like   when I save the data? Jeff --- Unsubscribe at http://nyphp.org/list/ --- Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. From nyphp at websapp.com Thu Jun 19 11:16:00 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Thu, 19 Jun 2003 11:16:00 -0400 Subject: [nycphp-talk] digest mode? In-Reply-To: <200306191515.h5JFEObD067833@parsec.nyphp.org> Message-ID: Hi Chalu, We are using NYPHP's own mailing list software (built in house). Digest mode is not currently available, but you are welcome to use the archive instead. Links to the archives can be found here http://nyphp.org/content/mailinglist/mlist.php. Best, Daniel Kushner > -----Original Message----- > From: flatiron [mailto:chalu at egenius.com] > Sent: Thursday, June 19, 2003 11:14 AM > To: NYPHP Talk > Subject: [nycphp-talk] digest mode? > > > Is there a way to get nyphp in digest mode? > > There are too many newbie questions. > > > --- Unsubscribe at http://nyphp.org/list/ --- > From chalu at egenius.com Thu Jun 19 11:00:55 2003 From: chalu at egenius.com (flatiron) Date: Thu, 19 Jun 2003 11:00:55 -0400 Subject: [nycphp-talk] digest mode? References: <200306191518.h5JFHpSx069354@parsec.nyphp.org> Message-ID: <00f901c33673$95ae4170$6000a8c0@kimbap.local> Can you just turn off getting messages but still on the list? ----- Original Message ----- From: "Daniel Kushner" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 11:17 AM Subject: RE: [nycphp-talk] digest mode? > Hi Chalu, > > We are using NYPHP's own mailing list software (built in house). Digest mode > is not currently available, but you are welcome to use the archive instead. > Links to the archives can be found here > http://nyphp.org/content/mailinglist/mlist.php. > > Best, > Daniel Kushner > > > > -----Original Message----- > > From: flatiron [mailto:chalu at egenius.com] > > Sent: Thursday, June 19, 2003 11:14 AM > > To: NYPHP Talk > > Subject: [nycphp-talk] digest mode? > > > > > > Is there a way to get nyphp in digest mode? > > > > There are too many newbie questions. > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From tom at supertom.com Thu Jun 19 11:14:57 2003 From: tom at supertom.com (tom at supertom.com) Date: Thu, 19 Jun 2003 11:14:57 -0400 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306191512.h5JFBoZN067060@parsec.nyphp.org> Message-ID: Ok, gotcha. PHP is turning the name of the checkbox from ALFA-ROMEO|1600 DUETTO SPIDER to ALFA-ROMEO 1600 DUETTO SPIDER. If you need to do it this way, before you do the insert, I would just do a str_replace() on the string, swapping underscores for spaces. MySQL certainly doesn't have an issue storing data with spaces. Nice car, by the way. :-) -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, June 19, 2003 11:12 AM To: NYPHP Talk Subject: RE: [nycphp-talk] MySQL and spaces in data I'm creating check boxes on the fly. Here's a sample of the output on the form: Now here's the post data: [ALFA-ROMEO|1600_DUETTO_SPIDER] Jeff -----Original Message----- From: tom at supertom.com [mailto:tom at supertom.com] Sent: Thursday, June 19, 2003 9:58 AM To: NYPHP Talk Subject: RE: [nycphp-talk] MySQL and spaces in data Jeff, What does your insert query look like, and what type of column are you inserting into? I can't yet see why this would happen (spaces replaced with underscores). Tom -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, June 19, 2003 10:50 AM To: NYPHP Talk Subject: [nycphp-talk] MySQL and spaces in data How does MySQL handle the following? I'm trying to save a car model called "1600 DUETTO SPIDER." I noticed it saves it with underscores. What happens when I retrieve that data in a query? Does it come back as 1600_DUETTO_SPIDER? Or, if I need to retain the spaces, do I do something like %20 or something like   when I save the data? Jeff --- Unsubscribe at http://nyphp.org/list/ --- From jsiegel1 at optonline.net Thu Jun 19 11:55:22 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 19 Jun 2003 11:55:22 -0400 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306191517.h5JFH4Xp068622@parsec.nyphp.org> Message-ID: <003401c3367b$31b5a110$6501a8c0@EZDSDELL> OIC. -----Original Message----- From: Sexton, David [mailto:David.SextonJr at ubs.com] Sent: Thursday, June 19, 2003 10:17 AM To: NYPHP Talk Subject: RE: [nycphp-talk] MySQL and spaces in data This might be your problem... spaces are illegal... http://www.w3.org/TR/html4/types.html#type-cdata -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, June 19, 2003 11:12 AM To: NYPHP Talk Subject: RE: [nycphp-talk] MySQL and spaces in data I'm creating check boxes on the fly. Here's a sample of the output on the form: Now here's the post data: [ALFA-ROMEO|1600_DUETTO_SPIDER] Jeff -----Original Message----- From: tom at supertom.com [mailto:tom at supertom.com] Sent: Thursday, June 19, 2003 9:58 AM To: NYPHP Talk Subject: RE: [nycphp-talk] MySQL and spaces in data Jeff, What does your insert query look like, and what type of column are you inserting into? I can't yet see why this would happen (spaces replaced with underscores). Tom -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, June 19, 2003 10:50 AM To: NYPHP Talk Subject: [nycphp-talk] MySQL and spaces in data How does MySQL handle the following? I'm trying to save a car model called "1600 DUETTO SPIDER." I noticed it saves it with underscores. What happens when I retrieve that data in a query? Does it come back as 1600_DUETTO_SPIDER? Or, if I need to retain the spaces, do I do something like %20 or something like   when I save the data? Jeff Please do not transmit orders or instructions regarding a UBS account by email. The information provided in this email or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your email. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you. UBS Financial Services Inc. UBS International Inc. --- Unsubscribe at http://nyphp.org/list/ --- From jsiegel1 at optonline.net Thu Jun 19 11:55:22 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 19 Jun 2003 11:55:22 -0400 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306191521.h5JFKpXp070485@parsec.nyphp.org> Message-ID: <003501c3367b$341cb600$6501a8c0@EZDSDELL> Gotcha! Thanks for the rapid response. -----Original Message----- From: tom at supertom.com [mailto:tom at supertom.com] Sent: Thursday, June 19, 2003 10:21 AM To: NYPHP Talk Subject: RE: [nycphp-talk] MySQL and spaces in data Ok, gotcha. PHP is turning the name of the checkbox from ALFA-ROMEO|1600 DUETTO SPIDER to ALFA-ROMEO 1600 DUETTO SPIDER. If you need to do it this way, before you do the insert, I would just do a str_replace() on the string, swapping underscores for spaces. MySQL certainly doesn't have an issue storing data with spaces. Nice car, by the way. :-) -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, June 19, 2003 11:12 AM To: NYPHP Talk Subject: RE: [nycphp-talk] MySQL and spaces in data I'm creating check boxes on the fly. Here's a sample of the output on the form: Now here's the post data: [ALFA-ROMEO|1600_DUETTO_SPIDER] Jeff -----Original Message----- From: tom at supertom.com [mailto:tom at supertom.com] Sent: Thursday, June 19, 2003 9:58 AM To: NYPHP Talk Subject: RE: [nycphp-talk] MySQL and spaces in data Jeff, What does your insert query look like, and what type of column are you inserting into? I can't yet see why this would happen (spaces replaced with underscores). Tom -----Original Message----- From: Jeff [mailto:jsiegel1 at optonline.net] Sent: Thursday, June 19, 2003 10:50 AM To: NYPHP Talk Subject: [nycphp-talk] MySQL and spaces in data How does MySQL handle the following? I'm trying to save a car model called "1600 DUETTO SPIDER." I noticed it saves it with underscores. What happens when I retrieve that data in a query? Does it come back as 1600_DUETTO_SPIDER? Or, if I need to retain the spaces, do I do something like %20 or something like   when I save the data? Jeff --- Unsubscribe at http://nyphp.org/list/ --- From danielc at analysisandsolutions.com Thu Jun 19 12:23:10 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 19 Jun 2003 12:23:10 -0400 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306191511.h5JFBoR1067060@parsec.nyphp.org> References: <200306191511.h5JFBoR1067060@parsec.nyphp.org> Message-ID: <20030619162309.GA22409@panix.com> Hi Jeff: On Thu, Jun 19, 2003 at 11:11:50AM -0400, Jeff wrote: > > While some folks have suggested using string replace functions on the incomming data, I beg to differ. Text values like that aren't meant for name fields. Perhaps swap the value and name fields? Or for the name and/or value fields, use id numbers from the database. The name could even be an array, such as: name="car[123]" allowing your receiving script to loop through all of the "car" array elements with a foreach statement. Without knowing the more context of what you're trying to do, it's hard to give more solid guidance. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From danielc at analysisandsolutions.com Thu Jun 19 12:24:21 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 19 Jun 2003 12:24:21 -0400 Subject: [nycphp-talk] digest mode? In-Reply-To: <200306191520.h5JFKSR1070173@parsec.nyphp.org> References: <200306191520.h5JFKSR1070173@parsec.nyphp.org> Message-ID: <20030619162421.GB22409@panix.com> > Can you just turn off getting messages but still on the list? You could set up a mail filter via procmail or your email program to send list messages to /dev/null or the trash bin, etc. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From chalu at egenius.com Thu Jun 19 12:05:57 2003 From: chalu at egenius.com (Chalu Kim) Date: Thu, 19 Jun 2003 12:05:57 -0400 Subject: [nycphp-talk] digest mode? References: <200306191624.h5JGONSx074983@parsec.nyphp.org> Message-ID: <016001c3367c$ab6b33c0$6000a8c0@kimbap.local> That is a very poor answer... ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 12:24 PM Subject: Re: [nycphp-talk] digest mode? > > Can you just turn off getting messages but still on the list? > > You could set up a mail filter via procmail or your email program to send > list messages to /dev/null or the trash bin, etc. > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From adam at trachtenberg.com Thu Jun 19 12:27:17 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Thu, 19 Jun 2003 12:27:17 -0400 (EDT) Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306191517.h5JFH4a5068622@parsec.nyphp.org> Message-ID: > I'm creating check boxes on the fly. Here's a sample of the output on > the form: > > > > Now here's the post data: > [ALFA-ROMEO|1600_DUETTO_SPIDER] Don't know exactly how you've got things set up, but maybe you could change this to: names can't have spaces, but values can. Also, looping through car_model can be easier than a bunch of ifs. -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From danielc at analysisandsolutions.com Thu Jun 19 12:31:55 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 19 Jun 2003 12:31:55 -0400 Subject: [nycphp-talk] digest mode? In-Reply-To: <200306191625.h5JGPUR1075745@parsec.nyphp.org> References: <200306191625.h5JGPUR1075745@parsec.nyphp.org> Message-ID: <20030619163155.GA23933@panix.com> On Thu, Jun 19, 2003 at 12:25:30PM -0400, Chalu Kim wrote: > That is a very poor answer... WHATever. It accomplishes the person's goal of not having to see messages while still being subscribed to the list. I imagine such an option doesn't exist in our list management program. Do you have a better answer? Oh, if you're dishing out inane criticism, how about taking some... Leaving the entirety of the prior person's message, including their signature and the list's unsubscribe message -- let alone top posting -- is poor practice. Later, --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From henry at beewh.com Thu Jun 19 12:31:31 2003 From: henry at beewh.com (Henry Ponce) Date: Thu, 19 Jun 2003 13:31:31 -0300 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306191627.h5JGRKRb076514@parsec.nyphp.org> References: <200306191627.h5JGRKRb076514@parsec.nyphp.org> Message-ID: <200306191331.31482.henry@beewh.com> I totally agree on this. It's neat and easy to implement. It's better than using string functions. Henry On Thursday 19 June 2003 13:27, Adam Maccabee Trachtenberg wrote: > > I'm creating check boxes on the fly. Here's a sample of the output on > > the form: > > > > > > > > Now here's the post data: > > [ALFA-ROMEO|1600_DUETTO_SPIDER] > > Don't know exactly how you've got things set up, but maybe you could > change this to: > > > > names can't have spaces, but values can. Also, looping through > car_model can be easier than a bunch of ifs. > > -adam -- An. Henry Ponce Linux Registered User # 303567 Mar del Plata, Argentina Planeta Tierra From hans at nyphp.org Thu Jun 19 12:57:52 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 19 Jun 2003 09:57:52 -0700 (PDT) Subject: [nycphp-talk] digest mode? In-Reply-To: <200306191626.h5JGPUXJ075745@parsec.nyphp.org> Message-ID: <20030619165752.88797.qmail@web12804.mail.yahoo.com> --- Chalu Kim wrote: > That is a very poor answer... > > > > Can you just turn off getting messages but still on the list? > > > > You could set up a mail filter via procmail or your email program to send > > list messages to /dev/null or the trash bin, etc. It was a poor question. If you don't get messages from the list, what makes you subscribed to it? Aside from the variation of a digest, which isn't currently available, the closest thing are the realtime archives online. We know there are lacking features with the list - I wrote it in a couple of days when NYPHP had but 10 users, and it was never meant to last this long, nor support this many people. A major revamp will be happening in the coming the weeks/months, including anonymous IMAP archives, digests, XML goodies, etc. If anyone has suggestions for what they'd like to see, we invite you to subscribe to dev at nyphp.org and post them there for discussion. Of course, those who would like to participate in the development process itself (ie, code/frontend/quality assurance) are always welcome. Thanks, H From jonbaer at jonbaer.net Thu Jun 19 13:09:45 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Thu, 19 Jun 2003 10:09:45 -0700 Subject: MySQL/phpMyAdmin Insert exports -> Form Message-ID: <00d201c33685$95ba9850$6600a8c0@FlipWilson> hi, im trying to determine if this type of package already exists or if its worth actually building but on phpMyAdmin what id really like is the ability itself to create php-based insert forms directly from export ... (View dump (schema) of table) ... i beleive something like forms-based in access that already exists but having the ability directly to plug into a php-app. (complete w/ pull down/multiple select/booleans/etc). it might be just a case of modifying tbl_dump.php and creating another export plugin for it. does a similar package exist? (mysql -> php form) - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 From heli_travel at yahoo.com Thu Jun 19 13:12:16 2003 From: heli_travel at yahoo.com (LIAO YANG) Date: Thu, 19 Jun 2003 10:12:16 -0700 (PDT) Subject: [nycphp-talk] URL Trick... In-Reply-To: <200306191328.h5JDPObn059066@parsec.nyphp.org> Message-ID: <20030619171216.96616.qmail@web12207.mail.yahoo.com> you need to set up your redirect rule first. some thing like this: switch(url) { match format a: go to page b; break; match format b: go to page c; break; --- -- defaut: go to page a; } --- "Pete Czech - New Possibilities Group, LLC" wrote: > Hey all: > > I want to redirect a user to a page based on a URL, but the > URL doesnt exist. IE, if I had: > > www.xyz.com/123 > > it would redirect to: > > www.xyz.com/somepage.php?variable=123 > > Anyone have any idea how to do it??? > > Thanks, > > Pete Czech > Director of Technology > New Possibilities Group, LLC > pete at npgroup.net > http://www.npgroup.net > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From danielc at analysisandsolutions.com Thu Jun 19 13:31:44 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 19 Jun 2003 13:31:44 -0400 Subject: [nycphp-talk] MySQL/phpMyAdmin Insert exports -> Form In-Reply-To: <200306191709.h5JH9rR1081138@parsec.nyphp.org> References: <200306191709.h5JH9rR1081138@parsec.nyphp.org> Message-ID: <20030619173144.GA3019@panix.com> Hi Jon: On Thu, Jun 19, 2003 at 01:09:53PM -0400, Jon Baer wrote: > > itself to create php-based insert forms directly from export This isn't exactly what you want, but it may be helpful. http://www.analysisandsolutions.com/software/sql/sql-man.htm#RecordAsInput --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jonbaer at jonbaer.net Thu Jun 19 13:42:42 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Thu, 19 Jun 2003 10:42:42 -0700 Subject: [nycphp-talk] MySQL/phpMyAdmin Insert exports -> Form References: <200306191732.h5JHVlVd082884@parsec.nyphp.org> Message-ID: <00ff01c3368a$303bd480$6600a8c0@FlipWilson> actually it's pretty close ... i attempted something likewise a while back w/ JDBC 2 but what i really wanted was a complete package that could create form checking and validation @ the same time js + form post code, the works. so describe the table + create a single row insert tool w/ all the needed libraries for checking types (varchar lengths, booleans, selects, etc). i thought i saw a form manager package for php/mysql somewhere. - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 10:31 AM Subject: Re: [nycphp-talk] MySQL/phpMyAdmin Insert exports -> Form > Hi Jon: > > On Thu, Jun 19, 2003 at 01:09:53PM -0400, Jon Baer wrote: > > > > itself to create php-based insert forms directly from export > > This isn't exactly what you want, but it may be helpful. > > http://www.analysisandsolutions.com/software/sql/sql-man.htm#RecordAsInput > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From coling at macmicro.com Thu Jun 19 13:48:56 2003 From: coling at macmicro.com (Colin Goldberg) Date: Thu, 19 Jun 2003 13:48:56 -0400 Subject: [nycphp-talk] MySQL/phpMyAdmin Insert exports -> Form In-Reply-To: <200306191743.h5JHgnW5083776@parsec.nyphp.org> Message-ID: <5.2.0.9.0.20030619134805.036fc830@mail.macmicro.com> I believe I saw a package on phpclasses.org - I am not sure which category... Colin Goldberg At 01:42 PM 6/19/03 -0400, you wrote: >actually it's pretty close ... i attempted something likewise a while back >w/ JDBC 2 but what i really wanted was a complete package that could create >form checking and validation @ the same time js + form post code, the works. >so describe the table + create a single row insert tool w/ all the needed >libraries for checking types (varchar lengths, booleans, selects, etc). > >i thought i saw a form manager package for php/mysql somewhere. > >- jon > >pgp key: http://www.jonbaer.net/jonbaer.asc >fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 > >----- Original Message ----- >From: "Analysis & Solutions" >To: "NYPHP Talk" >Sent: Thursday, June 19, 2003 10:31 AM >Subject: Re: [nycphp-talk] MySQL/phpMyAdmin Insert exports -> Form > > > > Hi Jon: > > > > On Thu, Jun 19, 2003 at 01:09:53PM -0400, Jon Baer wrote: > > > > > > itself to create php-based insert forms directly from export > > > > This isn't exactly what you want, but it may be helpful. > > > > http://www.analysisandsolutions.com/software/sql/sql-man.htm#RecordAsInput > > > > --Dan > > > > -- > > FREE scripts that make web and database programming easier > > http://www.analysisandsolutions.com/software/ > > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > > > > > > > > > >--- Unsubscribe at http://nyphp.org/list/ --- From jonbaer at jonbaer.net Thu Jun 19 14:01:18 2003 From: jonbaer at jonbaer.net (Jon Baer) Date: Thu, 19 Jun 2003 11:01:18 -0700 Subject: [nycphp-talk] MySQL/phpMyAdmin Insert exports -> Form References: <200306191751.h5JHpZVd084648@parsec.nyphp.org> Message-ID: <012f01c3368c$cb2de5d0$6600a8c0@FlipWilson> http://phpclasses.mirrors.nyphp.org/browse.html/package/332.html thanks. if i get it plugged into phpMyAdmin ill post along the patch/files. - jon pgp key: http://www.jonbaer.net/jonbaer.asc fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 ----- Original Message ----- From: "Colin Goldberg" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 10:51 AM Subject: Re: [nycphp-talk] MySQL/phpMyAdmin Insert exports -> Form > I believe I saw a package on phpclasses.org - I am not sure which category... > > Colin Goldberg > > At 01:42 PM 6/19/03 -0400, you wrote: > >actually it's pretty close ... i attempted something likewise a while back > >w/ JDBC 2 but what i really wanted was a complete package that could create > >form checking and validation @ the same time js + form post code, the works. > >so describe the table + create a single row insert tool w/ all the needed > >libraries for checking types (varchar lengths, booleans, selects, etc). > > > >i thought i saw a form manager package for php/mysql somewhere. > > > >- jon > > > >pgp key: http://www.jonbaer.net/jonbaer.asc > >fingerprint: F438 A47E C45E 8B27 F68C 1F9B 41DB DB8B 9A0C AF47 > > > >----- Original Message ----- > >From: "Analysis & Solutions" > >To: "NYPHP Talk" > >Sent: Thursday, June 19, 2003 10:31 AM > >Subject: Re: [nycphp-talk] MySQL/phpMyAdmin Insert exports -> Form > > > > > > > Hi Jon: > > > > > > On Thu, Jun 19, 2003 at 01:09:53PM -0400, Jon Baer wrote: > > > > > > > > itself to create php-based insert forms directly from export > > > > > > This isn't exactly what you want, but it may be helpful. > > > > > > http://www.analysisandsolutions.com/software/sql/sql-man.htm#RecordAsInput > > > > > > --Dan > > > > > > -- > > > FREE scripts that make web and database programming easier > > > http://www.analysisandsolutions.com/software/ > > > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > > > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > From chalu at egenius.com Thu Jun 19 13:42:33 2003 From: chalu at egenius.com (Chalu Kim) Date: Thu, 19 Jun 2003 13:42:33 -0400 Subject: [nycphp-talk] digest mode? References: <200306191632.h5JGVwSx077323@parsec.nyphp.org> Message-ID: <019e01c3368a$2c013810$6000a8c0@kimbap.local> It should not be that difficult to program that in. Let's see. It could be done under an hour. alter table users.... if dontsend == 'y', don't send you have an interface to check that. Or use Gmane or Mailman Procmail and filter? You will get into trouble one of these days if you do things like that. That is why it is a poor answer. ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 12:31 PM Subject: Re: [nycphp-talk] digest mode? > On Thu, Jun 19, 2003 at 12:25:30PM -0400, Chalu Kim wrote: > > That is a very poor answer... > > WHATever. It accomplishes the person's goal of not having to see messages > while still being subscribed to the list. I imagine such an option > doesn't exist in our list management program. Do you have a better > answer? > > Oh, if you're dishing out inane criticism, how about taking some... > Leaving the entirety of the prior person's message, including their > signature and the list's unsubscribe message -- let alone top posting -- > is poor practice. > > Later, > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From zaunere at yahoo.com Thu Jun 19 14:06:49 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Thu, 19 Jun 2003 11:06:49 -0700 (PDT) Subject: [nycphp-talk] digest mode? In-Reply-To: <200306191802.h5JI28XJ086205@parsec.nyphp.org> Message-ID: <20030619180649.68513.qmail@web12803.mail.yahoo.com> Please, let us not continue this thread on Talk. At first glance it may seem to be easily patched in, but I can assure you that it is not; the system has undergone too many patches already. I'm happy to discuss and get feedback about features and development for the system, but lets not clutter people's mailboxes - NYPHP-Development is the appropiate mailing list for this thread. Thanks, H --- Chalu Kim wrote: > It should not be that difficult to program that in. > > Let's see. It could be done under an hour. > > alter table users.... > > if dontsend == 'y', don't send > > you have an interface to check that. > > Or use Gmane or Mailman > > Procmail and filter? You will get into trouble one of these days if you do > things like that. That is why it is a poor answer. > > ----- Original Message ----- > From: "Analysis & Solutions" > To: "NYPHP Talk" > Sent: Thursday, June 19, 2003 12:31 PM > Subject: Re: [nycphp-talk] digest mode? > > > > On Thu, Jun 19, 2003 at 12:25:30PM -0400, Chalu Kim wrote: > > > That is a very poor answer... > > > > WHATever. It accomplishes the person's goal of not having to see > messages > > while still being subscribed to the list. I imagine such an option > > doesn't exist in our list management program. Do you have a better > > answer? > > > > Oh, if you're dishing out inane criticism, how about taking some... > > Leaving the entirety of the prior person's message, including their > > signature and the list's unsubscribe message -- let alone top posting -- > > is poor practice. > > > > Later, > > > > --Dan > > > > -- > > FREE scripts that make web and database programming easier > > http://www.analysisandsolutions.com/software/ > > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From agfische at email.smith.edu Thu Jun 19 14:10:02 2003 From: agfische at email.smith.edu (Aaron Fischer) Date: Thu, 19 Jun 2003 14:10:02 -0400 Subject: [nycphp-talk] digest mode? In-Reply-To: <200306191802.h5JI28TB086205@parsec.nyphp.org> Message-ID: <3F3832A4-A281-11D7-A144-0003930D07F2@email.smith.edu> Chalu, I still don't see why this would help you, even if it was programmed in. If you are trying to filter the list because you don't want to see "newbie" questions, how is staying subscribed to the list while not receiving any email from it going to benefit you? Are you just going to want to change your preferences and receive email when you ask a question? If so, that is pretty selfish and goes against the spirit of a listserve, IMHO. Aaron On Thursday, Jun 19, 2003, at 14:02 US/Eastern, Chalu Kim wrote: > It should not be that difficult to program that in. > > Let's see. It could be done under an hour. > > alter table users.... > > if dontsend == 'y', don't send > > you have an interface to check that. > > Or use Gmane or Mailman > > Procmail and filter? You will get into trouble one of these days if > you do > things like that. That is why it is a poor answer. From chalu at egenius.com Thu Jun 19 13:53:43 2003 From: chalu at egenius.com (Chalu Kim) Date: Thu, 19 Jun 2003 13:53:43 -0400 Subject: [nycphp-talk] digest mode? References: <200306191810.h5JIAaSx088089@parsec.nyphp.org> Message-ID: <01b301c3368b$b94c5f50$6000a8c0@kimbap.local> I simply would like to receive in digest mode. That is what newspaper does. ----- Original Message ----- From: "Aaron Fischer" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 2:10 PM Subject: Re: [nycphp-talk] digest mode? > Chalu, I still don't see why this would help you, even if it was > programmed in. If you are trying to filter the list because you don't > want to see "newbie" questions, how is staying subscribed to the list > while not receiving any email from it going to benefit you? > > Are you just going to want to change your preferences and receive email > when you ask a question? If so, that is pretty selfish and goes > against the spirit of a listserve, IMHO. > > Aaron > > On Thursday, Jun 19, 2003, at 14:02 US/Eastern, Chalu Kim wrote: > > > It should not be that difficult to program that in. > > > > Let's see. It could be done under an hour. > > > > alter table users.... > > > > if dontsend == 'y', don't send > > > > you have an interface to check that. > > > > Or use Gmane or Mailman > > > > Procmail and filter? You will get into trouble one of these days if > > you do > > things like that. That is why it is a poor answer. > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From jlacey at ix.netcom.com Thu Jun 19 14:14:29 2003 From: jlacey at ix.netcom.com (John Lacey) Date: Thu, 19 Jun 2003 12:14:29 -0600 Subject: [nycphp-talk] digest mode? References: <200306191807.h5JI6rVV087283@parsec.nyphp.org> Message-ID: <002001c3368e$a148bae0$0200000a@Pentium700> amen :) ----- Original Message ----- From: "Hans Zaunere" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 12:06 PM Subject: Re: [nycphp-talk] digest mode? Please, let us not continue this thread on Talk. At first glance it may seem to be easily patched in, but I can assure you that it is not; the system has undergone too many patches already. I'm happy to discuss and get feedback about features and development for the system, but lets not clutter people's mailboxes - NYPHP-Development is the appropiate mailing list for this thread. Thanks, H --- Chalu Kim wrote: > It should not be that difficult to program that in. > > Let's see. It could be done under an hour. > > alter table users.... > > if dontsend == 'y', don't send > > you have an interface to check that. > > Or use Gmane or Mailman > > Procmail and filter? You will get into trouble one of these days if you do > things like that. That is why it is a poor answer. > > ----- Original Message ----- > From: "Analysis & Solutions" > To: "NYPHP Talk" > Sent: Thursday, June 19, 2003 12:31 PM > Subject: Re: [nycphp-talk] digest mode? > > > > On Thu, Jun 19, 2003 at 12:25:30PM -0400, Chalu Kim wrote: > > > That is a very poor answer... > > > > WHATever. It accomplishes the person's goal of not having to see > messages > > while still being subscribed to the list. I imagine such an option > > doesn't exist in our list management program. Do you have a better > > answer? > > > > Oh, if you're dishing out inane criticism, how about taking some... > > Leaving the entirety of the prior person's message, including their > > signature and the list's unsubscribe message -- let alone top posting -- > > is poor practice. > > > > Later, > > > > --Dan > > > > -- > > FREE scripts that make web and database programming easier > > http://www.analysisandsolutions.com/software/ > > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From chendry at nyc.rr.com Thu Jun 19 14:29:43 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Thu, 19 Jun 2003 14:29:43 -0400 Subject: POST to mail Message-ID: Anyone know a quick and painless way I can dump POST vars into a format that will be somewhat readable to the layperson receiving it via the mail() function? Thanks. Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Thu Jun 19 14:35:45 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 19 Jun 2003 14:35:45 -0400 Subject: [nycphp-talk] POST to mail In-Reply-To: <200306191829.h5JITmR1090564@parsec.nyphp.org> References: <200306191829.h5JITmR1090564@parsec.nyphp.org> Message-ID: <20030619183545.GA9620@panix.com> On Thu, Jun 19, 2003 at 02:29:48PM -0400, Christopher Hendry wrote: > Anyone know a quick and painless way I can dump POST vars into a format that > will be somewhat readable to the layperson receiving it via the mail() > function? $Body = implode("\ ", $Array); or $Body = ''; foreach ($Array as $Key => $Val) { $Body .= "$Key: $Val\ \ "; } --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From danielc at analysisandsolutions.com Thu Jun 19 14:37:24 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 19 Jun 2003 14:37:24 -0400 Subject: [nycphp-talk] POST to mail In-Reply-To: <200306191835.h5JIZmR1091407@parsec.nyphp.org> References: <200306191835.h5JIZmR1091407@parsec.nyphp.org> Message-ID: <20030619183724.GB9620@panix.com> On Thu, Jun 19, 2003 at 02:35:47PM -0400, Analysis & Solutions wrote: > > $Body = implode("\ ", $Array); In my exmaples I used $Array. To better answer your question, use $_POST instead of $Array. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From chendry at nyc.rr.com Thu Jun 19 14:39:07 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Thu, 19 Jun 2003 14:39:07 -0400 Subject: [nycphp-talk] POST to mail In-Reply-To: <200306191836.h5JIZmX7091407@parsec.nyphp.org> Message-ID: yep, that'll work - thanks for thinking for me ;) -> -----Original Message----- -> From: Analysis & Solutions [mailto:danielc at analysisandsolutions.com] -> Sent: Thursday, June 19, 2003 2:36 PM -> To: NYPHP Talk -> Subject: Re: [nycphp-talk] POST to mail -> -> -> On Thu, Jun 19, 2003 at 02:29:48PM -0400, Christopher Hendry wrote: -> > Anyone know a quick and painless way I can dump POST vars into -> a format that -> > will be somewhat readable to the layperson receiving it via the mail() -> > function? -> -> $Body = implode("\ ", $Array); -> -> or -> -> $Body = ''; -> -> foreach ($Array as $Key => $Val) { -> $Body .= "$Key: $Val\ \ "; -> } -> -> --Dan -> -> -- -> FREE scripts that make web and database programming easier -> http://www.analysisandsolutions.com/software/ -> T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y -> 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -> -> -> --- Unsubscribe at http://nyphp.org/list/ --- -> -> -> From chalu at egenius.com Thu Jun 19 14:39:44 2003 From: chalu at egenius.com (Chalu Kim) Date: Thu, 19 Jun 2003 14:39:44 -0400 Subject: [nycphp-talk] digest mode? References: <200306191813.h5JIDESx088864@parsec.nyphp.org> Message-ID: <01d401c33692$273118c0$6000a8c0@kimbap.local> One last thing Where do you unsubscribe? I look at the web site and in the past, I requested to get off. Hans, remember? ----- Original Message ----- From: "Chalu Kim" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 2:13 PM Subject: Re: [nycphp-talk] digest mode? > I simply would like to receive in digest mode. That is what newspaper does. > > ----- Original Message ----- > From: "Aaron Fischer" > To: "NYPHP Talk" > Sent: Thursday, June 19, 2003 2:10 PM > Subject: Re: [nycphp-talk] digest mode? > > > > Chalu, I still don't see why this would help you, even if it was > > programmed in. If you are trying to filter the list because you don't > > want to see "newbie" questions, how is staying subscribed to the list > > while not receiving any email from it going to benefit you? > > > > Are you just going to want to change your preferences and receive email > > when you ask a question? If so, that is pretty selfish and goes > > against the spirit of a listserve, IMHO. > > > > Aaron > > > > On Thursday, Jun 19, 2003, at 14:02 US/Eastern, Chalu Kim wrote: > > > > > It should not be that difficult to program that in. > > > > > > Let's see. It could be done under an hour. > > > > > > alter table users.... > > > > > > if dontsend == 'y', don't send > > > > > > you have an interface to check that. > > > > > > Or use Gmane or Mailman > > > > > > Procmail and filter? You will get into trouble one of these days if > > > you do > > > things like that. That is why it is a poor answer. > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From danielc at analysisandsolutions.com Thu Jun 19 15:00:41 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 19 Jun 2003 15:00:41 -0400 Subject: [nycphp-talk] digest mode? In-Reply-To: <200306191859.h5JIxGR1093959@parsec.nyphp.org> References: <200306191859.h5JIxGR1093959@parsec.nyphp.org> Message-ID: <20030619190041.GA12291@panix.com> On Thu, Jun 19, 2003 at 02:59:16PM -0400, Chalu Kim wrote: > > Where do you unsubscribe? Dude, the method of unsubscribing is mentioned on the bottom of each and every email the list sends out. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From chalu at egenius.com Thu Jun 19 14:48:37 2003 From: chalu at egenius.com (Chalu Kim) Date: Thu, 19 Jun 2003 14:48:37 -0400 Subject: [nycphp-talk] digest mode? References: <200306191900.h5JJ0hSx094785@parsec.nyphp.org> Message-ID: <01dc01c33693$651a7130$6000a8c0@kimbap.local> Did you check before you say that? It does not say unsubscribe. Just log in it says. Just a few seconds it says. NYPHP is like a death trap. You figure out what to do? Do you even have forgotten password? This is the worst. Does it even have privacy statement? Can you share our emails with others? New York PHP is a copy righted. ----- Original Message ----- From: "Analysis & Solutions" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 3:00 PM Subject: Re: [nycphp-talk] digest mode? > On Thu, Jun 19, 2003 at 02:59:16PM -0400, Chalu Kim wrote: > > > > Where do you unsubscribe? > > Dude, the method of unsubscribing is mentioned on the bottom of each and > every email the list sends out. > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From dmintz at panix.com Thu Jun 19 15:20:42 2003 From: dmintz at panix.com (David Mintz) Date: Thu, 19 Jun 2003 15:20:42 -0400 (EDT) Subject: why phpinfo() exposes $_ENV In-Reply-To: <200306161432.h5GEVcXx049380@parsec.nyphp.org> References: <200306161432.h5GEVcXx049380@parsec.nyphp.org> Message-ID: Hello, This is the dude who just got started with a fresh AMP environment on my Red Hat 9 box, thanks again for the help. It's workin'. I notice that phpinfo() output includes $_ENV, which seems a little intrusive, and I'm wondering why and what can be done about it. (I googled for this and found a thousand people's phpinfo hanging out in public, and one reference to the issuee, but no solution. Perused the php docs too.) My httpd is running as nobody and the script in question is owned by user david, that's whose environment is being printed. I recognize that it's not considered good security practice to advertise your phpinfo and I don't plan to, but I'm curious about this anyway. TIA. --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "You want me to pour the beer, Frank?" From dmintz at panix.com Thu Jun 19 15:21:56 2003 From: dmintz at panix.com (David Mintz) Date: Thu, 19 Jun 2003 15:21:56 -0400 (EDT) Subject: [nycphp-talk] digest mode? In-Reply-To: <200306191908.h5JJ89Y3095786@parsec.nyphp.org> References: <200306191908.h5JJ89Y3095786@parsec.nyphp.org> Message-ID: Yo, egenius: STFU --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "You want me to pour the beer, Frank?" From shiflett at php.net Thu Jun 19 15:22:40 2003 From: shiflett at php.net (Chris Shiflett) Date: Thu, 19 Jun 2003 12:22:40 -0700 (PDT) Subject: [nycphp-talk] digest mode? In-Reply-To: <200306191908.h5JJ89Yv095786@parsec.nyphp.org> Message-ID: <20030619192240.78890.qmail@web14308.mail.yahoo.com> --- Chalu Kim wrote: > --- Unsubscribe at http://nyphp.org/list/ --- egenius, If you seriously can't figure out how to unsubscribe, ask the listmaster at listmaster at nyphp.org to help you rather than spamming the list. Chris From chalu at egenius.com Thu Jun 19 15:07:05 2003 From: chalu at egenius.com (Chalu Kim) Date: Thu, 19 Jun 2003 15:07:05 -0400 Subject: [nycphp-talk] digest mode? References: <200306191922.h5JJMkSx098206@parsec.nyphp.org> Message-ID: <01e601c33695$f933bb90$6000a8c0@kimbap.local> I did that. Nothing... ----- Original Message ----- From: "Chris Shiflett" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 3:22 PM Subject: Re: [nycphp-talk] digest mode? > --- Chalu Kim wrote: > > > > egenius, > > If you seriously can't figure out how to unsubscribe, ask the listmaster at > listmaster at nyphp.org to help you rather than spamming the list. > > Chris > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From chalu at egenius.com Thu Jun 19 15:09:41 2003 From: chalu at egenius.com (Chalu Kim) Date: Thu, 19 Jun 2003 15:09:41 -0400 Subject: [nycphp-talk] digest mode? References: <200306191922.h5JJLwSx097447@parsec.nyphp.org> Message-ID: <01fd01c33696$56440b00$6000a8c0@kimbap.local> Do you know anything not to use inflamatory on the list? It is not a good form, David. ----- Original Message ----- From: "David Mintz" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 3:21 PM Subject: Re: [nycphp-talk] digest mode? > > Yo, egenius: STFU > > > --- > David Mintz > http://davidmintz.org/ > Email: See http://dmintzweb.com/whitelist.php first! > > "You want me to pour the beer, Frank?" > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From nyphp at websapp.com Thu Jun 19 15:27:37 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Thu, 19 Jun 2003 15:27:37 -0400 Subject: [nycphp-talk] digest mode? In-Reply-To: <200306191923.h5JJMkbB098206@parsec.nyphp.org> Message-ID: NYPHP list, Let's not make matters worse. Just ignore any of Chalu's posting. I understand that it is very enoying, but these things happen on even the best of lists! Hans will be in contact directly with Chalu (off list). Please let this be the last post on this issue. Thank you, Daniel Kushner Vice President, New York PHP http://nyphp.org/ daniel at nyphp.org > -----Original Message----- > From: Chris Shiflett [mailto:shiflett at php.net] > Sent: Thursday, June 19, 2003 3:23 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] digest mode? > > > --- Chalu Kim wrote: > > > > egenius, > > If you seriously can't figure out how to unsubscribe, ask the > listmaster at > listmaster at nyphp.org to help you rather than spamming the list. > > Chris > > > --- Unsubscribe at http://nyphp.org/list/ --- > From nyphp at websapp.com Thu Jun 19 15:32:44 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Thu, 19 Jun 2003 15:32:44 -0400 Subject: NYPHP is looking for a SF Admin Message-ID: NYPHP has multiple Open Source projects that it would like to start sharing with the community. If there is anyone that has experience in administrating Source Forge projects and that is willing to volunteer some of their time to NYPHP please contact me off list at daniel at nyphp.org Best, Daniel Kushner From chalu at egenius.com Thu Jun 19 15:16:28 2003 From: chalu at egenius.com (Chalu Kim) Date: Thu, 19 Jun 2003 15:16:28 -0400 Subject: [nycphp-talk] digest mode? References: <200306191929.h5JJTTSx099973@parsec.nyphp.org> Message-ID: <022301c33697$48b13340$6000a8c0@kimbap.local> Let's not make matters worse. Just ignore any of Daniel's postings. Listen to yourself. Daniel.I understand it is very enjoying. This is like entering a red neck country. It is just that you can't tolerate difference in opinions and how people use lists. For example, I just don't see the reason why you create your own list for it is very complex to build a good tool. Look at the feature sets of Gmane or Mailman. My opinion of the NYPHP has been dimmed by this flurry of email exchanges. All the best >From the vanished. ----- Original Message ----- From: "Daniel Kushner" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 3:29 PM Subject: RE: [nycphp-talk] digest mode? > NYPHP list, > > Let's not make matters worse. Just ignore any of Chalu's posting. I > understand that it is very enoying, but these things happen on even the best > of lists! > > Hans will be in contact directly with Chalu (off list). > > Please let this be the last post on this issue. > > Thank you, > Daniel Kushner > Vice President, New York PHP > http://nyphp.org/ > daniel at nyphp.org > > > -----Original Message----- > > From: Chris Shiflett [mailto:shiflett at php.net] > > Sent: Thursday, June 19, 2003 3:23 PM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] digest mode? > > > > > > --- Chalu Kim wrote: > > > > > > > egenius, > > > > If you seriously can't figure out how to unsubscribe, ask the > > listmaster at > > listmaster at nyphp.org to help you rather than spamming the list. > > > > Chris > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From jkelly at sussex.cc.nj.us Thu Jun 19 15:42:05 2003 From: jkelly at sussex.cc.nj.us (jessica kelly) Date: Thu, 19 Jun 2003 15:42:05 -0400 Subject: [nycphp-talk] digest mode? Message-ID: Yo, Butt Munch, --- Unsubscribe at http://nyphp.org/list/ --- And please hurry!!!!!!!! >>> chalu at egenius.com 6/19/03 3:35:58 PM >>> Let's not make matters worse. Just ignore any of Daniel's postings. Listen to yourself. Daniel.I understand it is very enjoying. This is like entering a red neck country. It is just that you can't tolerate difference in opinions and how people use lists. For example, I just don't see the reason why you create your own list for it is very complex to build a good tool. Look at the feature sets of Gmane or Mailman. My opinion of the NYPHP has been dimmed by this flurry of email exchanges. All the best >From the vanished. ----- Original Message ----- From: "Daniel Kushner" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 3:29 PM Subject: RE: [nycphp-talk] digest mode? > NYPHP list, > > Let's not make matters worse. Just ignore any of Chalu's posting. I > understand that it is very enoying, but these things happen on even the best > of lists! > > Hans will be in contact directly with Chalu (off list). > > Please let this be the last post on this issue. > > Thank you, > Daniel Kushner > Vice President, New York PHP > http://nyphp.org/ > daniel at nyphp.org > > > -----Original Message----- > > From: Chris Shiflett [mailto:shiflett at php.net] > > Sent: Thursday, June 19, 2003 3:23 PM > > To: NYPHP Talk > > Subject: Re: [nycphp-talk] digest mode? > > > > > > --- Chalu Kim wrote: > > > > > > > egenius, > > > > If you seriously can't figure out how to unsubscribe, ask the > > listmaster at > > listmaster at nyphp.org to help you rather than spamming the list. > > > > Chris > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From chalu at egenius.com Thu Jun 19 15:26:34 2003 From: chalu at egenius.com (Chalu Kim) Date: Thu, 19 Jun 2003 15:26:34 -0400 Subject: [nycphp-talk] digest mode? References: <200306191942.h5JJg0Sx003489@parsec.nyphp.org> Message-ID: <023201c33698$b2491a10$6000a8c0@kimbap.local> keep going. RN ----- Original Message ----- From: "jessica kelly" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 3:42 PM Subject: Re: [nycphp-talk] digest mode? > Yo, Butt Munch, > > > > And please hurry!!!!!!!! > > >>> chalu at egenius.com 6/19/03 3:35:58 PM >>> > Let's not make matters worse. Just ignore any of Daniel's postings. > > Listen to yourself. Daniel.I understand it is very enjoying. > > This is like entering a red neck country. It is just that you can't tolerate > difference in opinions and how people use lists. > > For example, I just don't see the reason why you create your own list for it > is very complex to build a good tool. Look at the feature sets of Gmane or > Mailman. > > My opinion of the NYPHP has been dimmed by this flurry of email exchanges. > > All the best > > >From the vanished. > > ----- Original Message ----- > From: "Daniel Kushner" > To: "NYPHP Talk" > Sent: Thursday, June 19, 2003 3:29 PM > Subject: RE: [nycphp-talk] digest mode? > > > > NYPHP list, > > > > Let's not make matters worse. Just ignore any of Chalu's posting. I > > understand that it is very enoying, but these things happen on even the > best > > of lists! > > > > Hans will be in contact directly with Chalu (off list). > > > > Please let this be the last post on this issue. > > > > Thank you, > > Daniel Kushner > > Vice President, New York PHP > > http://nyphp.org/ > > daniel at nyphp.org > > > > > -----Original Message----- > > > From: Chris Shiflett [mailto:shiflett at php.net] > > > Sent: Thursday, June 19, 2003 3:23 PM > > > To: NYPHP Talk > > > Subject: Re: [nycphp-talk] digest mode? > > > > > > > > > --- Chalu Kim wrote: > > > > > > > > > > egenius, > > > > > > If you seriously can't figure out how to unsubscribe, ask the > > > listmaster at > > > listmaster at nyphp.org to help you rather than spamming the list. > > > > > > Chris > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From chalu at egenius.com Thu Jun 19 15:26:51 2003 From: chalu at egenius.com (Chalu Kim) Date: Thu, 19 Jun 2003 15:26:51 -0400 Subject: [nycphp-talk] digest mode? References: <200306191922.h5JJLwSx097447@parsec.nyphp.org> Message-ID: <023801c33698$bbf17bc0$6000a8c0@kimbap.local> RN ----- Original Message ----- From: "David Mintz" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 3:21 PM Subject: Re: [nycphp-talk] digest mode? > > Yo, egenius: STFU > > > --- > David Mintz > http://davidmintz.org/ > Email: See http://dmintzweb.com/whitelist.php first! > > "You want me to pour the beer, Frank?" > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From bpang at bpang.com Thu Jun 19 16:01:15 2003 From: bpang at bpang.com (Brian Pang) Date: Thu, 19 Jun 2003 16:01:15 -0400 Subject: [nycphp-talk] digest mode? Message-ID: dude, what's the matter with you? > RN > > ----- Original Message ----- > From: "David Mintz" > To: "NYPHP Talk" > Sent: Thursday, June 19, 2003 3:21 PM > Subject: Re: [nycphp-talk] digest mode? > > > > > > Yo, egenius: STFU > > > > > > --- > > David Mintz > > http://davidmintz.org/ > > Email: See http://dmintzweb.com/whitelist.php first! > > > > "You want me to pour the beer, Frank?" > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > > From chalu at egenius.com Thu Jun 19 16:12:19 2003 From: chalu at egenius.com (Chalu Kim) Date: Thu, 19 Jun 2003 16:12:19 -0400 Subject: What I see wrong with NYPHP mailing list. References: <200306192001.h5JK1WSx006015@parsec.nyphp.org> Message-ID: <024801c3369f$15f5b4f0$6000a8c0@kimbap.local> Dear NYPHPers Nothing is matter with me. Awhile back like a month or two ago, I asked Hans and rather the web master to remove me from the list. I asked about retrieving my password. Nothing happened. Now, I asked politely about the digest mode so that I can reduce amount of individual emails I receive. This is what I get for getting this done. Hopefully, I raise enough noise to get off this list this time. That is all. You get it now. I am not too happy about that way things turned out with this NYPHP mailing list. ----- Original Message ----- From: "Brian Pang" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 4:01 PM Subject: Re: [nycphp-talk] digest mode? > dude, what's the matter with you? > > > > > RN > > > > ----- Original Message ----- > > From: "David Mintz" > > To: "NYPHP Talk" > > Sent: Thursday, June 19, 2003 3:21 PM > > Subject: Re: [nycphp-talk] digest mode? > > > > > > > > > > Yo, egenius: STFU > > > > > > > > > --- > > > David Mintz > > > http://davidmintz.org/ > > > Email: See http://dmintzweb.com/whitelist.php first! > > > > > > "You want me to pour the beer, Frank?" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From zaunere at yahoo.com Thu Jun 19 16:50:56 2003 From: zaunere at yahoo.com (Hans Zaunere) Date: Thu, 19 Jun 2003 13:50:56 -0700 (PDT) Subject: [nycphp-talk] What I see wrong with NYPHP mailing list. In-Reply-To: <200306192032.h5JKVuXJ007247@parsec.nyphp.org> Message-ID: <20030619205056.93965.qmail@web12803.mail.yahoo.com> Let's not respond to this. It's over. Best, H --- Chalu Kim wrote: > Dear NYPHPers > > Nothing is matter with me. Awhile back like a month or two ago, I asked > Hans and rather the web master to remove me from the list. I asked about > retrieving my password. > > Nothing happened. > > Now, I asked politely about the digest mode so that I can reduce amount of > individual emails I receive. This is what I get for getting this done. > Hopefully, I raise enough noise to get off this list this time. > > That is all. > > You get it now. I am not too happy about that way things turned out with > this NYPHP mailing list. > > ----- Original Message ----- > From: "Brian Pang" > To: "NYPHP Talk" > Sent: Thursday, June 19, 2003 4:01 PM > Subject: Re: [nycphp-talk] digest mode? > > > > dude, what's the matter with you? > > > > > > > > > RN > > > > > > ----- Original Message ----- > > > From: "David Mintz" > > > To: "NYPHP Talk" > > > Sent: Thursday, June 19, 2003 3:21 PM > > > Subject: Re: [nycphp-talk] digest mode? > > > > > > > > > > > > > > Yo, egenius: STFU > > > > > > > > > > > > --- > > > > David Mintz > > > > http://davidmintz.org/ > > > > Email: See http://dmintzweb.com/whitelist.php first! > > > > > > > > "You want me to pour the beer, Frank?" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From hans at nyphp.org Thu Jun 19 17:04:35 2003 From: hans at nyphp.org (Hans Zaunere) Date: Thu, 19 Jun 2003 14:04:35 -0700 (PDT) Subject: [nycphp-talk] why phpinfo exposes $_ENV In-Reply-To: <200306191921.h5JJKiXJ096691@parsec.nyphp.org> Message-ID: <20030619210435.29289.qmail@web12804.mail.yahoo.com> --- David Mintz wrote: > > Hello, > > This is the dude who just got started with a fresh AMP environment on my > Red Hat 9 box, thanks again for the help. It's workin'. > > I notice that phpinfo() output includes $_ENV, which seems a little > intrusive, and I'm wondering why and what can be done about it. (I googled > for this and found a thousand people's phpinfo hanging out in public, and > one reference to the issuee, but no solution. Perused the php docs too.) > > My httpd is running as nobody and the script in question is owned by user > david, that's whose environment is being printed. > > I recognize that it's not considered good security practice to advertise > your phpinfo and I don't plan to, but I'm curious about this anyway. TIA. Take a look at the blurb about variables_order at http://us2.php.net/manual/en/configuration.directives.php. You'll want to take the 'E' out of that setting, which can be done via php.ini or httpd.conf. H From jsiegel1 at optonline.net Thu Jun 19 17:35:37 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 19 Jun 2003 17:35:37 -0400 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306191623.h5JGNCXn074212@parsec.nyphp.org> Message-ID: <007e01c336aa$b998e090$6501a8c0@EZDSDELL> Dan, Thanks for your input...here's some more info on what I'm doing. On Form 1 a car dealer selects a manufacturer, say, Audi and Alfa-Romeo. On Form 2, I generate all of the models for these manufacturers and provide a checkbox next to each model. To differentiate makes/models on the page I generate checkboxes that look like the following: First part gives me the manufacturer, second part gives me the model. The problem is the Post data. For example, look what happens to the Spider Veloce: (I used var_dump) ["ALFA-ROMEO|1600_DUETTO_SPIDER"] The post data has underscores. But the other part of the issue is that the page posts to itself if there is a data error and checks the various checkboxes depending on the post data. In the case where the post data is ["ALFA-ROMEO|GTV-6"] it's easy enough to do. So...do I do something like a str_replace function to remove the underscores? Keep in mind that I'm on php 4.1.x and it does not have htmlentities nor html_decode_entity. Jeff -----Original Message----- From: Analysis & Solutions [mailto:danielc at analysisandsolutions.com] Sent: Thursday, June 19, 2003 11:23 AM To: NYPHP Talk Subject: Re: [nycphp-talk] MySQL and spaces in data Hi Jeff: On Thu, Jun 19, 2003 at 11:11:50AM -0400, Jeff wrote: > > While some folks have suggested using string replace functions on the incomming data, I beg to differ. Text values like that aren't meant for name fields. Perhaps swap the value and name fields? Or for the name and/or value fields, use id numbers from the database. The name could even be an array, such as: name="car[123]" allowing your receiving script to loop through all of the "car" array elements with a foreach statement. Without knowing the more context of what you're trying to do, it's hard to give more solid guidance. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 --- Unsubscribe at http://nyphp.org/list/ --- From Pinyo.Bhulipongsanon at usa.xerox.com Thu Jun 19 17:46:51 2003 From: Pinyo.Bhulipongsanon at usa.xerox.com (Bhulipongsanon, Pinyo) Date: Thu, 19 Jun 2003 17:46:51 -0400 Subject: [nycphp-talk] POST to mail Message-ID: just 2 lines: foreach (array_keys($_POST) as $key ) { $mailBody .= "$$key=$_POST[$key]\ "; } @mail($admin_email, $email_title, $mailBody, $optional_header); Enjoy :-) -----Original Message----- From: Christopher Hendry [mailto:chendry at nyc.rr.com] Sent: Thursday, June 19, 2003 2:30 PM To: NYPHP Talk Subject: [nycphp-talk] POST to mail Anyone know a quick and painless way I can dump POST vars into a format that will be somewhat readable to the layperson receiving it via the mail() function? Thanks. Chris --- Unsubscribe at http://nyphp.org/list/ --- From chendry at nyc.rr.com Thu Jun 19 18:42:41 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Thu, 19 Jun 2003 18:42:41 -0400 Subject: [nycphp-talk] POST to mail In-Reply-To: <200306192147.h5JLkxX5015698@parsec.nyphp.org> Message-ID: ooh, if we can get it to one line, I'll give you a nickel. :) what's the '@' do? - C -> -----Original Message----- -> From: Bhulipongsanon, Pinyo [mailto:Pinyo.Bhulipongsanon at usa.xerox.com] -> Sent: Thursday, June 19, 2003 5:47 PM -> To: NYPHP Talk -> Subject: RE: [nycphp-talk] POST to mail -> -> -> just 2 lines: -> -> foreach (array_keys($_POST) as $key ) { $mailBody .= -> "$$key=$_POST[$key]\ "; } -> @mail($admin_email, $email_title, $mailBody, $optional_header); -> -> Enjoy :-) -> -> -----Original Message----- -> From: Christopher Hendry [mailto:chendry at nyc.rr.com] -> Sent: Thursday, June 19, 2003 2:30 PM -> To: NYPHP Talk -> Subject: [nycphp-talk] POST to mail -> -> -> Anyone know a quick and painless way I can dump POST vars into a -> format that -> will be somewhat readable to the layperson receiving it via the mail() -> function? -> -> Thanks. -> Chris -> -> -> -> -> -> -> -> --- Unsubscribe at http://nyphp.org/list/ --- -> -> -> From danielc at analysisandsolutions.com Thu Jun 19 19:02:10 2003 From: danielc at analysisandsolutions.com (Analysis & Solutions) Date: Thu, 19 Jun 2003 19:02:10 -0400 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306192136.h5JLaGR1014833@parsec.nyphp.org> References: <200306192136.h5JLaGR1014833@parsec.nyphp.org> Message-ID: <20030619230210.GA2889@panix.com> Jeff: On Thu, Jun 19, 2003 at 05:36:16PM -0400, Jeff wrote: > Dan, > > Thanks for your input...here's some more info on what I'm doing. > > > > > First part gives me the manufacturer, second part gives me the model. But what you haven't clarified is the forms actual purpose. Okay, so, you're processing the manufacturer and model in the checkboxes. But what does it mean if someone checks the box? In addition, what other data is submitted? What are you doing with all of this data? Before writing what I just wrote, I started writing the following, so I'm leaving it here to avoid having to restate it later... You mentioned using a database. I assume each manufacturer and each model are represented by integer based primary keys. Right? Again, if you want to store both the manufacturer and model ID numbers in the name attribute of the name element, do this: Where the first key is the manufacturer and the second key is the model. > The post data has underscores. Which is why I'm saying you should use use a different approach. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 From jsiegel1 at optonline.net Thu Jun 19 19:48:01 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 19 Jun 2003 19:48:01 -0400 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306192302.h5JN2CXl018420@parsec.nyphp.org> Message-ID: <008d01c336bd$3980b140$6501a8c0@EZDSDELL> The purpose: If a box is checked it means that the dealer sells parts for that particular make/model. This data is then used to match a purchaser to a dealer(s) depending on the user's needs. Now I *wish* I could say that the makes/models had identifying keys however...things are worse than that. This data is matched against a table containing 2.5 million rows (that's right! 2.5 million rows) of non-normalized data that contains information on most every part for most every make/model made since about 1952. This data comes from another source and, therefore, there is nothing that can be done to normalize the data (it's a L-O-N-G story as to why it can not be normalized...makes/models are simply text strings within each row). Consequently, the text is needed because a match is made by matching text strings. Not the greatest system, I admit, but sometimes one has to work with what one is given. I've tried the str_replace and that seems to have done the trick (at least in preselecting check boxes based on post data) and I'll use it again to strip out underscores when I save it to the database. I'm open to suggestions if you have another idea. Jeff -----Original Message----- From: Analysis & Solutions [mailto:danielc at analysisandsolutions.com] Sent: Thursday, June 19, 2003 6:02 PM To: NYPHP Talk Subject: Re: [nycphp-talk] MySQL and spaces in data Jeff: On Thu, Jun 19, 2003 at 05:36:16PM -0400, Jeff wrote: > Dan, > > Thanks for your input...here's some more info on what I'm doing. > > > > > First part gives me the manufacturer, second part gives me the model. But what you haven't clarified is the forms actual purpose. Okay, so, you're processing the manufacturer and model in the checkboxes. But what does it mean if someone checks the box? In addition, what other data is submitted? What are you doing with all of this data? Before writing what I just wrote, I started writing the following, so I'm leaving it here to avoid having to restate it later... You mentioned using a database. I assume each manufacturer and each model are represented by integer based primary keys. Right? Again, if you want to store both the manufacturer and model ID numbers in the name attribute of the name element, do this: Where the first key is the manufacturer and the second key is the model. > The post data has underscores. Which is why I'm saying you should use use a different approach. --Dan -- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 --- Unsubscribe at http://nyphp.org/list/ --- From jim at bizcomputinginc.com Thu Jun 19 20:19:26 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Thu, 19 Jun 2003 20:19:26 -0400 Subject: [nycphp-talk] MySQL and spaces in data References: <200306192348.h5JNmnRj020172@parsec.nyphp.org> Message-ID: <01da01c336c1$9c1d74b0$6501a8c0@Notebook> Jeff, Why can't you build your own table for make/model? You can run a process that parses each row of data lookup the string in your table. If the string doesn't exist in your table, add it with a unique int ID. If it exists in your table, move to the next row of your denormalized table. What you will end up with is a table with 2 columns, ID and MakeModel. ID is an int set as primary key, MakeModel is a varchar with a unique index. Now you can build your form using the ID's from your table rather than the MakeModel string. Even if the data is coming from another source, normalization of the data makes much more sense than trying to use the data in denormalized condition. Your app will perform much better and will be much easier to troubleshoot and maintain. Even if the data is not under your control I would sugest writing a background process that periodically parses the data and puts it into your own normalized tables. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: "Jeff" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 7:48 PM Subject: RE: [nycphp-talk] MySQL and spaces in data > The purpose: > > If a box is checked it means that the dealer sells parts for that > particular make/model. This data is then used to match a purchaser to a > dealer(s) depending on the user's needs. > > Now I *wish* I could say that the makes/models had identifying keys > however...things are worse than that. This data is matched against a > table containing 2.5 million rows (that's right! 2.5 million rows) of > non-normalized data that contains information on most every part for > most every make/model made since about 1952. This data comes from > another source and, therefore, there is nothing that can be done to > normalize the data (it's a L-O-N-G story as to why it can not be > normalized...makes/models are simply text strings within each row). > Consequently, the text is needed because a match is made by matching > text strings. > > Not the greatest system, I admit, but sometimes one has to work with > what one is given. > > I've tried the str_replace and that seems to have done the trick (at > least in preselecting check boxes based on post data) and I'll use it > again to strip out underscores when I save it to the database. > > I'm open to suggestions if you have another idea. > > Jeff > > -----Original Message----- > From: Analysis & Solutions [mailto:danielc at analysisandsolutions.com] > Sent: Thursday, June 19, 2003 6:02 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] MySQL and spaces in data > > > Jeff: > > On Thu, Jun 19, 2003 at 05:36:16PM -0400, Jeff wrote: > > Dan, > > > > Thanks for your input...here's some more info on what I'm doing. > > > > > > > > > > First part gives me the manufacturer, second part gives me the model. > > But what you haven't clarified is the forms actual purpose. Okay, so, > you're processing the manufacturer and model in the checkboxes. But > what > does it mean if someone checks the box? In addition, what other data is > submitted? What are you doing with all of this data? > > Before writing what I just wrote, I started writing the following, so > I'm > leaving it here to avoid having to restate it later... > > You mentioned using a database. I assume each manufacturer and each > model > are represented by integer based primary keys. Right? Again, if you > want > to store both the manufacturer and model ID numbers in the name > attribute > of the name element, do this: > > > > > > Where the first key is the manufacturer and the second key is the model. > > > > The post data has underscores. > > Which is why I'm saying you should use use a different approach. > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > > > From jsiegel1 at optonline.net Thu Jun 19 20:32:11 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 19 Jun 2003 20:32:11 -0400 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306200020.h5K0JZXl021436@parsec.nyphp.org> Message-ID: <00a201c336c3$645af0f0$6501a8c0@EZDSDELL> I had originally intended to do that, that is, normalize the data. The idea was "killed" a long time ago by the client. Let me make matters worse, so to speak. This data has a part code that represents each different car part, e.g., brakes; fender, etc. However, the company that creates the data (*not* my client) decided to use the same exact part code number for different parts so that every electronic module in a car has the part code "591" even though one module may control air bags and one may control ignition, etc. Further, part dealers know the parts by these 3 digit codes and can differentiate them by their description (ignition; air bag, etc.). So it requires a part code and text description to differentiate an air bag control module for a Buick from one from a Chevy, etc. Even the make/model information that is provided is not complete....for example, some parts are lumped in under Mercedes Benz even though there are many different models of Mercedes. The bottom line is that the data is not pretty. Jeff -----Original Message----- From: Jim Hendricks [mailto:jim at bizcomputinginc.com] Sent: Thursday, June 19, 2003 7:20 PM To: NYPHP Talk Subject: Re: [nycphp-talk] MySQL and spaces in data Jeff, Why can't you build your own table for make/model? You can run a process that parses each row of data lookup the string in your table. If the string doesn't exist in your table, add it with a unique int ID. If it exists in your table, move to the next row of your denormalized table. What you will end up with is a table with 2 columns, ID and MakeModel. ID is an int set as primary key, MakeModel is a varchar with a unique index. Now you can build your form using the ID's from your table rather than the MakeModel string. Even if the data is coming from another source, normalization of the data makes much more sense than trying to use the data in denormalized condition. Your app will perform much better and will be much easier to troubleshoot and maintain. Even if the data is not under your control I would sugest writing a background process that periodically parses the data and puts it into your own normalized tables. Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: "Jeff" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 7:48 PM Subject: RE: [nycphp-talk] MySQL and spaces in data > The purpose: > > If a box is checked it means that the dealer sells parts for that > particular make/model. This data is then used to match a purchaser to a > dealer(s) depending on the user's needs. > > Now I *wish* I could say that the makes/models had identifying keys > however...things are worse than that. This data is matched against a > table containing 2.5 million rows (that's right! 2.5 million rows) of > non-normalized data that contains information on most every part for > most every make/model made since about 1952. This data comes from > another source and, therefore, there is nothing that can be done to > normalize the data (it's a L-O-N-G story as to why it can not be > normalized...makes/models are simply text strings within each row). > Consequently, the text is needed because a match is made by matching > text strings. > > Not the greatest system, I admit, but sometimes one has to work with > what one is given. > > I've tried the str_replace and that seems to have done the trick (at > least in preselecting check boxes based on post data) and I'll use it > again to strip out underscores when I save it to the database. > > I'm open to suggestions if you have another idea. > > Jeff > > -----Original Message----- > From: Analysis & Solutions [mailto:danielc at analysisandsolutions.com] > Sent: Thursday, June 19, 2003 6:02 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] MySQL and spaces in data > > > Jeff: > > On Thu, Jun 19, 2003 at 05:36:16PM -0400, Jeff wrote: > > Dan, > > > > Thanks for your input...here's some more info on what I'm doing. > > > > > > > > > > First part gives me the manufacturer, second part gives me the model. > > But what you haven't clarified is the forms actual purpose. Okay, so, > you're processing the manufacturer and model in the checkboxes. But > what > does it mean if someone checks the box? In addition, what other data is > submitted? What are you doing with all of this data? > > Before writing what I just wrote, I started writing the following, so > I'm > leaving it here to avoid having to restate it later... > > You mentioned using a database. I assume each manufacturer and each > model > are represented by integer based primary keys. Right? Again, if you > want > to store both the manufacturer and model ID numbers in the name > attribute > of the name element, do this: > > > > > > Where the first key is the manufacturer and the second key is the model. > > > > The post data has underscores. > > Which is why I'm saying you should use use a different approach. > > --Dan > > -- > FREE scripts that make web and database programming easier > http://www.analysisandsolutions.com/software/ > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 > > > > > > > > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From nyphp at websapp.com Thu Jun 19 20:41:58 2003 From: nyphp at websapp.com (Daniel Kushner) Date: Thu, 19 Jun 2003 20:41:58 -0400 Subject: [nycphp-talk] POST to mail In-Reply-To: <200306192244.h5JMglb9017260@parsec.nyphp.org> Message-ID: Chendry, You really like to push PHP to the limits! You owe me a nickel: mail($admin_email, $email_title, is_array($_POST) && count($_POST) > 0 ? call_user_func_array(($foo = create_function ('$vars, $vals, $ind, $foo', 'if(count($vals) == ($ind+1)) return "$vars[$ind] => $vals[$ind]"; else return "$vars[$ind] => $vals[$ind]\ ".$foo($vars, $vals, ++$ind, $foo);')), array(array_keys($_POST), array_values($_POST), 0, $foo)) : 'Empty', $optional_header); > -----Original Message----- > From: Christopher Hendry [mailto:chendry at nyc.rr.com] > Sent: Thursday, June 19, 2003 6:43 PM > To: NYPHP Talk > Subject: RE: [nycphp-talk] POST to mail > > > ooh, if we can get it to one line, I'll give you a nickel. :) > > what's the '@' do? > > - C > > -> -----Original Message----- > -> From: Bhulipongsanon, Pinyo [mailto:Pinyo.Bhulipongsanon at usa.xerox.com] > -> Sent: Thursday, June 19, 2003 5:47 PM > -> To: NYPHP Talk > -> Subject: RE: [nycphp-talk] POST to mail > -> > -> > -> just 2 lines: > -> > -> foreach (array_keys($_POST) as $key ) { $mailBody .= > -> "$$key=$_POST[$key]\ "; } > -> @mail($admin_email, $email_title, $mailBody, $optional_header); > -> > -> Enjoy :-) > -> > -> -----Original Message----- > -> From: Christopher Hendry [mailto:chendry at nyc.rr.com] > -> Sent: Thursday, June 19, 2003 2:30 PM > -> To: NYPHP Talk > -> Subject: [nycphp-talk] POST to mail > -> > -> > -> Anyone know a quick and painless way I can dump POST vars into a > -> format that > -> will be somewhat readable to the layperson receiving it via the mail() > -> function? > -> > -> Thanks. > -> Chris > -> > -> > -> > -> > -> > -> > -> > -> > -> > -> > -> > > > > --- Unsubscribe at http://nyphp.org/list/ --- > > From jim at bizcomputinginc.com Thu Jun 19 20:45:42 2003 From: jim at bizcomputinginc.com (Jim Hendricks) Date: Thu, 19 Jun 2003 20:45:42 -0400 Subject: [nycphp-talk] MySQL and spaces in data References: <200306200034.h5K0YBRj022351@parsec.nyphp.org> Message-ID: <01e401c336c5$47b24af0$6501a8c0@Notebook> Sounds to me you have the perfect situation to make lots of money! While it may be a real PITN to work with data that horribly structured, it does mean that everything you do will take 3-4 times as long to write and will be very prone to bugs. Any time I have a client force me into a poor design decision, I document the hell out of it so that every time the client complains how long it takes me to do XY & Z, or how many anomolies are in the program, I gently remind them that if they had agreed to proper design from the start they would get faster development times, better performing applications, and relatively bug free code. When a client hears that message enough times in answer to their complaints, they either stop complaining, stop development, or take it in the wallet and go for a redesign so that the wallet doesn't hurt so much in the future. It's sort of like I used to love working with Oracle databases because they were so complicated and poorly documented. It's not that I loved the work so much as I loved getting the money caused by Oracles complexity! Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: "Jeff" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 8:34 PM Subject: RE: [nycphp-talk] MySQL and spaces in data > I had originally intended to do that, that is, normalize the data. The > idea was "killed" a long time ago by the client. > > Let me make matters worse, so to speak. This data has a part code that > represents each different car part, e.g., brakes; fender, etc. However, > the company that creates the data (*not* my client) decided to use the > same exact part code number for different parts so that every electronic > module in a car has the part code "591" even though one module may > control air bags and one may control ignition, etc. Further, part > dealers know the parts by these 3 digit codes and can differentiate them > by their description (ignition; air bag, etc.). So it requires a part > code and text description to differentiate an air bag control module for > a Buick from one from a Chevy, etc. Even the make/model information > that is provided is not complete....for example, some parts are lumped > in under Mercedes Benz even though there are many different models of > Mercedes. > > The bottom line is that the data is not pretty. > > Jeff > From chendry at nyc.rr.com Thu Jun 19 21:41:52 2003 From: chendry at nyc.rr.com (Christopher Hendry) Date: Thu, 19 Jun 2003 21:41:52 -0400 Subject: [nycphp-talk] POST to mail In-Reply-To: <200306200036.h5K0aJX5023123@parsec.nyphp.org> Message-ID: LushMEDIA is over now (so you know what that means) - so I'm going to test this later... but you've earned it if it works. ;) C -> -----Original Message----- -> From: Daniel Kushner [mailto:nyphp at websapp.com] -> Sent: Thursday, June 19, 2003 8:36 PM -> To: NYPHP Talk -> Subject: RE: [nycphp-talk] POST to mail -> -> -> Chendry, -> -> You really like to push PHP to the limits! You owe me a nickel: -> -> mail($admin_email, $email_title, is_array($_POST) && count($_POST) > 0 ? -> call_user_func_array(($foo = create_function ('$vars, $vals, $ind, $foo', -> 'if(count($vals) == ($ind+1)) return "$vars[$ind] => $vals[$ind]"; else -> return "$vars[$ind] => $vals[$ind]\ ".$foo($vars, $vals, ++$ind, -> $foo);')), -> array(array_keys($_POST), array_values($_POST), 0, $foo)) : 'Empty', -> $optional_header); -> -> -> -> > -----Original Message----- -> > From: Christopher Hendry [mailto:chendry at nyc.rr.com] -> > Sent: Thursday, June 19, 2003 6:43 PM -> > To: NYPHP Talk -> > Subject: RE: [nycphp-talk] POST to mail -> > -> > -> > ooh, if we can get it to one line, I'll give you a nickel. :) -> > -> > what's the '@' do? -> > -> > - C -> > -> > -> -----Original Message----- -> > -> From: Bhulipongsanon, Pinyo [mailto:Pinyo.Bhulipongsanon at usa.xerox.com] > -> Sent: Thursday, June 19, 2003 5:47 PM > -> To: NYPHP Talk > -> Subject: RE: [nycphp-talk] POST to mail > -> > -> > -> just 2 lines: > -> > -> foreach (array_keys($_POST) as $key ) { $mailBody .= > -> "$$key=$_POST[$key]\ "; } > -> @mail($admin_email, $email_title, $mailBody, $optional_header); > -> > -> Enjoy :-) > -> > -> -----Original Message----- > -> From: Christopher Hendry [mailto:chendry at nyc.rr.com] > -> Sent: Thursday, June 19, 2003 2:30 PM > -> To: NYPHP Talk > -> Subject: [nycphp-talk] POST to mail > -> > -> > -> Anyone know a quick and painless way I can dump POST vars into a > -> format that > -> will be somewhat readable to the layperson receiving it via the mail() > -> function? > -> > -> Thanks. > -> Chris > -> > -> > -> > -> > -> > -> > -> > -> > -> > -> > -> > > > > > > --- Unsubscribe at http://nyphp.org/list/ --- From jsiegel1 at optonline.net Thu Jun 19 23:39:55 2003 From: jsiegel1 at optonline.net (Jeff) Date: Thu, 19 Jun 2003 23:39:55 -0400 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306200046.h5K0jpXl023964@parsec.nyphp.org> Message-ID: <00ae01c336dd$9e095570$6501a8c0@EZDSDELL> This will *definitely* be a long time client. They are well aware of the problems with the data and prior to beginning the project we had lengthy discussions with the company that creates the data. This data is used by parts dealers across the continent so they were not keen on the idea of doing it the "right way" nor was the client keen on shelling out the money to "normalize" the data. There are many more data issues...I only touched the tip of the iceberg. Jeff -----Original Message----- From: Jim Hendricks [mailto:jim at bizcomputinginc.com] Sent: Thursday, June 19, 2003 7:46 PM To: NYPHP Talk Subject: Re: [nycphp-talk] MySQL and spaces in data Sounds to me you have the perfect situation to make lots of money! While it may be a real PITN to work with data that horribly structured, it does mean that everything you do will take 3-4 times as long to write and will be very prone to bugs. Any time I have a client force me into a poor design decision, I document the hell out of it so that every time the client complains how long it takes me to do XY & Z, or how many anomolies are in the program, I gently remind them that if they had agreed to proper design from the start they would get faster development times, better performing applications, and relatively bug free code. When a client hears that message enough times in answer to their complaints, they either stop complaining, stop development, or take it in the wallet and go for a redesign so that the wallet doesn't hurt so much in the future. It's sort of like I used to love working with Oracle databases because they were so complicated and poorly documented. It's not that I loved the work so much as I loved getting the money caused by Oracles complexity! Jim ______________________________________________________________ Jim Hendricks, President, Biz Computing, Inc Phone: (201) 599-9380 Email: jim at bizcomputinginc.com Web: www.bizcomputinginc.com Snail: Jim Hendricks, Biz Computing, Inc., 255 McKinley Ave, New Milford, NJ 07646 ______________________________________________________________ ----- Original Message ----- From: "Jeff" To: "NYPHP Talk" Sent: Thursday, June 19, 2003 8:34 PM Subject: RE: [nycphp-talk] MySQL and spaces in data > I had originally intended to do that, that is, normalize the data. The > idea was "killed" a long time ago by the client. > > Let me make matters worse, so to speak. This data has a part code that > represents each different car part, e.g., brakes; fender, etc. However, > the company that creates the data (*not* my client) decided to use the > same exact part code number for different parts so that every electronic > module in a car has the part code "591" even though one module may > control air bags and one may control ignition, etc. Further, part > dealers know the parts by these 3 digit codes and can differentiate them > by their description (ignition; air bag, etc.). So it requires a part > code and text description to differentiate an air bag control module for > a Buick from one from a Chevy, etc. Even the make/model information > that is provided is not complete....for example, some parts are lumped > in under Mercedes Benz even though there are many different models of > Mercedes. > > The bottom line is that the data is not pretty. > > Jeff > --- Unsubscribe at http://nyphp.org/list/ --- From adam at trachtenberg.com Fri Jun 20 01:37:14 2003 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Fri, 20 Jun 2003 01:37:14 -0400 (EDT) Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306192137.h5JLaGa1014833@parsec.nyphp.org> Message-ID: On Thu, 19 Jun 2003, Jeff wrote: > To differentiate makes/models on the page I generate checkboxes that > look like the following: > > > > > First part gives me the manufacturer, second part gives me the model. Why don't you make the input name an array value like: "makes[ALFA-ROMEO]" and give it a value of "GTV-6" or "SPIDER VELOCE"? Then, you can do something like: foreach ($makes as $make => $model) { print "Dealer has an $make $model"; } Right now, you're probably doing something like: foreach ($_POST as $data) { $clean = str_replace($data, "_", "-"); list($make, $model) = split($clean, "|"); print "Dealer has a $make $model"; } (I may have some function parameter orders mixed up here.) Since the browser only sends back "checked" checkboxes to the server, what's the point of setting a value of "1"? Things should be easier if you set the value to an actually useful value, like say, the model, or even the make and the model. Then, at least, you wouldn't need to worry about the weird re-encoding of the data and the restriction on spaces. > Keep in mind that I'm on php 4.1.x and it does not have htmlentities nor > html_decode_entity. FWIW, htmlentities() has been around forever, so it should be in 4.1. Besides, that's pretty easy to mimic with strtr(): $from = array('&', '<', '>', '"'); $to = array('&', '<', '>', '"'); $html = strtr($ascii, $from, $to); (Well, you may have to rearrange the order to do a double pass because of the &, but this is a good start.) -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! From jsiegel1 at optonline.net Fri Jun 20 07:56:34 2003 From: jsiegel1 at optonline.net (Jeff) Date: Fri, 20 Jun 2003 07:56:34 -0400 Subject: [nycphp-talk] MySQL and spaces in data In-Reply-To: <200306200538.h5K5bLXl032019@parsec.nyphp.org> Message-ID: <001701c33722$ffa70ee0$6501a8c0@EZDSDELL> Adam, I was mistaken about htmlentities...I believe it's html_entity_decode that doesn't exist in 4.1. And your "guess" on how it is being done is right on the mark. Quite honestly, I hadn't thought about just setting the value to the model (instead of '1'). You offered some great ideas...I'm going to revisit the code and, if time permits, go with the suggestion of input name as array with a value = the model. Thanks so much for putting in the effort to help straighten this out (and thanks go to everyone else who offered suggestions). Jeff P.S. I may have failed to mention that I started using PHP about 5 months ago...when I started this project...so I'm always learning something new. -----Original Message----- From: Adam Maccabee Trachtenberg [mailto:adam at trachtenberg.com] Sent: Friday, June 20, 2003 12:37 AM To: NYPHP Talk Subject: RE: [nycphp-talk] MySQL and spaces in data On Thu, 19 Jun 2003, Jeff wrote: > To differentiate makes/models on the page I generate checkboxes that > look like the following: > > > > > First part gives me the manufacturer, second part gives me the model. Why don't you make the input name an array value like: "makes[ALFA-ROMEO]" and give it a value of "GTV-6" or "SPIDER VELOCE"? Then, you can do something like: foreach ($makes as $make => $model) { print "Dealer has an $make $model"; } Right now, you're probably doing something like: foreach ($_POST as $data) { $clean = str_replace($data, "_", "-"); list($make, $model) = split($clean, "|"); print "Dealer has a $make $model"; } (I may have some function parameter orders mixed up here.) Since the browser only sends back "checked" checkboxes to the server, what's the point of setting a value of "1"? Things should be easier if you set the value to an actually useful value, like say, the model, or even the make and the model. Then, at least, you wouldn't need to worry about the weird re-encoding of the data and the restriction on spaces. > Keep in mind that I'm on php 4.1.x and it does not have htmlentities nor > html_decode_entity. FWIW, htmlentities() has been around forever, so it should be in 4.1. Besides, that's pretty easy to mimic with strtr(): $from = array('&', '<', '>', '"'); $to = array('&', '<', '>', '"'); $html = strtr($ascii, $from, $to); (Well, you may have to rearrange the order to do a double pass because of the &, but this is a good start.) -adam -- adam at trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today! --- Unsubscribe at http://nyphp.org/list/ --- From dmintz at panix.com Fri Jun 20 09:45:30 2003 From: dmintz at panix.com (David Mintz) Date: Fri, 20 Jun 2003 09:45:30 -0400 (EDT) Subject: [nycphp-talk] why phpinfo exposes $_ENV In-Reply-To: <200306192105.h5JL4eY1013242@parsec.nyphp.org> References: <200306192105.h5JL4eY1013242@parsec.nyphp.org> Message-ID: On Thu, 19 Jun 2003, Hans Zaunere wrote: > > Take a look at the blurb about variables_order at > http://us2.php.net/manual/en/configuration.directives.php. You'll want to > take the 'E' out of that setting, which can be done via php.ini or > httpd.conf. Ah! My bad, I shoulda figured that out. Thanks a million, --- David Mintz http://davidmintz.org/ Email: See http://dmintzweb.com/whitelist.php first! "You want me to pour the beer, Frank?" From Pinyo.Bhulipongsanon at usa.xerox.com Fri Jun 20 10:40:18 2003 From: Pinyo.Bhulipongsanon at usa.xerox.com (Bhulipongsanon, Pinyo) Date: Fri, 20 Jun 2003 10:40:18 -0400 Subject: [nycphp-talk] POST to mail Message-ID: The "at" symbol is just to ignore error messages if the server does not support mail() function. A little upgrade: foreach (array_keys($_POST) as $key ) { $mailBody .= "$$key = $_POST[$key]\ "; } @mail($admin_email, $email_title, $mailBody, $optional_header); Add spaces in first line between equal symbol. -----Original Message----- From: Christopher Hendry [mailto:chendry at nyc.rr.com] Sent: Thursday, June 19, 2003 6:43 PM To: NYPHP Talk Subject: RE: [nycphp-talk] POST to mail ooh, if we can get it to one line, I'll give you a nickel. :) what's the '@' do? - C -> -----Original Message----- -> From: Bhulipongsanon, Pinyo [mailto:Pinyo.Bhulipongsanon at usa.xerox.com] -> Sent: Thursday, June 19, 2003 5:47 PM -> To: NYPHP Talk -> Subject: RE: [nycphp-talk] POST to mail -> -> -> just 2 lines: -> -> foreach (array_keys($_POST) as $key ) { $mailBody .= -> "$$key=$_POST[$key]\ "; } -> @mail($admin_email, $email_title, $mailBody, $optional_header); -> -> Enjoy :-) -> -> -----Original Message----- -> From: Christopher Hendry [mailto:chendry at nyc.rr.com] -> Sent: Thursday, June 19, 2003 2:30 PM -> To: NYPHP Talk -> Subject: [nycphp-talk] POST to mail -> -> -> Anyone know a quick and painless way I can dump POST vars into a -> format that -> will be somewhat readable to the layperson receiving it via the mail() -> function? -> -> Thanks. -> Chris -> -> -> -> -> -> -> -> -> -> -> --- Unsubscribe at http://nyphp.org/list/ --- From hans at nyphp.org Fri Jun 20 15:05:05 2003 From: hans at nyphp.org (Hans Zaunere) Date: Fri, 20 Jun 2003 12:05:05 -0700 (PDT) Subject: NYPHP Upgrade Message-ID: <20030620190505.82682.qmail@web12801.mail.yahoo.com> Hello all, New York PHP continues its efforts to improve service for members by moving to a new server. This server is more powerful, better connected and will offer breathing room for development on the old box. Starting at 8:00pm EST tonight, NYPHP.org and mailing lists will be unavailable. The website itself should be back online within an hour; however other services, such as the mailing lists, mailboxes and aliases, will be unavailable for a longer period of time. The NYPHP Mirrors will not be affected, and by Saturday evening all other services should be operational, with another announcement at that time. Please note, however, that some member's DNS servers aggressively cache, resulting in additional, temporary outages. By Monday morning all should be back to normal, and I'll be available at hans at nyu.edu at any time. Thank you, ===== Hans Zaunere President, New York PHP http://nyphp.org hans at nyphp.org From nyphp at enobrev.com Mon Jun 30 10:04:33 2003 From: nyphp at enobrev.com (Mark Armendariz) Date: Mon, 30 Jun 2003 10:04:33 -0400 Subject: [nycphp-talk] Regex Coach Message-ID: <017d01c33f10$887f5a20$e1951d18@enobrev> The email validation thread reminded me, This fee lil app was recently reccommended to me http://weitz.de/regex-coach/ It's a TRUE life saver when it comes to complex regex... Here's a blurb from the link: ---------------------------------- The Regex Coach is a graphical application for Linux and Windows which can be used to experiment with (Perl-compatible) regular expressions interactively. It has the following features: It shows whether a regular expression matches a particular target string. It can also show which parts of the target string correspond to captured register groups or to arbitrary parts of the regular expression. It can "walk" through the target string one match at a time. It can simulate Perl's split and s/// (substitution) operators. It tries to describe the regular expression in plain English. It can show a graphical representation of the regular expression's parse tree. It can single-step through the matching process as performed by the regex engine. Everything happens in "real time", i.e. as soon as you make a change somewhere in the application all other parts are instantly updated. ---------------------------------- (I'm in no way affiliated with the developer, just thought I'd pass along the great tool) Mark From contact at nyphp.org Mon Jun 30 16:44:12 2003 From: contact at nyphp.org (New York PHP) Date: Mon, 30 Jun 2003 16:44:12 -0400 Subject: [nycphp-talk] New York PHP Adopts Mailman as Mailing List Manager Message-ID: <3F00A11C.3000701@nyphp.org> Apologies to those who will receive this message multiple times; we are still in a testing phase with Mailman. Due to member's requests and the current system falling short in some respects, NYPHP's mailing lists are now operated by Mailman (http://list.org). This is anticipated as temporary until our own system is upgraded and enhanced. There are both pros and cons to using Mailman in contrast to our home-grown system (which was entirely in PHP): Pros: -- Handles modern MIME messages better, including attachments and HTML or signed messages -- Highly anticipated "Send me my password" functionality -- Digests -- Generic yet familiar interface (http://lists.nyphp.org) Cons: -- Ghost accounts are not available with Mailman - all mailing list posts must come from a single email address. -- The "Active Threads" area of http://nyphp.org is lost (if you are familiar with Mailman, please contact our Development list (dev at lists.nyphp.org) with any ideas on how this could be implemented using Mailman's static HTML archives) -- Date and time information of messages can be incorrect (the old system timestamped each message) -- Mailman is a bit slower than our PHP version Please take a look at the system (http://lists.nyphp.org) and report any errors, enhancements and suggestions to listmaster at nyphp.org or our Development list (dev at lists.nyphp.org), and we urge you to take advantage of new features such as list digests and other customizations. Development continues on our mailing list manager, pList, as our CVS/SourceForge server goes on line. Many exciting features are planned, including subscribing/unsubscribing from specific threads, full-text search of archives, user comments of archived messages, accurate discussion threading, web forum integration and RSS feeds. We?d also like to hear your suggestions and ideas at dev at lists.nyphp.org. Lastly, please send any errors, configuration issues or suggestions regarding the new Mailman installation to listmaster at nyphp.org Thank you, New York PHP