Re: [PHP] Re: Preferred Syntax

2011-12-17 Thread Eric Butera
On Sat, Dec 17, 2011 at 12:59 AM, Adam Richardson wrote: > On Fri, Dec 16, 2011 at 11:53 PM, Eric Butera wrote: >> >> To all the people who responded to this thread: >> It is 2011 - please stop writing code like this. >> >> To the OP: >> I'm glad you&

Re: [PHP] Re: Preferred Syntax

2011-12-16 Thread Eric Butera
On Thu, Dec 15, 2011 at 5:46 PM, Ross McKay wrote: > Jim Lucas wrote: > >>I second this example, with one minor change, I would add '{' and '}' around >>variables. >> >>echo <<>>   href="/mypage.php/{$page_id}">{$page_name} >>HTML; >> >>This works for $variables, $objects, and variable functions c

Re: [PHP] Sniping on the List

2011-11-15 Thread Eric Butera
On Mon, Nov 14, 2011 at 12:51 PM, George Langley wrote: >        Am concerned over the number of posts that appear to be from people > trying to over-inflate their self-importance. >        If you are the world's best coder, then help those of us who aren't. > If you happen to know a better way

Re: [PHP] Friday Distraction

2011-10-28 Thread Eric Butera
On Fri, Oct 28, 2011 at 7:24 PM, Nathan Nobbe wrote: > > > On Fri, Oct 28, 2011 at 5:23 PM, Eric Butera wrote: >> >> On Fri, Oct 28, 2011 at 7:07 PM, Daniel Brown wrote: >> > On Fri, Oct 28, 2011 at 18:36, Nathan Nobbe >> > wrote: >> >> Hi g

Re: [PHP] Friday Distraction

2011-10-28 Thread Eric Butera
On Fri, Oct 28, 2011 at 7:07 PM, Daniel Brown wrote: > On Fri, Oct 28, 2011 at 18:36, Nathan Nobbe wrote: >> Hi gang, >> >> Thinking database i/o would be the slowest part of a request in your new zf >> / amf app? >> >> Leave it to Zend_Amf to burn more cycles marshaling the protocol! >> >> http:

Re: [PHP] Why does this script run out of memory?

2011-10-28 Thread Eric Butera
On Fri, Oct 28, 2011 at 3:29 PM, Daniel Brown wrote: > On Fri, Oct 28, 2011 at 13:25, Jim Long wrote: >> >> Eric: >> >> Thanks for your reply. >> >> "process row here" is a comment.  It doesn't do anything.  The >> script, exactly as shown, runs out of memory, exactly as shown. > >    My response

Re: [PHP] Why does this script run out of memory?

2011-10-28 Thread Eric Butera
On Fri, Oct 28, 2011 at 12:38 PM, Jim Long wrote: > I'm running PHP 5.3.8 on FreeBSD 8.2 with MySQL 5.1.55. > > The script below is designed to be able to WHILE it's way through > a MySQL query result set, and process each row. > > However, it runs out of memory a little after a quarter million >

Re: [PHP] Friday Distraction

2011-10-28 Thread Eric Butera
On Fri, Oct 28, 2011 at 12:02 PM, Daniel Brown wrote: > On Fri, Oct 28, 2011 at 11:51, Eric Butera wrote: >> >> Mr Brown, >> >> You're not going to try and pawn this thread off as the Friday >> Distraction, are you? > >    No, I'm waiting for som

Re: [PHP] Friday Distraction

2011-10-28 Thread Eric Butera
On Fri, Oct 28, 2011 at 11:16 AM, Tedd Sperling wrote: > On Oct 28, 2011, at 9:43 AM, Stuart Dallas wrote >> On 28 Oct 2011, at 12:54, Daniel Brown wrote: >> On Fri, Oct 28, 2011 at 05:03, Adam Richardson wrote: Well, Daniel, I'll bet you never thought that your "Friday Distraction" wou

Re: [PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-14 Thread Eric Butera
On Wed, Sep 14, 2011 at 4:12 AM, Dotan Cohen wrote: > On Wed, Sep 14, 2011 at 06:05, chetan rane wrote: >> Hi, >> >> There are 2 peoblems with subselect >> >> 1. You cant use a limit on the nested select >> 2. Id the number of elements in the in clause exceeds the subselect buffer >> you will run

Re: [PHP] Querying a database for 50 users' information: 50 queries or a WHERE array?

2011-09-13 Thread Eric Butera
Oh no, he stole your internet points! On Tue, Sep 13, 2011 at 10:44 AM, Ashley Sheridan wrote: > > > yeer tai wrote: > >> >> >>select * from table where userID in(1,2,3,etc) >> >> >> >>> From: a...@ashleysheridan.co.uk >>> Date: Tue, 13 Sep 2011 15:29:26 +0100 >>> To: dotanco...@gmail.com; php-

Re: [PHP] Re: Stop PHP execution on client connection closed

2011-09-13 Thread Eric Butera
On Tue, Sep 13, 2011 at 4:01 AM, Marco Lanzotti wrote: > Il 13/09/2011 09:39, vikash.i...@gmail.com ha scritto: >> >> You can use ob_start() to start output buffering and ob_end_flush() to send >> some data in the middle of script  - that way  your php script will send >> some data to the client e

Re: [PHP] PHP cron job optimization

2011-09-12 Thread Eric Butera
On Mon, Sep 12, 2011 at 9:37 AM, Igor Escobar wrote: > Other good point is: always set a timeout connection when you're getting the > RSS data to avoid your thread get stuck unnecessary. Use cURL (is much more > faster then file_get_contents). > > Multithreading in PHP with cURL http://devzone.zen

Re: [PHP] PHP cron job optimization

2011-09-10 Thread Eric Butera
On Sat, Sep 10, 2011 at 1:47 PM, Sean Greenslade wrote: > On Sat, Sep 10, 2011 at 4:35 AM, muad shibani wrote: > >> I want to design an application that reads news from RSS sources. >> I have about 1000 RSS feed to collect from. >> >> I also will use Cron jobs every 15 minutes to collect the data.

Re: [PHP] Upgrade or Die?

2011-06-26 Thread Eric Butera
On Sat, Jun 25, 2011 at 12:13 AM, wrote: > The message for Netscape was very clear, the development community refused to > write for it they had started a precedence that could not be forgotten. > I say communities will not forget this act and remove the browser from their > systems rather than

Re: [PHP] Doctrine madness!

2011-06-17 Thread Eric Butera
On Fri, Jun 17, 2011 at 3:19 PM, Jim Lucas wrote: > On 6/16/2011 3:15 PM, Nathan Nobbe wrote: >> what it really amounts to is php is good at doing 1 thing and 1 thing only, >> generating web pages.  for anything else, including command line scripts >> that run for more than 30 seconds, choose an a

Re: [PHP] Performance gain when not using prepared statements?

2011-06-17 Thread Eric Butera
On Fri, Jun 17, 2011 at 4:55 AM, Vitalii Demianets wrote: > On Friday 17 June 2011 04:50:00 Daevid Vincent wrote: >> > I've seen too many people over the years try and rally against common >> > sense practices like using prepared statements for perhaps a marginal >> > gain of performance on one pa

Re: [PHP] Doctrine madness!

2011-06-16 Thread Eric Butera
On Thu, Jun 16, 2011 at 9:50 PM, Daevid Vincent wrote: > > >> -Original Message----- >> From: Eric Butera [mailto:eric.but...@gmail.com] >> Sent: Thursday, June 16, 2011 5:53 PM >> To: Daevid Vincent >> Cc: php-general@lists.php.net >> Subject: Re: [P

Re: [PHP] Doctrine madness!

2011-06-16 Thread Eric Butera
On Thu, Jun 16, 2011 at 7:32 PM, Daevid Vincent wrote: > > >> -Original Message----- >> From: Eric Butera [mailto:eric.but...@gmail.com] >> Sent: Thursday, June 16, 2011 2:58 PM >> To: Daevid Vincent >> Cc: php-general@lists.php.net >> Subject: Re: [P

Re: [PHP] Doctrine madness!

2011-06-16 Thread Eric Butera
On Thu, Jun 16, 2011 at 5:37 PM, Daevid Vincent wrote: >> -Original Message- >> From: Nathan Nobbe [mailto:quickshif...@gmail.com] >> Sent: Thursday, June 16, 2011 9:51 AM >> To: php-general@lists.php.net >> Subject: [PHP] Doctrine madness! >> >> Hi gang, >> >> If anyone out there has some

Re: [PHP] Doctrine madness!

2011-06-16 Thread Eric Butera
On Thu, Jun 16, 2011 at 12:51 PM, Nathan Nobbe wrote: > Hi gang, > > If anyone out there has some experience w/ Doctrine now would be a great > time to share it! > > So I'm writing a batch importer and noticed memory usage climbing during > script execution. > > In the debugging effort I've isolat

Re: [PHP] Best authentication system

2011-06-04 Thread Eric Butera
On Sat, Jun 4, 2011 at 2:44 PM, Adam Tong wrote: > Hi, > > I'm running a site for which I need an authentication system. I have > already my own (that is too simplistic and not very secure). > I want some advice here. I checked PEAR, but as there are several > options there, I was not sure which o

Re: [PHP] phpsadness

2011-06-03 Thread Eric Butera
On Fri, Jun 3, 2011 at 1:05 PM, Marc Guay wrote: > What's PHP?  I thought this was the > top-posting-etiquette-discussion-and-simmering-race-war group. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > I just wanted to do my part to

Re: [PHP] phpsadness

2011-06-03 Thread Eric Butera
On Fri, Jun 3, 2011 at 12:37 PM, Jasper Mulder wrote: > >> Stuart Dallas wrote: >> >> [SNIP] >> >> And this is where we disagree. Everyone is entitled to an opinion, and >> they're also entitled to express that opinion, whether through humour or >> simple statement. > > Somehow in your response I

Re: [PHP] Announcing New PHP Extension: System Detonation Library (was: phpsadness)

2011-06-03 Thread Eric Butera
On Fri, Jun 3, 2011 at 11:56 AM, Daniel Brown wrote: >    First of all, a happy Friday to all here.  Hopefully some of you > will be able to pass this on to your boss and get sent home early. > >    Second, as dreamed up in the previous thread, I've decided to take > a few moments this morning to

Re: [PHP] How can a UTF-8 string can be converted to an array of Bytes?

2011-05-25 Thread Eric Butera
On Wed, May 25, 2011 at 8:15 AM, Eli Orr (Office) wrote: > Hi, > > Since a UTF-8 is a multi-bytes mechanism I get for 2 or 3 bytes  UTF-8 > encoded character a single character > > How can it be break into the REAL bytes array that represent the UTF-8 > string >  and how  can we reassembled the by

Re: [PHP] observer pattern

2011-05-23 Thread Eric Butera
On Mon, May 23, 2011 at 5:14 PM, Daevid Vincent wrote: >> -Original Message- >> From: Eric Butera [mailto:eric.but...@gmail.com] >> Sent: Friday, May 20, 2011 2:25 PM >> To: PHP >> Subject: Re: [PHP] observer pattern >> >> [whoops didn't hi

Re: [PHP] observer pattern

2011-05-20 Thread Eric Butera
[whoops didn't hit reply-all] On Wed, May 18, 2011 at 5:18 AM, Ken Guest wrote: > Lo, > > so, I'm wondering - how many of you use the observer pattern in php; > and if so, do you implement it 'standalone' or with the spl classes? > Is there any particular advantage to doing it "your way"; whichev

Re: [PHP] New to list and to PHP

2011-02-20 Thread Eric Butera
On Sun, Feb 20, 2011 at 8:38 PM, tolga wrote: > 21.02.2011 03:21, Tamara Temple yazmış: >> >> On Feb 20, 2011, at 5:51 PM, tolga wrote: >> >>> 21.02.2011 01:41, Richard Quadling yazmış: On 20 February 2011 23:34, Richard Quadling  wrote: > > On 18 February 2011 19:03, Pete Woodhe

Re: [PHP] design pattern

2009-08-14 Thread Eric Butera
On Thu, Aug 13, 2009 at 4:45 PM, Ralph Deffke wrote: > Hi Martin, > > thanks for ur efforts, this is a lot of good work. > > for my opinion the start is a bit too much theoretical and valid for all > type of application. In simple words, u are too close to the book. > > I would love to have somethi

Re: [PHP] Warning: OutsourcingRoom.com

2009-08-05 Thread Eric Butera
On Wed, Aug 5, 2009 at 3:06 AM, Ashley Sheridan wrote: > On Tue, 2009-08-04 at 20:49 -0700, Steve wrote: >> Daniel Brown wrote: >> >     Just as a heads-up, in case you guys weren't yet aware (cross-posting): >> > >> >     Elance.com was the victim of an SQL injection attack earlier this >> > summ

Re: [PHP] Need quick got written up yesterday!! OUCH (RESOLVED)

2009-08-04 Thread Eric Butera
On Tue, Aug 4, 2009 at 7:19 PM, Govinda wrote: > Terion, > > I've done a lot of backend programming, but I'm even more newbie than you in > PHP...  so take this from an equal, & FWIW: > I think we in this work can all get dry/impersonal and grouchy at times, but > to rephrase the others, in perhaps

Re: [PHP] Internal PHP caching methodology

2009-07-20 Thread Eric Butera
On Sat, Jul 18, 2009 at 7:14 AM, Daniel Kolbo wrote: > Daniel Kolbo wrote: >> Eric Butera wrote: >>> On Thu, Jul 16, 2009 at 5:50 PM, Daniel Kolbo wrote: >>>> Hello, >>>> >>>> Call me a dreamer...but I got to ask. >>>> >>>

Re: [PHP] Add php.net to my browser search box

2009-07-16 Thread Eric Butera
On Thu, Jul 16, 2009 at 12:09 PM, Daniel Brown wrote: > On Thu, Jul 16, 2009 at 11:59, Martin Scotta wrote: >> Hi all! >> >> I'd like to add php.net to my browser search box. >> Most browser can do it by "looking" at some XML provided by the site. > >    I had written one about two and a half years

Re: [PHP] Internal PHP caching methodology

2009-07-16 Thread Eric Butera
On Thu, Jul 16, 2009 at 5:50 PM, Daniel Kolbo wrote: > Hello, > > Call me a dreamer...but I got to ask. > > Is there any software for helping speed up PHP by utilizing internal PHP > caching? > > I am not talking about the external php cache/header control.  Smarty > caching doesn't give me the con

Re: [PHP] Inverting a dependency list

2009-07-16 Thread Eric Butera
On Thu, Jul 16, 2009 at 12:09 PM, Bob McConnell wrote: > I recall, years ago, having a set of utilities that would build a call > tree from application code written in C. This was useful for figuring > out dependencies in code that someone else had written. I would like to > do something similar wi

Re: [PHP] Email security

2009-07-14 Thread Eric Butera
On Tue, Jul 14, 2009 at 7:46 AM, Tiji varghese wrote: > Hello, > > I've implemented a contact form on my website that would email me the > contents of the form and also add it to the database. Its working perfectly > but I'm not too sure about the security part. I don't know much about the > sec

Re: [PHP] Scope of Variables and use of global and this->var

2009-07-14 Thread Eric Butera
On Tue, Jul 14, 2009 at 6:21 AM, Anton Heuschen wrote: > This is just a general question, > > I am not 100% on when to use global $var , and $this->var  and how/what > about the GLOBAL vars > > Lets say I have one file I  call config.php here I connect to the db, to > ldap etc the con

Re: [PHP] sloppiness & stupidity

2009-06-18 Thread Eric Butera
On Tue, Jun 16, 2009 at 8:43 PM, PJ wrote some nonsense: > I'm sorry, guys, but I am really getting po'd. Fail. Please try again. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php applications

2009-06-08 Thread Eric Butera
On Mon, Jun 8, 2009 at 1:34 PM, Robert Cummings wrote: > Matty Sarro wrote: >> >> Real men use perl ;) > > When I was younger my dad told me real men drink their coffee black... I > tried it for a month and then I told him real men choose their own path in > life. > > Cheers, > Rob. > > -- > PHP Ge

Re: [PHP] "webpage has expired" remedies

2009-06-04 Thread Eric Butera
On Thu, Jun 4, 2009 at 2:14 PM, Ed Bukhman wrote: > Hello, > > Could someone suggest the steps needed to troubleshoot the "webpage has > expired" issue in IE. I have a self-posting php form which queries and > writes to a pgsql database. Occasionally, when an input is entered, the form > never loa

Re: [PHP] Web friendly file names

2009-06-03 Thread Eric Butera
On Wed, Jun 3, 2009 at 2:29 PM, Paul M Foster wrote: > (Sorry, I hit the wrong button and sent the reply only to Skip.) > > On Wed, Jun 03, 2009 at 11:18:57AM -0500, Skip Evans wrote: > >> Hey all, >> >> I have a file uploader module that allows users to upload >> documents and of course people ar

Re: [PHP] Create multipart email

2009-05-28 Thread Eric Butera
On Thu, May 28, 2009 at 4:47 AM, Guus Ellenkamp wrote: > I'm trying to attach an uploaded file to an e-mail which I receive in > Outlook. Neither the first part, nor the second part displays properly. The > header looks ok when displayed on the screen. What am I missing? If you value your time th

Re: [PHP] Re: General Web Development Editor/IDE

2009-05-24 Thread Eric Butera
On Sun, May 24, 2009 at 7:47 PM, Eddie Drapkin wrote: > I use Zend Studip (I coughed up the fee, and it's worth it) for PHP, JS, > HTML and CSS>  THere's a WYSIWYG HTML editor built in, and that's the only > drawback I hear from a lot of people about PHP IDE's.  And, it's built on > Eclipse, so wh

Re: [PHP] php dev environment

2009-05-24 Thread Eric Butera
On Sun, May 24, 2009 at 5:32 AM, Nathan Rixham wrote: > Hi All, > > A recent post just reminded me of something I did a while ago that may be of > use to many of you (and its sitting doing nothing), it's a kind of how to > for getting a full development environment up and running simply. > > > Ecl

Re: [PHP] Re: SQL Injection - Solution

2009-05-07 Thread Eric Butera
On Thu, May 7, 2009 at 9:41 AM, Igor Escobar wrote: > Ok guys, thanks. > > > Regards, > Igor Escobar > Systems Analyst & Interface Designer > > -- > > Personal Blog > ~ blog.igorescobar.com > Online Portifolio > ~ www.igorescobar.com > Twitter > ~ @igorescobar > > > > > > On Thu, May 7, 2009 at 7:

Re: [PHP] Namespce operator

2009-03-25 Thread Eric Butera
On Wed, Mar 25, 2009 at 8:30 AM, Jochem Maas wrote: > Christoph Boget schreef: Backslash? Seriously? I'm hurt that my suggestion of "¬" (ASCII170 ?) wasn't used. :-( >>> Backslash doesn't sound like it will look very pretty >> >> Windows and DOS have been getting away with it for the las

Re: [PHP] Re: Hi!! I Joined the PHP Mailing List

2009-03-09 Thread Eric Butera
On Mon, Mar 9, 2009 at 2:07 PM, Shawn McKenzie wrote: > Picu Priya wrote: >> Hello Everyone, I have just joined the PHP Community.. I hope, I will spend >> good time here.. I am already a PHP programmer, and Love to learn a lot of >> new php tricks while helping others, as best of my knowledge. :)

Re: [PHP] Database Abstraction Class

2009-03-07 Thread Eric Butera
On Sat, Mar 7, 2009 at 5:20 PM, Nathan Rixham wrote: > Eric Butera wrote: >> >> On Sat, Mar 7, 2009 at 5:07 PM, Paul M Foster >> wrote: >>> >>> On Sat, Mar 07, 2009 at 12:34:40PM -0500, Eric Butera wrote: >>> >>> >>> >>>

Re: [PHP] Database Abstraction Class

2009-03-07 Thread Eric Butera
On Sat, Mar 7, 2009 at 5:07 PM, Paul M Foster wrote: > On Sat, Mar 07, 2009 at 12:34:40PM -0500, Eric Butera wrote: > > > > >> >> PDO.  :)  Anything else is a waste of cpu cycles. > > I've looked into PDO, and I just didn't find it as feature-rich as

Re: [PHP] Database Abstraction Class

2009-03-07 Thread Eric Butera
On Sat, Mar 7, 2009 at 8:04 AM, Michael A. Peters wrote: > In some earlier thread (I really don't want to dig to find it) I argued for > running mysql_real_escape_string right on the _POST > > I must concede I was definitely wrong about that. > > The right place to do it is in a database abstracti

Re: [PHP] Sending out large amounts of email

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 6:20 PM, Brian Hansen wrote: > Hi. > > Our company is merging with another company and newsletter now needs to go > out to more than 100.000 people. Before it was only a couple of thousands. > > I have developed a mail queue using a database and a cronjob, but I am not > in

Re: [PHP] trouble sending japanese to mysql database!

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 2:06 PM, James wrote: > Right, I'm having some rather strange issues between mysql and php when it > comes to inserting Japanese text. I have the table and fields set to > utf8_unicode_ci, if I use phpmyAdmin to insert japanese text through the > interface it works just fine

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 3:29 PM, Nigel Green wrote: > On 05/03/09, Eric Butera wrote: > >> Make sure to always pass your active database connection into the >> second parameter of mysql_real_escape_string.  There could be >> character set differences between your two s

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 3:07 PM, haliphax wrote: > Sadly, my company is throwing PHP out the window in favor of ASP.NET, > as they have an irrational fear of Open Source software. Don't get me > wrong--.NET is pretty darn cool--but I literally enjoy working in PHP. > The fact that I don't need an I

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 1:47 PM, haliphax wrote: > On Thu, Mar 5, 2009 at 11:41 AM, Eric Butera wrote: >> On Thu, Mar 5, 2009 at 12:21 PM, haliphax wrote: >>> On Thu, Mar 5, 2009 at 11:08 AM, Eric Butera wrote: >>>> On Thu, Mar 5, 2009 at 12:00 PM, haliphax wrote

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 12:21 PM, haliphax wrote: > On Thu, Mar 5, 2009 at 11:08 AM, Eric Butera wrote: >> On Thu, Mar 5, 2009 at 12:00 PM, haliphax wrote: >>> On Thu, Mar 5, 2009 at 10:52 AM, Eric Butera wrote: >>>> On Thu, Mar 5, 2009 at 11:16 AM, Ni

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 12:00 PM, haliphax wrote: > On Thu, Mar 5, 2009 at 10:52 AM, Eric Butera wrote: >> On Thu, Mar 5, 2009 at 11:16 AM, Nigel Green wrote: >>> Hi all, >>> >>> This is my first post to the list. Have been observing for a few weeks and >&g

Re: [PHP] Problem with mysql_real_escape_string

2009-03-05 Thread Eric Butera
On Thu, Mar 5, 2009 at 11:16 AM, Nigel Green wrote: > Hi all, > > This is my first post to the list. Have been observing for a few weeks and > have learnt a lot. > > I am having an issue in one of my scripts where using the > mysql_real_escape_string function is stripping content out of my input d

Re: [PHP] escape your variables

2009-03-04 Thread Eric Butera
On Wed, Mar 4, 2009 at 8:54 PM, Michael A. Peters wrote: > Eric Butera wrote: > >> >> So here's some examples of bad behavior. >> >> = Database = >> Bad: >> $name = mysql_real_escape_string($_POST['name'], $link); >> myql_query(&quo

Re: [PHP] escape your variables

2009-03-04 Thread Eric Butera
On Wed, Mar 4, 2009 at 8:18 PM, Chris wrote: > You only need to escape data coming from a user going in to your database. If you put user input into your database and pull it back out, it's still raw user input. Never trust any piece of data ever, whether it comes from a superglobal OR within yo

Re: [PHP] escape your variables

2009-03-04 Thread Eric Butera
On Wed, Mar 4, 2009 at 8:04 PM, PJ wrote some stuff... You should do a little reading on some of the keywords that have been presented. Specifically you don't sanitize a value into your db. You escape it. Prepared statements are a way of doing this that makes it a bit harder to mess up. You ha

Re: [PHP] escape your variables

2009-02-18 Thread Eric Butera
On Wed, Feb 18, 2009 at 8:34 AM, PJ wrote: > To focus on mysql_real_escape_string, I am recapping... questions below > QUOTE:== > Instead of doing this (for an imaginary table): > $sql = "insert into table1(field1, field2) values ('$value1', '$value2')"; > > do > $sql = "insert into table1

Re: [PHP] function array problem

2009-02-17 Thread Eric Butera
On Tue, Feb 17, 2009 at 3:10 PM, Ashley Sheridan wrote: > I've had a bit of a problem with a function I'm using for a form. > Essentially, the function looks like this: > > function addEvent($values = Array('name' => '', 'venue' => '', > 'description' => '', 'errors' => Array())) > { >// code

Re: [PHP] Re:

2009-02-16 Thread Eric Butera
On Mon, Feb 16, 2009 at 6:32 PM, tedd wrote: > At 7:58 PM + 2/16/09, Colin Guthrie wrote: >> >> 'Twas brillig, and Richard Heyes at 16/02/09 15:04 did gyre and gimble: ... >>> >>> Sorry, should've mentioned, I'm talking about PHP6. >> >> Not heard about it but I'd like it. Short tags

Re: [PHP] Re:

2009-02-16 Thread Eric Butera
On Mon, Feb 16, 2009 at 2:58 PM, Colin Guthrie wrote: > 'Twas brillig, and Richard Heyes at 16/02/09 15:04 did gyre and gimble: Those reply lines are funny. =) -- http://www.voom.me | EFnet: #voom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

Re: [PHP] Reverse IP lookup

2009-02-16 Thread Eric Butera
On Sun, Feb 15, 2009 at 9:17 PM, Andrew Ballard wrote: > On Sun, Feb 15, 2009 at 1:22 PM, דניאל דנון wrote: > >> Hello, >> >> Is there anyway to get a list of sitess that are on a specific IP? >> >> I looked, But I couldn't find anything. >> >> I tried to make some with dns_get_record and gethost

Re: [PHP] Happy 1234567890 day!

2009-02-13 Thread Eric Butera
On Fri, Feb 13, 2009 at 5:13 PM, Gary Maddock-Greene wrote: > Note quite there yet here but yes Happy 1234567890 day to you too > > -- > - Gary Maddock-Greene > "Luke Slater" wrote in message > news:200902131812.43295.l...@blog-thing.com... > > -- > PHP General Mailing List (http://www.php.net/)

Re: [PHP] Generate unique login token

2009-02-09 Thread Eric Butera
On Mon, Feb 9, 2009 at 8:52 PM, sean greenslade wrote: > I have a login system that I am coding. I need it to generate a unique token > on login to be stored in the browser's cookie. I currently use a script that > generates a MD5 hash of the current unix timestamp, then checks the mysql > databas

Re: [PHP] PHP OOP

2009-02-09 Thread Eric Butera
On Mon, Feb 9, 2009 at 12:19 PM, Stuart wrote: > 2009/2/9 tedd : >> Hi gang: >> >> At the college where I teach, they are considering teaching OOP, but they >> don't want to settle on a specific language. >> >> My thoughts are it's difficult to teach OOP without a language -- while the >> general

Re: [PHP] PHP OOP

2009-02-09 Thread Eric Butera
On Mon, Feb 9, 2009 at 11:20 AM, Thodoris wrote: > >> Hi gang: >> >> At the college where I teach, they are considering teaching OOP, but they >> don't want to settle on a specific language. >> >> My thoughts are it's difficult to teach OOP without a language -- while >> the general concepts of OO

Re: [PHP] long echo statement performance question

2009-02-06 Thread Eric Butera
On Fri, Feb 6, 2009 at 2:10 PM, Bruno Fajardo wrote: > I am so stick to Smarty that I never tried other solutions, like > Savant. Thanks for the tip, I'll try it right away. > > Cheers. > > 2009/2/6 Eric Butera : >> On Fri, Feb 6, 2009 at 1:43 PM, Bruno Fajardo wrot

Re: [PHP] long echo statement performance question

2009-02-06 Thread Eric Butera
On Fri, Feb 6, 2009 at 1:43 PM, Bruno Fajardo wrote: > Well, Smarty's caching layer is very fast. Maybe not as fast as an > echo statement, but apparentely Frank was also interested in separate > logic from presentation, and a series of echo's is not the best > solution in my opinion. :-) > But th

Re: [PHP] Clarity needed OT

2009-02-06 Thread Eric Butera
On Fri, Feb 6, 2009 at 1:46 PM, Frank Stanovcak wrote: > > "Eric Butera" wrote in message > news:6a8639eb0902061020v793d22b9x1430872c2170b...@mail.gmail.com... >> On Fri, Feb 6, 2009 at 1:13 PM, tedd wrote: >>> At 1:55 AM +0100 2/6/09, Jochem Maas wrot

Re: [PHP] Clarity needed OT

2009-02-06 Thread Eric Butera
On Fri, Feb 6, 2009 at 1:13 PM, tedd wrote: > At 1:55 AM +0100 2/6/09, Jochem Maas wrote: >> >> that tedd's unlimited educational resources (tutors/courses) might >> go someway to undoing all the harm Fox News inflicts on the masses. > > Or to provide clarity to those who think that Fox News is do

Re: [PHP] long echo statement performance question

2009-02-06 Thread Eric Butera
On Fri, Feb 6, 2009 at 12:15 PM, Bruno Fajardo wrote: > In my opinion, you would achieve better results using a template > engine, like Smarty (http://www.smarty.net/). In addition, your code > would be entirely separated from presentation in a elegant way. > > 2009/2/6 Frank Stanovcak : >> I'm in

Re: [PHP] German characters Ö,Ä etc. show up as ?

2009-02-05 Thread Eric Butera
On Thu, Feb 5, 2009 at 7:37 AM, Merlin Morgenstern wrote: > Hi there, > > I recently upgraded on my prod system from php 4.x to the newest php > version. Now german characters lik "Ö" show up as ?. I have the same setup > running on a test server, where the characters show up OK. After searching >

Re: [PHP] Garbage Collection

2009-02-05 Thread Eric Butera
On Thu, Feb 5, 2009 at 11:06 AM, tedd wrote: > Hi gang: > > A related question to my last "Clarity needed" post. > > I have a tutor table (showing all the tutors), a course table (showing all > the courses), and a course-to-tutor table (showing all the instances of what > tutor teaches what course

Re: [PHP] Blank page of hell..what to look for

2009-02-05 Thread Eric Butera
On Mon, Feb 2, 2009 at 12:51 PM, Jim Lucas wrote: > Terion Miller wrote: >> Is there a certain thing that should be suspected and looked at first when >> getting the php blank page of hell >> I have errors on and nothing is being output anywhere to lead me in the >> right direction, I have a V

Re: [PHP] Boolean Assignment Operator

2009-02-02 Thread Eric Butera
On Mon, Feb 2, 2009 at 7:49 AM, Gavin Hodge wrote: > Hi, > > I'm fairly new to PHP, having migrated from the Java / C# world. > > I wrote some code similar to the following: > > $success = true; > $success &= operation1(); > $success &= operation2(); > > if ($success === true) { >operation3();

Re: [PHP] Includes only if required?

2009-02-02 Thread Eric Butera
On Mon, Feb 2, 2009 at 6:42 AM, Edmund Hertle wrote: > Hey, > normally I prefer to do all my includes (classes + config files) at the > beginning if my php files. But recently I thought about including some > classes only if they are needed later in my code (like pear Mail and > Mail_mime only if

Re: [PHP] Re: frameworks

2009-01-31 Thread Eric Butera
On Sat, Jan 31, 2009 at 2:16 PM, Nathan Rixham wrote: > Eric Butera wrote: >> >> On Sat, Jan 31, 2009 at 1:12 PM, Nathan Rixham wrote: >>> >>> Eric Butera wrote: >>>> >>>> On Sat, Jan 31, 2009 at 12:06 PM, Shawn McKenzie >>>&g

Re: [PHP] Re: frameworks

2009-01-31 Thread Eric Butera
On Sat, Jan 31, 2009 at 1:12 PM, Nathan Rixham wrote: > Eric Butera wrote: >> >> On Sat, Jan 31, 2009 at 12:06 PM, Shawn McKenzie >> wrote: >>> >>> Eric Butera wrote: >>>> >>>> On Fri, Jan 30, 2009 at 7:14 PM, Kevin Waterson wrote

Re: [PHP] Re: frameworks

2009-01-31 Thread Eric Butera
On Sat, Jan 31, 2009 at 12:06 PM, Shawn McKenzie wrote: > Eric Butera wrote: >> On Fri, Jan 30, 2009 at 7:14 PM, Kevin Waterson wrote: >>> On Fri, 2009-01-30 at 18:03 -0600, Shawn McKenzie wrote: >>>> From what I could tell, this was >>>> the best RA

Re: [PHP] PHP Enclosing Tags? Do You Close Your PHP Declarations?

2009-01-31 Thread Eric Butera
On Sat, Jan 31, 2009 at 10:10 AM, tedd wrote: > My mother always told me to close the door. She wasn't a programmer, but it > kept the chickens out. > > As a matter of habit, I always close all tags. However, I have yet to be > bitten by the problem everyone speaks about (knock on wood). > > Cheer

Re: [PHP] Matching

2009-01-31 Thread Eric Butera
On Sat, Jan 31, 2009 at 9:33 AM, Ashley Sheridan wrote: > On Sat, 2009-01-31 at 08:38 -0500, Eric Butera wrote: >> On Sat, Jan 31, 2009 at 7:32 AM, Ashley Sheridan >> wrote: >> > On Fri, 2009-01-30 at 21:33 -0500, Eric Butera wrote: >> >> On Fri,

Re: [PHP] Matching

2009-01-31 Thread Eric Butera
On Sat, Jan 31, 2009 at 7:32 AM, Ashley Sheridan wrote: > On Fri, 2009-01-30 at 21:33 -0500, Eric Butera wrote: >> On Fri, Jan 30, 2009 at 9:28 PM, Ron Piggott >> wrote: >> > How do I determine the value oftx from this string? >> > >> >

Re: [PHP] Matching

2009-01-30 Thread Eric Butera
On Fri, Jan 30, 2009 at 9:28 PM, Ron Piggott wrote: > How do I determine the value oftx from this string? > > > page/words_from_the_well_checkout/?tx=8UM53005HH344951T&st=Completed&amt=0.01 > > My desired answer is: 8UM53005HH344951T > > I am trying to capture the serial number which follows

Re: [PHP] Re: frameworks

2009-01-30 Thread Eric Butera
On Fri, Jan 30, 2009 at 7:14 PM, Kevin Waterson wrote: > On Fri, 2009-01-30 at 18:03 -0600, Shawn McKenzie wrote: >> From what I could tell, this was >> the best RAD, however if you prefer to lay everything out your own way >> and do things your own way then probably CI or Zend. > > I use Zend ev

Re: [PHP] PHP Enclosing Tags? Do You Close Your PHP Declarations?

2009-01-30 Thread Eric Butera
On Fri, Jan 30, 2009 at 3:50 PM, Edmund Hertle wrote: > What is the problem in session handling? I think I came never across this > issue altough I do close my tags... If there's any rogue whitespace in your file, it's sent to the browser as the start of data. So if you have an accidental space

Re: [PHP] PHP Enclosing Tags? Do You Close Your PHP Declarations?

2009-01-30 Thread Eric Butera
On Fri, Jan 30, 2009 at 1:45 PM, Nitsan Bin-Nun wrote: > I was just wondering whether people enclosing their PHP tags declarations, > I don't close these needs them, > and for the second reason - if a space/tab/new line/etc will beneath them it > will cause > problems with output buffering and se

Re: [PHP] frameworks

2009-01-30 Thread Eric Butera
On Fri, Jan 30, 2009 at 1:15 PM, Frank Stanovcak wrote: > Ok. I've done some reading on frameworks for PHP now, and have this > question. > > What are some good resources for learning about the various frameworks > available, and do you recomend one over another? If so why? > > I started using P

Re: [PHP] Re: Hidden costs of PHP arrays?

2009-01-29 Thread Eric Butera
On Thu, Jan 29, 2009 at 9:02 PM, Paul M Foster wrote: > On Fri, Jan 30, 2009 at 11:10:16AM +1100, Clancy wrote: > > > >> As a former assembly language programmer I have some idea of the vast >> amount of thumb >> twiddling which is going on behind-the-scenes when I make some apparently >> simple

Re: [PHP] Make New-Age Money Online with Google

2009-01-27 Thread Eric Butera
On Tue, Jan 27, 2009 at 2:42 AM, clive wrote: > So Funny, they went through all the trouble of signing up, unless hey have > bots now that can sign up to mailing lists? Could be a virus that is spamming all contacts in a real persons email client. -- PHP General Mailing List (http://www.php.net

Re: [PHP] Re: Doc standard for methods?

2009-01-27 Thread Eric Butera
On Tue, Jan 27, 2009 at 10:00 AM, Kyle Terry wrote: > On Tue, Jan 27, 2009 at 5:56 AM, Nathan Rixham wrote: >> Larry Garfield wrote: >>> >>> Greetings, all. I am looking for feedback on a documentation question, in >>> the hopes that someone else has found a good solution to an abnormal >>> situ

Re: [PHP] Coding for email response forms

2009-01-26 Thread Eric Butera
On Mon, Jan 26, 2009 at 4:47 PM, Daniel Brown wrote: > On Mon, Jan 26, 2009 at 16:34, Tom wrote: >> >> Shawn, >> So would that look something like this: >> > if ($_SERVER['REQUEST_METHOD'] == "POST") { >> >> // Just to be safe, I strip out HTML tags >> $realname = strip_tags($realname); >> $email

Re: [PHP] Help me understand unit testing?

2009-01-21 Thread Eric Butera
On Wed, Jan 21, 2009 at 7:31 PM, Eric Butera wrote: > On Wed, Jan 21, 2009 at 7:24 PM, Murray wrote: >> I think this is my problem -- basically to know how to get some benefit from >> it. >> >> If I have a function in a class that is supposed to return some ro

Re: [PHP] Help me understand unit testing?

2009-01-21 Thread Eric Butera
t function / class without having code > that puts it to the page? Some other benefit? > > M is for Murray > > > On Thu, Jan 22, 2009 at 10:13 AM, Eric Butera wrote: >> >> On Wed, Jan 21, 2009 at 7:01 PM, Murray >> wrote: >> > Hi All, >> > &

Re: [PHP] Help me understand unit testing?

2009-01-21 Thread Eric Butera
On Wed, Jan 21, 2009 at 7:01 PM, Murray wrote: > Hi All, > > I'd like to understand unit testing better (or, in fact, at all). I > understand the broad idea that testing Is A Very Good Thing, but when I have > tried to look into it further (for example, have just been looking through > the PHPUnit

Re: [PHP] MySQL class. Thoughts?

2009-01-21 Thread Eric Butera
On Wed, Jan 21, 2009 at 7:07 PM, Ashley Sheridan wrote: > On Wed, 2009-01-21 at 18:52 -0500, Eric Butera wrote: >> On Wed, Jan 21, 2009 at 6:37 PM, Jochem Maas wrote: >> > Chris schreef: >> >> >> >>>>> Yea if you're only targeting 1

  1   2   3   4   5   6   7   8   >