From lists at zaunere.com Thu Jun 1 11:11:44 2006 From: lists at zaunere.com (Hans Zaunere) Date: Thu, 1 Jun 2006 11:11:44 -0400 Subject: [nycphp-talk] NY PHP Conf discount? In-Reply-To: Message-ID: <00e401c6858d$b2687170$0202fea9@mobilez> Jon Baer wrote on Wednesday, May 31, 2006 10:15 PM: > Ive recently had to sell off my Rails Conf ticket + would like to > attend the NY PHP Conf in 2 weeks, is there a discount for the list / > group? Hi Jon, There will be some discounts put out on the announce list, hopefully today. H From urb at e-government.com Thu Jun 1 15:29:02 2006 From: urb at e-government.com (Urb LeJeune) Date: Thu, 01 Jun 2006 15:29:02 -0400 Subject: [nycphp-talk] code ? In-Reply-To: <14947726.1149177686859.JavaMail.root@mswamui-cedar.atl.sa. earthlink.net> References: <14947726.1149177686859.JavaMail.root@mswamui-cedar.atl.sa.earthlink.net> Message-ID: <7.0.1.0.0.20060601145551.02431658@usats.com> Can someone explain $$_key = $_value (I see it often in plugin functions in Smarty dealing with passed parameters.) foreach ($params as $_key=>$_value) { switch ($_key) { case 'loop': $$_key = (array)$_value; // hmm....$$_key break; Thanks Urb From scott at crisscott.com Thu Jun 1 15:34:40 2006 From: scott at crisscott.com (Scott Mattocks) Date: Thu, 01 Jun 2006 15:34:40 -0400 Subject: [nycphp-talk] code ? In-Reply-To: <7.0.1.0.0.20060601145551.02431658@usats.com> References: <14947726.1149177686859.JavaMail.root@mswamui-cedar.atl.sa.earthlink.net> <7.0.1.0.0.20060601145551.02431658@usats.com> Message-ID: <447F4150.2080900@crisscott.com> Urb LeJeune wrote: > Can someone explain $$_key = $_value (I see it often in plugin functions in > Smarty dealing with passed parameters.) It is a variable variable. Take a look at the PHP manual for more information: http://us3.php.net/manual/en/language.variables.variable.php -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com From kenrbnsn at rbnsn.com Thu Jun 1 15:36:53 2006 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Thu, 01 Jun 2006 15:36:53 -0400 Subject: [nycphp-talk] code ? In-Reply-To: <7.0.1.0.0.20060601145551.02431658@usats.com> References: <14947726.1149177686859.JavaMail.root@mswamui-cedar.atl.sa.earthlink.net> <7.0.1.0.0.20060601145551.02431658@usats.com> Message-ID: <7.0.1.0.2.20060601153512.0368b8b8@rbnsn.com> At 03:29 PM 6/1/2006, Urb LeJeune wrote: >Can someone explain $$_key = $_value (I see it often in plugin functions in >Smarty dealing with passed parameters.) > >foreach ($params as $_key=>$_value) { > switch ($_key) { > case 'loop': > $$_key = (array)$_value; // hmm....$$_key > break; That's using variable variables. It's all explained at Ken From prusak at gmail.com Thu Jun 1 15:44:13 2006 From: prusak at gmail.com (Ophir Prusak) Date: Thu, 1 Jun 2006 15:44:13 -0400 Subject: [nycphp-talk] CMS with split testing? Message-ID: Hi All, I was wondering if anyone knows of / has used a CMS that has split testing built in (or can be added with an existing plug-in or something). For example, I need 50% of the visitors to see version "A" of a page and 50% to see version "B" of the same page. Then I need to check how many of group "A" did something (like reached page "C") and how many of group "B" did the same thing. I found this discussion which claims that Joomla can already do this, but I have not been able to find where this is documented: http://www.sitepoint.com/forums/showthread.php?t=385858 Something free would be nice, but a "low cost" (under 2k) solution would also work. TIA Ophir -- Ophir Prusak http://www.prusak.com From lists at zaunere.com Sat Jun 3 10:58:34 2006 From: lists at zaunere.com (Hans Zaunere) Date: Sat, 3 Jun 2006 10:58:34 -0400 Subject: [nycphp-talk] FW: [PHP] OO purism sucks - sell me on PHP5? Message-ID: <009801c6871e$302e57f0$650aa8c0@mobilez> A nice outline from Rasmus on PHP 5. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com Rasmus Lerdorf wrote on Friday, June 02, 2006 12:01 PM: > tg-php_ at gryffyndevelopment.com wrote: > > > "If it ain't broke, don't fix it" works for a while, but if there > > are easier and/or better ways to do things in PHP5, I want in! So > > someone sell me on this from the point of view of someone who's > > upgraded and has learned the joys of PHP5. So far what I've found > > online has been little more than a list of new features without an > > idea of how much of a headache they're going to save me in the > > future. > > To me the main user-visible benefits of going to PHP 5 are (ignoring > the OO changes for now): > > 1. Simplexml > > eg. One-line RSS parser (of Flickr's upload queue feed) > > $url = 'http://www.flickr.com/services/feeds/photos_public.gne'; > foreach(simplexml_load_file($url)->entry as $it) echo $it->content; > > > 2. Much improved DOM support > > eg. various things you can do to a DOM > > // First, load your XML document into a DOM > $dom = domdocument::load('test.xml'); > > // Apply a stylesheet to the dom > $proc = new xsltProcessor; > $proc->importStyleSheet($domxsl); > echo $proc->transformToXML($dom); > > // xpath query on the dom > $ctx = new domXPath($dom); > $result = $ctx->query('/top/child[@attr > 3]/foo/text()'); > foreach($result as $node) { > echo $node->nodeValue; > } > > // pull it into simplexml and access it > $s = simplexml_import_dom($dom); > echo $s->child[0]->foo; > > > 3. xmlreader/xmlwriter > > eg. SAX document validation using xmlreader > > $reader = new XMLReader(); > $reader->open('test.xml'); > $reader->setParserProperty(XMLReader::VALIDATE, true); > while($reader->read()); > echo $reader->isValid(); > > > 4. PDO > > eg. Prepare execute against MySQL with named parameters > > $pdo = new PDO('mysql:dbname=testdb'); > > $sql = 'SELECT name, colour, calories > FROM fruit > WHERE calories < :calories AND colour = :colour'; > $prep = $pdo->prepare($sql); > $prep->execute(array(':calories' => 150, ':colour' => 'red')); > $red = $prep->fetchAll(); > > > 5. SOAP > > eg. Exposing your PHP code as a SOAP web service > > function Add($x,$y) { > return $x+$y; > } > $server = new SoapServer(null,array('uri'=>"http://test-uri/")); > $server->addFunction("Add"); > $server->handle(); > > > 6. SPL > > eg. Iterating over entries in a directory > > $dir = new DirectoryIterator('.'); > foreach($dir as $ent) echo $ent; > > > 7. Filter > > eg. Define a default filter and use form input safely without > cluttering up your code with htmlspecialchars() calls everywhere > and provide easily auditable access to the unfiltered data > > php.ini: filter.default = special_chars > > echo $_POST['data']; > $raw = input_get(INPUT_POST,'data', FILTER_UNSAFE_RAW); > > > 8. Native Date/Time mechanism > > Date/time functions now behave exactly the same way on every platform > regardless of the differences in locales if you choose to use the > native mechanism. > > Beyond that the compiler produces smaller opcode arrays and the > executor is faster. Not a directly visible thing, and this is still > improving, but definitely a plus. > > Note that for all of this I am referring to PHP 5.1.x, not 5.0.x. > > -Rasmus > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php From jonbaer at jonbaer.com Sat Jun 3 11:50:47 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Sat, 3 Jun 2006 11:50:47 -0400 Subject: [nycphp-talk] FW: [PHP] OO purism sucks - sell me on PHP5? In-Reply-To: <009801c6871e$302e57f0$650aa8c0@mobilez> References: <009801c6871e$302e57f0$650aa8c0@mobilez> Message-ID: <4BAC8D22-9231-4447-809C-4F99B322D303@jonbaer.com> Nice list ... Id probably also add the ~native~ builtin calls to __get, __set, and __call in there as well ... (vs. having to always call overload()). - Jon On Jun 3, 2006, at 10:58 AM, Hans Zaunere wrote: > > > A nice outline from Rasmus on PHP 5. > > --- > Hans Zaunere / President / New York PHP > www.nyphp.org / www.nyphp.com > > > Rasmus Lerdorf wrote on Friday, June 02, 2006 12:01 PM: >> tg-php_ at gryffyndevelopment.com wrote: >> >>> "If it ain't broke, don't fix it" works for a while, but if there >>> are easier and/or better ways to do things in PHP5, I want in! So >>> someone sell me on this from the point of view of someone who's >>> upgraded and has learned the joys of PHP5. So far what I've found >>> online has been little more than a list of new features without an >>> idea of how much of a headache they're going to save me in the >>> future. >> >> To me the main user-visible benefits of going to PHP 5 are (ignoring >> the OO changes for now): >> >> 1. Simplexml >> >> eg. One-line RSS parser (of Flickr's upload queue feed) >> >> $url = 'http://www.flickr.com/services/feeds/photos_public.gne'; >> foreach(simplexml_load_file($url)->entry as $it) echo $it- >> >content; >> >> >> 2. Much improved DOM support >> >> eg. various things you can do to a DOM >> >> // First, load your XML document into a DOM >> $dom = domdocument::load('test.xml'); >> >> // Apply a stylesheet to the dom >> $proc = new xsltProcessor; >> $proc->importStyleSheet($domxsl); >> echo $proc->transformToXML($dom); >> >> // xpath query on the dom >> $ctx = new domXPath($dom); >> $result = $ctx->query('/top/child[@attr > 3]/foo/text()'); >> foreach($result as $node) { >> echo $node->nodeValue; >> } >> >> // pull it into simplexml and access it >> $s = simplexml_import_dom($dom); >> echo $s->child[0]->foo; >> >> >> 3. xmlreader/xmlwriter >> >> eg. SAX document validation using xmlreader >> >> $reader = new XMLReader(); >> $reader->open('test.xml'); >> $reader->setParserProperty(XMLReader::VALIDATE, true); >> while($reader->read()); >> echo $reader->isValid(); >> >> >> 4. PDO >> >> eg. Prepare execute against MySQL with named parameters >> >> $pdo = new PDO('mysql:dbname=testdb'); >> >> $sql = 'SELECT name, colour, calories >> FROM fruit >> WHERE calories < :calories AND colour = :colour'; >> $prep = $pdo->prepare($sql); >> $prep->execute(array(':calories' => 150, ':colour' => 'red')); >> $red = $prep->fetchAll(); >> >> >> 5. SOAP >> >> eg. Exposing your PHP code as a SOAP web service >> >> function Add($x,$y) { >> return $x+$y; >> } >> $server = new SoapServer(null,array('uri'=>"http://test-uri/")); >> $server->addFunction("Add"); >> $server->handle(); >> >> >> 6. SPL >> >> eg. Iterating over entries in a directory >> >> $dir = new DirectoryIterator('.'); >> foreach($dir as $ent) echo $ent; >> >> >> 7. Filter >> >> eg. Define a default filter and use form input safely without >> cluttering up your code with htmlspecialchars() calls everywhere >> and provide easily auditable access to the unfiltered data >> >> php.ini: filter.default = special_chars >> >> echo $_POST['data']; >> $raw = input_get(INPUT_POST,'data', FILTER_UNSAFE_RAW); >> >> >> 8. Native Date/Time mechanism >> >> Date/time functions now behave exactly the same way on every platform >> regardless of the differences in locales if you choose to use the >> native mechanism. >> >> Beyond that the compiler produces smaller opcode arrays and the >> executor is faster. Not a directly visible thing, and this is still >> improving, but definitely a plus. >> >> Note that for all of this I am referring to PHP 5.1.x, not 5.0.x. >> >> -Rasmus >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From lists at zaunere.com Tue Jun 6 09:53:29 2006 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 6 Jun 2006 09:53:29 -0400 Subject: [nycphp-talk] FW: con@nyphp: Save 25% at NYPHPCon 2006! Message-ID: <019701c68970$97fadb20$650aa8c0@mobilez> I normally don't like to cross post, but there have been a couple of requests. Please see below for the discount code. H New York PHP wrote on Monday, June 05, 2006 9:10 AM: > All, > > We're pleased to offer a 25% discount for New York PHP Community > Members to NYPHPCon 2006. Join Rasmus, Rod, Chris and many more for > a PHP event like no other, covering both business and technical > topics. Read more about the conference and the impressive speaker > lineup at: > > http://www.nyphpcon.com > > > Register online at https://www.nyphpcon.com/register.php and use > Discount Code: > > nyphp.org > > > There are only 50 of these codes available so register today to take > advantage of this limited time pricing. Please use the contact form > at http://www.nyphp.com/contact.php with any questions or problems > during registration. > > Thank you and see you at the conference! > > > --- > Hans Zaunere / President / New York PHP > www.nyphp.org / www.nyphp.com From akamm at demicooper.com Tue Jun 6 09:51:40 2006 From: akamm at demicooper.com (Andrew Kamm) Date: Tue, 06 Jun 2006 08:51:40 -0500 Subject: [nycphp-talk] Static variables, self:: and abstract classes Message-ID: Hello all -- I've coded a set of classes that inherit from an abstract class. To my dismay, I've realized after charting and coding everything out that my class hierarchy may be of no use because of how PHP handles inheritance of variables/methods when extending a class. In short, when a method is declared in the parent class and uses "self::$whatever", when calling the method from a child class the "whatever" portion always references the parent value of "whatever." I've come to grips with this being just the way it is, but does anyone have a solution that will prevent me from cutting and pasting all the methods from my parent class into the child class (effectively killing the point of the inheritance)? In addition, is there any logical reason for the language to operate this way? I found it reported as a bug on the PHP site, but I believe the final result/response was that it's not a bug, but intentional. I don't know Java or C, so I have no frame of reference, but it seems kind of weird to me. Example: ***************************************** abstract class ParentClass { protected static $myVar = "parent var!"; function printVar() { echo self::$myVar; } } class ChildClass extends ParentClass { protected static $myVar = "child var!"; } ChildClass::printVar(); //displays "parent var!" ***************************************** thanks in advance! -- Andrew Kamm From jeff.knight at gmail.com Tue Jun 6 10:48:31 2006 From: jeff.knight at gmail.com (Jeff Knight) Date: Tue, 6 Jun 2006 09:48:31 -0500 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: References: Message-ID: <2ca9ba910606060748g35055bf1hd594d14345b84853@mail.gmail.com> I feel your pain.... On 6/6/06, Andrew Kamm wrote: > > Hello all -- I've coded a set of classes that inherit from an abstract > class. To my dismay, I've realized after charting and coding everything out > that my class hierarchy may be of no use because of how PHP handles > inheritance of variables/methods when extending a class. > > In short, when a method is declared in the parent class and uses > "self::$whatever", when calling the method from a child class the "whatever" > portion always references the parent value of "whatever." > > I've come to grips with this being just the way it is, but does anyone have > a solution that will prevent me from cutting and pasting all the methods > from my parent class into the child class (effectively killing the point of > the inheritance)? > > In addition, is there any logical reason for the language to operate this > way? I found it reported as a bug on the PHP site, but I believe the final > result/response was that it's not a bug, but intentional. I don't know Java > or C, so I have no frame of reference, but it seems kind of weird to me. > > > Example: > > ***************************************** > abstract class ParentClass { > protected static $myVar = "parent var!"; > function printVar() { > echo self::$myVar; > } > } > > > class ChildClass extends ParentClass { > protected static $myVar = "child var!"; > } > > > ChildClass::printVar(); //displays "parent var!" > ***************************************** > > > thanks in advance! > > > -- > Andrew Kamm > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From jeff.knight at gmail.com Tue Jun 6 10:52:25 2006 From: jeff.knight at gmail.com (Jeff Knight) Date: Tue, 6 Jun 2006 09:52:25 -0500 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: References: Message-ID: <2ca9ba910606060752l3af2926en971ed90d2d4ce5e4@mail.gmail.com> Actually, I'm getting: Fatal error: Cannot redeclare property static protected ParentClass::$myVar in class ChildClass for your example. From leeeyerman at aol.com Tue Jun 6 10:56:29 2006 From: leeeyerman at aol.com (leeeyerman at aol.com) Date: Tue, 06 Jun 2006 10:56:29 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP Message-ID: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> Hey everyone, Check out this article. It is a huge slam on the LAMP framework. It may be worth our collective response. The article is titled: Why the light has gone out on LAMP Written by: http://blog.develix.com/frog/user/cliff/article/2006-06-04/9 Bits and pieces from the article: I'm quite opposed to using MySQL and PHP, and I'm none too fond of Apache. Anyone who knows me or happens into a conversation with me about development quickly learns of my distaste for these particular projects. To be fair, Apache is the least problematic of the three and if there were no alternatives, I'd use it without a lot of complaint. MySQL and PHP, on the other hand, really raise my ire. Both of them have two major problems: 1. Bug ridden (by this I am including both misfeatures as well as actual bugs). 2. They encourage bad habits. PHP is another sore spot for me. I've gotten to the point that not only will I not write PHP code, I won't even run applications written in PHP (my long search for decent blogging software was due to the restriction that it not be written in PHP). At some level PHP is a great language because the entry cost is so low. Not so much because the language is so particularly friendly, but because it was designed to work in an extremely simple environment (the web) and because it's quite possible to learn PHP incrementally by intermixing it with HTML. So what's the problem? Well, first of all, as anyone who's done much web programming will tell you, mixing code with markup is *not* a good thing if you care about maintenance or extensibility. The very thing that makes PHP a great language for beginners is the very thing that makes it a bad language for beginners. At some point they will have to unlearn those habits, except that usually they don't. Also, because it's so easy to whip out a quick PHP webapp, many, if not most, PHP programmers fail to delve very deep into the realm of programming, preferring to sit at the edge and reap the benefits without the work (I'm not talking about coding work, rather the work of understanding your field). PHP programmers practically popularized the most common attack in the world, the SQL-injection attack. Not only is it the most common, it's the most easily avoided. That's how shallow most PHP-programmer's knowledge is. "Professional" programmers are still assembling SQL queries by concatenating strings. PHP and MySQL are this generation's BASIC, the language that was described thusly by the Free Online Dictionary of Computing BASIC has become the leading cause of brain-damage in proto-hackers. This is another case (like Pascal) of the cascading lossage that happens when a language deliberately designed as an educational toy gets taken too seriously. A novice can write short BASIC programs (on the order of 10-20 lines) very easily; writing anything longer is (a) very painful, and (b) encourages bad habits that will make it harder to use more powerful languages well. This wouldn't be so bad if historical accidents hadn't made BASIC so common on low-end micros. As it is, it ruins thousands of potential wizards a year. Replace BASIC with PHP or MySQL and you've got today's most common programmer. Worse, the most common programs in existence today mix the two in a brain-freezing mixture of stupidity. __________________________________________________ Lee ________________________________________________________________________ Check out AOL.com today. Breaking news, video search, pictures, email and IM. All on demand. Always Free. From yournway at gmail.com Tue Jun 6 11:06:09 2006 From: yournway at gmail.com (Alberto dos Santos) Date: Tue, 6 Jun 2006 16:06:09 +0100 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> References: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> Message-ID: I just wonder why he doesn't talk about the great many sites out there that rely on MS products and are constantly down due to various database problems, or some other really "brain-freezingly stupid" problems brought about by some "shallow programmer" that cannot write 2 consecutive lines of good code without using a wizard. Sorry folks, I had to let it out... I hear it so many times... It's like Portugal has sold it's collective IT soul to MS. But I am fighting it, damn right I am! Alberto. On 06/06/06, leeeyerman at aol.com wrote: > > Hey everyone, > > Check out this article. It is a huge slam on the LAMP framework. It > may be worth our collective response. > > The article is titled: > > Why the light has gone out on LAMP > > Written by: > > http://blog.develix.com/frog/user/cliff/article/2006-06-04/9 > > > > Bits and pieces from the article: > > I'm quite opposed to using MySQL and PHP, and I'm none too fond of > Apache. Anyone who knows me or happens into a conversation with me > about development quickly learns of my distaste for these particular > projects. To be fair, Apache is the least problematic of the three and > if there were no alternatives, I'd use it without a lot of complaint. > > MySQL and PHP, on the other hand, really raise my ire. Both of them > have two major problems: > > 1. Bug ridden (by this I am including both misfeatures as well as > actual bugs). > 2. They encourage bad habits. > > PHP is another sore spot for me. I've gotten to the point that not only > will I not write PHP code, I won't even run applications written in PHP > (my long search for decent blogging software was due to the restriction > that it not be written in PHP). At some level PHP is a great language > because the entry cost is so low. Not so much because the language is > so particularly friendly, but because it was designed to work in an > extremely simple environment (the web) and because it's quite possible > to learn PHP incrementally by intermixing it with HTML. So what's the > problem? Well, first of all, as anyone who's done much web programming > will tell you, mixing code with markup is *not* a good thing if you > care about maintenance or extensibility. The very thing that makes PHP > a great language for beginners is the very thing that makes it a bad > language for beginners. At some point they will have to unlearn those > habits, except that usually they don't. Also, because it's so easy to > whip out a quick PHP webapp, many, if not most, PHP programmers fail to > delve very deep into the realm of programming, preferring to sit at the > edge and reap the benefits without the work (I'm not talking about > coding work, rather the work of understanding your field). PHP > programmers practically popularized the most common attack in the > world, the SQL-injection attack. Not only is it the most common, it's > the most easily avoided. That's how shallow most PHP-programmer's > knowledge is. "Professional" programmers are still assembling SQL > queries by concatenating strings. > > PHP and MySQL are this generation's BASIC, the language that was > described thusly by the Free Online Dictionary of Computing > > BASIC has become the leading cause of brain-damage in proto-hackers. > This is another case (like Pascal) of the cascading lossage that > happens when a language deliberately designed as an educational toy > gets taken too seriously. A novice can write short BASIC programs (on > the order of 10-20 lines) very easily; writing anything longer is (a) > very painful, and (b) encourages bad habits that will make it harder to > use more powerful languages well. This wouldn't be so bad if historical > accidents hadn't made BASIC so common on low-end micros. As it is, it > ruins thousands of potential wizards a year. > > Replace BASIC with PHP or MySQL and you've got today's most common > programmer. Worse, the most common programs in existence today mix the > two in a brain-freezing mixture of stupidity. > > __________________________________________________ > > Lee > > > > ________________________________________________________________________ > Check out AOL.com today. Breaking news, video search, pictures, email > and IM. All on demand. Always Free. > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From akamm at demicooper.com Tue Jun 6 11:08:20 2006 From: akamm at demicooper.com (Andrew Kamm) Date: Tue, 06 Jun 2006 10:08:20 -0500 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: <2ca9ba910606060752l3af2926en971ed90d2d4ce5e4@mail.gmail.com> Message-ID: > Actually, I'm getting: > > Fatal error: Cannot redeclare property static protected > ParentClass::$myVar in class ChildClass > > for your example. Yeah, I may have missed how I originally coded it -- I've been trying several different methods so I probably got confused. Ultimately, it comes down to any use of a "self::XXXX" reference in a parent class method will cause a child class to use the parent's value for "self::XXXX." Most recently, I tried assigning constants in the parent class to the value of __CLASS__. Sure enough, when those constants were used in a static method and called by a child class, the value of the constants were the name of the parent class, not the class actually calling the method(!). I'm thinking I may have to develop a separate manager class to handle the functions. Kind of a drag, but I really don't want to cut and paste the exact same methods into 10 child classes. I'm not seeing the upside to this implementation of self::. How does Java handle this? -- Andrew Kamm From shiflett at php.net Tue Jun 6 11:15:28 2006 From: shiflett at php.net (Chris Shiflett) Date: Tue, 06 Jun 2006 11:15:28 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> References: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> Message-ID: <44859C10.6040207@php.net> > my long search for decent blogging software was due to the > restriction that it not be written in PHP I don't think a response is necessary. This statement illustrates how a strong loyalty to particular technologies makes people stupid. Chris From akamm at demicooper.com Tue Jun 6 11:20:03 2006 From: akamm at demicooper.com (Andrew Kamm) Date: Tue, 06 Jun 2006 10:20:03 -0500 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: Message-ID: >that cannot write 2 consecutive lines of good code without using a wizard. That is so true it that I can?t help but +1 it. Admittedly, older versions of MySQL aren?t as rich in features as other databases, but most users understand the concept of 'keys' and normalization because they had to do some work to set it up rather than use a wizard. I've had M$SQL users give me the eye roll when they hear that I work in MySQL, then after reviewing their work I find that they haven't even normalized their database, made use of foreign keys, indexes or anything else that would make their 'database' something more then a glorified spreadsheet. -- Andrew Kamm From max at neuropunks.org Tue Jun 6 11:43:50 2006 From: max at neuropunks.org (Max Gribov) Date: Tue, 06 Jun 2006 11:43:50 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> References: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> Message-ID: <4485A2B6.4080000@neuropunks.org> > MySQL and PHP, on the other hand, really raise my ire. Both of them > have two major problems: > > 1. Bug ridden (by this I am including both misfeatures as well as > actual bugs). > Unlike Microsoft/Sun/IBM software? Should we dive into Java's internal memory management? Microsoft's excellent security record?... > 2. They encourage bad habits. > Most languages support GOTO and do not require you to comment, and your code will still compile/run. Any OO language can be used as a glorified wrapper for a bunch of functions. > and because it's quite possible > to learn PHP incrementally by intermixing it with HTML. Its also possible to learn ASP by doing that same thing. In the matter of fact, its possible to be stupid with any programming language/environment. > So what's the > problem? Well, first of all, as anyone who's done much web programming > will tell you, mixing code with markup is *not* a good thing if you > care about maintenance or extensibility. The very thing that makes PHP > a great language for beginners is the very thing that makes it a bad > language for beginners. At some point they will have to unlearn those > habits, except that usually they don't. Also, because it's so easy to > whip out a quick PHP webapp, many, if not most, PHP programmers fail to > delve very deep into the realm of programming, preferring to sit at the > edge and reap the benefits without the work (I'm not talking about > coding work, rather the work of understanding your field). Im sorry, WTF?... Looked at MediaWiki source much? Joomla?.. Hell, I can paste some code too which doesnt look like BASIC... > PHP > programmers practically popularized the most common attack in the > world, the SQL-injection attack. Not only is it the most common, it's > the most easily avoided. That's how shallow most PHP-programmer's > knowledge is. "Professional" programmers are still assembling SQL > queries by concatenating strings. > I love the "most php programmers" part. I got another great one, "most people are born with sub-standard intelligence level". That one is also hard to argue for/against... > PHP and MySQL are this generation's BASIC, the language that was > described thusly by the Free Online Dictionary of Computing > > BASIC has become the leading cause of brain-damage in proto-hackers. > This is another case (like Pascal) of the cascading lossage that > happens when a language deliberately designed as an educational toy > gets taken too seriously. A novice can write short BASIC programs (on > the order of 10-20 lines) very easily; writing anything longer is (a) > very painful, and (b) encourages bad habits that will make it harder to > use more powerful languages well. This wouldn't be so bad if historical > accidents hadn't made BASIC so common on low-end micros. As it is, it > ruins thousands of potential wizards a year. > > Replace BASIC with PHP or MySQL and you've got today's most common > programmer. Worse, the most common programs in existence today mix the > two in a brain-freezing mixture of stupidity. > > > __________________________________________________ > > Lee > > > > ________________________________________________________________________ > Check out AOL.com today. Breaking news, video search, pictures, email > and IM. All on demand. Always Free. > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From tedd at sperling.com Tue Jun 6 12:08:21 2006 From: tedd at sperling.com (tedd) Date: Tue, 6 Jun 2006 12:08:21 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <4485A2B6.4080000@neuropunks.org> References: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> <4485A2B6.4080000@neuropunks.org> Message-ID: At 11:43 AM -0400 6/6/06, Max Gribov wrote: > > > BASIC has become the leading cause of brain-damage in proto-hackers. >> This is another case (like Pascal) of the cascading lossage that >> happens when a language deliberately designed as an educational toy >> gets taken too seriously. A novice can write short BASIC programs (on >> the order of 10-20 lines) very easily; writing anything longer is (a) >> very painful, and (b) encourages bad habits that will make it harder to >> use more powerful languages well. This wouldn't be so bad if historical >> accidents hadn't made BASIC so common on low-end micros. As it is, it >> ruins thousands of potential wizards a year. >> >> Replace BASIC with PHP or MySQL and you've got today's most common >> programmer. Worse, the most common programs in existence today mix the > > two in a brain-freezing mixture of stupidity. BASIC typically gets a bad rap -- but in some it's not deserved. I spent many years programing in FutureBASIC for the Mac it was far better than the other languages I programmed in, such as CodeWarrior. I could turn out a "real" application in a fraction of the time it would take C programmers and there was no difference in application performance (i.e., speed). But then again, maybe I'm one of those "brain-damage in proto-hackers" -- that might explain a lot, huh? Maybe that's why I turned to php/mysql -- hmmmm. tedd -- ------------------------------------------------------------------------------------ http://sperling.com http://ancientstones.com http://earthstones.com From lists at zaunere.com Tue Jun 6 12:21:58 2006 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 6 Jun 2006 12:21:58 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> Message-ID: <01d801c68985$57ce4770$650aa8c0@mobilez> leeeyerman at aol.com wrote on Tuesday, June 06, 2006 10:56 AM: > Hey everyone, > > Check out this article. It is a huge slam on the LAMP framework. It > may be worth our collective response. > > The article is titled: > > Why the light has gone out on LAMP > > Written by: > > http://blog.develix.com/frog/user/cliff/article/2006-06-04/9 Damn, and he's speaking at our conference... Though it's strange how he forgets that LAMP actually stands for Linux/Apache/MySQL/PHP-Python-Perl. Guess his little rant is in response to him forgetting that, too. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From jjb at ibiblio.org Tue Jun 6 12:38:26 2006 From: jjb at ibiblio.org (John Joseph Bachir) Date: Tue, 6 Jun 2006 12:38:26 -0400 (EDT) Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: <2ca9ba910606060748g35055bf1hd594d14345b84853@mail.gmail.com> References: <2ca9ba910606060748g35055bf1hd594d14345b84853@mail.gmail.com> Message-ID: i feel your pain... http://blog.johnjosephbachir.org/187 On Tue, 6 Jun 2006, Jeff Knight wrote: > I feel your pain.... > > On 6/6/06, Andrew Kamm wrote: >> >> Hello all -- I've coded a set of classes that inherit from an abstract >> class. To my dismay, I've realized after charting and coding everything out >> that my class hierarchy may be of no use because of how PHP handles >> inheritance of variables/methods when extending a class. >> >> In short, when a method is declared in the parent class and uses >> "self::$whatever", when calling the method from a child class the "whatever" >> portion always references the parent value of "whatever." >> >> I've come to grips with this being just the way it is, but does anyone have >> a solution that will prevent me from cutting and pasting all the methods >> from my parent class into the child class (effectively killing the point of >> the inheritance)? >> >> In addition, is there any logical reason for the language to operate this >> way? I found it reported as a bug on the PHP site, but I believe the final >> result/response was that it's not a bug, but intentional. I don't know Java >> or C, so I have no frame of reference, but it seems kind of weird to me. >> >> >> Example: >> >> ***************************************** >> abstract class ParentClass { >> protected static $myVar = "parent var!"; >> function printVar() { >> echo self::$myVar; >> } >> } >> >> >> class ChildClass extends ParentClass { >> protected static $myVar = "child var!"; >> } >> >> >> ChildClass::printVar(); //displays "parent var!" >> ***************************************** >> >> >> thanks in advance! >> >> >> -- >> Andrew Kamm >> >> >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> New York PHP Conference and Expo 2006 >> http://www.nyphpcon.com >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From the.wolfy at gmail.com Tue Jun 6 12:42:17 2006 From: the.wolfy at gmail.com (Wolfy) Date: Tue, 6 Jun 2006 13:42:17 -0300 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: References: <2ca9ba910606060752l3af2926en971ed90d2d4ce5e4@mail.gmail.com> Message-ID: Hi Andrew, well. i?ve left php exactly for this "problem", the solution well, it?s a different history. on java, when u extends a class the child class inherits all methods and attributes, and you still have the option to overwrite or override the parent method. but, i dont know why php does not let you override a method (and, i?m not sure, but does not let you overwrite a method too). so, what can u do? you can change the static method to a non-static one and try to overwrite the method to get the child attribute in the method. or you can try testing the instance of the class. just like this if (obj instance of parent1) call method from parent1 elseif (obj instance of parent2) call method from parent2 and so on if this does not help you. let me know... and then i can make further test to get a solution []?s gibaWolfy On 6/6/06, Andrew Kamm wrote: > > > Actually, I'm getting: > > > > Fatal error: Cannot redeclare property static protected > > ParentClass::$myVar in class ChildClass > > > > for your example. > > Yeah, I may have missed how I originally coded it -- I've been trying > several different methods so I probably got confused. > > Ultimately, it comes down to any use of a "self::XXXX" reference in a > parent > class method will cause a child class to use the parent's value for > "self::XXXX." > > Most recently, I tried assigning constants in the parent class to the > value > of __CLASS__. Sure enough, when those constants were used in a static > method > and called by a child class, the value of the constants were the name of > the > parent class, not the class actually calling the method(!). > > I'm thinking I may have to develop a separate manager class to handle the > functions. Kind of a drag, but I really don't want to cut and paste the > exact same methods into 10 child classes. > > I'm not seeing the upside to this implementation of self::. How does Java > handle this? > > -- > Andrew Kamm > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmintz at davidmintz.org Tue Jun 6 13:05:13 2006 From: dmintz at davidmintz.org (David Mintz) Date: Tue, 6 Jun 2006 13:05:13 -0400 (EDT) Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <01d801c68985$57ce4770$650aa8c0@mobilez> References: <01d801c68985$57ce4770$650aa8c0@mobilez> Message-ID: On Tue, 6 Jun 2006, Hans Zaunere wrote: > > Damn, and he's speaking at our conference... > Why? --- David Mintz http://davidmintz.org/ Amendment IV The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. From scott at crisscott.com Tue Jun 6 13:17:55 2006 From: scott at crisscott.com (Scott Mattocks) Date: Tue, 06 Jun 2006 13:17:55 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <01d801c68985$57ce4770$650aa8c0@mobilez> References: <01d801c68985$57ce4770$650aa8c0@mobilez> Message-ID: <4485B8C3.1030903@crisscott.com> Hans Zaunere wrote: > Damn, and he's speaking at our conference... He is? I don't see him on the list of speakers. http://www.nyphpcon.com/conference_glance.php -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com From lists at zaunere.com Tue Jun 6 13:20:28 2006 From: lists at zaunere.com (Hans Zaunere) Date: Tue, 6 Jun 2006 13:20:28 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: Message-ID: <01e801c6898d$831bf780$650aa8c0@mobilez> David Mintz wrote on Tuesday, June 06, 2006 1:05 PM: > On Tue, 6 Jun 2006, Hans Zaunere wrote: > > > > > Damn, and he's speaking at our conference... > > > > Why? Sorry guys - I guess my "..." at the end didn't convey the sarcasm I intended :) H From jbaer at VillageVoice.com Tue Jun 6 13:31:11 2006 From: jbaer at VillageVoice.com (Baer, Jon) Date: Tue, 6 Jun 2006 13:31:11 -0400 Subject: [nycphp-talk] PHP4/5 Migration Check(er) Message-ID: <4D2FAD9B00577645932AD7ED5FECA245027B600C@mail> I could have sworn there was a command line tool which someone posted that audited an old PHP4 codebase to perform PHP5 migration checks ... (ie a code scanner that spitted out warnings). Things like array_merge, domxml, etc ... Anyone know of it or the name? Was it a Zend tool? Thanks. - Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: From akamm at demicooper.com Tue Jun 6 13:33:49 2006 From: akamm at demicooper.com (Andrew Kamm) Date: Tue, 06 Jun 2006 12:33:49 -0500 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: Message-ID: Just an update ? my hack to get around this was to allow instantiation of empty objects that are used for calling what would be static methods. The classes would normally accept a numeric $id var in their constructor (the constructor being defined in the parent class) --- I?ve adapted them to accept the string ?static? as well. If ?static? is the argument for the constructor, they object is created without any of the normal properties it would have as an individual ?object?, but it?s able to call methods defined in the parent class and have them be relevant to the child class (i.e., in the parent class there are no more references to ?self::XXXX?, just references to ?this->xxxx?. The methods within the parent class are no longer static. It?s a hack, but it beats maintaining several files with the exact same code. -- Andrew Kamm From: Wolfy Date: Tue, 6 Jun 2006 13:42:17 -0300 To: NYPHP Talk , Subject: Re: [nycphp-talk] Static variables, self:: and abstract classes Hi Andrew, well. i?ve left php exactly for this "problem", the solution well, it?s a different history. on java, when u extends a class the child class inherits all methods and attributes, and you still have the option to overwrite or override the parent method. but, i dont know why php does not let you override a method (and, i?m not sure, but does not let you overwrite a method too). so, what can u do? you can change the static method to a non-static one and try to overwrite the method to get the child attribute in the method. or you can try testing the instance of the class. just like this if (obj instance of parent1) call method from parent1 elseif (obj instance of parent2) call method from parent2 and so on if this does not help you. let me know... and then i can make further test to get a solution []?s gibaWolfy On 6/6/06, Andrew Kamm wrote: >> > Actually, I'm getting: >> > >> > Fatal error: Cannot redeclare property static protected >> > ParentClass::$myVar in class ChildClass >> > >> > for your example. > > Yeah, I may have missed how I originally coded it -- I've been trying > several different methods so I probably got confused. > > Ultimately, it comes down to any use of a "self::XXXX" reference in a parent > class method will cause a child class to use the parent's value for > "self::XXXX." > > Most recently, I tried assigning constants in the parent class to the value > of __CLASS__. Sure enough, when those constants were used in a static method > and called by a child class, the value of the constants were the name of the > parent class, not the class actually calling the method(!). > > I'm thinking I may have to develop a separate manager class to handle the > functions. Kind of a drag, but I really don't want to cut and paste the > exact same methods into 10 child classes. > > I'm not seeing the upside to this implementation of self::. How does Java > handle this? > > -- > Andrew Kamm > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsnyder at gmail.com Tue Jun 6 14:10:14 2006 From: chsnyder at gmail.com (csnyder) Date: Tue, 6 Jun 2006 14:10:14 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <01e801c6898d$831bf780$650aa8c0@mobilez> References: <01e801c6898d$831bf780$650aa8c0@mobilez> Message-ID: On 6/6/06, Hans Zaunere wrote: > > > David Mintz wrote on Tuesday, June 06, 2006 1:05 PM: > > On Tue, 6 Jun 2006, Hans Zaunere wrote: > > > > > > > > Damn, and he's speaking at our conference... > > > > > > > Why? > > Sorry guys - I guess my "..." at the end didn't convey the sarcasm I > intended :) > /rolls eyes ... way to get everyone to go look at the list of speakers, Hans. From tedd at sperling.com Tue Jun 6 14:11:34 2006 From: tedd at sperling.com (tedd) Date: Tue, 6 Jun 2006 14:11:34 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: References: <01d801c68985$57ce4770$650aa8c0@mobilez> Message-ID: >On Tue, 6 Jun 2006, Hans Zaunere wrote: > >> >> Damn, and he's speaking at our conference... >> > >Why? You don't have to listen. But keep this in mind, everyone has the right to be wrong. tedd -- ------------------------------------------------------------------------------------ http://sperling.com http://ancientstones.com http://earthstones.com From rahmin at insite-out.com Tue Jun 6 14:16:28 2006 From: rahmin at insite-out.com (Rahmin Pavlovic) Date: Tue, 06 Jun 2006 14:16:28 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: Message-ID: On 6/6/06 2:11 PM, "tedd" wrote: > You don't have to listen. But keep this in mind, everyone has the right to be > wrong. > Wait -- what exactly is wrong with the "some people burn toast, therefore you shouldn't eat bread" school of thought? From 1j0lkq002 at sneakemail.com Tue Jun 6 14:51:12 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue, 06 Jun 2006 11:51:12 -0700 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> References: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> Message-ID: <5277-73690@sneakemail.com> leeeyerman-at-aol.com |nyphp dev/internal group use| wrote: >Hey everyone, > >Check out this article. It is a huge slam on the LAMP framework. It >may be worth our collective response. > Sometimes blog articles are best ignored. The last thing I would do for this blogger is link to him. That said, I can't ignore the new bill introduced that eliminates fair use and makes us have to pay "per listen" for music. It enables the RIAA to sue anyone who listens to a song (even one they bought..even if they bought the CD) each time they listen to it on their mp3 player, etc. http://www.eff.org/IP/060512SIRAof2006DiscussionDraft.pdf As if that wasn't ballsy enough, they are trying to make it retroactive to 2001. Now do I pay attention to a rant from a hardcore non-PHP coder about how he dislikes the most popular and successful innovation platform on the web since HTML, or email the members of the committee set up to govern me before they eliminate innovation via the chilling effects of $150,000 *per song* penalties? http://www.eff.org/deeplinks/archives/004679.php I'll be emailing the congress people http://judiciary.house.gov/committeestructure.aspx?committee=3 -=john andrews http://www.seo-fun.com From 1j0lkq002 at sneakemail.com Tue Jun 6 16:12:36 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: 6 Jun 2006 20:12:36 -0000 Subject: [nycphp-talk] Zend_search_lucene - anyone here used it? Message-ID: <3115-98082@sneakemail.com> I'm looking at Zend_search from the Zend platform for a site search utility on PHP5. Has anyone here been using it, have any comments/warnings/acccolades/gripes? Thx. -=john andrews http://www.seo-fun.com From danielc at analysisandsolutions.com Tue Jun 6 16:54:26 2006 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Tue, 6 Jun 2006 16:54:26 -0400 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: References: Message-ID: <20060606205426.GA13767@panix.com> Andrew: You can keep it static, but the child class must manually modify the values as desired rather than setting the property in the child. class a { public static $aa = 'original'; public static function e() { echo self::$aa . "
\n"; } } class b extends a { public function m() { self::$aa = 'modified'; } } b::m(); b::e(); --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From akamm at demicooper.com Tue Jun 6 17:21:36 2006 From: akamm at demicooper.com (Andrew Kamm) Date: Tue, 06 Jun 2006 16:21:36 -0500 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: <20060606205426.GA13767@panix.com> Message-ID: > You can keep it static, but the child class must manually modify the > values as desired rather than setting the property in the child. > > class a { > public static $aa = 'original'; > public static function e() { > echo self::$aa . "
\n"; > } > } > > class b extends a { > public function m() { > self::$aa = 'modified'; > } > } > > b::m(); > b::e(); > > > --Dan That's basically the problem I'm having -- your example redeclares a new function in the child class. I would like to declare all of my functions in the parent class, then allow the child classes to inherit them and have any static references refer to the static vars in the children and not the parent. I've tried using constants and get the same results. I guess it seems logical to me that static self:: variables would work like how $this-> variables work. When you have a parent class and the child class inherits the functions, an instantiated child object will use it's own variables when it is faced with an inherited function that includes '$this->' (it's not going to fail or look to the parent class for a value). I'm trying to avoid having to re-write the functions in each child class because it kind of defeats the purpose of even having a parent class. I assume I'm missing something, but it seems like a pretty big omission from PHP --- this really limits the usefulness of class inheritance if I have to paste code into several child classes. Basically: **************************** class a { //declare parents var public static $var = 'original'; //function that will be used in parent and child public static function e() { echo self::$var . "
\n"; } } class b extends a { //declare child's version of the static $var public static $var = 'modified'; } b::e(); //outputs 'original' **************************** If anyone can give me an example of how this is advantageous and not a bug, I'd greatly appreciate it. I'd much prefer to see a positive side to this (especially after hours of trying to work around it), and I really can't. Is there a better way to handle situations like this? I'm open to suggestions. I've got a work around, but I'd rather work in a 'best practices' pattern than just hack around the limitations of the language (if it is indeed a limitation and not a feature that I am misunderstanding). If it's not advantageous, any chance it'll be ditched in V.6? Word on the street is it's not very popular. thanks again- -- Andrew Kamm From the.wolfy at gmail.com Tue Jun 6 17:58:28 2006 From: the.wolfy at gmail.com (Wolfy) Date: Tue, 6 Jun 2006 18:58:28 -0300 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: References: <20060606205426.GA13767@panix.com> Message-ID: Andrew, just one question had crossed my mind right now... why did u had declared the variable as static? []?s On 6/6/06, Andrew Kamm wrote: > > > You can keep it static, but the child class must manually modify the > > values as desired rather than setting the property in the child. > > > > class a { > > public static $aa = 'original'; > > public static function e() { > > echo self::$aa . "
\n"; > > } > > } > > > > class b extends a { > > public function m() { > > self::$aa = 'modified'; > > } > > } > > > > b::m(); > > b::e(); > > > > > > --Dan > > > That's basically the problem I'm having -- your example redeclares a new > function in the child class. I would like to declare all of my functions > in > the parent class, then allow the child classes to inherit them and have > any > static references refer to the static vars in the children and not the > parent. I've tried using constants and get the same results. > > I guess it seems logical to me that static self:: variables would work > like > how $this-> variables work. When you have a parent class and the child > class > inherits the functions, an instantiated child object will use it's own > variables when it is faced with an inherited function that includes > '$this->' (it's not going to fail or look to the parent class for a > value). > > I'm trying to avoid having to re-write the functions in each child class > because it kind of defeats the purpose of even having a parent class. I > assume I'm missing something, but it seems like a pretty big omission from > PHP --- this really limits the usefulness of class inheritance if I have > to > paste code into several child classes. > > Basically: > > **************************** > class a { > > //declare parents var > public static $var = 'original'; > > //function that will be used in parent and child > public static function e() { > echo self::$var . "
\n"; > } > } > > > class b extends a { > //declare child's version of the static $var > public static $var = 'modified'; > } > > b::e(); //outputs 'original' > **************************** > > If anyone can give me an example of how this is advantageous and not a > bug, > I'd greatly appreciate it. I'd much prefer to see a positive side to this > (especially after hours of trying to work around it), and I really can't. > > Is there a better way to handle situations like this? I'm open to > suggestions. I've got a work around, but I'd rather work in a 'best > practices' pattern than just hack around the limitations of the language > (if > it is indeed a limitation and not a feature that I am misunderstanding). > > If it's not advantageous, any chance it'll be ditched in V.6? Word on the > street is it's not very popular. > > thanks again- > > -- > Andrew Kamm > > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From danielc at analysisandsolutions.com Tue Jun 6 19:06:06 2006 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Tue, 6 Jun 2006 19:06:06 -0400 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: References: <20060606205426.GA13767@panix.com> Message-ID: <20060606230606.GA23995@panix.com> On Tue, Jun 06, 2006 at 04:21:36PM -0500, Andrew Kamm wrote: > > That's basically the problem I'm having -- your example redeclares a new > function in the child class. No. You misunderstand. You don't need to redeclare each function. Consider "m" to be like a constructor. I would have used __construct(), but they don't get called in static mode. So, instead of setting the property values via instantiation in your example, manually set them in the fake constructor. Then manually call the "constructor" before making any other static calls on your inherited static methods. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From akamm at demicooper.com Wed Jun 7 08:25:46 2006 From: akamm at demicooper.com (Andrew Kamm) Date: Wed, 07 Jun 2006 07:25:46 -0500 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: Message-ID: >just one question had crossed my mind right now... > >why did u had declared the variable as static? The idea was to have an abstract parent class for customer preferences since most preference classes would basically share the same code. The static vars (or constants) that were to be stored in the individual classes were properties that differentiate how the child classes would interact with the database (among other things). Some of the methods within the classes were not object-specific, but rather class-specific operations (like a getList() method to get a an array of options for a specific type of preference (class) rather than something related to an actual object instance). For example: customerPreference has child class 'beds' which can be referenced statically for information about 'beds' in general or you could instantiate a 'beds' object that refers to '2-bedroom' or '4-bedroom', etc. Some of the vars I was attempting to store as static (or as constants) were things like "tableName", "linkTableName", "isMult", etc. thanks- -- Andrew Kamm From akamm at demicooper.com Wed Jun 7 08:38:59 2006 From: akamm at demicooper.com (Andrew Kamm) Date: Wed, 07 Jun 2006 07:38:59 -0500 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: <20060606230606.GA23995@panix.com> Message-ID: >> That's basically the problem I'm having -- your example redeclares a new >> function in the child class. > > No. You misunderstand. You don't need to redeclare each function. > Consider "m" to be like a constructor. I would have used __construct(), > but they don't get called in static mode. So, instead of setting the > property values via instantiation in your example, manually set them in > the fake constructor. Then manually call the "constructor" before making > any other static calls on your inherited static methods. Ah .... I see now. Fantastic. I just did a little trial run and I think that'll work great. I'm diving back into the actual class files right now to work it out. thanks! -- Andrew Kamm From danielc at analysisandsolutions.com Wed Jun 7 10:08:34 2006 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Wed, 7 Jun 2006 10:08:34 -0400 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: References: Message-ID: <20060607140834.GA6619@panix.com> On Wed, Jun 07, 2006 at 07:25:46AM -0500, Andrew Kamm wrote: > >just one question had crossed my mind right now... > > > >why did u had declared the variable as static? > > The idea was to have an abstract parent class for customer preferences since > most preference classes would basically share the same code. The static > vars (or constants) that were to be stored in the individual classes were > properties that differentiate how the child classes would interact with the > database (among other things). Static is the wrong approach. So scratch what I said in my prior email, I was just trying to prove it could be done. Declare the methods in the parent and the properties in the children. Then instantiate your class into an object. You get your desired outcome without a fake constructor plus you don't have to maintain properties in the parent that are just going to get overridden. class base { public function getTablename() { echo $this->_tablename . "
\n"; } } class joes extends base { protected $_tablename = 'joestable'; } $obj = new joes; $obj->getTablename(); --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From edwardpotter at gmail.com Wed Jun 7 11:42:24 2006 From: edwardpotter at gmail.com (edward potter) Date: Wed, 7 Jun 2006 11:42:24 -0400 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: References: Message-ID: So, JUST FOR FUN! how would you do it with no objects? (I just finished my grad work, a professor could pull that one on you). :-) ed On 6/7/06, Andrew Kamm wrote: > >just one question had crossed my mind right now... > > > >why did u had declared the variable as static? > > The idea was to have an abstract parent class for customer preferences since > most preference classes would basically share the same code. The static > vars (or constants) that were to be stored in the individual classes were > properties that differentiate how the child classes would interact with the > database (among other things). > > Some of the methods within the classes were not object-specific, but rather > class-specific operations (like a getList() method to get a an array of > options for a specific type of preference (class) rather than something > related to an actual object instance). > > For example: customerPreference has child class 'beds' which can be > referenced statically for information about 'beds' in general or you could > instantiate a 'beds' object that refers to '2-bedroom' or '4-bedroom', etc. > > Some of the vars I was attempting to store as static (or as constants) were > things like "tableName", "linkTableName", "isMult", etc. > > thanks- > > -- > Andrew Kamm > > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From papillion at gmail.com Wed Jun 7 14:44:35 2006 From: papillion at gmail.com (Anthony Papillion) Date: Wed, 7 Jun 2006 13:44:35 -0500 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> References: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> Message-ID: <5458518f0606071144u613f004ev34981a82684cd7b0@mail.gmail.com> You know, I've never understood the "real programmers" "real languages" "real databases" debate thing. If a technology meets your needs, does what you want, and makes you more marketable because you acquire skills that are in demand, *who cares* what idiots like this think? *Real* programmers adapt and learn whatever languages they need to stay competitive in their field. They learn whatever is popular. When VB was popular, we all leanred VB, when C++ was all the rage we learned C++. Now that so much is moving to the web, PHP and MySQL are in high demand. It would be career suicide for a programmer to ignore those technologies because a few people feel they aren't *real* somehow. The checks I get in the mail for programming in PHP sure feel real to me. Anthony On 6/6/06, leeeyerman at aol.com wrote: > Hey everyone, > > Check out this article. It is a huge slam on the LAMP framework. It > may be worth our collective response. > > The article is titled: > > Why the light has gone out on LAMP > > Written by: > > http://blog.develix.com/frog/user/cliff/article/2006-06-04/9 > > > > Bits and pieces from the article: > > I'm quite opposed to using MySQL and PHP, and I'm none too fond of > Apache. Anyone who knows me or happens into a conversation with me > about development quickly learns of my distaste for these particular > projects. To be fair, Apache is the least problematic of the three and > if there were no alternatives, I'd use it without a lot of complaint. > > MySQL and PHP, on the other hand, really raise my ire. Both of them > have two major problems: > > 1. Bug ridden (by this I am including both misfeatures as well as > actual bugs). > 2. They encourage bad habits. > > PHP is another sore spot for me. I've gotten to the point that not only > will I not write PHP code, I won't even run applications written in PHP > (my long search for decent blogging software was due to the restriction > that it not be written in PHP). At some level PHP is a great language > because the entry cost is so low. Not so much because the language is > so particularly friendly, but because it was designed to work in an > extremely simple environment (the web) and because it's quite possible > to learn PHP incrementally by intermixing it with HTML. So what's the > problem? Well, first of all, as anyone who's done much web programming > will tell you, mixing code with markup is *not* a good thing if you > care about maintenance or extensibility. The very thing that makes PHP > a great language for beginners is the very thing that makes it a bad > language for beginners. At some point they will have to unlearn those > habits, except that usually they don't. Also, because it's so easy to > whip out a quick PHP webapp, many, if not most, PHP programmers fail to > delve very deep into the realm of programming, preferring to sit at the > edge and reap the benefits without the work (I'm not talking about > coding work, rather the work of understanding your field). PHP > programmers practically popularized the most common attack in the > world, the SQL-injection attack. Not only is it the most common, it's > the most easily avoided. That's how shallow most PHP-programmer's > knowledge is. "Professional" programmers are still assembling SQL > queries by concatenating strings. > > PHP and MySQL are this generation's BASIC, the language that was > described thusly by the Free Online Dictionary of Computing > > BASIC has become the leading cause of brain-damage in proto-hackers. > This is another case (like Pascal) of the cascading lossage that > happens when a language deliberately designed as an educational toy > gets taken too seriously. A novice can write short BASIC programs (on > the order of 10-20 lines) very easily; writing anything longer is (a) > very painful, and (b) encourages bad habits that will make it harder to > use more powerful languages well. This wouldn't be so bad if historical > accidents hadn't made BASIC so common on low-end micros. As it is, it > ruins thousands of potential wizards a year. > > Replace BASIC with PHP or MySQL and you've got today's most common > programmer. Worse, the most common programs in existence today mix the > two in a brain-freezing mixture of stupidity. > > __________________________________________________ > > Lee > > > > ________________________________________________________________________ > Check out AOL.com today. Breaking news, video search, pictures, email > and IM. All on demand. Always Free. > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Anthony Papillion Phone: (918) 926-0139 ICQ: 96-698-595 CAN ONE VOICE CHANGE THE WORLD? http://www.one.org From tedd at sperling.com Wed Jun 7 15:03:45 2006 From: tedd at sperling.com (tedd) Date: Wed, 7 Jun 2006 15:03:45 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <5458518f0606071144u613f004ev34981a82684cd7b0@mail.gmail.com> References: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> <5458518f0606071144u613f004ev34981a82684cd7b0@mail.gmail.com> Message-ID: >The checks I get in the mail for programming in PHP sure feel >real to me. > >Anthony You get paid for this?!? I have got to figure out how that works. :-) tedd -- ------------------------------------------------------------------------------------ http://sperling.com http://ancientstones.com http://earthstones.com From mailinglists at caseysoftware.com Wed Jun 7 15:42:43 2006 From: mailinglists at caseysoftware.com (Keith Casey) Date: Wed, 7 Jun 2006 15:42:43 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <5458518f0606071144u613f004ev34981a82684cd7b0@mail.gmail.com> References: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> <5458518f0606071144u613f004ev34981a82684cd7b0@mail.gmail.com> Message-ID: On 6/7/06, Anthony Papillion wrote: > You know, I've never understood the "real programmers" "real > languages" "real databases" debate thing. If a technology meets your > needs, does what you want, and makes you more marketable because you > acquire skills that are in demand, *who cares* what idiots like this > think? I think this has been fueled (not created) by the boom which someone convinced the masses that anyone who could throw together some table tags was a "programmer". Since then there are some who have tried to demonstrate what "real" programmers use vs what the posers use... Personally, I'd hire Bob Villa with a pair of rocks over myself with an entire workshop any day. During most of the 90's, my mother worked at a community college in the Midwest. I'll never forget the day ('98 or '99) that I met their "web developer" who proceded to ask how she could include images in her webpage... kc -- D. Keith Casey Jr. CEO, CaseySoftware, LLC http://CaseySoftware.com 2006 DC PHP Conference: "PHP In The Federal Enterprise and the World" - http://dcphpconference.com/ From prusak at gmail.com Wed Jun 7 15:57:19 2006 From: prusak at gmail.com (Ophir Prusak) Date: Wed, 7 Jun 2006 15:57:19 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <44859C10.6040207@php.net> References: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> <44859C10.6040207@php.net> Message-ID: I agree with Chris that writing a response is not necessary. While I don't really agree with his "solution" - don't use PHP / MySQL I do agree that: - PHP has lowered the entry barrier into the realm of computer programming. - Many of the people who write programs in PHP don't take the time to learn computer science fundamentals (and it shows in their code). I have an old blog entry that goes into more detail about this: http://www.prusak.com/archives/2004-11-04/how-did-we-get-here/ But to the point - An analogy I like to use is Digital Video. Today's tools and technologies allows anyone to make their own "movies". Of course this means that we have more people making movies that are junk, but that doesn't mean everyone should be using 35mm ( http://en.wikipedia.org/wiki/35mm_film ) -- Ophir Prusak http://www.prusak.com From enolists at gmail.com Wed Jun 7 18:22:18 2006 From: enolists at gmail.com (Mark Armendariz) Date: Wed, 7 Jun 2006 15:22:18 -0700 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: Message-ID: <012a01c68a80$d8741110$6500a8c0@enobrev> I always just figured these guys were bitter because their job doesn't get them laid. When out in a group and the subject of what everyone does for a living comes up, I usually sneak away to buy the next round and let the musicians and actors steal the show. When you mention programming to a group of non-programmers (particularly of the opposite sex), a deafening glaze takes over. Not that I'm not proud of being a programmer. After 8 or 9 years in these trenches, I can't think of much I'd rather do. Especially in my underwear (although clients tend to prefer you put pants on for the meetings). Anyways, I always figured that since we can't have a 'normal' conversation about the usefulness of singletons, oo vs procedural, referential integrity, relational calculus, Unicode and why it's right for you and whatever the hell else comes up daily in our world a lot of us end up picking on each other. In the end, though. Every language has tons of faults. We're the middle men between punch cards and literally telling machines what we want in plain . We're inching towards our replacement every day, which will most likely have modules in just about every programming language we use daily and a few more we come up with along the way. The languages don't matter. Because even then, a system that understands Exactly what a trader on wall street wants, might have trouble understanding what the hell aunt Bessie is asking for - and vice versa. We're basically translators, and as long as we're well trained in getting our ideas across, then all else generally falls in the place just fine. In the meantime, as these silly naysayers yell 'doom, doom, doom' about the 'other' languages (the ones they won't use for whatever reason), I like to swoop in, solve the clients' problems quickly and correctly and collect the check - then go have a drink with some friends and forget about these silly languages we use to tell computers to do what we need them to do. (sorry for the long post - maybe I should finally start a blog one of these days) Mark > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ophir Prusak > Sent: Wednesday, June 07, 2006 12:57 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Why the light has gone out on LAMP > > I agree with Chris that writing a response is not necessary. > > While I don't really agree with his "solution" - don't use > PHP / MySQL I do agree that: > > - PHP has lowered the entry barrier into the realm of > computer programming. > - Many of the people who write programs in PHP don't take the > time to learn computer science fundamentals (and it shows in > their code). > > I have an old blog entry that goes into more detail about this: > http://www.prusak.com/archives/2004-11-04/how-did-we-get-here/ > > But to the point - An analogy I like to use is Digital Video. > Today's tools and technologies allows anyone to make their > own "movies". > Of course this means that we have more people making movies > that are junk, but that doesn't mean everyone should be using > 35mm ( http://en.wikipedia.org/wiki/35mm_film ) > > > > > > > > -- > Ophir Prusak > http://www.prusak.com > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.8.2/357 - Release > Date: 6/6/2006 > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date: 6/6/2006 From ps at pswebcode.com Wed Jun 7 19:55:15 2006 From: ps at pswebcode.com (Peter Sawczynec) Date: Wed, 7 Jun 2006 19:55:15 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <012a01c68a80$d8741110$6500a8c0@enobrev> Message-ID: <001701c68a8d$d2904590$68e4a144@Rubicon> Excuse me, I know the place is really, really busy right now, but I was just wondering, well, you know, like where do we keep the donuts. 'Cause thinking makes me hungry. Peter -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mark Armendariz Sent: Wednesday, June 07, 2006 6:22 PM To: 'NYPHP Talk' Subject: Re: [nycphp-talk] Why the light has gone out on LAMP I always just figured these guys were bitter because their job doesn't get them laid. When out in a group and the subject of what everyone does for a living comes up, I usually sneak away to buy the next round and let the musicians and actors steal the show. When you mention programming to a group of non-programmers (particularly of the opposite sex), a deafening glaze takes over. Not that I'm not proud of being a programmer. After 8 or 9 years in these trenches, I can't think of much I'd rather do. Especially in my underwear (although clients tend to prefer you put pants on for the meetings). Anyways, I always figured that since we can't have a 'normal' conversation about the usefulness of singletons, oo vs procedural, referential integrity, relational calculus, Unicode and why it's right for you and whatever the hell else comes up daily in our world a lot of us end up picking on each other. In the end, though. Every language has tons of faults. We're the middle men between punch cards and literally telling machines what we want in plain . We're inching towards our replacement every day, which will most likely have modules in just about every programming language we use daily and a few more we come up with along the way. The languages don't matter. Because even then, a system that understands Exactly what a trader on wall street wants, might have trouble understanding what the hell aunt Bessie is asking for - and vice versa. We're basically translators, and as long as we're well trained in getting our ideas across, then all else generally falls in the place just fine. In the meantime, as these silly naysayers yell 'doom, doom, doom' about the 'other' languages (the ones they won't use for whatever reason), I like to swoop in, solve the clients' problems quickly and correctly and collect the check - then go have a drink with some friends and forget about these silly languages we use to tell computers to do what we need them to do. (sorry for the long post - maybe I should finally start a blog one of these days) Mark > -----Original Message----- > From: talk-bounces at lists.nyphp.org > [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Ophir Prusak > Sent: Wednesday, June 07, 2006 12:57 PM > To: NYPHP Talk > Subject: Re: [nycphp-talk] Why the light has gone out on LAMP > > I agree with Chris that writing a response is not necessary. > > While I don't really agree with his "solution" - don't use > PHP / MySQL I do agree that: > > - PHP has lowered the entry barrier into the realm of > computer programming. > - Many of the people who write programs in PHP don't take the > time to learn computer science fundamentals (and it shows in > their code). > > I have an old blog entry that goes into more detail about this: > http://www.prusak.com/archives/2004-11-04/how-did-we-get-here/ > > But to the point - An analogy I like to use is Digital Video. Today's > tools and technologies allows anyone to make their own "movies". > Of course this means that we have more people making movies > that are junk, but that doesn't mean everyone should be using > 35mm ( http://en.wikipedia.org/wiki/35mm_film ) > > > > > > > > -- > Ophir Prusak > http://www.prusak.com _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.8.2/357 - Release > Date: 6/6/2006 > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.2/357 - Release Date: 6/6/2006 _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk New York PHP Conference and Expo 2006 http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From rotsen at gmail.com Wed Jun 7 20:09:45 2006 From: rotsen at gmail.com (Nestor) Date: Wed, 7 Jun 2006 17:09:45 -0700 Subject: [nycphp-talk] using PHP to create a php file Message-ID: I just had a chance to write some php code since 2004 and I am rusty. My code reads a php file that displays company jobs available. I read this file and allow the hr people to check the jobs that they want to remove and then I proceed to create the new php file without the jobs that were chosen to be removed. When I try to write the new php file it fails because it has no permissions to create a file in the web directory. No httpd is being run by use nobody and the file itself is own by root. Error: Warning: fopen(employment2.phtml): failed to open stream: Permission denied in /www/hr_rm_job.phtml line 11 Cannot create output file. ----- This is line11: if (!($out=fopen($outfile,"w"))) die ("Cannot create output file."); Why can I create php file on this directory? thanks, N?stor :-) From michael.southwell at nyphp.org Wed Jun 7 20:54:09 2006 From: michael.southwell at nyphp.org (Michael Southwell) Date: Wed, 07 Jun 2006 20:54:09 -0400 Subject: [nycphp-talk] using PHP to create a php file Message-ID: <6.2.3.4.2.20060607205302.025fda30@mail.optonline.net> At 08:09 PM 6/7/2006, you wrote: >When I try to write the new php file it fails because it has no >permissions to create >a file in the web directory. No httpd is being run by use nobody and >the file itself is >own by root. > >Why can I create php file on this directory? You just said yourself why you can't: because your script has no write permissions. chmod the target directory to 777 and you will be able to write to it. Alas, so will anybody else, so there is a certain security risk involved here. Only you can decide whether the ability to write is worth the risk that others can also. (You might however consider writing to somewhere outside the web directory if that is possible in your context.) Michael Southwell, Vice President for Education New York PHP http://www.nyphp.com/training - In-depth PHP Training Courses From pyurt at yahoo.com Wed Jun 7 21:10:08 2006 From: pyurt at yahoo.com (P Yurt) Date: Wed, 7 Jun 2006 18:10:08 -0700 (PDT) Subject: [nycphp-talk] using PHP to create a php file Message-ID: <20060608011008.69733.qmail@web52207.mail.yahoo.com> Is this on *nix? If so try permission 777 for the folder. Paul Yurt pyurt at yahoo.com 480-585-0007 -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Nestor Sent: Wednesday, June 07, 2006 5:10 PM To: NYPHP Talk Subject: [nycphp-talk] using PHP to create a php file I just had a chance to write some php code since 2004 and I am rusty. My code reads a php file that displays company jobs available. I read this file and allow the hr people to check the jobs that they want to remove and then I proceed to create the new php file without the jobs that were chosen to be removed. When I try to write the new php file it fails because it has no permissions to create a file in the web directory. No httpd is being run by use nobody and the file itself is own by root. Error: Warning: fopen(employment2.phtml): failed to open stream: Permission denied in /www/hr_rm_job.phtml line 11 Cannot create output file. ----- This is line11: if (!($out=fopen($outfile,"w"))) die ("Cannot create output file."); Why can I create php file on this directory? thanks, N?stor :-) _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk New York PHP Conference and Expo 2006 http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From enolists at gmail.com Wed Jun 7 21:21:01 2006 From: enolists at gmail.com (Mark Armendariz) Date: Wed, 7 Jun 2006 18:21:01 -0700 Subject: [nycphp-talk] Double Loading PHP as image - Firefox or PHP? Message-ID: This is a follow up to an old discussion I started months ago, on which the last post I found in my own archives was on 12/2. I can't seem to find the original post in the archive, but here's a link to one of them: http://lists.nyphp.org/pipermail/talk/2005-December/017145.html Strangely long after I'd forgotten the problem due to lack of time to find a real answer, I got 2 emails from unrelated people working on unrelated projects with the same issue. As I'm still as backlogged as I was when I originally had the issue I haven't progressed much and I couldn't be much help. But they seem to have solved the issue, and as I promised then - when I figure out the answer I'll post it. I haven't had the opportunity to give this a shot on my end, so I can confirm nothing - but it seems sound. Also, should you need to email Jason, let me know and I'll get you in contact. I don't want to post his address here sans permission. First Conversation with Jason Wieland... =================================================================== =================================================================== From: Jason Wieland Sent: Wednesday, May 24, 2006 10:27 AM To: nyphp at enobrev.com Subject: Firefox double loading images I was wondering if you found a solution to this. I saw your post a couple months ago on the nyphp-talk mailing list. I have exactly the same issues. Thanks, Jason ------------- Hey Jason, --- some gibberish summation of the discussion here with the air of 'I got nothin' --- Mark ------------- From: Jason Wieland Sent: Monday, June 05, 2006 10:58 AM To: Enobrev Subject: Re: Firefox double loading images Hey thanks for your response. how I solved it was sending Etag and Last-Modified headers. Something like this: $file_hash = md5_file($post_abs); header("Etag: \"$file_hash\""); header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($post_abs)).' GMT'); That seemed to make firefox happy. I then check for those headers in the future request to possibly issue a 304 if the image is the same. Something like this: #Possibly we could the file in the browsers cache $headers = apache_request_headers(); $file_hash = md5_file($post_abs); if (isset($headers['If-None-Match']) && ereg($file_hash, $headers['If-None-Match'])) { logger( DEBUG, "Etag match sending 304"); header("HTTP/1.1 304 Not Modified"); exit; } if (isset($headers['If-Modified-Since']) && (strtotime($headers['If-Modified-Since']) == filemtime($post_abs))) { #Etag should always hit first... but just in case logger( DEBUG, "If Modified since looks good sending 304"); header("HTTP/1.1 304 Not Modified"); exit; } Maybe you'll find some of this useful, Jason Wieland ------------- Enobrev wrote: Jason, that's fantastic. I'm going to have to give it a shot when I find a few minutes. I really hated the 3-second thing but never caught a moment to figure it out. The worst part about researching it was that both requests 'looked' exactly the same even though they were in fact different types of requests. I do recall looking everywhere for info, though. How'd you figure it out? If it works for me, I'll probably post it to the list for the archives (with reference to you, of course), if you don't mind. Thanks!! Mark ------------- No problem, glad I could help. I stumbled upon the solution in two parts. First I loaded up a static image on firefox and used Live Headers (a great developer extension http://livehttpheaders.mozdev.org/) to view the different headers sent for a static image and php dynamic image. I noticed that apache automagically stuck in Etag and Last-Modified when requesting the static image. Firefox would double request on php dynamic images but not on static images so I knew it had to be something to do with those headers. I also wanted to create a browser caching solution. The default way php sends out dynamic images the users browser will request a new image from the server every time the page is reloaded even though it may have a perfectly good image sitting in its local cache. The browsers uses Etag (Entity Tag, basically just a unique string the represents an id for that image) and Last-Modified (the time of image creation or modification). You really only need to send one. But apache sends both for static images so I just though I would send both as well. After I added those headers the browser stop doing the double requests and on future request of the image it would return the Etag and last-modified (If-Modified-Since) http headers which I can use to issue a 304 (use local cache) to the browser instead of creating the image all over again and sending it out. Good Luck, Jason =================================================================== And the second discussion from this week on the same subject... =================================================================== From: Jason Collins Sent: Monday, June 05, 2006 8:39 AM To: nyphp at enobrev.com Subject: Double Firefox Image Requests http://lists.nyphp.org/pipermail/talk/2005-December/017153.html Hey Mark, did you ever find any resolution on this? I am hitting a dynamic (.aspx) resource in an request, but Firefox is making 2 identical requests one after the other. It is very bizarre. There is a slight difference in the Accept header; I'm wondering if some form of content negotiation is occurring? J http://localhost/Report/dv.ashx?id=ff37 GET /Report/dv.ashx?id=ff37 HTTP/1.1 Host: localhost User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9 ,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: vid=0466af9b-127a-4550-9327-94d92cbae524 HTTP/1.x 200 OK Server: Microsoft-IIS/5.1 Date: Mon, 05 Jun 2006 15:31:54 GMT X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: image/gif Content-Length: 43 ---------------------------------------------------------- http://localhost/Report/dv.ashx?id=ff37 GET /Report/dv.ashx?id=ff37 HTTP/1.1 Host: localhost User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4 Accept: image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: vid=0466af9b-127a-4550-9327-94d92cbae524 HTTP/1.x 200 OK Server: Microsoft-IIS/5.1 Date: Mon, 05 Jun 2006 15:31:54 GMT X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Type: image/gif Content-Length: 43 ---------------------------------------------------------- From: Enobrev Sent: Tuesday, June 06, 2006 1:48 AM To: Jason Collins Subject: RE: Double Firefox Image Requests funny you should ask right now. I'd long forgotten about that post and ended up using a workaround that did the job but felt so dirty. Another person by the name of Jason Wieland came out of the blue a couple days ago and asked. I told him my workaround, which was basically to put a timestamp on requests, using the user agent and _possibly_ the ip(it's been a while) and a cookie to discern the visitor. Then set it to ignore any other requests by the same user for the next 3 seconds. It's worked all this time (to my knowledge), but it has that terrible kludgy feel to it. Jason hit me back just yesterday with his solution: --- (refer to last message) --- I haven't had the chance to test it yet and probably won't for at least a couple weeks, but it's an interesting approach. I just replied to him right before writing this to ask how he came up with it. Anyways, if it works for me, I'm going to add it to the nyphp post for the archives. If you get a chance to try it out, let me know how it goes. Have a great evening! Mark ---------------------------------------------------------- Jason Collins: As I did more experimenting yesterday, I found that Firefox behaved much differently when the request came from an tag embedded in an HTML page. That is, if I requested the resource directly, I received double requests from Firefox for many response header combinations (basically any header combination that made the resource non-cachable). If I embedded that request in an tag inside of an HTML document, many of those double requests went away. My solution was similar to below ? I set a Last-Modified in the past, and set the Expires header to Now. Combining this with only requesting from an embedded tag, I got 200 and 304 activity as I would have expected. My C# source: // Case 1 //context.Response.Cache.SetCacheability( HttpCacheability.NoCache); // IE good // firefox makes double requests // Case 2 //context.Response.Cache.SetETag("123"); // ETag, on its own, doesn't emit!!! // ETag is not emitted at all!!! Asp.Net weirdness? Unknown. Moving on. // Case 3 //context.Response.Cache.SetCacheability( HttpCacheability.NoCache); //context.Response.Cache.SetLastModified(new DateTime(2000, 1, 1)); // Last-Modified is not emitted at all (likely due to NoCache) // case 3 is therefore like case 1 above. // Case 4 //context.Response.Cache.SetLastModified(new DateTime(2000, 1, 1)); // IE makes one request, but caches // Firefox makes one request, but caches // Case 5 //context.Response.Cache.SetLastModified(new DateTime(2000, 1, 1)); //context.Response.AddHeader("Expires", "-1"); // Custom "Expires" header is not emitted therefore like case 4 above // Case 6 //context.Response.Cache.SetLastModified(new DateTime(2000, 1, 1)); //context.Response.Cache.SetExpires(DateTime.Now); // IE makes correct requests, including If-Modified-Since (for 304) // Firefox makes double requests, but does include If-Modified-Since // Update: Firefox only makes double requests if the image is requested directly!!! // Case 7 // final solution: using Case 6, assuming that is embedded in web page, and supporting // 304 revalidation headers context.Response.Cache.SetExpires(DateTime.Now); if (context.Request.Headers["If-Modified-Since"] != null) { context.Response.StatusCode = 304; } else { context.Response.Cache.SetLastModified(new DateTime(2000, 1, 1)); context.Response.ContentType = "image/gif"; context.Response.OutputStream.Write(ImageBytes, 0, ImageBytes.Length); } Thanks, j =================================================================== =================================================================== Apparently two very smart gentlemen. Hopefully this can help anyone else who's had the same issue. Have a great evening!! Mar -------------- next part -------------- An HTML attachment was scrubbed... URL: From ps at pswebcode.com Thu Jun 8 07:38:33 2006 From: ps at pswebcode.com (Peter Sawczynec) Date: Thu, 8 Jun 2006 07:38:33 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <8C8579086BD16D2-7BC-1310@FWM-D36.sysops.aol.com> Message-ID: <000001c68af0$130f1ee0$68e4a144@Rubicon> Forward progress in any field, even the hi tech, is actually a very incremental uptick of new knowledge and technique applied on top of existent knowledge. Great creators in every field will readily admit that they stand on the shoulders of previous giants. As we do even with PHP. Therefore, I believe there is nothing, not even a spate of misapplied technique that cannot be refocused and refined within a single generation of new PHP product and developers. Just as PHP is actually a compendium of many fine minds at work delivering slices of solution, then the necessary refocus of all PHP programming on the more enterprise-ready, flexible, matured OOP technique should start right here, right now with any and all of us. To the tech writers, to the tutors, to the paid consultants brought in to teach a team, to the book writers, to the module creators, to the project leaders, to the book editors, the conference leaders, the industry leaders, and the gurus that watchfully circle the fire: I believe that we can all enhance our product with a single well-applied master stroke: Start teaching the OOP paradigm, first thing, right out of the box. Make it the first essential construct that needs to be bridged to youthful developers. No more first step "echo 'hello world';" examples, instead go straight to something more like: "class output{ function present_output($matter){ return $matter; } } $msg = new output(); $msg->present_output('Hello World'); echo $msg;". Why not segue OOP examples and techniques into all your new instructional material right now. I believe that within 1 - 2 years we could have almost all PHP product totally converted to OOP, have new people coming in ready set for OOP work, and have a giant pool of teaching material and product that is all OOP. Like others here note, I do independent programming for the certain freedoms, direct hands-on responsibility, the pretty fine earning potential, and, yes, even the satisfaction of helping a business use their resources more competitively and more cost-effectively. So if we want i) an optimized PHP product, ii) new developers ready set to go straight to OOP enterprise dev, and iii) developers and the product gain more share of mind, more market share, and ultimately more dollars potential: it is time to switch more and more to the OOP paradigm from the get go. To those unthanked early adapters already implementing OOP in your instructional material, we salute you. Warmest regards, Peter Sawczynec, Technology Director PSWebcode _Design & Interface _Ecommerce _Database Management ps at pswebcode.com 718.796.1951 www.pswebcode.com -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of leeeyerman at aol.com Sent: Tuesday, June 06, 2006 10:56 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] Why the light has gone out on LAMP Hey everyone, Check out this article. It is a huge slam on the LAMP framework. It may be worth our collective response. The article is titled: Why the light has gone out on LAMP Written by: http://blog.develix.com/frog/user/cliff/article/2006-06-04/9 Bits and pieces from the article: I'm quite opposed to using MySQL and PHP, and I'm none too fond of Apache. Anyone who knows me or happens into a conversation with me about development quickly learns of my distaste for these particular projects. To be fair, Apache is the least problematic of the three and if there were no alternatives, I'd use it without a lot of complaint. MySQL and PHP, on the other hand, really raise my ire. Both of them have two major problems: 1. Bug ridden (by this I am including both misfeatures as well as actual bugs). 2. They encourage bad habits. PHP is another sore spot for me. I've gotten to the point that not only will I not write PHP code, I won't even run applications written in PHP (my long search for decent blogging software was due to the restriction that it not be written in PHP). At some level PHP is a great language because the entry cost is so low. Not so much because the language is so particularly friendly, but because it was designed to work in an extremely simple environment (the web) and because it's quite possible to learn PHP incrementally by intermixing it with HTML. So what's the problem? Well, first of all, as anyone who's done much web programming will tell you, mixing code with markup is *not* a good thing if you care about maintenance or extensibility. The very thing that makes PHP a great language for beginners is the very thing that makes it a bad language for beginners. At some point they will have to unlearn those habits, except that usually they don't. Also, because it's so easy to whip out a quick PHP webapp, many, if not most, PHP programmers fail to delve very deep into the realm of programming, preferring to sit at the edge and reap the benefits without the work (I'm not talking about coding work, rather the work of understanding your field). PHP programmers practically popularized the most common attack in the world, the SQL-injection attack. Not only is it the most common, it's the most easily avoided. That's how shallow most PHP-programmer's knowledge is. "Professional" programmers are still assembling SQL queries by concatenating strings. PHP and MySQL are this generation's BASIC, the language that was described thusly by the Free Online Dictionary of Computing BASIC has become the leading cause of brain-damage in proto-hackers. This is another case (like Pascal) of the cascading lossage that happens when a language deliberately designed as an educational toy gets taken too seriously. A novice can write short BASIC programs (on the order of 10-20 lines) very easily; writing anything longer is (a) very painful, and (b) encourages bad habits that will make it harder to use more powerful languages well. This wouldn't be so bad if historical accidents hadn't made BASIC so common on low-end micros. As it is, it ruins thousands of potential wizards a year. Replace BASIC with PHP or MySQL and you've got today's most common programmer. Worse, the most common programs in existence today mix the two in a brain-freezing mixture of stupidity. __________________________________________________ Lee ________________________________________________________________________ Check out AOL.com today. Breaking news, video search, pictures, email and IM. All on demand. Always Free. _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk New York PHP Conference and Expo 2006 http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From akamm at demicooper.com Thu Jun 8 07:45:28 2006 From: akamm at demicooper.com (Andrew Kamm) Date: Thu, 08 Jun 2006 06:45:28 -0500 Subject: [nycphp-talk] Static variables, self:: and abstract classes In-Reply-To: <20060607140834.GA6619@panix.com> Message-ID: >>> just one question had crossed my mind right now... >>> >>> why did u had declared the variable as static? >> >> The idea was to have an abstract parent class for customer preferences since >> most preference classes would basically share the same code. The static >> vars (or constants) that were to be stored in the individual classes were >> properties that differentiate how the child classes would interact with the >> database (among other things). > > Static is the wrong approach. So scratch what I said in my prior email, I > was just trying to prove it could be done. > > Declare the methods in the parent and the properties in the children. > Then instantiate your class into an object. You get your desired outcome > without a fake constructor plus you don't have to maintain properties in > the parent that are just going to get overridden. > > class base { > public function getTablename() { > echo $this->_tablename . "
\n"; > } > } > > class joes extends base { > protected $_tablename = 'joestable'; > } > > $obj = new joes; > $obj->getTablename(); > > --Dan Actually, you were pretty right on with the other suggestion in terms of this particular implementation (the other method being to use a 'setVars()' method to set the static vars in a class that is being referenced statically). Either way would work, but I want to limit instantiating an object unless it's really going to be utilized as an object (contrary to the email I sent a couple days ago about instantiating objects with the string 'static' rather than the numeric ID they should use). Basically, I probably should have structured those classes differently, but I didn't anticipate the whole inherited 'self::' calls referencing the parent rather than, well... 'self::'. I always thought that's what parent:: was for. I still scratch my head at the logic of that -- I'd love to see an example of it in a beneficial situation so I could look at it as a functionality rather then a limitation of PHP. Thanks for all the help, it's appreciated. -- Andrew Kamm From jbaer at VillageVoice.com Thu Jun 8 10:19:17 2006 From: jbaer at VillageVoice.com (Baer, Jon) Date: Thu, 8 Jun 2006 10:19:17 -0400 Subject: [nycphp-talk] MDB2 / DB ... Message-ID: <4D2FAD9B00577645932AD7ED5FECA245029F6386@mail> Question ... Ive been on PHP5 w/ PDO on a framework for a while + have to switch back to a PHP4 setup and looking over the repository came across the MDB2 package and wondering if this is what I should be looking @ + what/if any changes would need to be made when switched over to 5 ... also does DataObject interoperate w/ the package ok? Thanks. - Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: From tedd at sperling.com Thu Jun 8 12:12:49 2006 From: tedd at sperling.com (tedd) Date: Thu, 8 Jun 2006 12:12:49 -0400 Subject: [nycphp-talk] Why the light has gone out on LAMP In-Reply-To: <000001c68af0$130f1ee0$68e4a144@Rubicon> References: <000001c68af0$130f1ee0$68e4a144@Rubicon> Message-ID: At 7:38 AM -0400 6/8/06, Peter Sawczynec wrote: -snip- All of what you said, you said very well. However, I take exception to: >I believe that we can all enhance our product with a single well-applied >master stroke: Start teaching the OOP paradigm, first thing, right out of >the box. Make it the first essential construct that needs to be bridged to >youthful developers. No more first step "echo 'hello world';" examples, >instead go straight to something more like: "class output{ function >present_output($matter){ return $matter; } } $msg = new output(); >$msg->present_output('Hello World'); echo $msg;". > >Why not segue OOP examples and techniques into all your new instructional >material right now. I am always concerned about the beginners, for they are the future. I would prefer teaching a class "Hello World" and have them experience something immediately positive than teaching them OOP and have the majority not understand or become frustrated with its complexity. What is easy and obvious to you, may not be to others. Also, keep in mind that innovation and advancement in any field seldom comes from established norms (schools, industry, government), but rather by the fringe, which includes beginners. The examples around us are abundant, such as those found in the histories of Xerox, Apple, Excel, and the list goes on and on. I taught Karate when I was much younger and my teacher was literally at the top of his craft. I asked him once "Who do you learn from?" and he pointed to a group of white belts. White belts in Karate, programming, or in any field for that matter, can learn the complexities and benefits of advanced techniques, but only after they learn the basics. And the easier the basics, the better the chance of taking root and supporting growth. My $0.02. tedd -- ------------------------------------------------------------------------------------ http://sperling.com http://ancientstones.com http://earthstones.com From mitch.pirtle at gmail.com Thu Jun 8 13:35:30 2006 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Thu, 8 Jun 2006 13:35:30 -0400 Subject: [nycphp-talk] CMS with split testing? In-Reply-To: References: Message-ID: <330532b60606081035x4ef86cfase71b7a18da4b97e3@mail.gmail.com> On 6/1/06, Ophir Prusak wrote: > > I found this discussion which claims that Joomla can already do this, > but I have not been able to find where this is documented: > http://www.sitepoint.com/forums/showthread.php?t=385858 The person that made that post (Dalt) is the one holding the keys to that riddle. I have never used Joomla! in that capacity, and am equally curious how he has done such without significant modification to the core. -- Mitch Pirtle Joomla! Core Developer Open Source Matters From agfische at email.smith.edu Fri Jun 9 13:46:30 2006 From: agfische at email.smith.edu (Aaron Fischer) Date: Fri, 09 Jun 2006 13:46:30 -0400 Subject: [nycphp-talk] Working with PDF Message-ID: <4489B3F6.7050309@email.smith.edu> Greetings! I'm beginning a project that will involve creating PDF documents. So far my research has turned up PDFlib (http://us3.php.net/manual/en/ref.pdf.php) and FPDF (http://www.fpdf.org/). So far it seems that FPDF will do what I need. It has the added benefit of being free (as opposed to PDFlib which would run at least $450). Have folks used FPDF? Would you recommend it? Are there are any other means to generate PDF that you would recommend? If helpful, here's a brief project summary: I am developing an application that will allow nontraditional students to apply for admission to our college. The user will be able to create an account and work on her application, saving and returning at any time (data will be stored in MySQL). The PDF aspect comes into play when the applicant would like to preview the application with her data populating the fields. It will also be used for our support staff to print the applications once they are completed. Here's the blank application which would need to be created and populated with student data (application is pages 2-4, instructions are on page 1): http://www.smith.edu/admission/pdf/nontraditional_application05.pdf Cheers, -Aaron From akamm at demicooper.com Fri Jun 9 14:13:59 2006 From: akamm at demicooper.com (Andrew Kamm) Date: Fri, 09 Jun 2006 13:13:59 -0500 Subject: [nycphp-talk] Working with PDF In-Reply-To: <4489B3F6.7050309@email.smith.edu> Message-ID: > Have folks used FPDF? Would you recommend it? I've used FPDF for a few large clients and have been very pleased with it (I recommend it). Our use involved pulling text from a database and dropping in images. One of them we did at a high resolution (the client wanted it to match a print piece we did, but with dynamic content). The positioning and layout is done differently than HTML (you can't just print a webpage), but once you get the hang of it, it's fine. It's picky about image formats too, but not a big deal as long as the other folks contributing content know what formats are allowed. Haven't used PDFLib. HTH, Andy -- Andrew Kamm From dcech at phpwerx.net Fri Jun 9 14:17:31 2006 From: dcech at phpwerx.net (Dan Cech) Date: Fri, 09 Jun 2006 14:17:31 -0400 Subject: [nycphp-talk] Working with PDF In-Reply-To: <4489B3F6.7050309@email.smith.edu> References: <4489B3F6.7050309@email.smith.edu> Message-ID: <4489BB3B.2000908@phpwerx.net> Aaron Fischer wrote: > Greetings! > > I'm beginning a project that will involve creating PDF documents. So > far my research has turned up PDFlib > (http://us3.php.net/manual/en/ref.pdf.php) and FPDF (http://www.fpdf.org/). > > So far it seems that FPDF will do what I need. It has the added benefit > of being free (as opposed to PDFlib which would run at least $450). > > Have folks used FPDF? Would you recommend it? > > Are there are any other means to generate PDF that you would recommend? I would heartily recommend the R&OS pdf class: http://www.ros.co.nz/pdf/ It's broadly similar to fpdf and I've used it on several different projects without any problems. Another approach that could work very well for what you're describing is to use fdf/xfdf to dynamically fill fields in an existing pdf document. There are quite a few good examples of this to be found in the book PDFHacks by Sid Steward, with an online example and source code available here: http://pdfhacks.com/form_session/ Dan > If helpful, here's a brief project summary: > I am developing an application that will allow nontraditional students > to apply for admission to our college. The user will be able to create > an account and work on her application, saving and returning at any time > (data will be stored in MySQL). The PDF aspect comes into play when the > applicant would like to preview the application with her data populating > the fields. It will also be used for our support staff to print the > applications once they are completed. > > Here's the blank application which would need to be created and > populated with student data (application is pages 2-4, instructions are > on page 1): > http://www.smith.edu/admission/pdf/nontraditional_application05.pdf > > Cheers, > > -Aaron From spangia at redcent.net Fri Jun 9 14:27:11 2006 From: spangia at redcent.net (Sean Pangia) Date: Fri, 09 Jun 2006 14:27:11 -0400 Subject: [nycphp-talk] Working with PDF In-Reply-To: <4489B3F6.7050309@email.smith.edu> References: <4489B3F6.7050309@email.smith.edu> Message-ID: <4489BD7F.70605@redcent.net> we have a marketing client that has us building a fun promotional feature as part of their website. can't say much except that it involves personalizing some things that are then output to PDF to facilitate printing. we started down the path of using an expensive .NET component (from http://www.tallcomponents.com/) for use in this client's IIS environment when we happily discovered PHP was available to us. FPDF is working just fine, though we are still in development and haven't done any serious QA yet. -sean Aaron Fischer wrote: > Greetings! > > I'm beginning a project that will involve creating PDF documents. So > far my research has turned up PDFlib > (http://us3.php.net/manual/en/ref.pdf.php) and FPDF (http://www.fpdf.org/). > > So far it seems that FPDF will do what I need. It has the added benefit > of being free (as opposed to PDFlib which would run at least $450). > > Have folks used FPDF? Would you recommend it? > > Are there are any other means to generate PDF that you would recommend? > > If helpful, here's a brief project summary: > I am developing an application that will allow nontraditional students > to apply for admission to our college. The user will be able to create > an account and work on her application, saving and returning at any time > (data will be stored in MySQL). The PDF aspect comes into play when the > applicant would like to preview the application with her data populating > the fields. It will also be used for our support staff to print the > applications once they are completed. > > Here's the blank application which would need to be created and > populated with student data (application is pages 2-4, instructions are > on page 1): > http://www.smith.edu/admission/pdf/nontraditional_application05.pdf > > Cheers, > > -Aaron > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > -- _______________________________________ Sean Pangia Red Cent 54 West 21st Street, #607 NYC 10010 212.255.3800 www.redcent.net From mikeh at dtev.com Fri Jun 9 14:34:14 2006 From: mikeh at dtev.com (mike hjorleifsson) Date: Fri, 9 Jun 2006 14:34:14 -0400 Subject: [nycphp-talk] Working with PDF In-Reply-To: <4489BD7F.70605@redcent.net> Message-ID: <08a201c68bf3$4f9a3da0$c8323232@lcdxp> I have done several projects where I build data and create a custom pdf file for printing and in some cases even made it print on the client machine... Fpdf is the way to go. From ashaw at polymerdb.org Fri Jun 9 14:35:01 2006 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 09 Jun 2006 13:35:01 -0500 Subject: [nycphp-talk] Working with PDF In-Reply-To: <4489B3F6.7050309@email.smith.edu> References: <4489B3F6.7050309@email.smith.edu> Message-ID: <4489BF55.1020402@polymerdb.org> Don't know if it fits what you're trying to do (or if it's an unnecessary Rube Goldberg solution), but here's what my system does: We needed a system to take files edited in MS-Word (invitation letters, actually), pop in the various name and address fields for a recipient, and export the whole thing to a PDF file. Support for some MS-Word-friendly format was crucial, as the invitation letters would change at least with every event, and often go through several versions for each event. Our solution was to save the files in RTF, with placeholder tags typed right into the text; then use PHP to replace the tags with the right values and use Ted (http://www.nllgg.nl/Ted/) (a linux only RTF reader) to convert the files from RTF to PDF. This way, the non-technical people who write the letters can spin away on their edits, and I can upload them as templates with little trouble. (Trial and error showed me a few things to clean up each time from their sloppy MS-Word formmatting before uploading, though.) It's not pure PHP like FPDF, but it gets us the features we needed. - Allen Aaron Fischer wrote: > Greetings! > > I'm beginning a project that will involve creating PDF documents. So > far my research has turned up PDFlib > (http://us3.php.net/manual/en/ref.pdf.php) and FPDF (http://www.fpdf.org/). > > So far it seems that FPDF will do what I need. It has the added benefit > of being free (as opposed to PDFlib which would run at least $450). > > Have folks used FPDF? Would you recommend it? > > Are there are any other means to generate PDF that you would recommend? > > If helpful, here's a brief project summary: > I am developing an application that will allow nontraditional students > to apply for admission to our college. The user will be able to create > an account and work on her application, saving and returning at any time > (data will be stored in MySQL). The PDF aspect comes into play when the > applicant would like to preview the application with her data populating > the fields. It will also be used for our support staff to print the > applications once they are completed. > > Here's the blank application which would need to be created and > populated with student data (application is pages 2-4, instructions are > on page 1): > http://www.smith.edu/admission/pdf/nontraditional_application05.pdf > > Cheers, > > -Aaron > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Allen Shaw Polymer (http://polymerdb.org) From jglenn at redcent.net Fri Jun 9 14:40:24 2006 From: jglenn at redcent.net (Joshua Glenn) Date: Fri, 9 Jun 2006 14:40:24 -0400 Subject: [nycphp-talk] Working with PDF In-Reply-To: <4489B3F6.7050309@email.smith.edu> Message-ID: The last several days i've been working with fpdf and fpdi, which allows you to import an existing pdf as a template. So far it's been working pretty well. Some of the methods seem to be a bit buggy, such as MultiCell, but overall it's very nice. -josh From chsnyder at gmail.com Fri Jun 9 15:31:35 2006 From: chsnyder at gmail.com (csnyder) Date: Fri, 9 Jun 2006 15:31:35 -0400 Subject: [nycphp-talk] using PHP to create a php file In-Reply-To: <6.2.3.4.2.20060607205302.025fda30@mail.optonline.net> References: <6.2.3.4.2.20060607205302.025fda30@mail.optonline.net> Message-ID: On 6/7/06, Michael Southwell wrote: > At 08:09 PM 6/7/2006, you wrote: > >When I try to write the new php file it fails because it has no > >permissions to create > >a file in the web directory. No httpd is being run by use nobody and > >the file itself is > >own by root. > > > >Why can I create php file on this directory? > > You just said yourself why you can't: because your script has no > write permissions. chmod the target directory to 777 and you will be > able to write to it. Alas, so will anybody else, so there is a > certain security risk involved here. Only you can decide whether the > ability to write is worth the risk that others can also. (You might > however consider writing to somewhere outside the web directory if > that is possible in your context.) > > > Michael Southwell, Vice President for Education > New York PHP > http://www.nyphp.com/training - In-depth PHP Training Courses > My jaw hit the desk on this one, guys. Do not allow the webserver to create php scripts, under any circumstances ever. It's just asking for trouble. Abstract the data (job listings) into a text file or sqlite database and give the webserver password protected write access to that. Or use a .csv file and edit the records by hand using Excel or EditGrid.com. If you need to create world-writeable directories for uploaded files (and you _do_ need them sometimes), you should also take steps (via Apache config or .htaccess) that php scripts residing in those directories cannot be executed. From rotsen at gmail.com Fri Jun 9 16:08:33 2006 From: rotsen at gmail.com (Nestor) Date: Fri, 9 Jun 2006 13:08:33 -0700 Subject: [nycphp-talk] using PHP to create a php file In-Reply-To: References: <6.2.3.4.2.20060607205302.025fda30@mail.optonline.net> Message-ID: Yes, That is what I am have decided to do. Just reading and writing a txt file. The php file just include this text file. I was having problems with the txt file until I found out that there was a cron job that every hour chmods the values of all the directories and files to non 755 under the web directory. Thanks, N?stor :-) On 6/9/06, csnyder wrote: > On 6/7/06, Michael Southwell wrote: > > At 08:09 PM 6/7/2006, you wrote: > > >When I try to write the new php file it fails because it has no > > >permissions to create > > >a file in the web directory. No httpd is being run by use nobody and > > >the file itself is > > >own by root. > > > > > >Why can I create php file on this directory? > > > > You just said yourself why you can't: because your script has no > > write permissions. chmod the target directory to 777 and you will be > > able to write to it. Alas, so will anybody else, so there is a > > certain security risk involved here. Only you can decide whether the > > ability to write is worth the risk that others can also. (You might > > however consider writing to somewhere outside the web directory if > > that is possible in your context.) > > > > > > Michael Southwell, Vice President for Education > > New York PHP > > http://www.nyphp.com/training - In-depth PHP Training Courses > > > > My jaw hit the desk on this one, guys. Do not allow the webserver to > create php scripts, under any circumstances ever. It's just asking for > trouble. > > Abstract the data (job listings) into a text file or sqlite database > and give the webserver password protected write access to that. Or use > a .csv file and edit the records by hand using Excel or EditGrid.com. > > If you need to create world-writeable directories for uploaded files > (and you _do_ need them sometimes), you should also take steps (via > Apache config or .htaccess) that php scripts residing in those > directories cannot be executed. > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From rotsen at gmail.com Fri Jun 9 16:09:45 2006 From: rotsen at gmail.com (Nestor) Date: Fri, 9 Jun 2006 13:09:45 -0700 Subject: [nycphp-talk] using PHP to create a php file In-Reply-To: References: <6.2.3.4.2.20060607205302.025fda30@mail.optonline.net> Message-ID: I meant to say that it chmod directories and files to 755 :-) On 6/9/06, Nestor wrote: > Yes, That is what I am have decided to do. Just reading and writing > a txt file. > The php file just include this text file. > > I was having problems with the txt file until I found out that there > was a cron job that every hour chmods the values of all the > directories and files to non 755 under the web directory. > > > Thanks, > > N?stor :-) > > > On 6/9/06, csnyder wrote: > > On 6/7/06, Michael Southwell wrote: > > > At 08:09 PM 6/7/2006, you wrote: > > > >When I try to write the new php file it fails because it has no > > > >permissions to create > > > >a file in the web directory. No httpd is being run by use nobody and > > > >the file itself is > > > >own by root. > > > > > > > >Why can I create php file on this directory? > > > > > > You just said yourself why you can't: because your script has no > > > write permissions. chmod the target directory to 777 and you will be > > > able to write to it. Alas, so will anybody else, so there is a > > > certain security risk involved here. Only you can decide whether the > > > ability to write is worth the risk that others can also. (You might > > > however consider writing to somewhere outside the web directory if > > > that is possible in your context.) > > > > > > > > > Michael Southwell, Vice President for Education > > > New York PHP > > > http://www.nyphp.com/training - In-depth PHP Training Courses > > > > > > > My jaw hit the desk on this one, guys. Do not allow the webserver to > > create php scripts, under any circumstances ever. It's just asking for > > trouble. > > > > Abstract the data (job listings) into a text file or sqlite database > > and give the webserver password protected write access to that. Or use > > a .csv file and edit the records by hand using Excel or EditGrid.com. > > > > If you need to create world-writeable directories for uploaded files > > (and you _do_ need them sometimes), you should also take steps (via > > Apache config or .htaccess) that php scripts residing in those > > directories cannot be executed. > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > New York PHP Conference and Expo 2006 > > http://www.nyphpcon.com > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > From ashaw at polymerdb.org Fri Jun 9 16:51:19 2006 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 09 Jun 2006 15:51:19 -0500 Subject: [nycphp-talk] server-writable php files (was: using PHP to create a php file) In-Reply-To: References: <6.2.3.4.2.20060607205302.025fda30@mail.optonline.net> Message-ID: <4489DF47.2040301@polymerdb.org> 1. Create the file 2. store md5 checksum of in database 3. compare stored checksum and actual file checksum anytime before running the file later. No? csnyder wrote: > My jaw hit the desk on this one, guys. Do not allow the webserver to > create php scripts, under any circumstances ever. It's just asking for > trouble. > > Abstract the data (job listings) into a text file or sqlite database > and give the webserver password protected write access to that. Or use > a .csv file and edit the records by hand using Excel or EditGrid.com. > > If you need to create world-writeable directories for uploaded files > (and you _do_ need them sometimes), you should also take steps (via > Apache config or .htaccess) that php scripts residing in those > directories cannot be executed. > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Allen Shaw Polymer (http://polymerdb.org) From kenrbnsn at rbnsn.com Fri Jun 9 17:01:18 2006 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Fri, 09 Jun 2006 17:01:18 -0400 Subject: [nycphp-talk] server-writable php files (was: using PHP to create a php file) In-Reply-To: <4489DF47.2040301@polymerdb.org> References: <6.2.3.4.2.20060607205302.025fda30@mail.optonline.net> <4489DF47.2040301@polymerdb.org> Message-ID: <7.0.1.0.2.20060609165655.115f9328@rbnsn.com> At 04:51 PM 6/9/2006, Allen Shaw wrote: >1. Create the file >2. store md5 checksum of in database >3. compare stored checksum and actual file checksum anytime before >running the file later. > >No? That might be fine for files you create, but what is going to stop a malicious person who finds the directory, put his own scripts into it, and causes havoc to your server or the web and you won't even know he's there until too late. Ken From ashaw at polymerdb.org Fri Jun 9 17:07:54 2006 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 09 Jun 2006 16:07:54 -0500 Subject: [nycphp-talk] server-writable php files In-Reply-To: <7.0.1.0.2.20060609165655.115f9328@rbnsn.com> References: <6.2.3.4.2.20060607205302.025fda30@mail.optonline.net> <4489DF47.2040301@polymerdb.org> <7.0.1.0.2.20060609165655.115f9328@rbnsn.com> Message-ID: <4489E32A.306@polymerdb.org> Yeah, that's right. Guess I was thinking too narrowly. Thanks. - Allen Ken Robinson wrote: > At 04:51 PM 6/9/2006, Allen Shaw wrote: > >>1. Create the file >>2. store md5 checksum of in database >>3. compare stored checksum and actual file checksum anytime before >>running the file later. >> >>No? > > > That might be fine for files you create, but what is going to stop a > malicious person who finds the directory, put his own scripts into > it, and causes havoc to your server or the web and you won't even > know he's there until too late. > > Ken > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -- Allen Shaw Polymer (http://polymerdb.org) From ps at pswebcode.com Fri Jun 9 17:14:48 2006 From: ps at pswebcode.com (Peter Sawczynec) Date: Fri, 9 Jun 2006 17:14:48 -0400 Subject: [nycphp-talk] Working with PDF In-Reply-To: <4489B3F6.7050309@email.smith.edu> Message-ID: <000c01c68c09$bdf62fa0$68e4a144@Rubicon> Maybe see also: http://www.ros.co.nz/pdf/ Peter -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Aaron Fischer Sent: Friday, June 09, 2006 1:47 PM To: NYPHP Talk Subject: [nycphp-talk] Working with PDF Greetings! I'm beginning a project that will involve creating PDF documents. So far my research has turned up PDFlib (http://us3.php.net/manual/en/ref.pdf.php) and FPDF (http://www.fpdf.org/). So far it seems that FPDF will do what I need. It has the added benefit of being free (as opposed to PDFlib which would run at least $450). Have folks used FPDF? Would you recommend it? Are there are any other means to generate PDF that you would recommend? If helpful, here's a brief project summary: I am developing an application that will allow nontraditional students to apply for admission to our college. The user will be able to create an account and work on her application, saving and returning at any time (data will be stored in MySQL). The PDF aspect comes into play when the applicant would like to preview the application with her data populating the fields. It will also be used for our support staff to print the applications once they are completed. Here's the blank application which would need to be created and populated with student data (application is pages 2-4, instructions are on page 1): http://www.smith.edu/admission/pdf/nontraditional_application05.pdf Cheers, -Aaron _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk New York PHP Conference and Expo 2006 http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From tim_lists at o2group.com Fri Jun 9 17:33:20 2006 From: tim_lists at o2group.com (Tim Lieberman) Date: Fri, 9 Jun 2006 15:33:20 -0600 Subject: [nycphp-talk] Working with PDF In-Reply-To: <000c01c68c09$bdf62fa0$68e4a144@Rubicon> References: <000c01c68c09$bdf62fa0$68e4a144@Rubicon> Message-ID: I'd also suggest looking into FO, which is a markup language for document layout. I'm not sure if there is yet a PHP parser for FO that will output PDF, but it exists in the Java world, and I've heard the java libraries work fine from PHP via the java bridge. I've used FPDF in the past, with good results, but when things start getting very dynamic, you start wishing you had an intermediate language like FO which could then just be parsed and interpreted. HTH -Tim On Jun 9, 2006, at 3:14 PM, Peter Sawczynec wrote: > Maybe see also: > http://www.ros.co.nz/pdf/ > > Peter > > -----Original Message----- > From: talk-bounces at lists.nyphp.org [mailto:talk- > bounces at lists.nyphp.org] On > Behalf Of Aaron Fischer > Sent: Friday, June 09, 2006 1:47 PM > To: NYPHP Talk > Subject: [nycphp-talk] Working with PDF > > > Greetings! > > I'm beginning a project that will involve creating PDF documents. So > far my research has turned up PDFlib > (http://us3.php.net/manual/en/ref.pdf.php) and FPDF (http:// > www.fpdf.org/). > > So far it seems that FPDF will do what I need. It has the added > benefit > of being free (as opposed to PDFlib which would run at least $450). > > Have folks used FPDF? Would you recommend it? > > Are there are any other means to generate PDF that you would > recommend? > > If helpful, here's a brief project summary: > I am developing an application that will allow nontraditional students > to apply for admission to our college. The user will be able to > create > an account and work on her application, saving and returning at any > time > (data will be stored in MySQL). The PDF aspect comes into play > when the > applicant would like to preview the application with her data > populating > the fields. It will also be used for our support staff to print the > applications once they are completed. > > Here's the blank application which would need to be created and > populated with student data (application is pages 2-4, instructions > are > on page 1): > http://www.smith.edu/admission/pdf/nontraditional_application05.pdf > > Cheers, > > -Aaron > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From sryboston at hotmail.com Sat Jun 10 08:11:19 2006 From: sryboston at hotmail.com (-sry Boston) Date: Sat, 10 Jun 2006 07:11:19 -0500 Subject: [nycphp-talk] DTD choice help? Message-ID: Hiya, You know, I've been on this list for what, a couple of years now? Reading, learning (a little) but not much since I still haven't DONE anything! My big obstacle is nuisance factor - I don't own my server, I rent from GoDaddy and therefore, don't have my HOTB and in the end, it has just seemed easier to stick to hand-coded HTML. *finally* I'm thinking it's going the other way. I want to implement a design that is standards compliant, at least browser independent, and to me, that screams: USE PHP!! So I went off and found a CSS layout I wanted to use (why code it myself when it's out there already) and the guy at Blue Robot had a really nice one that seems to be stable but he's using the HTML 4.01 Strict DTD and I've been creating content (not much of it but some) for 3 years w/the XHTML 1.0 Transitional DTD. Before I go "converting" the markup into PHP templates, I kinda need to pick a DTD, right? The page or layout I plan to use is on my home page with absolutely no nav system--it's amazing, a page that goes NOWHERE but has lots of links offsite!! *chuckle* I'd like to convert to PHP before I start making myself a nav system for my own content. http://www.sarahryoffa.com/ CSS is at the root in the file "layout3.css" My goals for PHP will ultimately be: 1. have the 3 columns (2 of links, one of content) each be a PHP template file 2. when clicking on a link in one of the side columns, if it's ON site (my stuff) display it in the content DIV 3. when clicking on a link in one of the side columns, if it's OFF site (like all the ones there now) open a new window for it This is *REALLY* basic, I know, but (1) I've never done any PHP so it's just one more thing to make work and (2) I need to pick a DTD before I start generating pages, PHP or not. Help? Advice? -sry Sarah R. Yoffa http://www.sarahryoffa.com/ sry at sarahryoffa.com ************************************ Leave your mind in the gutter...then you'll always know where to find it ************************************ _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ From 1j0lkq002 at sneakemail.com Sat Jun 10 14:02:50 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sat, 10 Jun 2006 11:02:50 -0700 Subject: [nycphp-talk] DTD choice help? In-Reply-To: References: Message-ID: <2312-87358@sneakemail.com> -sry Boston sryboston-at-hotmail.com |nyphp dev/internal group use| wrote: >Hiya, > >You know, I've been on this list for what, a couple of years now? Reading, >learning (a little) but not much since I still haven't DONE anything! My big >obstacle is nuisance factor - I don't own my server, I rent from GoDaddy >and therefore, don't have my HOTB and in the end, it has just seemed >easier to stick to hand-coded HTML. *finally* I'm thinking it's going the >other way. > Don't let hosting stop you. I sart people on dreamhost with the L1 Monthly if they are just getting their feet wet (I give them code "tenbucks" to get it for $10). That's $10 to be all set with no commitment. For those doing a website from the start, I give out code "try92" which is $92 off the prepaid year, which means you get that first year for something like $25. If you are a developer or coder you are very likely to switch hosts or add another hosting account in your first 6 months, so don't sweat the start and just get going. You can spend forever picking a webhost (or reading about advanced PHP issues - lol) but it's all about jumping in and trying. -=john andrews http://www.seo-fun.com From 1j0lkq002 at sneakemail.com Sat Jun 10 14:40:12 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: 10 Jun 2006 18:40:12 -0000 Subject: [nycphp-talk] on the anniversary of PHP... Message-ID: <2312-28682@sneakemail.com> With the NYPHPCON just a few days off, I suppose everybody is pretty busy in New York and maybe didn't have time to acknowledge the birthday of PHP, so I offer this to the list... http://php.youaremighty.com/ (and a tip o' the hat to Allie at New Jersey design firm cyberxdesigns.com) From 1j0lkq002 at sneakemail.com Sat Jun 10 15:41:20 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sat, 10 Jun 2006 12:41:20 -0700 Subject: [nycphp-talk] [OT] Re: on the anniversary of PHP... In-Reply-To: <2312-28682@sneakemail.com> References: <2312-28682@sneakemail.com> Message-ID: <14044-66632@sneakemail.com> inforequest 1j0lkq002-at-sneakemail.com |nyphp dev/internal group use| wrote: >With the NYPHPCON just a few days off, I suppose everybody is pretty busy in New York and maybe didn't have time to acknowledge the birthday of PHP, so I offer this to the list... > >http://php.youaremighty.com/ > >(and a tip o' the hat to Allie at New Jersey design firm cyberxdesigns.com) > > > Sorry if I was accidentally misleading... that wasn't made by Allie at cyberxdesigns.com, but she was the first to pass that viral to me (hence the tip of the hat). Allie's flash work is much more creative than that (see cyberxdesigns.com for the New Jersey bit). And yes I also know that is in flash and not PHP... so the purists don't need to tag me for that :-) (for those interested, I actually used it in another context... suggesting some of the PR dangers associated with wildcard DNS... hit monster-dot-com.youarealmighty.com and see jobster pay for a nice branding effort for their competitor, OR hit hey_sh*thead.youarealmighty.com and see how a little sarcasm becomes funnier than the original joke, and jobster gets the brand tarnish from something potentially more viral than the original.) Alas, no shortage of minutia on the PHP talk list! PS: anyway the point was happy birthday php! -=john andrews http://www.seo-fun.com From sryboston at hotmail.com Sun Jun 11 10:01:21 2006 From: sryboston at hotmail.com (-sry Boston) Date: Sun, 11 Jun 2006 09:01:21 -0500 Subject: [nycphp-talk] DTD choice help? In-Reply-To: <2312-87358@sneakemail.com> Message-ID: Umm, John, your reply not only has nothing at all to do with my ACTUAL question, but it sounds like a spammy sales pitch. I have *no* intention of leaving GoDaddy, *love* their service, features, etc. and can't imagine why you'd be pitching me to change hosts other than you are trying to sell something on a list dedicated to discussing technical issues...kinda off topic, aren't you? Please stop spamming tech lists or at least change the subject to "shameless self-promotion" or something. Back to the question at hand, I look forward to some insights on DTD choice when you guys come back to the office Monday. -sry >-sry Boston sryboston-at-hotmail.com |nyphp dev/internal group use| wrote: > >You know, I've been on this list for what, a couple of years now? >Reading, > >learning (a little) but not much since I still haven't DONE anything! My >big > >obstacle is nuisance factor - I don't own my server, I rent from GoDaddy > >and therefore, don't have my HOTB and in the end, it has just seemed > >easier to stick to hand-coded HTML. *finally* I'm thinking it's going >the > >other way. > > >Don't let hosting stop you. I sart people on dreamhost with the L1 >Monthly if they are just getting their feet wet (I give them code >"tenbucks" to get it for $10). That's $10 to be all set with no >commitment. For those doing a website from the start, I give out code >"try92" which is $92 off the prepaid year, which means you get that >first year for something like $25. > >If you are a developer or coder you are very likely to switch hosts or >add another hosting account in your first 6 months, so don't sweat the >start and just get going. You can spend forever picking a webhost (or >reading about advanced PHP issues - lol) but it's all about jumping in >and trying. > >-=john andrews >http://www.seo-fun.com _________________________________________________________________ Don?t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ From dcech at phpwerx.net Sun Jun 11 10:30:28 2006 From: dcech at phpwerx.net (Dan Cech) Date: Sun, 11 Jun 2006 10:30:28 -0400 Subject: [nycphp-talk] DTD choice help? In-Reply-To: References: Message-ID: <448C2904.8030709@phpwerx.net> Sarah, John may not have directly addressed your DTD question, but I think the point he was trying to make was that you should just jump in and give it a shot. That said, if you wish to make points about list etiquette, here are a couple for you. 1. choose the right list Your DTD question is really more appropriate for the front-end list as it's not directly related to PHP 2. be aware of your position on the list, especially if you're considering a potentially insulting post directed at another member. Here is a quick illustration of what I mean: http://www.googlefight.com/index.php?lang=en_GB&word1=john+andrews+nyphp.org&word2=sarah+yoffa+nyphp.org John is a valued member of the community and was simply trying to help you out, accusing him of spamming the list is downright insulting and serves only to discourage him and other members from trying to help out in the future. nyphp.org is a great place with many people who are not only very knowledgeable but also willing to share that knowledge, a very rare and valuable resource for all the members. My apologies in advance if I have offended you or anyone else on the list, the point I'm trying to make is that nyphp.org in general is a wonderful resource, and the people who are kind enough to take the time to share their knowledge should be treated with the respect and thanks they deserve. Dan -sry Boston wrote: > Umm, John, your reply not only has nothing at all to do with my ACTUAL > question, but it sounds like a spammy sales pitch. > > I have *no* intention of leaving GoDaddy, *love* their service, features, > etc. and can't imagine why you'd be pitching me to change hosts other > than you are trying to sell something on a list dedicated to discussing > technical issues...kinda off topic, aren't you? Please stop spamming tech > lists or at least change the subject to "shameless self-promotion" or > something. > > > Back to the question at hand, I look forward to some insights on DTD > choice when you guys come back to the office Monday. > > -sry > >> -sry Boston sryboston-at-hotmail.com |nyphp dev/internal group use| >> wrote: >> >You know, I've been on this list for what, a couple of years now? >> Reading, >> >learning (a little) but not much since I still haven't DONE anything! >> My big >> >obstacle is nuisance factor - I don't own my server, I rent from GoDaddy >> >and therefore, don't have my HOTB and in the end, it has just seemed >> >easier to stick to hand-coded HTML. *finally* I'm thinking it's >> going the >> >other way. >> > >> Don't let hosting stop you. I sart people on dreamhost with the L1 >> Monthly if they are just getting their feet wet (I give them code >> "tenbucks" to get it for $10). That's $10 to be all set with no >> commitment. For those doing a website from the start, I give out code >> "try92" which is $92 off the prepaid year, which means you get that >> first year for something like $25. >> >> If you are a developer or coder you are very likely to switch hosts or >> add another hosting account in your first 6 months, so don't sweat the >> start and just get going. You can spend forever picking a webhost (or >> reading about advanced PHP issues - lol) but it's all about jumping in >> and trying. >> >> -=john andrews >> http://www.seo-fun.com From 1j0lkq002 at sneakemail.com Sun Jun 11 23:47:50 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Sun, 11 Jun 2006 20:47:50 -0700 Subject: [nycphp-talk] [OT] Re: DTD choice help? In-Reply-To: References: Message-ID: <11270-30975@sneakemail.com> -sry Boston sryboston-at-hotmail.com |nyphp dev/internal group use| wrote: > Umm, John, your reply not only has nothing at all to do with my ACTUAL > question, but it sounds like a spammy sales pitch. Of all people, I understand what it means to deal with web hosting. NONE of them are straight forward. If you think a newbie has trouble picking a DTD (a trivial problem easily answered here: http://www.google.com/search?hl=en&q=DTD try the first result) then you are in for a surprise dealing with chrooted jails and PHP as CGI and all of the other "unmentionables" that come with shared hosting. As some on this list can attest, I have had tons of problems with Dreamhost. I have also had tons of success with Dreamhost (ditto for westhost, serverbeach, and Hostway, and Rackspace, and ev1, and dozens of others). For someone who wants to start inserting I have *no* intention of leaving GoDaddy, *love* their service, > features, etc. and can't imagine why you'd be pitching me to change > hosts other than you are trying to sell something on a list dedicated > to discussing technical issues...kinda off topic, aren't you? Please > stop spamming tech lists or at least change the subject to "shameless > self-promotion" or something. So I suppose I should let you learn the hard way that you should *never* host with your registrar? Okay. (not to the rest of the Talk list: think very carefully about hosting with your registrar, especially one that begins with GO and ends with Daddy see http://www.google.com/search?hl=en&lr=&q=godaddy+ransom&btnG=Search for just one set of examples). Welcome to PHP Talk, sry. Make yourself at home. Don't let the old timers intimidate you. -=john andrews http://www.seo-fun.com From tedd at sperling.com Mon Jun 12 09:16:57 2006 From: tedd at sperling.com (tedd) Date: Mon, 12 Jun 2006 09:16:57 -0400 Subject: [nycphp-talk] [OT] Re: DTD choice help? In-Reply-To: <11270-30975@sneakemail.com> References: <11270-30975@sneakemail.com> Message-ID: At 8:47 PM -0700 6/11/06, inforequest wrote: >So I suppose I should let you learn the hard way that you should *never* >host with your registrar? Okay. A VERY good point! Keep your domain names and sites separate. That way if you decide to divorce, unlike the real world, you get to keep your stuff. >(not to the rest of the Talk list: think very carefully about hosting >with your registrar, especially one that begins with GO and ends with >Daddy see >http://www.google.com/search?hl=en&lr=&q=godaddy+ransom&btnG=Search for >just one set of examples). While you have to be married to one woman at a time, that doesn't apply to hosts. It doesn't cost that much (one of mine is under $7 per year, imagine that). So try out different ones for different needs and come and go as you want. As I often say -- I think everyone should go through at least one divorce before getting married. >Welcome to PHP Talk, sry. Make yourself at home. Don't let the old >timers intimidate you. Hey, "old timers" -- just what did you mean by that remark? :-) tedd -- ------------------------------------------------------------------------------------ http://sperling.com http://ancientstones.com http://earthstones.com From rahmin at insite-out.com Mon Jun 12 09:45:06 2006 From: rahmin at insite-out.com (Rahmin Pavlovic) Date: Mon, 12 Jun 2006 09:45:06 -0400 Subject: [nycphp-talk] Working with PDF In-Reply-To: Message-ID: On 6/9/06 5:33 PM, "Tim Lieberman" wrote: > I'm not sure if there is yet a PHP parser for FO that will output > PDF, but it exists in the Java world, and I've heard the java > libraries work fine from PHP via the java bridge. > Haven't played with it, but sounds like this: http://pear.php.net/package/XML_fo2pdf/ From rahmin at insite-out.com Mon Jun 12 09:46:07 2006 From: rahmin at insite-out.com (Rahmin Pavlovic) Date: Mon, 12 Jun 2006 09:46:07 -0400 Subject: [nycphp-talk] MySQL 4 vs. 5 and character encoding (?) In-Reply-To: <20060512125258.GA23633@panix.com> Message-ID: To anyone who was following this: It was Apache. The AddDefaultCharset directive in httpd.conf (on the new box) was encoding data before it hit MySQL (which is why none of my charset-collation changes mattered). All working now. Thanks to all who responded. From hendler at simmons.edu Tue Jun 13 11:42:32 2006 From: hendler at simmons.edu (Jonathan Hendler) Date: Tue, 13 Jun 2006 11:42:32 -0400 Subject: [nycphp-talk] Eclipse/PHP remote debugging In-Reply-To: <448ECD72.9070705@civicactions.com> References: <448ECD72.9070705@civicactions.com> Message-ID: <448EDCE8.6070503@simmons.edu> Nice feature for finding bugs during execution instead of waiting for output. A bit complicated to set up, but useful for hard to find issues. Installation tutorial: http://www.plog4u.org/index.php/Using_PHPEclipse_:_Installation_:_Installing_the_DBG_Debugger From odragola at gmail.com Wed Jun 14 02:37:28 2006 From: odragola at gmail.com (Odra Gola) Date: Wed, 14 Jun 2006 02:37:28 -0400 Subject: [nycphp-talk] JOB: Full-Time LAMP/JavaScript Developer (Urgent) Message-ID: Our midtown-based Internet marketing company has an immediate opening for an experienced and creative PHP programmer with strong JavaScript background (preferably AJAX). Other REQIRED skills: - Object Oriented Programming in PHP - strong SQL, database optimization, MySQL configuration - Apache configuration - Linux administration - installation and configuration of software including services like email, DNS, etc. - (X)HTML, CSS, DOM - XML, SOAP or XML-RPC - HTTP - basic graphics design Flash/ActionScript not required but a big plus. Will work independently but under the supervision of the senior programmer. Must be detail oriented and reliable. Send resume with desired salary to lampven [at] gmail.com Regards, olaf & jerry -------------- next part -------------- An HTML attachment was scrubbed... URL: From Ben at aclion.com Wed Jun 14 11:12:00 2006 From: Ben at aclion.com (Benjamin vonWurmb) Date: Wed, 14 Jun 2006 11:12:00 -0400 Subject: [nycphp-talk] Director of Technology - LAMP Job (NYC) Message-ID: I am an executive recruiter with AC Lion International, an Executive Search firm based in NYC. In business since 1996, we specialize in developing sales, product development, and marketing teams for high growth and advertising and marketing related companies (3rd party vendors, Publishers, Marketers, and top Agencies). We are currently handling an exclusive search for one of our top clients for a Director of Technology. The position would offer the opportunity to lead a team of 6-10 LAMP developers and would be reporting into the SVP of Technology. We are looking for someone who is able to manage and yet still able to get their hands dirty and code. We are looking to target $100-140k on the base salary. Please feel free to contact me for more information. If you know of anyone else interested, we offer a healthy referral bonus, as well. Regards, Benjamin vonWurmb Senior Account Executive 62 W 45th, 4th Floor New York, NY 10036 212-268-7300 x22 ben at aclion.com http://www.aclion.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: att662f3.gif Type: image/gif Size: 2451 bytes Desc: att662f3.gif URL: From odragola at gmail.com Wed Jun 14 12:05:12 2006 From: odragola at gmail.com (Odra Gola) Date: Wed, 14 Jun 2006 12:05:12 -0400 Subject: [nycphp-talk] NYPHPCon Free Access? Message-ID: Is access to the exposition booth area free? if so is any registration required (on-line / on-site) ? Thanks, Olaf -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at zaunere.com Wed Jun 14 15:01:00 2006 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 14 Jun 2006 15:01:00 -0400 Subject: [nycphp-talk] NYPHPCon Free Access? In-Reply-To: Message-ID: <01cd01c68fe4$e1187630$670aa8c0@mobilez> Hi Odra, Odra Gola wrote on Wednesday, June 14, 2006 12:05 PM: > Is access to the exposition booth area free? if so is any > registration required (on-line / on-site) ? We're here at the conference and we've been able to put together a special deal for exhibits and the networking/social event Thursday night. Come meet the speakers, sponsors, keynotes, and exhibits - plus two hours of OPEN BAR, hors'dourves and exhibits. The pass starts at 4pm and is $25. Please register online at https://www.nyphpcon.com/register and select the Thursday Exhibits/Networking Event Package. Register online, or cash will be accepted onsite. Enjoy, --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From lists at zaunere.com Wed Jun 14 15:16:49 2006 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 14 Jun 2006 15:16:49 -0400 Subject: [nycphp-talk] NYPHPCon Free Access? In-Reply-To: <01cd01c68fe4$e1187630$670aa8c0@mobilez> Message-ID: <01d401c68fe7$16558ac0$670aa8c0@mobilez> Sorry, that note was a little confusing. See here: We're here at the conference and we've been able to put together a special deal for exhibits and the networking/social events Thursday night. Plus, come take part in the Oracle PHPfest. So come meet the speakers, sponsors, keynotes, and exhibits - plus two hours of OPEN BAR, hors'dourves and exhibits. The pass starts at 4pm and is $25. Please register online at https://www.nyphpcon.com/register.php and select the Thursday Exhibits/Networking Event Package. Register online, or cash will be accepted onsite. Enjoy, --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com Hans Zaunere wrote on Wednesday, June 14, 2006 3:01 PM: > Hi Odra, > > Odra Gola wrote on Wednesday, June 14, 2006 12:05 PM: > > Is access to the exposition booth area free? if so is any > > registration required (on-line / on-site) ? > > We're here at the conference and we've been able to put together a > special deal for exhibits and the networking/social event Thursday > night. > > Come meet the speakers, sponsors, keynotes, and exhibits - plus two > hours of OPEN BAR, hors'dourves and exhibits. The pass starts at > 4pm and is $25. > > Please register online at https://www.nyphpcon.com/register and > select the Thursday Exhibits/Networking Event Package. > > Register online, or cash will be accepted onsite. > > Enjoy, > > --- > Hans Zaunere / President / New York PHP > www.nyphp.org / www.nyphp.com > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php From codebowl at gmail.com Wed Jun 14 15:46:00 2006 From: codebowl at gmail.com (Joseph Crawford) Date: Wed, 14 Jun 2006 15:46:00 -0400 Subject: [nycphp-talk] NYPHPCon Free Access? In-Reply-To: <01d401c68fe7$16558ac0$670aa8c0@mobilez> References: <01cd01c68fe4$e1187630$670aa8c0@mobilez> <01d401c68fe7$16558ac0$670aa8c0@mobilez> Message-ID: <8d9a42800606141246y35b6ebf5ibaeb14fca60a0275@mail.gmail.com> OPEN BAR all for $25 man wish i could go LOL :) -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ 1-802-671-2021 codebowl at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From 1j0lkq002 at sneakemail.com Wed Jun 14 16:13:09 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Wed, 14 Jun 2006 13:13:09 -0700 Subject: [nycphp-talk] NYPHPCon Free Access? In-Reply-To: <8d9a42800606141246y35b6ebf5ibaeb14fca60a0275@mail.gmail.com> References: <01cd01c68fe4$e1187630$670aa8c0@mobilez> <01d401c68fe7$16558ac0$670aa8c0@mobilez> <8d9a42800606141246y35b6ebf5ibaeb14fca60a0275@mail.gmail.com> Message-ID: <30114-66467@sneakemail.com> Joseph Crawford codebowl-at-gmail.com |nyphp dev/internal group use| wrote: > OPEN BAR all for $25 man wish i could go LOL :) > > -- > Joseph Crawford Jr. yeah no kidding. If ever there was a reason to go to a php con.... From rolan at omnistep.com Wed Jun 14 16:26:57 2006 From: rolan at omnistep.com (Rolan Yang) Date: Wed, 14 Jun 2006 16:26:57 -0400 Subject: [nycphp-talk] NYPHPCon Free Access? In-Reply-To: <30114-66467@sneakemail.com> References: <01cd01c68fe4$e1187630$670aa8c0@mobilez> <01d401c68fe7$16558ac0$670aa8c0@mobilez> <8d9a42800606141246y35b6ebf5ibaeb14fca60a0275@mail.gmail.com> <30114-66467@sneakemail.com> Message-ID: <44907111.6060902@omnistep.com> I wasn't planning on going, but now... hrm........ ~Rolan inforequest wrote: > Joseph Crawford codebowl-at-gmail.com |nyphp dev/internal group use| wrote: > > >> OPEN BAR all for $25 man wish i could go LOL :) >> >> -- >> Joseph Crawford Jr. >> > > yeah no kidding. If ever there was a reason to go to a php con.... > > > From dmintz at davidmintz.org Wed Jun 14 16:32:58 2006 From: dmintz at davidmintz.org (David Mintz) Date: Wed, 14 Jun 2006 16:32:58 -0400 (EDT) Subject: [nycphp-talk] NYPHPCon Free Access? In-Reply-To: <44907111.6060902@omnistep.com> References: <01cd01c68fe4$e1187630$670aa8c0@mobilez> <01d401c68fe7$16558ac0$670aa8c0@mobilez> <8d9a42800606141246y35b6ebf5ibaeb14fca60a0275@mail.gmail.com> <30114-66467@sneakemail.com> <44907111.6060902@omnistep.com> Message-ID: On Wed, 14 Jun 2006, Rolan Yang wrote: > I wasn't planning on going, but now... hrm........ > Could you please stop reading my thoughts? --- David Mintz http://davidmintz.org/ Amendment IV The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. From jjb at ibiblio.org Wed Jun 14 17:00:48 2006 From: jjb at ibiblio.org (John Joseph Bachir) Date: Wed, 14 Jun 2006 17:00:48 -0400 (EDT) Subject: [nycphp-talk] NYPHPCon Free Access? In-Reply-To: <01d401c68fe7$16558ac0$670aa8c0@mobilez> References: <01d401c68fe7$16558ac0$670aa8c0@mobilez> Message-ID: On Wed, 14 Jun 2006, Hans Zaunere wrote: > So come meet the speakers, sponsors, keynotes, and exhibits - plus two > hours of OPEN BAR, hors'dourves and exhibits. The pass starts at 4pm > and is $25. > > Please register online at https://www.nyphpcon.com/register.php and > select the Thursday Exhibits/Networking Event Package. Great stuff. Just to be clear, where can we see a schedule of what the $25 pass gets us? John ---- aim/yim/msn/jabber.org: johnjosephbachir 713.494.2704 irc://irc.freenode.net/lyceum http://lyceum.ibiblio.org/ http://blog.johnjosephbachir.org/ From jjb at ibiblio.org Thu Jun 15 10:15:54 2006 From: jjb at ibiblio.org (John Joseph Bachir) Date: Thu, 15 Jun 2006 10:15:54 -0400 (EDT) Subject: [nycphp-talk] NYPHPCon Free Access? In-Reply-To: References: <01d401c68fe7$16558ac0$670aa8c0@mobilez> Message-ID: On Wed, 14 Jun 2006, John Joseph Bachir wrote: > > On Wed, 14 Jun 2006, Hans Zaunere wrote: > >> So come meet the speakers, sponsors, keynotes, and exhibits - plus two >> hours of OPEN BAR, hors'dourves and exhibits. The pass starts at 4pm >> and is $25. >> >> Please register online at https://www.nyphpcon.com/register.php and >> select the Thursday Exhibits/Networking Event Package. > > Great stuff. Just to be clear, where can we see a schedule of what the $25 > pass gets us? Anyone? I'm assuming it's the Expo Happy Hour and Manhattan Cocktail Party. Anything else? John ---- aim/yim/msn/jabber.org: johnjosephbachir 713.494.2704 irc://irc.freenode.net/lyceum http://lyceum.ibiblio.org/ http://blog.johnjosephbachir.org/ From lists at zaunere.com Thu Jun 15 11:30:38 2006 From: lists at zaunere.com (Hans Zaunere) Date: Thu, 15 Jun 2006 11:30:38 -0400 Subject: [nycphp-talk] NYPHPCon Free Access? In-Reply-To: Message-ID: <003c01c69090$a89c6530$1c040a0a@mobilez> John Joseph Bachir wrote on Thursday, June 15, 2006 10:16 AM: > On Wed, 14 Jun 2006, John Joseph Bachir wrote: > > > > > On Wed, 14 Jun 2006, Hans Zaunere wrote: > > > > > So come meet the speakers, sponsors, keynotes, and exhibits - > > > plus two hours of OPEN BAR, hors'dourves and exhibits. The pass > > > starts at 4pm and is $25. > > > > > > Please register online at https://www.nyphpcon.com/register.php > > > and select the Thursday Exhibits/Networking Event Package. > > > > Great stuff. Just to be clear, where can we see a schedule of what > > the $25 pass gets us? > > Anyone? I'm assuming it's the Expo Happy Hour and Manhattan Cocktail > Party. Anything else? That's correct - plus exhibits and the Oracle PHPfest. H From rolan at omnistep.com Thu Jun 15 11:34:35 2006 From: rolan at omnistep.com (Rolan Yang) Date: Thu, 15 Jun 2006 11:34:35 -0400 Subject: [nycphp-talk] NYPHPCon Free Access? In-Reply-To: <003c01c69090$a89c6530$1c040a0a@mobilez> References: <003c01c69090$a89c6530$1c040a0a@mobilez> Message-ID: <44917E0B.3040707@omnistep.com> Is it a "Manhattan Cocktail" Party or "Manhattan" Cocktail Party ? :) Hans Zaunere wrote: >>>> g Event Package. >>>> >>> Great stuff. Just to be clear, where can we see a schedule of what >>> the $25 pass gets us? >>> >> Anyone? I'm assuming it's the Expo Happy Hour and Manhattan Cocktail >> Party. Anything else? >> > > That's correct - plus exhibits and the Oracle PHPfest. > > H > > From agfische at email.smith.edu Thu Jun 15 11:51:06 2006 From: agfische at email.smith.edu (Aaron Fischer) Date: Thu, 15 Jun 2006 11:51:06 -0400 Subject: [nycphp-talk] Working with PDF In-Reply-To: References: Message-ID: <449181EA.7020700@email.smith.edu> Thanks to all for the helpful information. It looks like FPDF and FPDI may fit my needs and I'm currently working through the tutorials for the FPDF class. Importing my existing PDF as a template using FPDI sounds like it could be an ideal solution. Also ordered the PDF book recommended by Dan: http://pdfhacks.com/form_session/ I'll post at some point during or on completion of the project if I have helpful information or feedback about these classes. Cheers, -Aaron Joshua Glenn wrote: >The last several days i've been working with fpdf and fpdi, which allows you >to import an existing pdf as a template. So far it's been working pretty >well. Some of the methods seem to be a bit buggy, such as MultiCell, but >overall it's very nice. > >-josh > > From cliff at pinestream.com Thu Jun 15 13:04:25 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Thu, 15 Jun 2006 13:04:25 -0400 Subject: [nycphp-talk] Strange PEAR DB problem Message-ID: <002f01c6909d$c1f63080$0ba8a8c0@cliff> Every so often, my server seems to "lose" PEAR DB. Why? I have no idea. I haven't investigated whether the files actually disappear or whether the dir pointers disappear -- that's next. Running pear install -o DB makes everything lovely again. I am running PHP5 ZendCore on a VPS. Unless someone is specifically hacking my server and just mucking with my PEAR DM install, which seems unlikely, I am truly perplexed. Perhaps some sort of cron job I'm unaware of that is flushing something? Any thoughts? I hope you are all enjoying that $25 open bar. In NY -- what a deal. Cliff Hirsch _______________________________ Pinestream Communications, Inc. 52 Pine Street, Weston, MA 02493 USA Tel: 781.647.8800, Fax: 781.647.8825 http://www.pinestream.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjb at ibiblio.org Thu Jun 15 15:24:58 2006 From: jjb at ibiblio.org (John Joseph Bachir) Date: Thu, 15 Jun 2006 15:24:58 -0400 (EDT) Subject: [nycphp-talk] NYPHPCon Free Access? In-Reply-To: <003c01c69090$a89c6530$1c040a0a@mobilez> References: <003c01c69090$a89c6530$1c040a0a@mobilez> Message-ID: >> I'm assuming it's the Expo Happy Hour and Manhattan Cocktail Party. >> Anything else? > > That's correct - plus exhibits and the Oracle PHPfest. And all of the above is in the New Yorker hotel, correct? The schedule doesn't even mention which room they are in so I'm a little suspicious :) John ---- aim/yim/msn/jabber.org: johnjosephbachir 713.494.2704 irc://irc.freenode.net/lyceum http://lyceum.ibiblio.org/ http://blog.johnjosephbachir.org/ From tacofighter at gmail.com Fri Jun 16 12:15:16 2006 From: tacofighter at gmail.com (Aaron Deutsch) Date: Fri, 16 Jun 2006 12:15:16 -0400 Subject: [nycphp-talk] script output Message-ID: >From my co-worker; I'm writing about 20 excel files via php and want to print to the screen the script status after each file is written. I'm using the pear Spreadsheet_Excel_Writer class. The script takes about 10 sec to ecxecute. The problem is the script only displays the status at the end of the whole script execution, not after each one. Any ideas? thanks, Aaron D. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tedd at sperling.com Fri Jun 16 12:31:16 2006 From: tedd at sperling.com (tedd) Date: Fri, 16 Jun 2006 12:31:16 -0400 Subject: [nycphp-talk] script output In-Reply-To: References: Message-ID: At 12:15 PM -0400 6/16/06, Aaron Deutsch wrote: > >From my co-worker; > >I'm writing about 20 excel files via php and want to print to the screen the script status after each file is written. I'm using the pear Spreadsheet_Excel_Writer class. The script takes about 10 sec to ecxecute. The problem is the script only displays the status at the end of the whole script execution, not after each one. Any ideas? > >thanks, >Aaron D. Aaron: The script is running and done before you see it. If you want it to step through the process, then place a "continue" button within the loop. That way, it will do it's thing and get back to you asking for permission to continue. This is not that different from the long uploads problem where people try to use progress bars and such to monitor what's happening. My technique (not original) is simply to provide a "waiting gif", like thus: http://xn--ovg.com/a4.php hth's tedd -- ------------------------------------------------------------------------------------ http://sperling.com http://ancientstones.com http://earthstones.com From drydell at optonline.net Fri Jun 16 12:32:14 2006 From: drydell at optonline.net (drydell at optonline.net) Date: Fri, 16 Jun 2006 12:32:14 -0400 Subject: [nycphp-talk] script output In-Reply-To: References: Message-ID: check out the Output Control functions - ob_start(), ob_flush(), etc -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- >From my co-worker; I'm writing about 20 excel files via php and want to print to the screen the script status after each file is written. I'm using the pear Spreadsheet_Excel_Writer class. The script takes about 10 sec to ecxecute. The problem is the script only displays the status at the end of the whole script execution, not after each one. Any ideas? thanks, Aaron D. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk New York PHP Conference and Expo 2006 http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From ashaw at polymerdb.org Fri Jun 16 12:34:32 2006 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 16 Jun 2006 11:34:32 -0500 Subject: [nycphp-talk] script output In-Reply-To: References: Message-ID: <4492DD98.3090602@polymerdb.org> How about flush() ? http://php.net/flush - Allen Aaron Deutsch wrote: > > From my co-worker; > > I'm writing about 20 excel files via php and want to print to the screen > the script status after each file is written. I'm using the pear > Spreadsheet_Excel_Writer class. The script takes about 10 sec to > ecxecute. The problem is the script only displays the status at the end > of the whole script execution, not after each one. Any ideas? > > thanks, > Aaron D. > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -- Allen Shaw Polymer (http://polymerdb.org) From edwardpotter at gmail.com Fri Jun 16 14:09:00 2006 From: edwardpotter at gmail.com (edward potter) Date: Fri, 16 Jun 2006 14:09:00 -0400 Subject: [nycphp-talk] script output In-Reply-To: <4492DD98.3090602@polymerdb.org> References: <4492DD98.3090602@polymerdb.org> Message-ID: For some reason, I could never get flush() to work. Ended up always hacking the GUI so things looked like they were working. -ed :-) On 6/16/06, Allen Shaw wrote: > How about flush() ? > > http://php.net/flush > > - Allen > > Aaron Deutsch wrote: > > > > From my co-worker; > > > > I'm writing about 20 excel files via php and want to print to the screen > > the script status after each file is written. I'm using the pear > > Spreadsheet_Excel_Writer class. The script takes about 10 sec to > > ecxecute. The problem is the script only displays the status at the end > > of the whole script execution, not after each one. Any ideas? > > > > thanks, > > Aaron D. > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > New York PHP Conference and Expo 2006 > > http://www.nyphpcon.com > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > -- > Allen Shaw > Polymer (http://polymerdb.org) > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From tacofighter at gmail.com Fri Jun 16 14:12:56 2006 From: tacofighter at gmail.com (Aaron Deutsch) Date: Fri, 16 Jun 2006 14:12:56 -0400 Subject: [nycphp-talk] script output In-Reply-To: References: <4492DD98.3090602@polymerdb.org> Message-ID: Thanks for the help, we got flush to work in a function that we call at a few points in the script. On 6/16/06, edward potter wrote: > > For some reason, I could never get flush() to work. Ended up always > hacking the GUI so things looked like they were working. > > -ed :-) > > > On 6/16/06, Allen Shaw wrote: > > How about flush() ? > > > > http://php.net/flush > > > > - Allen > > > > Aaron Deutsch wrote: > > > > > > From my co-worker; > > > > > > I'm writing about 20 excel files via php and want to print to the > screen > > > the script status after each file is written. I'm using the pear > > > Spreadsheet_Excel_Writer class. The script takes about 10 sec to > > > ecxecute. The problem is the script only displays the status at the > end > > > of the whole script execution, not after each one. Any ideas? > > > > > > thanks, > > > Aaron D. > > > > > > > > > > ------------------------------------------------------------------------ > > > > > > _______________________________________________ > > > New York PHP Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > New York PHP Conference and Expo 2006 > > > http://www.nyphpcon.com > > > Show Your Participation in New York PHP > > > http://www.nyphp.org/show_participation.php > > > > > > -- > > Allen Shaw > > Polymer (http://polymerdb.org) > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > New York PHP Conference and Expo 2006 > > http://www.nyphpcon.com > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ashaw at polymerdb.org Fri Jun 16 15:43:21 2006 From: ashaw at polymerdb.org (Allen Shaw) Date: Fri, 16 Jun 2006 14:43:21 -0500 Subject: [nycphp-talk] script output In-Reply-To: References: <4492DD98.3090602@polymerdb.org> Message-ID: <449309D9.4070107@polymerdb.org> edward potter wrote: > For some reason, I could never get flush() to work. Ended up always > hacking the GUI so things looked like they were working. As I recall I've had that problem, too. I think the fix was related to this line from the flush() page at http://php.net/flush " flush() has no effect on the buffering scheme of your webserver or the browser on the client side. Thus you need to call both ob_flush() and flush() to flush the output buffers. " - Allen -- Allen Shaw Polymer (http://polymerdb.org) From lists at genoverly.net Sat Jun 17 09:20:41 2006 From: lists at genoverly.net (michael) Date: Sat, 17 Jun 2006 09:20:41 -0400 Subject: [nycphp-talk] phpcon 2006 Message-ID: <20060617092041.70017abf@wit.genoverly.home> I had to leave a little early on Friday, so I may not have had a chance to say goodbye to everyone. All in all, the conference was very well done. Kudos to the organizers (Hans?). I especially like seeing Rasmus Lerdorf (my first time) not just to put a name with a face, but also to hear his insights and concerns. I spent most of my time in the more technical track (org track) and took in some great talks. While the specific technology talks were invalualble, I found the "tip-n-tricks" and "best practices" sessions by John Coggeshall and Laura Thomson to be the best. Thanks again for the effort and bringing the Con to NYC. -- Michael From lists at zaunere.com Sun Jun 18 09:53:43 2006 From: lists at zaunere.com (Hans Zaunere) Date: Sun, 18 Jun 2006 09:53:43 -0400 Subject: [nycphp-talk] phpcon 2006 In-Reply-To: <20060617092041.70017abf@wit.genoverly.home> Message-ID: <003701c692de$9ce64710$640aa8c0@mobilez> michael wrote on Saturday, June 17, 2006 9:21 AM: > I had to leave a little early on Friday, so I may not have had a > chance to say goodbye to everyone. > > All in all, the conference was very well done. Kudos to the > organizers (Hans?). I especially like seeing Rasmus Lerdorf (my > first time) not just to put a name with a face, but also to hear his > insights and concerns. Thanks Michael... I think it was a success by all measures. That said, I'm happy it's over - well until next year anyway. > I spent most of my time in the more technical track (org track) and > took in some great talks. While the specific technology talks were > invalualble, I found the "tip-n-tricks" and "best practices" sessions > by John Coggeshall and Laura Thomson to be the best. > > Thanks again for the effort and bringing the Con to NYC. It certainly isn't easy to do an event in NYC. Ironically, several weeks ago I was surveyed by a City business development agency regarding this very topic. Perhaps this conference and others from organizations like NYCBUG, will be a starting point for progress for getting conferences back into the city. Thanks all, --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From dariusz at jachimowski.pl Mon Jun 19 04:44:00 2006 From: dariusz at jachimowski.pl (Dariusz A. Jachimowski) Date: Mon, 19 Jun 2006 10:44:00 +0200 Subject: [nycphp-talk] JOB: Full-Time LAMP/JavaScript Developer (Urgent) References: Message-ID: <9cde50b47a6ac471ce06e9ea2f36c5e0.qmail@home.pl> Hi olaf & jerry, Thank you for information about job oportunity. I am interested only in on-line cooperation. I have 5 years practise in area : Windows, Unix, ( Corel. Adobe Macromedia), CI, , e-shops, CMS, application( VB,C#,C++)( DHTML, CSS2, XML, CGI-PERL, PHP, MS-My-POstgre SQL, ASP.NET (VB)Java Script, Java, LAMP, Flash ???action script), animation. best regards "Odra Gola" napisa??(a): > Our midtown-based Internet marketing company has an immediate opening for > an > experienced and creative PHP programmer with strong JavaScript background > > (preferably AJAX). > > Other REQIRED skills: > - Object Oriented Programming in PHP > - strong SQL, database optimization, MySQL configuration > - Apache configuration > - Linux administration - installation and configuration of software > including services like email, DNS, etc. > - (X)HTML, CSS, DOM > - XML, SOAP or XML-RPC > - HTTP > - basic graphics design > > Flash/ActionScript not required but a big plus. > > Will work independently but under the supervision of the senior > programmer. > > Must be detail oriented and reliable. > > Send resume with desired salary to lampven [at] gmail.com > > Regards, > olaf & jerry DARIUSZ ANDRZEJ JACHIMOWSKI e-mail: dariusz at jachimowski.pl mobile: 0048 505 724 971 SKYPE: dariusz.jachimowski ICQ: 286 16 68 98 postal address: UP Warszawa 121, skr. nr 55 ----------------------------------------------------------------- MANUFACTURA konsultacyje wszelakie w materii codu, pikczeru i wrajtu czynione ----------------------------------------------------------------- grafika 2D, 3D, animacje,webdesign,Corporate Identity www-programowanie,intranety, extranety,B2B,B2C, finansowanie zlece? : kredyty, leasing, programy UE From salmaz2000 at gmail.com Mon Jun 19 10:03:17 2006 From: salmaz2000 at gmail.com (Salman Mazhar) Date: Mon, 19 Jun 2006 10:03:17 -0400 Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION Message-ID: <7740c3f70606190703qc488c4du7496ec0d0e713f47@mail.gmail.com> Hello, I am trying to install PHP 5.1.4 on my Windows Computer. Please note that it is not a Web Server. Its just a simple computer for home use. First of all, can I even install PHP on this or does it have to be on a web server? Then what configuration changes do I need to make in order for the PHP files to run successfully? Does my source code have to be in any particular directory on my machine and in order to access those pages, what URL do I need to type in my browser and can I also put my HTML files in the same directory? Please can you help me? Thanks. Sincerely Yours, Salman Mazhar. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pyurt at yahoo.com Mon Jun 19 10:09:16 2006 From: pyurt at yahoo.com (pyurt) Date: Mon, 19 Jun 2006 07:09:16 -0700 Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION In-Reply-To: <7740c3f70606190703qc488c4du7496ec0d0e713f47@mail.gmail.com> Message-ID: <20060619141138.45326A8658@virtu.nyphp.org> Go to php.net Find a distro for your platform. It will place files into the correct directory which typically was c:\php on a windows machine. HTML is different. Do you want to display the HTML in a browser? If so, you need to install a HTTP server (web server) such as apache. www.apache.org. Web server install is a separate process. If you do the web server you may need to tell it about (change a config file setting) to indicate the presence of a php install. _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Salman Mazhar Sent: Monday, June 19, 2006 7:03 AM To: NYPHP Talk Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION Hello, I am trying to install PHP 5.1.4 on my Windows Computer. Please note that it is not a Web Server. Its just a simple computer for home use. First of all, can I even install PHP on this or does it have to be on a web server? Then what configuration changes do I need to make in order for the PHP files to run successfully? Does my source code have to be in any particular directory on my machine and in order to access those pages, what URL do I need to type in my browser and can I also put my HTML files in the same directory? Please can you help me? Thanks. Sincerely Yours, Salman Mazhar. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tboyden at supercoups.com Mon Jun 19 10:13:11 2006 From: tboyden at supercoups.com (Timothy Boyden) Date: Mon, 19 Jun 2006 10:13:11 -0400 Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION In-Reply-To: <7740c3f70606190703qc488c4du7496ec0d0e713f47@mail.gmail.com> Message-ID: PHP.net has excellent documentation covering the install of PHP on the Windows platform, see the following link for instructions: http://www.php.net/manual/en/install.windows.php The user comments on that page contain links to additional tutorials if required. Regards, Tim Boyden From: Salman Mazhar Reply-To: NYPHP Talk Date: Mon, 19 Jun 2006 10:03:17 -0400 To: NYPHP Talk Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION Hello, I am trying to install PHP 5.1.4 on my Windows Computer. Please note that it is not a Web Server. Its just a simple computer for home use. First of all, can I even install PHP on this or does it have to be on a web server? Then what configuration changes do I need to make in order for the PHP files to run successfully? Does my source code have to be in any particular directory on my machine and in order to access those pages, what URL do I need to type in my browser and can I also put my HTML files in the same directory? Please can you help me? Thanks. Sincerely Yours, Salman Mazhar. _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk New York PHP Conference and Expo 2006 http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -------------- next part -------------- An HTML attachment was scrubbed... URL: From kenrbnsn at rbnsn.com Mon Jun 19 10:19:01 2006 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Mon, 19 Jun 2006 10:19:01 -0400 Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION In-Reply-To: <20060619141138.45326A8658@virtu.nyphp.org> References: <7740c3f70606190703qc488c4du7496ec0d0e713f47@mail.gmail.com> <20060619141138.45326A8658@virtu.nyphp.org> Message-ID: <7.0.1.0.2.20060619101543.083f97b0@rbnsn.com> I recommend getting one of the prepackaged bundles that include Apache, PHP, MySQL, and possibly other things like PERL, Ruby, and/or Python. The one I use is xampp Ken At 10:09 AM 6/19/2006, pyurt wrote: >Go to php.net >Find a distro for your platform. >It will place files into the correct directory which typically was >c:\php on a windows machine. > >HTML is different. Do you want to display the HTML in a browser? If >so, you need to install a HTTP server (web server) such as apache. >www.apache.org. >Web server install is a separate process. If you do the web server >you may need to tell it about (change a config file setting) to >indicate the presence of a php install. > > >From: talk-bounces at lists.nyphp.org >[mailto:talk-bounces at lists.nyphp.org] On Behalf Of Salman Mazhar >Sent: Monday, June 19, 2006 7:03 AM >To: NYPHP Talk >Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION > >Hello, > >I am trying to install PHP 5.1.4 on my Windows Computer. Please note >that it is not a Web Server. Its just a simple computer for home >use. First of all, can I even install PHP on this or does it have to >be on a web server? Then what configuration changes do I need to >make in order for the PHP files to run successfully? Does my source >code have to be in any particular directory on my machine and in >order to access those pages, what URL do I need to type in my >browser and can I also put my HTML files in the same directory? >Please can you help me? > >Thanks. >Sincerely Yours, >Salman Mazhar. From pyurt at yahoo.com Mon Jun 19 10:19:26 2006 From: pyurt at yahoo.com (pyurt) Date: Mon, 19 Jun 2006 07:19:26 -0700 Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION In-Reply-To: <7740c3f70606190703qc488c4du7496ec0d0e713f47@mail.gmail.com> Message-ID: <20060619142149.5B7B0A8658@virtu.nyphp.org> What is your purpose? It would help to know what you want to do. To get php go to www.php.net You will find an install distribution for your platform. The install will place the PHP language files into a directory which typically is c:\php on a windows machine. HTML is different. Do you want to use PHP to make HTML and show it in a browser? If so, you need to install a HTTP server (web server) such as Apache. Which can be found at www.apache.org . The apache install is quite straight forward. If you install the web server you may need to tell it about (change a config file setting) to indicate the presence of a php install. There are notes on this on the apache site and also on the php.net site. Your source can go anywhere if you are only using php. Source goes into a specific place if you are using a web server and you want to see it in the browser. A path the php will take care of allowing you to run the php code. PHP like Basic or other languages has a interpretive mode, is that what you want? If rather, you want to run the php from a browser, then you are talking about a web application which requires a web server like Apache. _____ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Salman Mazhar Sent: Monday, June 19, 2006 7:03 AM To: NYPHP Talk Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION Hello, I am trying to install PHP 5.1.4 on my Windows Computer. Please note that it is not a Web Server. Its just a simple computer for home use. First of all, can I even install PHP on this or does it have to be on a web server? Then what configuration changes do I need to make in order for the PHP files to run successfully? Does my source code have to be in any particular directory on my machine and in order to access those pages, what URL do I need to type in my browser and can I also put my HTML files in the same directory? Please can you help me? Thanks. Sincerely Yours, Salman Mazhar. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rotsen at gmail.com Mon Jun 19 11:09:36 2006 From: rotsen at gmail.com (Nestor) Date: Mon, 19 Jun 2006 08:09:36 -0700 Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION In-Reply-To: <7740c3f70606190703qc488c4du7496ec0d0e713f47@mail.gmail.com> References: <7740c3f70606190703qc488c4du7496ec0d0e713f47@mail.gmail.com> Message-ID: You can install mysql and php without having to do anything with a web server. Php can work just as a script language just like perl. N?stor :-) On 6/19/06, Salman Mazhar wrote: > > Hello, > > I am trying to install PHP 5.1.4 on my Windows Computer. Please note that it > is not a Web Server. Its just a simple computer for home use. First of all, > can I even install PHP on this or does it have to be on a web server? Then > what configuration changes do I need to make in order for the PHP files to > run successfully? Does my source code have to be in any particular directory > on my machine and in order to access those pages, what URL do I need to type > in my browser and can I also put my HTML files in the same directory? Please > can you help me? > > Thanks. > Sincerely Yours, > > Salman Mazhar. > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > From lists at zaunere.com Mon Jun 19 11:48:36 2006 From: lists at zaunere.com (Hans Zaunere) Date: Mon, 19 Jun 2006 11:48:36 -0400 Subject: [nycphp-talk] JOB: Full-Time LAMP/JavaScript Developer (Urgent) In-Reply-To: <9cde50b47a6ac471ce06e9ea2f36c5e0.qmail@home.pl> Message-ID: <00af01c693b7$d44c5b70$660aa8c0@mobilez> All, Please use only the NYPHP-Jobs list for job/employment discussion. It can be found here: http://lists.nyphp.org/mailman/listinfo/jobs Thank you, --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com Dariusz A. Jachimowski wrote on Monday, June 19, 2006 4:44 AM: > Hi olaf & jerry, > Thank you for information about job oportunity. I am interested only > in on-line cooperation. I have 5 years practise in area : Windows, > Unix, ( Corel. Adobe Macromedia), CI, , e-shops, CMS, > application( VB,C#,C++)( DHTML, CSS2, XML, CGI-PERL, PHP, > MS-My-POstgre SQL, ASP.NET (VB)Java Script, Java, LAMP, Flash > -action script), animation. > best regards > > "Odra Gola" napisa?(a): > > Our midtown-based Internet marketing company has an immediate > > opening for > > > an > > experienced and creative PHP programmer with strong JavaScript > > background > > > > (preferably AJAX). > > > > Other REQIRED skills: > > - Object Oriented Programming in PHP > > - strong SQL, database optimization, MySQL configuration > > - Apache configuration > > - Linux administration - installation and configuration of software > > including services like email, DNS, etc. > > - (X)HTML, CSS, DOM > > - XML, SOAP or XML-RPC > > - HTTP > > - basic graphics design > > > > Flash/ActionScript not required but a big plus. > > > > Will work independently but under the supervision of the senior > > programmer. > > > > Must be detail oriented and reliable. > > > > Send resume with desired salary to lampven [at] gmail.com > > > > Regards, > > olaf & jerry > > > > > DARIUSZ ANDRZEJ JACHIMOWSKI > e-mail: dariusz at jachimowski.pl mobile: 0048 505 724 971 > SKYPE: dariusz.jachimowski ICQ: 286 16 68 98 > postal address: UP Warszawa 121, skr. nr 55 > ----------------------------------------------------------------- > MANUFACTURA > konsultacyje wszelakie w materii codu, pikczeru i wrajtu czynione > ----------------------------------------------------------------- > grafika 2D, 3D, animacje,webdesign,Corporate Identity > www-programowanie,intranety, extranety,B2B,B2C, > finansowanie zlece : kredyty, leasing, programy UE From plehrer at gmail.com Mon Jun 19 13:46:24 2006 From: plehrer at gmail.com (Peter Lehrer) Date: Mon, 19 Jun 2006 13:46:24 -0400 Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION In-Reply-To: <7740c3f70606190703qc488c4du7496ec0d0e713f47@mail.gmail.com> References: <7740c3f70606190703qc488c4du7496ec0d0e713f47@mail.gmail.com> Message-ID: Why don't you try to get the latest version of xamp and install it on your computer. Peter On 6/19/06, Salman Mazhar wrote: > > Hello, > > I am trying to install PHP 5.1.4 on my Windows Computer. Please note that > it is not a Web Server. Its just a simple computer for home use. First of > all, can I even install PHP on this or does it have to be on a web server? > Then what configuration changes do I need to make in order for the PHP files > to run successfully? Does my source code have to be in any particular > directory on my machine and in order to access those pages, what URL do I > need to type in my browser and can I also put my HTML files in the same > directory? Please can you help me? > > Thanks. > Sincerely Yours, > Salman Mazhar. > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From 1j0lkq002 at sneakemail.com Mon Jun 19 15:45:33 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Mon, 19 Jun 2006 12:45:33 -0700 Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION In-Reply-To: <7740c3f70606190703qc488c4du7496ec0d0e713f47@mail.gmail.com> References: <7740c3f70606190703qc488c4du7496ec0d0e713f47@mail.gmail.com> Message-ID: <25483-42467@sneakemail.com> Salman Mazhar salmaz2000-at-gmail.com |nyphp dev/internal group use| wrote: > Hello, > > I am trying to install PHP 5.1.4 on my Windows Computer. Please note > that it is not a Web Server. Its just a simple computer for home use. > First of all, can I even install PHP on this or does it have to be on > a web server? Then what configuration changes do I need to make in > order for the PHP files to run successfully? Does my source code have > to be in any particular directory on my machine and in order to access > those pages, what URL do I need to type in my browser and can I also > put my HTML files in the same directory? Please can you help me? > > Thanks. > Sincerely Yours, > Salman Mazhar. > >------------------------------------------------------------------------ > If it's just for development work, use XAMPP or EasyPHP or WAMP. I have all three on my Windows notebook and they all work. I like XAMPP the best, but that may be because I am comfortable manually configuring Apache/PHP anyway. EasyPHP was truly easy. Sounds like a great opportunity to make a quantum leap and install Ubuntu linux as a dual-boot on that Windows machine :-) If you have decent hard drive space, Ubuntu installs nicely alongside windows. There are a few videos on Google (ubuntu windows dual boot) that make it trivial to do. Once you do that, you can experience PHP in a Linux environment and your learning will be much more valuable. There are many, many Free/Open source packages that don't work properly on a Windows box and discovering that for yourself can be quite frustrating. Instead, every newbie struggle with PHP on Ubuntu will lead to forward knowledge momentum... a much better value for your time spent IMHO. Of course any decent linux would do, but I went with Ubuntu on an existing Windows box and it was a breeze. -=john andrews http://www.seo-fun.com From danielc at analysisandsolutions.com Mon Jun 19 15:59:37 2006 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 19 Jun 2006 15:59:37 -0400 Subject: [nycphp-talk] QUESTION ABOUT PHP INSTALLATION In-Reply-To: <20060619141138.45326A8658@virtu.nyphp.org> References: <7740c3f70606190703qc488c4du7496ec0d0e713f47@mail.gmail.com> <20060619141138.45326A8658@virtu.nyphp.org> Message-ID: <20060619195937.GA20807@panix.com> On Mon, Jun 19, 2006 at 07:09:16AM -0700, pyurt wrote: > > It will place files into the correct directory which typically was c:\php on > a windows machine. And put the path ("c:\php" in this case) into your PATH environment variable. My Computer | Properties | Advanced | Environment Variables | System Variables. You don't need to go for a package as others are suggesting. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From artzi at avaya.com Wed Jun 21 04:46:04 2006 From: artzi at avaya.com (Artzi, Yoav (Yoav)) Date: Wed, 21 Jun 2006 11:46:04 +0300 Subject: [nycphp-talk] Fails to enable dynamic library support Message-ID: In my phpinfo() I get (under standard): Dynamic Library support not available I can't seem to get PHP to be configured to allow dynamic libraries. My php.ini is: enable_dl="1" extension_dir="/usr/local/lib/php/extensions/no-debug-zts-20050922/" extension=logmanager.so And myconfigure line is: './configure' '--host=powerpc-wrs-linux-gnu' '--build=i686-linux' '--prefix=/usr/local' '--enable-releasemode' '--enable-xml' '--cache-file=config.cache' '--enable-libxml' '--with-libxml-dir=/home/artzi/work/down/temp/target/usr/local' '--disable-simplexml' '--enable-dom' '--enable-soap' '--with-db' '--enable-memory-limit' '--disable-safe-mode' '--enable-sockets' '--enable-track-vars' '--enable-trans-sid' '--enable-magic-quotes' '--enable-inline-optimization' '--without-pear' '--disable-all' '--disable-shared' '--enable-static' '--disable-ipv6' '--disable-wddx' '--disable-bcmath' '--disable-debug' '--disable-calendar' '--disable-ftp' '--with-zlib' '--with-exec-dir=/usr/local/appweb' '--sysconfdir=/usr/local/appweb' '--with-gnu-ld' '--with-openssl=/usr' '--without-aolserver' '--without-apache' '--without-continuity' '--without-pi3web' '--enable-mbstring' '--disable-mbregex' '--enable-session' '--enable-pcntl' '--enable-pdo' '--with-pdo-sqlite' '--with-pcre-regex' '--enable-spl' '--enable-tokenizer' '--disable-rpath' '--with-snmp=/home/artzi/work/down/temp/target/usr/local' '--enable-ctype' '--with-ctype' '--with-tsrm-pthreads' '--enable-threadsafe' '--enable-maintainer-zts' '--enable-embed=shared' '--enable-cgi' '--enable-cli' I can't seem to understand where I go wrong. Obviously something is wrong, but what? Thanks, Yoav. From scott at crisscott.com Wed Jun 21 08:06:20 2006 From: scott at crisscott.com (Scott Mattocks) Date: Wed, 21 Jun 2006 08:06:20 -0400 Subject: [nycphp-talk] Fails to enable dynamic library support In-Reply-To: References: Message-ID: <4499363C.4040308@crisscott.com> Artzi, Yoav (Yoav) wrote: > In my phpinfo() I get (under standard): > Dynamic Library support not available > I can't seem to get PHP to be configured to allow dynamic libraries. My > > And myconfigure line is: > './configure' '--host=powerpc-wrs-linux-gnu' '--build=i686-linux' > '--disable-shared' '--enable-static' '--disable-ipv6' '--disable-wddx' Try getting rid of --disable-shared. -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com From artzi at avaya.com Wed Jun 21 08:37:16 2006 From: artzi at avaya.com (Artzi, Yoav (Yoav)) Date: Wed, 21 Jun 2006 15:37:16 +0300 Subject: [nycphp-talk] Fails to enable dynamic library support Message-ID: Tried. It didn't help. Thanks anyway. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Scott Mattocks Sent: Wednesday, June 21, 2006 3:06 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Fails to enable dynamic library support Artzi, Yoav (Yoav) wrote: > In my phpinfo() I get (under standard): > Dynamic Library support not available > I can't seem to get PHP to be configured to allow dynamic libraries. > My > > And myconfigure line is: > './configure' '--host=powerpc-wrs-linux-gnu' '--build=i686-linux' > '--disable-shared' '--enable-static' '--disable-ipv6' '--disable-wddx' Try getting rid of --disable-shared. -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk New York PHP Conference and Expo 2006 http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From artzi at avaya.com Wed Jun 21 08:41:55 2006 From: artzi at avaya.com (Artzi, Yoav (Yoav)) Date: Wed, 21 Jun 2006 15:41:55 +0300 Subject: [nycphp-talk] Custom static extension compilation Message-ID: After trying to compile my custom extension as a dynamic extension, I decided to try to compile it as a static one. I found out that I have to copy the directory with the sources and the config.m4 to the ext directory under the source dir and call ./buildconf --force to rebuild the configure script. However, doing that built the configure script in a way that doesn't even compile. My configure command is: './configure' '--host=powerpc-wrs-linux-gnu' '--build=i686-linux' '--prefix=/usr/local' '--disable-all' '--enable-static' '--disable-shared' '--enable-memory-limit' '--disable-safe-mode' '--disable-rpath' '--disable-ipv6' '--disable-wddx' '--disable-bcmath' '--disable-debug' '--disable-calendar' '--disable-ftp' '--without-aolserver' '--without-apache' '--without-continuity' '--without-pi3web' '--enable-releasemode' '--enable-xml' '--cache-file=config.cache' '--enable-libxml' '--with-libxml-dir=/home/artzi/work/down/temp/target/usr/local' '--disable-simplexml' '--enable-dom' '--enable-soap' '--with-db' '--enable-sockets' '--enable-track-vars' '--enable-trans-sid' '--enable-magic-quotes' '--without-pear' '--with-zlib' '--with-exec-dir=/usr/local/appweb' '--sysconfdir=/usr/local/appweb' '--with-gnu-ld' '--with-openssl=/usr' '--enable-mbstring' '--disable-mbregex' '--enable-session' '--enable-pcntl' '--enable-pdo' '--with-pdo-sqlite' '--with-pcre-regex' '--enable-spl' '--enable-tokenizer' '--with-snmp=/home/artzi/work/down/temp/target/usr/local' '--enable-ctype' '--with-ctype' '--with-tsrm-pthreads' '--enable-threadsafe' '--enable-maintainer-zts' '--enable-embed=shared' '--enable-cgi' '--enable-cli' '--enable-inline-optimization' Before the buildconf, the configure passed fine, but afterwards I got an error from the PCNTL extension that the system doesn't support fork(). It happened both when cross compiling and when compiling normally. Any idea what is the right way to add an extension as static so it will compile right? Thanks, Yoav. -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott at crisscott.com Wed Jun 21 08:51:30 2006 From: scott at crisscott.com (Scott Mattocks) Date: Wed, 21 Jun 2006 08:51:30 -0400 Subject: [nycphp-talk] Fails to enable dynamic library support In-Reply-To: References: Message-ID: <449940D2.1020201@crisscott.com> Artzi, Yoav (Yoav) wrote: > Tried. It didn't help. Thanks anyway. And you removed --disable-all? I would try getting rid of all the configure options and then adding them one at a time until you figure out which one is causing problems. There's way too much information there to be able to track down the problem. -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com From chsnyder at gmail.com Wed Jun 21 08:57:26 2006 From: chsnyder at gmail.com (csnyder) Date: Wed, 21 Jun 2006 08:57:26 -0400 Subject: [nycphp-talk] Fails to enable dynamic library support In-Reply-To: References: Message-ID: On 6/21/06, Artzi, Yoav (Yoav) wrote: > In my phpinfo() I get (under standard): > Dynamic Library support not available > I can't seem to get PHP to be configured to allow dynamic libraries. My > php.ini is: > enable_dl="1" > extension_dir="/usr/local/lib/php/extensions/no-debug-zts-20050922/" > extension=logmanager.so Try enable_dl = On ? Seems like a silly difference. Also, php enables dynamic extensions by default. The --disable-all in your config call might be turning that off...? From tgales at tgaconnect.com Wed Jun 21 09:29:15 2006 From: tgales at tgaconnect.com (Tim Gales) Date: Wed, 21 Jun 2006 09:29:15 -0400 Subject: [nycphp-talk] Fails to enable dynamic library support In-Reply-To: References: Message-ID: <449949AB.1040400@tgaconnect.com> after you '--disable-all' you may have to '--enable-dynamic' Artzi, Yoav (Yoav) wrote: > In my phpinfo() I get (under standard): > Library support not available > I can't seem to get PHP to be configured to allow dynamic libraries. My > php.ini is: > enable_dl="1" > extension_dir="/usr/local/lib/php/extensions/no-debug-zts-20050922/" > extension=logmanager.so > > And myconfigure line is: > './configure' '--host=powerpc-wrs-linux-gnu' '--build=i686-linux' > '--prefix=/usr/local' '--enable-releasemode' '--enable-xml' > '--cache-file=config.cache' '--enable-libxml' > '--with-libxml-dir=/home/artzi/work/down/temp/target/usr/local' > '--disable-simplexml' '--enable-dom' '--enable-soap' '--with-db' > '--enable-memory-limit' '--disable-safe-mode' '--enable-sockets' > '--enable-track-vars' '--enable-trans-sid' '--enable-magic-quotes' > '--enable-inline-optimization' '--without-pear' '--disable-all' > '--disable-shared' '--enable-static' '--disable-ipv6' '--disable-wddx' > '--disable-bcmath' '--disable-debug' '--disable-calendar' > '--disable-ftp' '--with-zlib' '--with-exec-dir=/usr/local/appweb' > '--sysconfdir=/usr/local/appweb' '--with-gnu-ld' '--with-openssl=/usr' > '--without-aolserver' '--without-apache' '--without-continuity' > '--without-pi3web' '--enable-mbstring' '--disable-mbregex' > '--enable-session' '--enable-pcntl' '--enable-pdo' '--with-pdo-sqlite' > '--with-pcre-regex' '--enable-spl' '--enable-tokenizer' > '--disable-rpath' > '--with-snmp=/home/artzi/work/down/temp/target/usr/local' > '--enable-ctype' '--with-ctype' '--with-tsrm-pthreads' > '--enable-threadsafe' '--enable-maintainer-zts' '--enable-embed=shared' > '--enable-cgi' '--enable-cli' > > I can't seem to understand where I go wrong. Obviously something is > wrong, but what? > > Thanks, > > Yoav. > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com From lists at genoverly.net Fri Jun 23 08:14:51 2006 From: lists at genoverly.net (michael) Date: Fri, 23 Jun 2006 08:14:51 -0400 Subject: [nycphp-talk] do we really need SOA 2.0? Message-ID: <20060623081451.16cdefd2@wit.genoverly.home> "SOA 2.0 madness - Sign the petition, help put a stop to it" http://www.regdeveloper.co.uk/2006/06/22/soa_madness/ Related links, definition: http://en.wikipedia.org/wiki/Service-oriented_architecture -- Michael From artzi at avaya.com Sun Jun 25 04:06:50 2006 From: artzi at avaya.com (Artzi, Yoav (Yoav)) Date: Sun, 25 Jun 2006 11:06:50 +0300 Subject: [nycphp-talk] Fails to enable dynamic library support Message-ID: I cross compiling to another platform. Using the same configure commnad it works fine on my i686, but on my PPC box for some reason (same configure) the dynamic libraries support is disabled. I am hopeless here.s -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Scott Mattocks Sent: Wednesday, June 21, 2006 3:52 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Fails to enable dynamic library support Artzi, Yoav (Yoav) wrote: > Tried. It didn't help. Thanks anyway. And you removed --disable-all? I would try getting rid of all the configure options and then adding them one at a time until you figure out which one is causing problems. There's way too much information there to be able to track down the problem. -- Scott Mattocks Author of: Pro PHP-GTK http://www.crisscott.com _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk New York PHP Conference and Expo 2006 http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From artzi at avaya.com Sun Jun 25 04:08:56 2006 From: artzi at avaya.com (Artzi, Yoav (Yoav)) Date: Sun, 25 Jun 2006 11:08:56 +0300 Subject: [nycphp-talk] Fails to enable dynamic library support Message-ID: The enable-dynamic options doesn't exist in PHP 5.1.4, I checked in the configure file and nada. Thanks anyway. -----Original Message----- From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Tim Gales Sent: Wednesday, June 21, 2006 4:29 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Fails to enable dynamic library support after you '--disable-all' you may have to '--enable-dynamic' Artzi, Yoav (Yoav) wrote: > In my phpinfo() I get (under standard): > Library support not available > I can't seem to get PHP to be configured to allow dynamic libraries. > My php.ini is: > enable_dl="1" > extension_dir="/usr/local/lib/php/extensions/no-debug-zts-20050922/" > extension=logmanager.so > > And myconfigure line is: > './configure' '--host=powerpc-wrs-linux-gnu' '--build=i686-linux' > '--prefix=/usr/local' '--enable-releasemode' '--enable-xml' > '--cache-file=config.cache' '--enable-libxml' > '--with-libxml-dir=/home/artzi/work/down/temp/target/usr/local' > '--disable-simplexml' '--enable-dom' '--enable-soap' '--with-db' > '--enable-memory-limit' '--disable-safe-mode' '--enable-sockets' > '--enable-track-vars' '--enable-trans-sid' '--enable-magic-quotes' > '--enable-inline-optimization' '--without-pear' '--disable-all' > '--disable-shared' '--enable-static' '--disable-ipv6' '--disable-wddx' > '--disable-bcmath' '--disable-debug' '--disable-calendar' > '--disable-ftp' '--with-zlib' '--with-exec-dir=/usr/local/appweb' > '--sysconfdir=/usr/local/appweb' '--with-gnu-ld' '--with-openssl=/usr' > '--without-aolserver' '--without-apache' '--without-continuity' > '--without-pi3web' '--enable-mbstring' '--disable-mbregex' > '--enable-session' '--enable-pcntl' '--enable-pdo' '--with-pdo-sqlite' > '--with-pcre-regex' '--enable-spl' '--enable-tokenizer' > '--disable-rpath' > '--with-snmp=/home/artzi/work/down/temp/target/usr/local' > '--enable-ctype' '--with-ctype' '--with-tsrm-pthreads' > '--enable-threadsafe' '--enable-maintainer-zts' '--enable-embed=shared' > '--enable-cgi' '--enable-cli' > > I can't seem to understand where I go wrong. Obviously something is > wrong, but what? > > Thanks, > > Yoav. > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > -- T. Gales & Associates 'Helping People Connect with Technology' http://www.tgaconnect.com _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk New York PHP Conference and Expo 2006 http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php From robynover at gmail.com Mon Jun 26 12:54:05 2006 From: robynover at gmail.com (robyn overstreet) Date: Mon, 26 Jun 2006 12:54:05 -0400 Subject: [nycphp-talk] php for mailing list app? Message-ID: Hi all- I'm working on a mailing list (announcement only) for a client and I'm trying to decide if using PHP is the way to go. I'm more comfortable with PHP than with Perl, but it seems that Perl has better email handling modules available. When I've worked with PHP mail() before, my experience was that even a relatively small list of about 50 addresses took a while to loop through and send. I'm concerned that the server will time out for a larger list. I'm wondering if I need to make a socket connection. Can anyone point me in a good direction to research? Thanks in advance- Robyn From dorgan at optonline.net Mon Jun 26 12:57:56 2006 From: dorgan at optonline.net (Donald J Organ IV) Date: Mon, 26 Jun 2006 12:57:56 -0400 Subject: [nycphp-talk] php for mailing list app? In-Reply-To: References: Message-ID: <44A01214.4060805@optonline.net> I believe that if you run the script that sends the emails from the command line using say cron that the PHP has no max execution time. This may help. robyn overstreet wrote: > Hi all- > I'm working on a mailing list (announcement only) for a client and I'm > trying to decide if using PHP is the way to go. I'm more comfortable > with PHP than with Perl, but it seems that Perl has better email > handling modules available. > > When I've worked with PHP mail() before, my experience was that even a > relatively small list of about 50 addresses took a while to loop > through and send. I'm concerned that the server will time out for a > larger list. I'm wondering if I need to make a socket connection. > > Can anyone point me in a good direction to research? > > Thanks in advance- > Robyn > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > From max at neuropunks.org Mon Jun 26 13:05:29 2006 From: max at neuropunks.org (max at neuropunks.org) Date: Mon, 26 Jun 2006 12:05:29 -0500 Subject: [nycphp-talk] PHP and MS Excel Message-ID: <0.03905200.1151341529@neuropunks.org> Hello, Has anyone ever used/using something they like to deal with reading and writing MS Excel files? Not CSV, but the actual XLS, specifically things like formatting, multiple sheets, etc? Something like a good xls class, like the one for PDF. I found something on phpclasses, but would like to get some opnions and suggestions... Thank you! max From robynover at gmail.com Mon Jun 26 13:07:57 2006 From: robynover at gmail.com (robyn overstreet) Date: Mon, 26 Jun 2006 13:07:57 -0400 Subject: [nycphp-talk] php for mailing list app? In-Reply-To: <44A01214.4060805@optonline.net> References: <44A01214.4060805@optonline.net> Message-ID: On 6/26/06, Donald J Organ IV wrote: > I believe that if you run the script that sends the emails from the > command line using say cron that the PHP has no max execution time. > This may help. Thank you. That's helpful. It makes sense that if I run the script behind the scenes, not only will it not time out, but the user won't be affected by the 'long' time it takes to send mail. Since I'm writing a web application, though, I don't think cron will help -- I need to run the script (not in the browser) when the user hits "send to subscribers". Any suggestions on how to do this? Thanks Robyn > > robyn overstreet wrote: > > Hi all- > > I'm working on a mailing list (announcement only) for a client and I'm > > trying to decide if using PHP is the way to go. I'm more comfortable > > with PHP than with Perl, but it seems that Perl has better email > > handling modules available. > > > > When I've worked with PHP mail() before, my experience was that even a > > relatively small list of about 50 addresses took a while to loop > > through and send. I'm concerned that the server will time out for a > > larger list. I'm wondering if I need to make a socket connection. > > > > Can anyone point me in a good direction to research? > > > > Thanks in advance- > > Robyn > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > New York PHP Conference and Expo 2006 > > http://www.nyphpcon.com > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > > > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From lists at jack-scott.com Mon Jun 26 13:10:08 2006 From: lists at jack-scott.com (Jack Scott) Date: Mon, 26 Jun 2006 13:10:08 -0400 Subject: [nycphp-talk] PHP and MS Excel In-Reply-To: <0.03905200.1151341529@neuropunks.org> References: <0.03905200.1151341529@neuropunks.org> Message-ID: <1151341808.11604.26.camel@localhost> On Mon, 2006-06-26 at 12:05 -0500, max at neuropunks.org wrote: > Hello, > Has anyone ever used/using something they like to deal with reading and writing MS Excel files? > Not CSV, but the actual XLS, specifically things like formatting, multiple sheets, etc? > Something like a good xls class, like the one for PDF. > I found something on phpclasses, but would like to get some opnions and suggestions... > > Thank you! > > max http://pear.php.net/package/Spreadsheet_Excel_Writer Its beta but works fine, there are also some packages on phpclasses.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From akamm at demicooper.com Mon Jun 26 13:07:12 2006 From: akamm at demicooper.com (Andrew Kamm) Date: Mon, 26 Jun 2006 12:07:12 -0500 Subject: [nycphp-talk] php for mailing list app? In-Reply-To: Message-ID: I've used PHPMailer with a lot of success, and I've heard the Pear Mail class is good (though I haven't used it). If it's something you don't mind outsourcing, CampaignMonitor.com is a great service. Some folks on the list mentioned it a while ago and I really like it. (and it's very affordable) -- Andrew Kamm > From: robyn overstreet > Reply-To: "NYPHP Talk " > Date: Mon, 26 Jun 2006 12:54:05 -0400 > To: NYPHP Talk > Subject: [nycphp-talk] php for mailing list app? > > Can anyone point me in a good direction to research? From dorgan at optonline.net Mon Jun 26 13:19:09 2006 From: dorgan at optonline.net (Donald J Organ IV) Date: Mon, 26 Jun 2006 13:19:09 -0400 Subject: [nycphp-talk] PHP and MS Excel In-Reply-To: <1151341808.11604.26.camel@localhost> References: <0.03905200.1151341529@neuropunks.org> <1151341808.11604.26.camel@localhost> Message-ID: <44A0170D.2080608@optonline.net> Well create a cron job that runs every x amount of minutes that looks for messages that have say the Send field set to 1 in the database. Jack Scott wrote: > > On Mon, 2006-06-26 at 12:05 -0500, max at neuropunks.org wrote: >> Hello, >> Has anyone ever used/using something they like to deal with reading and writing MS Excel files? >> Not CSV, but the actual XLS, specifically things like formatting, multiple sheets, etc? >> Something like a good xls class, like the one for PDF. >> I found something on phpclasses, but would like to get some opnions and suggestions... >> >> Thank you! >> >> max >> > http://pear.php.net/package/Spreadsheet_Excel_Writer > Its beta but works fine, there are also some packages on phpclasses.org > > > ------------------------------------------------------------------------ > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > ------------------------------------------------------------------------ > > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.9.4/375 - Release Date: 6/25/2006 > From dorgan at optonline.net Mon Jun 26 13:22:17 2006 From: dorgan at optonline.net (Donald J Organ IV) Date: Mon, 26 Jun 2006 13:22:17 -0400 Subject: [nycphp-talk] PHP and MS Excel In-Reply-To: <44A0170D.2080608@optonline.net> References: <0.03905200.1151341529@neuropunks.org> <1151341808.11604.26.camel@localhost> <44A0170D.2080608@optonline.net> Message-ID: <44A017C9.4090308@optonline.net> Wow sorry about that hit reply to the wrong message. Donald J Organ IV wrote: > Well create a cron job that runs every x amount of minutes that looks > for messages that have say the Send field set to 1 in the database. > > > Jack Scott wrote: > >> On Mon, 2006-06-26 at 12:05 -0500, max at neuropunks.org wrote: >> >>> Hello, >>> Has anyone ever used/using something they like to deal with reading and writing MS Excel files? >>> Not CSV, but the actual XLS, specifically things like formatting, multiple sheets, etc? >>> Something like a good xls class, like the one for PDF. >>> I found something on phpclasses, but would like to get some opnions and suggestions... >>> >>> Thank you! >>> >>> max >>> >>> >> http://pear.php.net/package/Spreadsheet_Excel_Writer >> Its beta but works fine, there are also some packages on phpclasses.org >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> New York PHP Conference and Expo 2006 >> http://www.nyphpcon.com >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> >> ------------------------------------------------------------------------ >> >> No virus found in this incoming message. >> Checked by AVG Free Edition. >> Version: 7.1.394 / Virus Database: 268.9.4/375 - Release Date: 6/25/2006 >> >> > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > From dorgan at optonline.net Mon Jun 26 13:22:31 2006 From: dorgan at optonline.net (Donald J Organ IV) Date: Mon, 26 Jun 2006 13:22:31 -0400 Subject: [nycphp-talk] php for mailing list app? In-Reply-To: References: <44A01214.4060805@optonline.net> Message-ID: <44A017D7.6080104@optonline.net> Well create a cron job that runs every x amount of minutes that looks for messages that have say the Send field set to 1 in the database. robyn overstreet wrote: > On 6/26/06, Donald J Organ IV wrote: > >> I believe that if you run the script that sends the emails from the >> command line using say cron that the PHP has no max execution time. >> This may help. >> > > Thank you. That's helpful. It makes sense that if I run the script > behind the scenes, not only will it not time out, but the user won't > be affected by the 'long' time it takes to send mail. Since I'm > writing a web application, though, I don't think cron will help -- I > need to run the script (not in the browser) when the user hits "send > to subscribers". Any suggestions on how to do this? > > Thanks > Robyn > > > >> robyn overstreet wrote: >> >>> Hi all- >>> I'm working on a mailing list (announcement only) for a client and I'm >>> trying to decide if using PHP is the way to go. I'm more comfortable >>> with PHP than with Perl, but it seems that Perl has better email >>> handling modules available. >>> >>> When I've worked with PHP mail() before, my experience was that even a >>> relatively small list of about 50 addresses took a while to loop >>> through and send. I'm concerned that the server will time out for a >>> larger list. I'm wondering if I need to make a socket connection. >>> >>> Can anyone point me in a good direction to research? >>> >>> Thanks in advance- >>> Robyn >>> _______________________________________________ >>> New York PHP Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> New York PHP Conference and Expo 2006 >>> http://www.nyphpcon.com >>> Show Your Participation in New York PHP >>> http://www.nyphp.org/show_participation.php >>> >>> >>> >>> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> New York PHP Conference and Expo 2006 >> http://www.nyphpcon.com >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > From robynover at gmail.com Mon Jun 26 13:45:50 2006 From: robynover at gmail.com (robyn overstreet) Date: Mon, 26 Jun 2006 13:45:50 -0400 Subject: [nycphp-talk] php for mailing list app? In-Reply-To: <44A017D7.6080104@optonline.net> References: <44A01214.4060805@optonline.net> <44A017D7.6080104@optonline.net> Message-ID: On 6/26/06, Donald J Organ IV wrote: > Well create a cron job that runs every x amount of minutes that looks > for messages that have say the Send field set to 1 in the database. Great! That makes sense. Still wondering how to let the user know the status of the process from the browser. Obviously, the browser PHP could check the database repeatedly to see if the send field is set to 0, but that might create a long wait also. Additionally, is it reasonable to query the database in a cron job every minute? Every 5 minutes? The client will probably only use the app weekly or monthly, but of course it needs to be ready at any time. TIA Robyn > robyn overstreet wrote: > > On 6/26/06, Donald J Organ IV wrote: > > > >> I believe that if you run the script that sends the emails from the > >> command line using say cron that the PHP has no max execution time. > >> This may help. > >> > > > > Thank you. That's helpful. It makes sense that if I run the script > > behind the scenes, not only will it not time out, but the user won't > > be affected by the 'long' time it takes to send mail. Since I'm > > writing a web application, though, I don't think cron will help -- I > > need to run the script (not in the browser) when the user hits "send > > to subscribers". Any suggestions on how to do this? > > > > Thanks > > Robyn > > > > > > > >> robyn overstreet wrote: > >> > >>> Hi all- > >>> I'm working on a mailing list (announcement only) for a client and I'm > >>> trying to decide if using PHP is the way to go. I'm more comfortable > >>> with PHP than with Perl, but it seems that Perl has better email > >>> handling modules available. > >>> > >>> When I've worked with PHP mail() before, my experience was that even a > >>> relatively small list of about 50 addresses took a while to loop > >>> through and send. I'm concerned that the server will time out for a > >>> larger list. I'm wondering if I need to make a socket connection. > >>> > >>> Can anyone point me in a good direction to research? > >>> > >>> Thanks in advance- > >>> Robyn > >>> _______________________________________________ > >>> New York PHP Community Talk Mailing List > >>> http://lists.nyphp.org/mailman/listinfo/talk > >>> New York PHP Conference and Expo 2006 > >>> http://www.nyphpcon.com > >>> Show Your Participation in New York PHP > >>> http://www.nyphp.org/show_participation.php > >>> > >>> > >>> > >>> > >> _______________________________________________ > >> New York PHP Community Talk Mailing List > >> http://lists.nyphp.org/mailman/listinfo/talk > >> New York PHP Conference and Expo 2006 > >> http://www.nyphpcon.com > >> Show Your Participation in New York PHP > >> http://www.nyphp.org/show_participation.php > >> > >> > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > New York PHP Conference and Expo 2006 > > http://www.nyphpcon.com > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > > > > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From dorgan at optonline.net Mon Jun 26 13:51:34 2006 From: dorgan at optonline.net (Donald J Organ IV) Date: Mon, 26 Jun 2006 13:51:34 -0400 Subject: [nycphp-talk] php for mailing list app? In-Reply-To: References: <44A01214.4060805@optonline.net> <44A017D7.6080104@optonline.net> Message-ID: <44A01EA6.50805@optonline.net> have the script update a field in the database for the percentage complete. I wrote an entire backup system using php and a cron'ed script that runs every minute, but depending on how fast your client wants these messages to go out would depend on how often you run the script. Now running the script every minute isnt really a big load on the database because most of the time its not returning anything. So if the database is index correctly, this will have no effect on the system. robyn overstreet wrote: > On 6/26/06, Donald J Organ IV wrote: > >> Well create a cron job that runs every x amount of minutes that looks >> for messages that have say the Send field set to 1 in the database. >> > > Great! That makes sense. > > Still wondering how to let the user know the status of the process > from the browser. Obviously, the browser PHP could check the database > repeatedly to see if the send field is set to 0, but that might create > a long wait also. Additionally, is it reasonable to query the database > in a cron job every minute? Every 5 minutes? The client will probably > only use the app weekly or monthly, but of course it needs to be ready > at any time. > > TIA > Robyn > > >> robyn overstreet wrote: >> >>> On 6/26/06, Donald J Organ IV wrote: >>> >>> >>>> I believe that if you run the script that sends the emails from the >>>> command line using say cron that the PHP has no max execution time. >>>> This may help. >>>> >>>> >>> Thank you. That's helpful. It makes sense that if I run the script >>> behind the scenes, not only will it not time out, but the user won't >>> be affected by the 'long' time it takes to send mail. Since I'm >>> writing a web application, though, I don't think cron will help -- I >>> need to run the script (not in the browser) when the user hits "send >>> to subscribers". Any suggestions on how to do this? >>> >>> Thanks >>> Robyn >>> >>> >>> >>> >>>> robyn overstreet wrote: >>>> >>>> >>>>> Hi all- >>>>> I'm working on a mailing list (announcement only) for a client and I'm >>>>> trying to decide if using PHP is the way to go. I'm more comfortable >>>>> with PHP than with Perl, but it seems that Perl has better email >>>>> handling modules available. >>>>> >>>>> When I've worked with PHP mail() before, my experience was that even a >>>>> relatively small list of about 50 addresses took a while to loop >>>>> through and send. I'm concerned that the server will time out for a >>>>> larger list. I'm wondering if I need to make a socket connection. >>>>> >>>>> Can anyone point me in a good direction to research? >>>>> >>>>> Thanks in advance- >>>>> Robyn >>>>> _______________________________________________ >>>>> New York PHP Community Talk Mailing List >>>>> http://lists.nyphp.org/mailman/listinfo/talk >>>>> New York PHP Conference and Expo 2006 >>>>> http://www.nyphpcon.com >>>>> Show Your Participation in New York PHP >>>>> http://www.nyphp.org/show_participation.php >>>>> >>>>> >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> New York PHP Community Talk Mailing List >>>> http://lists.nyphp.org/mailman/listinfo/talk >>>> New York PHP Conference and Expo 2006 >>>> http://www.nyphpcon.com >>>> Show Your Participation in New York PHP >>>> http://www.nyphp.org/show_participation.php >>>> >>>> >>>> >>> _______________________________________________ >>> New York PHP Community Talk Mailing List >>> http://lists.nyphp.org/mailman/listinfo/talk >>> New York PHP Conference and Expo 2006 >>> http://www.nyphpcon.com >>> Show Your Participation in New York PHP >>> http://www.nyphp.org/show_participation.php >>> >>> >>> >>> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> New York PHP Conference and Expo 2006 >> http://www.nyphpcon.com >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > From drydell at optonline.net Mon Jun 26 13:52:14 2006 From: drydell at optonline.net (drydell at optonline.net) Date: Mon, 26 Jun 2006 13:52:14 -0400 Subject: [nycphp-talk] php for mailing list app? In-Reply-To: References: <44A01214.4060805@optonline.net> Message-ID: you can run a detached background task by either turning off std out and err: shell_exec("env -i /your/path/to/php -q -f /your/path/to/script.php >&- <&- 2>&- &"); or directing them to /dev/null: shell_exec("env -i /your/path/to/php -q -f /your/path/to/script.php 2>>/dev/null >&- <&- >>/dev/null &"); ----- Original Message ----- From: robyn overstreet Date: Monday, June 26, 2006 1:07 pm Subject: Re: [nycphp-talk] php for mailing list app? > On 6/26/06, Donald J Organ IV wrote: > > I believe that if you run the script that sends the emails from the > > command line using say cron that the PHP has no max execution time. > > This may help. > > Thank you. That's helpful. It makes sense that if I run the script > behind the scenes, not only will it not time out, but the user won't > be affected by the 'long' time it takes to send mail. Since I'm > writing a web application, though, I don't think cron will help -- I > need to run the script (not in the browser) when the user hits "send > to subscribers". Any suggestions on how to do this? > > Thanks > Robyn > > > > > > robyn overstreet wrote: > > > Hi all- > > > I'm working on a mailing list (announcement only) for a client > and I'm > > > trying to decide if using PHP is the way to go. I'm more > comfortable> > with PHP than with Perl, but it seems that Perl has > better email > > > handling modules available. > > > > > > When I've worked with PHP mail() before, my experience was > that even a > > > relatively small list of about 50 addresses took a while to loop > > > through and send. I'm concerned that the server will time out > for a > > > larger list. I'm wondering if I need to make a socket connection. > > > > > > Can anyone point me in a good direction to research? > > > > > > Thanks in advance- > > > Robyn > > > _______________________________________________ > > > New York PHP Community Talk Mailing List > > > http://lists.nyphp.org/mailman/listinfo/talk > > > New York PHP Conference and Expo 2006 > > > http://www.nyphpcon.com > > > Show Your Participation in New York PHP > > > http://www.nyphp.org/show_participation.php > > > > > > > > > > > > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > New York PHP Conference and Expo 2006 > > http://www.nyphpcon.com > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From dcech at phpwerx.net Mon Jun 26 14:18:29 2006 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 26 Jun 2006 14:18:29 -0400 Subject: [nycphp-talk] php for mailing list app? In-Reply-To: References: Message-ID: <44A024F5.5060404@phpwerx.net> robyn overstreet wrote: > Hi all- > I'm working on a mailing list (announcement only) for a client and I'm > trying to decide if using PHP is the way to go. I'm more comfortable > with PHP than with Perl, but it seems that Perl has better email > handling modules available. > > When I've worked with PHP mail() before, my experience was that even a > relatively small list of about 50 addresses took a while to loop > through and send. I'm concerned that the server will time out for a > larger list. I'm wondering if I need to make a socket connection. > > Can anyone point me in a good direction to research? It sounds like you're looking for PEAR Mail_Queue: http://pear.php.net/manual/en/package.mail.mail-queue.mail-queue.tutorial.php Dan From dcech at phpwerx.net Mon Jun 26 14:20:28 2006 From: dcech at phpwerx.net (Dan Cech) Date: Mon, 26 Jun 2006 14:20:28 -0400 Subject: [nycphp-talk] PHP and MS Excel In-Reply-To: <1151341808.11604.26.camel@localhost> References: <0.03905200.1151341529@neuropunks.org> <1151341808.11604.26.camel@localhost> Message-ID: <44A0256C.9090102@phpwerx.net> Jack Scott wrote: > On Mon, 2006-06-26 at 12:05 -0500, max at neuropunks.org wrote: > >> Hello, >> Has anyone ever used/using something they like to deal with reading and writing MS Excel files? >> Not CSV, but the actual XLS, specifically things like formatting, multiple sheets, etc? >> Something like a good xls class, like the one for PDF. >> I found something on phpclasses, but would like to get some opnions and suggestions... >> >> Thank you! >> >> max > > http://pear.php.net/package/Spreadsheet_Excel_Writer > Its beta but works fine, there are also some packages on phpclasses.org For writing XLS Spreadsheet_Excel_Writer is definitely a good option, I've used in on several projects with great success. I haven't tried reading/modifying XLS files from php. Dan From danielc at analysisandsolutions.com Mon Jun 26 14:30:13 2006 From: danielc at analysisandsolutions.com (Daniel Convissor) Date: Mon, 26 Jun 2006 14:30:13 -0400 Subject: [nycphp-talk] PHP and MS Excel In-Reply-To: <0.03905200.1151341529@neuropunks.org> References: <0.03905200.1151341529@neuropunks.org> Message-ID: <20060626183013.GA1512@panix.com> Hey Max: Yeah, the PEAR Spreadsheet_Excel_Writer package works, for the most part. But it exports version 5 of the Excel format, so you're limited to 255 characters in any one cell. Joy. My company has hit this limit and I'm in the middle of rewriting the package. As a temporary stopgap measure, we're exporting the data to the XML format used by the Perl/CPAN FromXML package that then converts it to Excel. These new PHP packages we made should eventually be released, but don't expect that in the immediate future. --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 From 1j0lkq002 at sneakemail.com Mon Jun 26 15:28:58 2006 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Mon, 26 Jun 2006 12:28:58 -0700 Subject: [nycphp-talk] php for mailing list app? In-Reply-To: References: Message-ID: <25506-15544@sneakemail.com> Andrew Kamm akamm-at-demicooper.com |nyphp dev/internal group use| wrote: >If it's something you don't mind outsourcing, CampaignMonitor.com is a great >service. Some folks on the list mentioned it a while ago and I really like >it. (and it's very affordable) > > That looks very pricy to me. $50 for 4500 recipients, each time. No thanks. From dmintz at davidmintz.org Mon Jun 26 17:16:38 2006 From: dmintz at davidmintz.org (David Mintz) Date: Mon, 26 Jun 2006 17:16:38 -0400 (EDT) Subject: [nycphp-talk] php for mailing list app? In-Reply-To: References: <44A01214.4060805@optonline.net> <44A017D7.6080104@optonline.net> Message-ID: Keeping the user apprised of progress in the back end... Sounds like a candidate for AJAXification, doesn't it? You could have some Javascript send an XmlHttpRequest to a back end that reports progress, and update DIV element with progress information. No? (I'm tentative b/c I'm an AJAX newbie at best). More generally, a few months ago I tried writing something similar to what Robin is attempting and discovered that (at least for me, under my set of constraints) it was a lot harder than it should have been. The shared host (pair Networks) doesn't want people mass-emailing with their system, CLI or otherwise. So I tried running it from my very own box instead, but because I am clueless and do not have a properly configured mail server, things were going out with malformed headers and being identified as spam by a lot of systems on the receiving end, and I got my IP blacklisted by SpamHaus et al. The PEAR Mail_Queue class is nice but there's something peculiar to me about saving the very same message text n times, once for each recipient. Why? On Mon, 26 Jun 2006, robyn overstreet wrote: > On 6/26/06, Donald J Organ IV wrote: > > Well create a cron job that runs every x amount of minutes that looks > > for messages that have say the Send field set to 1 in the database. > > Great! That makes sense. > > Still wondering how to let the user know the status of the process > from the browser. Obviously, the browser PHP could check the database > repeatedly to see if the send field is set to 0, but that might create > a long wait also. Additionally, is it reasonable to query the database > in a cron job every minute? Every 5 minutes? The client will probably > only use the app weekly or monthly, but of course it needs to be ready > at any time. --- David Mintz http://davidmintz.org/ Amendment IV The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. From max at neuropunks.org Mon Jun 26 20:33:33 2006 From: max at neuropunks.org (Max Gribov) Date: Mon, 26 Jun 2006 19:33:33 -0500 Subject: [nycphp-talk] PHP and MS Excel In-Reply-To: <20060626183013.GA1512@panix.com> References: <0.03905200.1151341529@neuropunks.org> <20060626183013.GA1512@panix.com> Message-ID: <44A07CDD.2060200@neuropunks.org> Daniel Convissor wrote: >Hey Max: > >Yeah, the PEAR Spreadsheet_Excel_Writer package works, for the most part. >But it exports version 5 of the Excel format, so you're limited to 255 >characters in any one cell. Joy. > >My company has hit this limit and I'm in the middle of rewriting the >package. As a temporary stopgap measure, we're exporting the data to the >XML format used by the Perl/CPAN FromXML package that then converts it to >Excel. > > PEAR package does look good, im going to try it out. Thanks for all your replies! >These new PHP packages we made should eventually be released, but don't >expect that in the immediate future. > >--Dan > > > From greg.rundlett at gmail.com Mon Jun 26 22:43:32 2006 From: greg.rundlett at gmail.com (Greg Rundlett) Date: Mon, 26 Jun 2006 22:43:32 -0400 Subject: [nycphp-talk] php for mailing list app? In-Reply-To: References: <44A01214.4060805@optonline.net> <44A017D7.6080104@optonline.net> Message-ID: <5e2aaca40606261943u2f9ee37erfa6e957be0b6d4a4@mail.gmail.com> http://tincan.co.uk/phplist From arzala at gmail.com Tue Jun 27 00:51:30 2006 From: arzala at gmail.com (Anirudh Zala) Date: Tue, 27 Jun 2006 10:21:30 +0530 Subject: [nycphp-talk] PHP and MS Excel In-Reply-To: <44A07CDD.2060200@neuropunks.org> References: <0.03905200.1151341529@neuropunks.org> <20060626183013.GA1512@panix.com> <44A07CDD.2060200@neuropunks.org> Message-ID: For writing excel files there are good packages, but for reading, I assume, there is not any good package. There is 1 package that can be found here http://sourceforge.net/projects/phpexcelreader but it doesn't work properly many times. Hence we had to do work around by 1st converting Excel files into CSV format. To convert excel files into CSV there are many packages available but I specially like this software http://www.45.free.net/~vitus/software/catdoc/ because it is multipurpose and can be used to extract plain text from ms-excel, doc and power points files as well. This is actually a software that needs to be installed on your web server and to use it you need to run relative commands (which can easily be done using php). Worth to have look at it. Thanks Anirudh Zala On Tue, 27 Jun 2006 06:03:33 +0530, Max Gribov wrote: > Daniel Convissor wrote: > >> Hey Max: >> >> Yeah, the PEAR Spreadsheet_Excel_Writer package works, for the most >> part. >> But it exports version 5 of the Excel format, so you're limited to 255 >> characters in any one cell. Joy. >> >> My company has hit this limit and I'm in the middle of rewriting the >> package. As a temporary stopgap measure, we're exporting the data to >> the >> XML format used by the Perl/CPAN FromXML package that then converts it >> to >> Excel. >> >> > PEAR package does look good, im going to try it out. > > Thanks for all your replies! > > > >> These new PHP packages we made should eventually be released, but don't >> expect that in the immediate future. >> >> --Dan >> >> >> > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -- ----------------------------------------------- Anirudh Zala (Project Manager) ASPL, http://www.aspl.in Ph: +91 281 245 1894 arzala at gmail.com ----------------------------------------------- From arzala at gmail.com Tue Jun 27 04:24:35 2006 From: arzala at gmail.com (Anirudh Zala) Date: Tue, 27 Jun 2006 13:54:35 +0530 Subject: [nycphp-talk] php for mailing list app? In-Reply-To: References: <44A01214.4060805@optonline.net> <44A017D7.6080104@optonline.net> Message-ID: Hi Robyn, It seems that basically there is not such package that can satisfy all your needs. So either you may combine different different packages/software that can serve your purpose or design your own custom application. Your custom application's logic can be divided into 4 steps (scripts) 1: mailScheduler.php 2: sendMail.php 3: checkBounceMail.php 4: mailLog.php 1st and 4th script are intended to run from browser, while 2nd and 3rd are from CLI. Logic can be as mentioned below: +> "mailScheduler.php" will determine how many mails are to be sent, to whom, what content will be etc. It can be, in fact, your regular script that can generate above information. Instead of sending those mails directly (which is your 1st problem domain), store them in database as it is. (i.e in various fields like mail_to, mail_from, mail_content, mail_status, date_send etc.) In short mailScheduler.php will insert mail related information into database with mail_status=Q (Q means queue). +> As soon as insertion of data is finished, you can call script "sendMail.php" to run from CLI from above script using many methods like using functions, using Backtick operator etc. (about how to run PHP script in background from command line by executing that command from script running in browser). Read reply of "drydell at optonline.net". This script will simply read those inserted content from database, maybe do some other foo stuffs, and will start sending mail and then it will set value of field mail_status=S (S means sent). If you have 10 000 mails to be sent then it wont take more than 15 minutes to finish execution in normal case. +> As soon as execution of above script is finished, either you can call 3rd script "checkBounceMail.php" immediately from above running CLI script to check whether any mails are bounced or not by checking mails from that account or schedule that script in Cron to check bounced mail at every hour and parsing content of bounced mail and marking status of field mail_status=B (B means bounced) +> 4th script is special script which will manually read content from database, at any stage during execution of any 1st, 2nd or 3rd script, and will list status of all mails whether Q or S or B according to value of filed mail_status (and other information if required). Since this is manual script it will need to be clicked in browser in order to display desired results. Alternatively if you want automatic results then you can make this script to be run from CLI and set it's execution time in Cron and it will then notify results via email etc. By this way, I think within an hour everything will be scanned and report can be generated. There are also many other issues to be handled while sending mass mails like setting bounced mail address, how to read bounced mails etc. but since you have not asked, no need to reply at this moment. Thanks Anirudh Zala On Mon, 26 Jun 2006 23:15:50 +0530, robyn overstreet wrote: > On 6/26/06, Donald J Organ IV wrote: >> Well create a cron job that runs every x amount of minutes that looks >> for messages that have say the Send field set to 1 in the database. > > Great! That makes sense. > > Still wondering how to let the user know the status of the process > from the browser. Obviously, the browser PHP could check the database > repeatedly to see if the send field is set to 0, but that might create > a long wait also. Additionally, is it reasonable to query the database > in a cron job every minute? Every 5 minutes? The client will probably > only use the app weekly or monthly, but of course it needs to be ready > at any time. > > TIA > Robyn > >> robyn overstreet wrote: >> > On 6/26/06, Donald J Organ IV wrote: >> > >> >> I believe that if you run the script that sends the emails from the >> >> command line using say cron that the PHP has no max execution time. >> >> This may help. >> >> >> > >> > Thank you. That's helpful. It makes sense that if I run the script >> > behind the scenes, not only will it not time out, but the user won't >> > be affected by the 'long' time it takes to send mail. Since I'm >> > writing a web application, though, I don't think cron will help -- I >> > need to run the script (not in the browser) when the user hits "send >> > to subscribers". Any suggestions on how to do this? >> > >> > Thanks >> > Robyn >> > >> > >> > >> >> robyn overstreet wrote: >> >> >> >>> Hi all- >> >>> I'm working on a mailing list (announcement only) for a client and >> I'm >> >>> trying to decide if using PHP is the way to go. I'm more comfortable >> >>> with PHP than with Perl, but it seems that Perl has better email >> >>> handling modules available. >> >>> >> >>> When I've worked with PHP mail() before, my experience was that >> even a >> >>> relatively small list of about 50 addresses took a while to loop >> >>> through and send. I'm concerned that the server will time out for a >> >>> larger list. I'm wondering if I need to make a socket connection. >> >>> >> >>> Can anyone point me in a good direction to research? >> >>> >> >>> Thanks in advance- >> >>> Robyn >> >>> _______________________________________________ >> >>> New York PHP Community Talk Mailing List >> >>> http://lists.nyphp.org/mailman/listinfo/talk >> >>> New York PHP Conference and Expo 2006 >> >>> http://www.nyphpcon.com >> >>> Show Your Participation in New York PHP >> >>> http://www.nyphp.org/show_participation.php >> >>> >> >>> >> >>> >> >>> >> >> _______________________________________________ >> >> New York PHP Community Talk Mailing List >> >> http://lists.nyphp.org/mailman/listinfo/talk >> >> New York PHP Conference and Expo 2006 >> >> http://www.nyphpcon.com >> >> Show Your Participation in New York PHP >> >> http://www.nyphp.org/show_participation.php >> >> >> >> >> > _______________________________________________ >> > New York PHP Community Talk Mailing List >> > http://lists.nyphp.org/mailman/listinfo/talk >> > New York PHP Conference and Expo 2006 >> > http://www.nyphpcon.com >> > Show Your Participation in New York PHP >> > http://www.nyphp.org/show_participation.php >> > >> > >> > >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> New York PHP Conference and Expo 2006 >> http://www.nyphpcon.com >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php -- ----------------------------------------------- Anirudh Zala (Project Manager) ASPL, http://www.aspl.in Ph: +91 281 245 1894 arzala at gmail.com ----------------------------------------------- From edwardpotter at gmail.com Tue Jun 27 15:16:51 2006 From: edwardpotter at gmail.com (edward potter) Date: Tue, 27 Jun 2006 15:16:51 -0400 Subject: [nycphp-talk] Trying to use Paypal 100% as merchant account Message-ID: ok, i know it's not a real merchant account, but as a quick project, I just want to have Paypal go DIRECTLY fo a CC screen. I'm set up as a merchant account, yet I always get lead into Paypal trying to sign me up for a new Paypal account, or having me pay using my Paypal account. I'm using the oscommerce Paypal module. Any Paypal tips appreciated... thanks, ed From andrew at plexpod.com Tue Jun 27 15:26:10 2006 From: andrew at plexpod.com (Andrew Yochum) Date: Tue, 27 Jun 2006 15:26:10 -0400 Subject: [nycphp-talk] Trying to use Paypal 100% as merchant account In-Reply-To: References: Message-ID: <20060627192609.GL23141@desario.homelinux.net> On Tue, Jun 27, 2006 at 03:16:51PM -0400, edward potter wrote: > ok, i know it's not a real merchant account, but as a quick project, I > just want to have Paypal go DIRECTLY fo a CC screen. > > I'm set up as a merchant account, yet I always get lead into Paypal > trying to sign me up for a new Paypal account, or having me pay using > my Paypal account. > > I'm using the oscommerce Paypal module. Any Paypal tips > appreciated... thanks, ed Sounds like you want to use PayPal Website Payments Pro: https://www.paypal.com/cgi-bin/webscr?cmd=_wp-pro-overview-outside You can setup a developers account for free in the PayPal sandbox: https://developer.paypal.com/ ... where every transaction is fake. To use this with osC is likely a different module than the regular PayPal module. HTH, Andrew -- Andrew Yochum Plexpod andrew at plexpod.com 718-360-0879 From rolan at omnistep.com Tue Jun 27 15:28:32 2006 From: rolan at omnistep.com (Rolan Yang) Date: Tue, 27 Jun 2006 15:28:32 -0400 Subject: [nycphp-talk] Trying to use Paypal 100% as merchant account In-Reply-To: References: Message-ID: <44A186E0.80809@omnistep.com> I believe it is a requirement to be prompted for the option of paying via paypal. You could sign up for paypal "Website Payments Pro." which would allow you to present a credit card form directly on your oscommerce checkout page. Paypal would process the transaction "transparently" in the background. When I was messing around with that a few months back, there were 2 plugin modules that supported WPP. Paypal does charge a monthly fee for the service and in their written terms of agreement, you are supposed to present a "pay with paypal" button on the checkout page as an alternate option. ~Rolan edward potter wrote: > ok, i know it's not a real merchant account, but as a quick project, I > just want to have Paypal go DIRECTLY fo a CC screen. > > I'm set up as a merchant account, yet I always get lead into Paypal > trying to sign me up for a new Paypal account, or having me pay using > my Paypal account. > > I'm using the oscommerce Paypal module. Any Paypal tips > appreciated... thanks, ed > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From mlynch1 at gmail.com Wed Jun 28 11:16:55 2006 From: mlynch1 at gmail.com (Mike Lynch) Date: Wed, 28 Jun 2006 16:16:55 +0100 Subject: [nycphp-talk] Accessing Oracle Database with PHP - best practices Message-ID: <9db292e90606280816i4f6137c6p2c584e50a986ec7d@mail.gmail.com> Hi All Looking for some general advice here... We have an Oracle 9i database on HPUX. We access it in three ways - legacy front end interface (internal users) - PHP on the HPUX server using OCI calls (internal users) - through a public web server (LAMP) using XML RPC (public) We are getting rid of the legacy front end and rewriting the screens in PHP. Our plan is to use the webserver and move away from servicing web requests on the DB server. Questions: 1. We've only used XML-RPC on a small scale and are not sure whether to continue with this approach. Having said that, it's simple and it works. But what about SOAP ? We have no experience of it but "feel" we should be using it. 2. XML-RPC has proved fine for just calling stored procedures on the DB server but should we be using something like ADODB which would potentially make coding/designing a lot easier if we want to go the whole data abstraction route. This however uses OCI calls to the database. The webserver will be in the public domain. Is it safe to connect to the production DB using OCI calls ? Any advice would be appreciated Thanks Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam at trachtenberg.com Wed Jun 28 13:40:24 2006 From: adam at trachtenberg.com (Adam Maccabee Trachtenberg) Date: Wed, 28 Jun 2006 13:40:24 -0400 (EDT) Subject: [nycphp-talk] Trying to use Paypal 100% as merchant account In-Reply-To: References: Message-ID: On Tue, 27 Jun 2006, edward potter wrote: > ok, i know it's not a real merchant account, but as a quick project, I > just want to have Paypal go DIRECTLY fo a CC screen. > > I'm set up as a merchant account, yet I always get lead into Paypal > trying to sign me up for a new Paypal account, or having me pay using > my Paypal account. You can't do this. Even if you adopt the more advanced APIs (see other messages in the thread), you must legally also offer payments via PayPal. In general, this is a good idea, as sites that offer both have higher completion rates than one that just offer credit card payments. (PayPal has done tests of what happens when existing sites with just credit cards processing add in a PayPal option.) If you're looking for a credit card only option, you need to get merchant account. (AFAIK.) One such option is Verisign's payment processing unit, which, oddly enough, is now part of PayPal. :) http://www.verisign.com/products-services/payment-processing/index.html -adam -- adam at trachtenberg.com | http://www.trachtenberg.com author of o'reilly's "upgrading to php 5" and "php cookbook" avoid the holiday rush, buy your copies today! From enunez at tiaa-cref.org Wed Jun 28 17:52:58 2006 From: enunez at tiaa-cref.org (Nunez, Eddy) Date: Wed, 28 Jun 2006 17:52:58 -0400 Subject: [nycphp-talk] Accessing Oracle Database with PHP - best practices Message-ID: <15781715614BCB43AB7083C37880D19C01CB746F@NYCPDMSXMB06.ad.tiaa-cref.org> Hey there, I have a question/concern ... the XML-RPC "server" is written in PHP I assume, if so you'll still be making OCI calls anyway. As far as security is concerned, it starts with you. Always carefully evaluate/filter your query variables/strings for valid data before sending it to the database. That applies to your webpages and the XML-RPC. Regards, -Eddy ________________________________ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mike Lynch Sent: Wednesday, June 28, 2006 11:17 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] Accessing Oracle Database with PHP - best practices Hi All Looking for some general advice here... We have an Oracle 9i database on HPUX. We access it in three ways - legacy front end interface (internal users) - PHP on the HPUX server using OCI calls (internal users) - through a public web server (LAMP) using XML RPC (public) We are getting rid of the legacy front end and rewriting the screens in PHP. Our plan is to use the webserver and move away from servicing web requests on the DB server. Questions: 1. We've only used XML-RPC on a small scale and are not sure whether to continue with this approach. Having said that, it's simple and it works. But what about SOAP ? We have no experience of it but "feel" we should be using it. 2. XML-RPC has proved fine for just calling stored procedures on the DB server but should we be using something like ADODB which would potentially make coding/designing a lot easier if we want to go the whole data abstraction route. This however uses OCI calls to the database. The webserver will be in the public domain. Is it safe to connect to the production DB using OCI calls ? Any advice would be appreciated Thanks Mike ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From enunez at tiaa-cref.org Wed Jun 28 18:03:37 2006 From: enunez at tiaa-cref.org (Nunez, Eddy) Date: Wed, 28 Jun 2006 18:03:37 -0400 Subject: [nycphp-talk] FW: Accessing Oracle Database with PHP - best practices Message-ID: <15781715614BCB43AB7083C37880D19C01CB7470@NYCPDMSXMB06.ad.tiaa-cref.org> Man! I just re-read my email ... My brain must have farted on that first statement, sorry. I'm not even sure what I was trying to say... If you want to take advantage of data abstraction, take a look at PDO. Ilia gave a good presentation at the conference going over it's merits ... e.g. "it's completely written in C, so you know it's pretty fast!" -Eddy ________________________________ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Nunez, Eddy Sent: Wednesday, June 28, 2006 5:53 PM To: NYPHP Talk Subject: Re: [nycphp-talk] Accessing Oracle Database with PHP - best practices Hey there, I have a question/concern ... the XML-RPC "server" is written in PHP I assume, if so you'll still be making OCI calls anyway. As far as security is concerned, it starts with you. Always carefully evaluate/filter your query variables/strings for valid data before sending it to the database. That applies to your webpages and the XML-RPC. Regards, -Eddy ________________________________ From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org] On Behalf Of Mike Lynch Sent: Wednesday, June 28, 2006 11:17 AM To: talk at lists.nyphp.org Subject: [nycphp-talk] Accessing Oracle Database with PHP - best practices Hi All Looking for some general advice here... We have an Oracle 9i database on HPUX. We access it in three ways - legacy front end interface (internal users) - PHP on the HPUX server using OCI calls (internal users) - through a public web server (LAMP) using XML RPC (public) We are getting rid of the legacy front end and rewriting the screens in PHP. Our plan is to use the webserver and move away from servicing web requests on the DB server. Questions: 1. We've only used XML-RPC on a small scale and are not sure whether to continue with this approach. Having said that, it's simple and it works. But what about SOAP ? We have no experience of it but "feel" we should be using it. 2. XML-RPC has proved fine for just calling stored procedures on the DB server but should we be using something like ADODB which would potentially make coding/designing a lot easier if we want to go the whole data abstraction route. This however uses OCI calls to the database. The webserver will be in the public domain. Is it safe to connect to the production DB using OCI calls ? Any advice would be appreciated Thanks Mike ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** ************************************************************** This message, including any attachments, contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, please contact sender immediately by reply e-mail and destroy all copies. You are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. TIAA-CREF ************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ATT6695147.txt URL: From lists at zaunere.com Wed Jun 28 20:26:34 2006 From: lists at zaunere.com (Hans Zaunere) Date: Wed, 28 Jun 2006 20:26:34 -0400 Subject: [nycphp-talk] Accessing Oracle Database with PHP - best practices In-Reply-To: <9db292e90606280816i4f6137c6p2c584e50a986ec7d@mail.gmail.com> Message-ID: <005a01c69b12$adc2f6f0$640aa8c0@mobilez> Hi Mike, Mike Lynch wrote on Wednesday, June 28, 2006 11:17 AM: > Hi All > > Looking for some general advice here... > > We have an Oracle 9i database on HPUX. > We access it in three ways > - legacy front end interface (internal users) > - PHP on the HPUX server using OCI calls (internal users) > - through a public web server (LAMP) using XML RPC (public) > > We are getting rid of the legacy front end and rewriting the screens > in PHP. Our plan is to use the webserver and move away from servicing > web requests on the DB server. > > Questions: > 1. We've only used XML-RPC on a small scale and are not sure whether > to continue with this approach. Having said that, it's simple and it > works. But what about SOAP ? We have no experience of it but "feel" > we should be using it. Simple and it works? Stick with it... SOAP is quite complex, and while it may feel right now, once you start using it, that feeling may quickly change. And since this is internal, the added complexity of publishing services, will likely get in the way. Plus, you're team is likely comfortable with XML-RPC already, so at this stage, it probably doesn't make sense to bring in another new learning curve. > 2. XML-RPC has proved fine for just calling stored procedures on the > DB server but should we be using something like ADODB which would > potentially make coding/designing a lot easier if we want to go the > whole data abstraction route. This however uses OCI calls to the Since it appears as though you are working with a single database technology - Oracle - why abstract? Sure, people will say "well, there's a chance we're going to change the database at some point." Ok, but database changes aren't trivial - you don't hot-swap a database out for another technology - and using an "abstracted" database access method will be the least of the migration. > database. The webserver will be in the public domain. Is it safe to > connect to the production DB using OCI calls ? As Eddy pointed out, security is a very large picture. But done right, sure, it could be safe. OCI is one of the most mature and heavily tested database connection methods out there, and again, you have the expertise already (which is usually the toughest part of OCI), so you're more likely to do it right, than with a new technology. --- Hans Zaunere / President / New York PHP www.nyphp.org / www.nyphp.com From php.mail.list at clickfacts.com Wed Jun 28 22:46:31 2006 From: php.mail.list at clickfacts.com (Mikhail Ledvich) Date: Wed, 28 Jun 2006 22:46:31 -0400 Subject: [nycphp-talk] apache2/php5 and include ( ) paths Message-ID: <44A33F07.7040304@clickfacts.com> Hi all, Perhaps someone can help me out with a weird error I am experiencing. I've installed Apache2, PHP5, MySQL5 on a WindowsXP machine and everything works like a charm. Except when I try to use php.exe from command line. If I execute a php file from command prompt using the php.exe, if the include/require paths are not entirely hardcoded (c:\AppServ\www ...) but are dynamically set (../../config.php): it throws errors. Warning: include_once(../../config.php): failed to open stream: No such file or directory in c:\AppServ\www\fill_combination.php on line 10 However, if I put the same into the browser, it works, but from local command line I get path errors. Any ideas? I am at the end of my wits. Thanks, mikhail From jonbaer at jonbaer.com Thu Jun 29 07:10:50 2006 From: jonbaer at jonbaer.com (Jon Baer) Date: Thu, 29 Jun 2006 07:10:50 -0400 Subject: [nycphp-talk] apache2/php5 and include ( ) paths In-Reply-To: <44A33F07.7040304@clickfacts.com> References: <44A33F07.7040304@clickfacts.com> Message-ID: What happens when you add the -C flag to the mix? From what I recall on windows you path is actually set where your interpreter is setup (ie c:/php5/php.exe) so your 'document root' in that case is really c:/php5. I could be wrong, trying running a print_r($_SERVER) from your CLI program to see what differences you get. Are you using PHP via Cygwin? - Jon On Jun 28, 2006, at 10:46 PM, Mikhail Ledvich wrote: > Hi all, > Perhaps someone can help me out with a weird error I am > experiencing. > I've installed Apache2, PHP5, MySQL5 on a WindowsXP machine and > everything works like a charm. Except when I try to use php.exe from > command line. If I execute a php file from command prompt using the > php.exe, if the include/require paths are not entirely hardcoded > (c:\AppServ\www ...) but are dynamically set (../../config.php): it > throws errors. > > Warning: include_once(../../config.php): failed to open stream: No > such > file or directory in c:\AppServ\www\fill_combination.php on line 10 > > However, if I put the same into the browser, it works, but from local > command line I get path errors. Any ideas? I am at the end of my wits. > > Thanks, > mikhail > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > From cliff at pinestream.com Thu Jun 29 07:18:11 2006 From: cliff at pinestream.com (Cliff Hirsch) Date: Thu, 29 Jun 2006 07:18:11 -0400 Subject: [nycphp-talk] Filter Input, Escape Output Stinks Message-ID: <003001c69b6d$b5191be0$0ba8a8c0@cliff> Are we allowed to rant on here? So I have been trying very hard to heed some management advice: "Sometime it's best not to look under the hood." Of course I should know better as last time I tried that strategy, I threw a crank rod -- literally. But look I did... That's interesting an echo value in a text input field. Ok, no big deal; it's not a echo post or get. Trace backwards...surprise, surprise...the assignment was made earlier with no filtering or escaping. As it was in the other 6,000 lines of code! Oh the joys of sub-contracting. It is going to be an unpleasant July 4th weekend. As I said, Filter Input, Escape Output Stinks. Hey, at least it may be raining anyway... Cliff -------------- next part -------------- An HTML attachment was scrubbed... URL: From robynover at gmail.com Thu Jun 29 09:36:39 2006 From: robynover at gmail.com (robyn overstreet) Date: Thu, 29 Jun 2006 09:36:39 -0400 Subject: [nycphp-talk] php for mailing list app? In-Reply-To: References: <44A01214.4060805@optonline.net> <44A017D7.6080104@optonline.net> Message-ID: Thanks for all the responses! Very helpful. Robyn On 6/27/06, Anirudh Zala wrote: > Hi Robyn, > > It seems that basically there is not such package that can satisfy all > your needs. So either you may combine different different > packages/software that can serve your purpose or design your own custom > application. > > Your custom application's logic can be divided into 4 steps (scripts) > > 1: mailScheduler.php > 2: sendMail.php > 3: checkBounceMail.php > 4: mailLog.php > > 1st and 4th script are intended to run from browser, while 2nd and 3rd are > from CLI. Logic can be as mentioned below: > > +> "mailScheduler.php" will determine how many mails are to be sent, to > whom, what content will be etc. It can be, in fact, your regular script > that can generate above information. Instead of sending those mails > directly (which is your 1st problem domain), store them in database as it > is. (i.e in various fields like mail_to, mail_from, mail_content, > mail_status, date_send etc.) In short mailScheduler.php will insert mail > related information into database with mail_status=Q (Q means queue). > > +> As soon as insertion of data is finished, you can call script > "sendMail.php" to run from CLI from above script using many methods like > using functions, using Backtick operator etc. (about how to run PHP script > in background from command line by executing that command from script > running in browser). Read reply of "drydell at optonline.net". This script > will simply read those inserted content from database, maybe do some other > foo stuffs, and will start sending mail and then it will set value of > field mail_status=S (S means sent). If you have 10 000 mails to be sent > then it wont take more than 15 minutes to finish execution in normal case. > > +> As soon as execution of above script is finished, either you can call > 3rd script "checkBounceMail.php" immediately from above running CLI script > to check whether any mails are bounced or not by checking mails from that > account or schedule that script in Cron to check bounced mail at every > hour and parsing content of bounced mail and marking status of field > mail_status=B (B means bounced) > > +> 4th script is special script which will manually read content from > database, at any stage during execution of any 1st, 2nd or 3rd script, and > will list status of all mails whether Q or S or B according to value of > filed mail_status (and other information if required). Since this is > manual script it will need to be clicked in browser in order to display > desired results. Alternatively if you want automatic results then you can > make this script to be run from CLI and set it's execution time in Cron > and it will then notify results via email etc. > > By this way, I think within an hour everything will be scanned and report > can be generated. There are also many other issues to be handled while > sending mass mails like setting bounced mail address, how to read bounced > mails etc. but since you have not asked, no need to reply at this moment. > > Thanks > > Anirudh Zala > > On Mon, 26 Jun 2006 23:15:50 +0530, robyn overstreet > wrote: > > > On 6/26/06, Donald J Organ IV wrote: > >> Well create a cron job that runs every x amount of minutes that looks > >> for messages that have say the Send field set to 1 in the database. > > > > Great! That makes sense. > > > > Still wondering how to let the user know the status of the process > > from the browser. Obviously, the browser PHP could check the database > > repeatedly to see if the send field is set to 0, but that might create > > a long wait also. Additionally, is it reasonable to query the database > > in a cron job every minute? Every 5 minutes? The client will probably > > only use the app weekly or monthly, but of course it needs to be ready > > at any time. > > > > TIA > > Robyn > > > >> robyn overstreet wrote: > >> > On 6/26/06, Donald J Organ IV wrote: > >> > > >> >> I believe that if you run the script that sends the emails from the > >> >> command line using say cron that the PHP has no max execution time. > >> >> This may help. > >> >> > >> > > >> > Thank you. That's helpful. It makes sense that if I run the script > >> > behind the scenes, not only will it not time out, but the user won't > >> > be affected by the 'long' time it takes to send mail. Since I'm > >> > writing a web application, though, I don't think cron will help -- I > >> > need to run the script (not in the browser) when the user hits "send > >> > to subscribers". Any suggestions on how to do this? > >> > > >> > Thanks > >> > Robyn > >> > > >> > > >> > > >> >> robyn overstreet wrote: > >> >> > >> >>> Hi all- > >> >>> I'm working on a mailing list (announcement only) for a client and > >> I'm > >> >>> trying to decide if using PHP is the way to go. I'm more comfortable > >> >>> with PHP than with Perl, but it seems that Perl has better email > >> >>> handling modules available. > >> >>> > >> >>> When I've worked with PHP mail() before, my experience was that > >> even a > >> >>> relatively small list of about 50 addresses took a while to loop > >> >>> through and send. I'm concerned that the server will time out for a > >> >>> larger list. I'm wondering if I need to make a socket connection. > >> >>> > >> >>> Can anyone point me in a good direction to research? > >> >>> > >> >>> Thanks in advance- > >> >>> Robyn > >> >>> _______________________________________________ > >> >>> New York PHP Community Talk Mailing List > >> >>> http://lists.nyphp.org/mailman/listinfo/talk > >> >>> New York PHP Conference and Expo 2006 > >> >>> http://www.nyphpcon.com > >> >>> Show Your Participation in New York PHP > >> >>> http://www.nyphp.org/show_participation.php > >> >>> > >> >>> > >> >>> > >> >>> > >> >> _______________________________________________ > >> >> New York PHP Community Talk Mailing List > >> >> http://lists.nyphp.org/mailman/listinfo/talk > >> >> New York PHP Conference and Expo 2006 > >> >> http://www.nyphpcon.com > >> >> Show Your Participation in New York PHP > >> >> http://www.nyphp.org/show_participation.php > >> >> > >> >> > >> > _______________________________________________ > >> > New York PHP Community Talk Mailing List > >> > http://lists.nyphp.org/mailman/listinfo/talk > >> > New York PHP Conference and Expo 2006 > >> > http://www.nyphpcon.com > >> > Show Your Participation in New York PHP > >> > http://www.nyphp.org/show_participation.php > >> > > >> > > >> > > >> > >> _______________________________________________ > >> New York PHP Community Talk Mailing List > >> http://lists.nyphp.org/mailman/listinfo/talk > >> New York PHP Conference and Expo 2006 > >> http://www.nyphpcon.com > >> Show Your Participation in New York PHP > >> http://www.nyphp.org/show_participation.php > >> > > _______________________________________________ > > New York PHP Community Talk Mailing List > > http://lists.nyphp.org/mailman/listinfo/talk > > New York PHP Conference and Expo 2006 > > http://www.nyphpcon.com > > Show Your Participation in New York PHP > > http://www.nyphp.org/show_participation.php > > > > -- > ----------------------------------------------- > Anirudh Zala (Project Manager) > ASPL, http://www.aspl.in > Ph: +91 281 245 1894 > arzala at gmail.com > ----------------------------------------------- > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > From php.mail.list at clickfacts.com Thu Jun 29 14:15:56 2006 From: php.mail.list at clickfacts.com (Mikhail Ledvich) Date: Thu, 29 Jun 2006 14:15:56 -0400 Subject: [nycphp-talk] apache2/php5 and include ( ) paths In-Reply-To: References: Message-ID: <44A418DC.7090100@clickfacts.com> Jon, You're completely right. When running print_r($_SERVER) from the localhost browser I get $_SERVER["DOCUMENT_ROOT"] = C:/AppServ/www however, when running it from command line it's empty. Perhaps excuse the naive question, but how do I set C:/AppServ/www as the Document root for when I run files from the command line? Thank you again, Mikhail ------------------------------ > Message: 3 > Date: Thu, 29 Jun 2006 07:10:50 -0400 > From: Jon Baer > Subject: Re: [nycphp-talk] apache2/php5 and include ( ) paths > To: NYPHP Talk > Message-ID: > Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed > > What happens when you add the -C flag to the mix? From what I recall > on windows you path is actually set where your interpreter is setup > (ie c:/php5/php.exe) so your 'document root' in that case is really > c:/php5. I could be wrong, trying running a print_r($_SERVER) from > your CLI program to see what differences you get. > > Are you using PHP via Cygwin? > > - Jon > > On Jun 28, 2006, at 10:46 PM, Mikhail Ledvich wrote: > > >> Hi all, >> Perhaps someone can help me out with a weird error I am >> experiencing. >> I've installed Apache2, PHP5, MySQL5 on a WindowsXP machine and >> everything works like a charm. Except when I try to use php.exe from >> command line. If I execute a php file from command prompt using the >> php.exe, if the include/require paths are not entirely hardcoded >> (c:\AppServ\www ...) but are dynamically set (../../config.php): it >> throws errors. >> >> Warning: include_once(../../config.php): failed to open stream: No >> such >> file or directory in c:\AppServ\www\fill_combination.php on line 10 >> >> However, if I put the same into the browser, it works, but from local >> command line I get path errors. Any ideas? I am at the end of my wits. >> >> Thanks, >> mikhail >> >> >> _______________________________________________ >> New York PHP Community Talk Mailing List >> http://lists.nyphp.org/mailman/listinfo/talk >> New York PHP Conference and Expo 2006 >> http://www.nyphpcon.com >> Show Your Participation in New York PHP >> http://www.nyphp.org/show_participation.php >> >> From dcech at phpwerx.net Thu Jun 29 14:36:21 2006 From: dcech at phpwerx.net (Dan Cech) Date: Thu, 29 Jun 2006 14:36:21 -0400 Subject: [nycphp-talk] apache2/php5 and include ( ) paths In-Reply-To: <44A418DC.7090100@clickfacts.com> References: <44A418DC.7090100@clickfacts.com> Message-ID: <44A41DA5.2070804@phpwerx.net> Mikhail Ledvich wrote: > Jon, > You're completely right. When running print_r($_SERVER) from the > localhost browser I get > $_SERVER["DOCUMENT_ROOT"] = C:/AppServ/www > however, when running it from command line it's empty. > > Perhaps excuse the naive question, but how do I set C:/AppServ/www as > the Document root for when I run files from the command line? If you need to be able to access include files, you have 2 options: 1. set the include paths dynamically 2. change to the directory of the script in both cases, you'll find the construct: basename(__FILE__); very handy, eg: directory of your script: basename(__FILE__); parent directory: basename(basename(__FILE__)); parent of that directory: basename(basename(basename(__FILE__))); etc... then you can either do something along the lines of: ini_set('include_path',basename(__FILE__)); or: chdir(basename(__FILE__)); at the top of the script you are executing from the command line. Dan > Thank you again, > Mikhail > > > ------------------------------ >> Message: 3 >> Date: Thu, 29 Jun 2006 07:10:50 -0400 >> From: Jon Baer >> Subject: Re: [nycphp-talk] apache2/php5 and include ( ) paths >> To: NYPHP Talk >> Message-ID: >> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed >> >> What happens when you add the -C flag to the mix? From what I recall >> on windows you path is actually set where your interpreter is setup >> (ie c:/php5/php.exe) so your 'document root' in that case is really >> c:/php5. I could be wrong, trying running a print_r($_SERVER) from >> your CLI program to see what differences you get. >> >> Are you using PHP via Cygwin? >> >> - Jon >> >> On Jun 28, 2006, at 10:46 PM, Mikhail Ledvich wrote: >> >> >>> Hi all, >>> Perhaps someone can help me out with a weird error I am >>> experiencing. >>> I've installed Apache2, PHP5, MySQL5 on a WindowsXP machine and >>> everything works like a charm. Except when I try to use php.exe from >>> command line. If I execute a php file from command prompt using the >>> php.exe, if the include/require paths are not entirely hardcoded >>> (c:\AppServ\www ...) but are dynamically set (../../config.php): it >>> throws errors. >>> >>> Warning: include_once(../../config.php): failed to open stream: No >>> such >>> file or directory in c:\AppServ\www\fill_combination.php on line 10 >>> >>> However, if I put the same into the browser, it works, but from local >>> command line I get path errors. Any ideas? I am at the end of my wits. >>> >>> Thanks, >>> mikhail From karl_niarb at yahoo.com Fri Jun 30 07:36:52 2006 From: karl_niarb at yahoo.com (Karl Brian Dano) Date: Fri, 30 Jun 2006 04:36:52 -0700 (PDT) Subject: [nycphp-talk] Need help with Updating data in MySQL Message-ID: <20060630113652.13554.qmail@web30509.mail.mud.yahoo.com> Hello Everyone, I need help with updating an existing data in MySQL through PHP. I want to add a certain amount to an already existing data in a field. For example, in a field called "numbers", in that record, there's already a value of "500". I want to know how I can add "50" to that record so that it becomes "550". Help will be greatly appreciated. --------------------------------- Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better. -------------- next part -------------- An HTML attachment was scrubbed... URL: From subson at gmail.com Fri Jun 30 07:51:44 2006 From: subson at gmail.com (Subson Mittal) Date: Fri, 30 Jun 2006 17:21:44 +0530 Subject: [nycphp-talk] Need help with Updating data in MySQL In-Reply-To: <20060630113652.13554.qmail@web30509.mail.mud.yahoo.com> References: <20060630113652.13554.qmail@web30509.mail.mud.yahoo.com> Message-ID: Hello Karl, you can write the query in mysql update table set number = number+50 where Thanks Subson On 6/30/06, Karl Brian Dano wrote: > > Hello Everyone, > > I need help with updating an existing data in MySQL through PHP. I want to > add a certain amount to an already existing data in a field. For example, in > a field called "numbers", in that record, there's already a value of "500". > I want to know how I can add "50" to that record so that it becomes "550". > > Help will be greatly appreciated. > > ------------------------------ > Sneak preview the all-new Yahoo.com. > It's not radically different. Just radically better. > > > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > > > -- Thanks Subson Mittal -------------- next part -------------- An HTML attachment was scrubbed... URL: From agfische at email.smith.edu Fri Jun 30 15:14:40 2006 From: agfische at email.smith.edu (Aaron Fischer) Date: Fri, 30 Jun 2006 15:14:40 -0400 Subject: [nycphp-talk] FPDF/FPDI template size too small Message-ID: <44A57820.7020408@email.smith.edu> Greetings, I am working with the FPDF and FPDI classes and have run into an issue. When I import a pdf to use as a template it comes in smaller than it's original size. I have specified the size of the template to be full page and set the margins for the pdf page to zero but the issue remains. Code excerpt: $pdf->SetMargins(0,0,0); $pdf->addPage(); $pdf->useTemplate($tplidx,0,0,215.9,279.4); (Unit measurements 215.9 and 279.4 are in mm, equivalent to specifying 8.5 x 11 inches.) Has anyone working with the FPDI class noticed an issue with the template size? Workarounds or suggestions? Thanks, -Aaron From dmintz at davidmintz.org Fri Jun 30 15:59:39 2006 From: dmintz at davidmintz.org (David Mintz) Date: Fri, 30 Jun 2006 15:59:39 -0400 (EDT) Subject: [nycphp-talk] FPDF/FPDI template size too small In-Reply-To: <44A57820.7020408@email.smith.edu> References: <44A57820.7020408@email.smith.edu> Message-ID: I am not sure what if anything you might be doing wrong, but a few months ago I gnawed on the demo/example that ships with the Fpdi class until I got it to open a PDF doc test_pdf.pdf and generate a new one using test_pdf.pdf as a template, with some text inserted in a specific position. (this is substantially the same snippet I put out here a few weeks ago in response to another question, sorry for the redundancy). If I remember correctly, the demo (before I hacked it up) explicitly resets the dimensions -- you don't want to do that. HTH. define('FPDF_FONTPATH','../font/'); require('./fpdi.php'); $pdf= new fpdi(); $pdf->setTextColor(255,0,0); $pdf->setSourceFile("./test_pdf.pdf"); $tplidx = $pdf->ImportPage(1); $pdf->addPage(); $pdf->useTemplate($tplidx); $pdf->SetXY(66,52); $pdf->SetFont('helvetica','B',10); $pdf->Cell(150,20,'new text written '.date('r')); $pdf->Ln(5); $pdf->SetX(66); $pdf->Cell(150,20,'more text written soon thereafter'); $pdf->Output('./output.pdf','F'); $pdf->closeParsers(); On Fri, 30 Jun 2006, Aaron Fischer wrote: > Greetings, > > I am working with the FPDF and FPDI classes and have run into an issue. > When I import a pdf to use as a template it comes in smaller than it's > original size. I have specified the size of the template to be full > page and set the margins for the pdf page to zero but the issue remains. > > Code excerpt: > > $pdf->SetMargins(0,0,0); > $pdf->addPage(); > $pdf->useTemplate($tplidx,0,0,215.9,279.4); > > (Unit measurements 215.9 and 279.4 are in mm, equivalent to specifying > 8.5 x 11 inches.) > > Has anyone working with the FPDI class noticed an issue with the > template size? Workarounds or suggestions? > > Thanks, > > -Aaron > _______________________________________________ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > New York PHP Conference and Expo 2006 > http://www.nyphpcon.com > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php > --- David Mintz http://davidmintz.org/ Amendment IV The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. From karl_niarb at yahoo.com Fri Jun 30 20:30:46 2006 From: karl_niarb at yahoo.com (Karl Brian Dano) Date: Fri, 30 Jun 2006 17:30:46 -0700 (PDT) Subject: [nycphp-talk] Need help with Updating data in MySQL In-Reply-To: Message-ID: <20060701003046.41839.qmail@web30510.mail.mud.yahoo.com> Oh, great! :D Thanks! :D So basically, you just put + after the SET? Alright, thanks again! :D Subson Mittal wrote: Hello Karl, you can write the query in mysql update table
set number = number+50 where Thanks Subson On 6/30/06, Karl Brian Dano wrote: Hello Everyone, I need help with updating an existing data in MySQL through PHP. I want to add a certain amount to an already existing data in a field. For example, in a field called "numbers", in that record, there's already a value of "500". I want to know how I can add "50" to that record so that it becomes "550". Help will be greatly appreciated. --------------------------------- Sneak preview the all-new Yahoo.com. It's not radically different. Just radically better. _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk New York PHP Conference and Expo 2006 http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php -- Thanks Subson Mittal _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk New York PHP Conference and Expo 2006 http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php --------------------------------- Do you Yahoo!? Get on board. You're invited to try the new Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sgavurin at kmrrec.org Fri Jun 30 20:31:28 2006 From: sgavurin at kmrrec.org (Slava Gavurin) Date: Fri, 30 Jun 2006 20:31:28 -0400 Subject: [nycphp-talk] Need help with Updating data in MySQL (out of the office ) Message-ID: I will be out of the office July 3-14 and will return on Monday, July 17th. Slava Gavurin