Re: [PHP] No SMTP server? Can't get mail()

2011-01-20 Thread Peter Lind
Probably not the solution you were looking for, but I've always found mail() very unstable and I tend to use a mail library instead. Like phpmailer or swiftmailer. Easier to configure and figure out problems with. Regards Peter

Re: [PHP] No SMTP server? Can't get mail()

2011-01-20 Thread Paul S
On Fri, 21 Jan 2011 13:07:02 +0700, "Paul S" wrote: On Fri, 21 Jan 2011 12:28:16 +0700, Paul M Foster wrote: On Fri, Jan 21, 2011 at 10:45:46AM +0700, Paul S wrote: I am having problems with mail(). The problem is that the email just never gets there. Mail appears to be working. To star

Re: [PHP] No SMTP server? Can't get mail()

2011-01-20 Thread Paul S
On Fri, 21 Jan 2011 12:28:16 +0700, Paul M Foster wrote: On Fri, Jan 21, 2011 at 10:45:46AM +0700, Paul S wrote: I am having problems with mail(). The problem is that the email just never gets there. Mail appears to be working. To start, I am investigating the SMTP server. I can't underst

[PHP] 400 Cannot connect to NNTP server

2011-01-20 Thread Paul S
400 Cannot connect to NNTP server 76.75.200.58 (76.75.200.58:119), connect error 10060 I do not seem to be having any problems getting to this newsgroup :-) but this message keeps popping up. Just to let u know, no need for replies. Thanks for a great resource! -- Using Opera's revolution

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Paul M Foster
On Thu, Jan 20, 2011 at 12:05:53PM -0800, David Harkness wrote: > On Thu, Jan 20, 2011 at 7:00 AM, Richard Quadling wrote: > > > I'd recommend using a nested set approach for the tags > > (http://dev.mysql.com/tech-resources/articles/hierarchical-data.html > > gives a good explanation on the issu

Re: [PHP] array to var - with different name

2011-01-20 Thread Paul M Foster
On Thu, Jan 20, 2011 at 05:29:01PM -0600, Donovan Brooke wrote: [snip] > > > Shawn, I don't know if I have a good reason, other than I rather like > working with string vars instead of array vars from $_REQUEST for > (sticky forms and conditionals). I can check/verify them as well in the > pro

Re: [PHP] No SMTP server? Can't get mail()

2011-01-20 Thread Paul M Foster
On Fri, Jan 21, 2011 at 10:45:46AM +0700, Paul S wrote: > I am having problems with mail(). The problem is that the email just never > gets there. Mail appears to be working. To start, I am investigating the > SMTP server. I can't understand some things. > > 1) I am sure that the smtp server is a

[PHP] No SMTP server? Can't get mail()

2011-01-20 Thread Paul S
I am having problems with mail(). The problem is that the email just never gets there. Mail appears to be working. To start, I am investigating the SMTP server. I can't understand some things. 1) I am sure that the smtp server is and is set to "localhost", but I want to verify this ... --

Re: [PHP] possible namespace bug?

2011-01-20 Thread David Harkness
On Thu, Jan 20, 2011 at 4:26 PM, Tommy Pham wrote: > Anyway, I found the problem: \N in > > use org\puremvc\php\patterns\observer\Notifier; > AFAIK \n is only processed inside double-quoted strings and here-docs. The \N has no special meaning beyond a namespace separator and a capital N. My

Re: [PHP] email address syntax checker

2011-01-20 Thread Andre Polykanine
Hej Nisse, Me thinks it isn't a valid address :-). -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion Original message From: Ni

Re: [PHP] possible namespace bug?

2011-01-20 Thread Tommy Pham
On Thu, Jan 20, 2011 at 3:49 PM, Adam Richardson wrote: > On Thu, Jan 20, 2011 at 5:33 PM, Tommy Pham wrote: >> >> Hi folks, >> >> I thought I try implementing namesapce on one the ported apps I did a >> while >> back but ran into a problem.  First the code: >> >> //namespace org\puremvc\php\interf

Re: [PHP] email address syntax checker

2011-01-20 Thread Nisse Engström
On Thu, 20 Jan 2011 19:03:22 +0530, Nilesh Govindarajan wrote: > Well, I had created an email validator long ago, after a neat research > on Google, reading RFCs, etc. > I don't guarantee that it's without bugs, but it has been correct for me > in all valid & invalid email addresses I used for t

Re: [PHP] possible namespace bug?

2011-01-20 Thread Adam Richardson
On Thu, Jan 20, 2011 at 5:33 PM, Tommy Pham wrote: > Hi folks, > > I thought I try implementing namesapce on one the ported apps I did a while > back but ran into a problem. First the code: > > //namespace org\puremvc\php\interfaces; > > interface ICommand > { >function execute(INotification

RE: [PHP] array to var - with different name

2011-01-20 Thread Tommy Pham
> -Original Message- > From: Donovan Brooke [mailto:li...@euca.us] > Sent: Thursday, January 20, 2011 3:29 PM > Cc: php-general@lists.php.net > Subject: Re: [PHP] array to var - with different name > > Tommy Pham wrote: > [snip] > >> foreach ($_REQUEST as $key => $value) $$key = $value; >

Re: [PHP] array to var - with different name

2011-01-20 Thread Donovan Brooke
Tommy Pham wrote: [snip] foreach ($_REQUEST as $key => $value) $$key = $value; short-circuited one-liners :) Regards, Tommy akk... wrong clicked before I had a chance to fix the code. anyway, foreach ($_GET as $key => $value) if (substr($key, 0, 2) == 'f_') ${'t_'.substr($key, 2)} = $valu

Re: [PHP] Re: array to var - with different name

2011-01-20 Thread Tommy Pham
On Thu, Jan 20, 2011 at 2:49 PM, Shawn McKenzie wrote: > On 01/20/2011 04:28 PM, Donovan Brooke wrote: >> Hello again! >> >> I'm trying to find a good way to convert array key/value's to >> variable name values... but with the caveat of the name being >> slightly different than the original key >>

Re: [PHP] array to var - with different name

2011-01-20 Thread Tommy Pham
On Thu, Jan 20, 2011 at 3:09 PM, Tommy Pham wrote: > On Thu, Jan 20, 2011 at 2:28 PM, Donovan Brooke wrote: >> Hello again! >> >> I'm trying to find a good way to convert array key/value's to >> variable name values... but with the caveat of the name being >> slightly different than the original k

Re: [PHP] array to var - with different name

2011-01-20 Thread Tommy Pham
On Thu, Jan 20, 2011 at 2:28 PM, Donovan Brooke wrote: > Hello again! > > I'm trying to find a good way to convert array key/value's to > variable name values... but with the caveat of the name being > slightly different than the original key > (to fit my naming conventions). > > first, I (tediousl

[PHP] Re: array to var - with different name

2011-01-20 Thread Shawn McKenzie
On 01/20/2011 04:28 PM, Donovan Brooke wrote: > Hello again! > > I'm trying to find a good way to convert array key/value's to > variable name values... but with the caveat of the name being > slightly different than the original key > (to fit my naming conventions). > > first, I (tediously) did

[PHP] possible namespace bug?

2011-01-20 Thread Tommy Pham
Hi folks, I thought I try implementing namesapce on one the ported apps I did a while back but ran into a problem. First the code: //namespace org\puremvc\php\interfaces; interface ICommand { function execute(INotification $notification); } interface INotifier { function sendNotificatio

Re: [PHP] array to var - with different name

2011-01-20 Thread Daniel Molina Wegener
On Thursday 20 January 2011, Donovan Brooke wrote: > Hello again! > > I'm trying to find a good way to convert array key/value's to > variable name values... but with the caveat of the name being > slightly different than the original key > (to fit my naming conventions). > > first, I (tediousl

[PHP] array to var - with different name

2011-01-20 Thread Donovan Brooke
Hello again! I'm trying to find a good way to convert array key/value's to variable name values... but with the caveat of the name being slightly different than the original key (to fit my naming conventions). first, I (tediously) did this: --- if (isset($_GET['f_action'])) { $t_action =

RE: [PHP] RE: Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Jerry Schwartz
>> [JS] I disagree. The method I proposed can be extended to any depth, and >> any >> leaf or branch can be retrieved with a single query. >> > >I suppose for retrievals this structure has advantages, but unless >MySQL has a ++ operator (or better yet, one that adds or subtracts 2 >from an int) th

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread David Harkness
On Thu, Jan 20, 2011 at 12:21 PM, Dotan Cohen wrote: > I understood that. My concern is exactly with adding new nodes. There > is no incrementor (++i) in SQL, so knowingly coding a solution that > will require incrementing two fields in half the database rows seems > irresponsible. > It only req

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
On Thu, Jan 20, 2011 at 22:05, David Harkness wrote: > Thanks for the link. That article proposes an interesting way to organize > the categories. Have you implemented this in the wild? Clearly the design > would work as it's pretty simple, and I like that it removes the need for > recursive queri

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread David Harkness
On Thu, Jan 20, 2011 at 7:00 AM, Richard Quadling wrote: > I'd recommend using a nested set approach for the tags > (http://dev.mysql.com/tech-resources/articles/hierarchical-data.html > gives a good explanation on the issues and methodology of nested > sets). > Thanks for the link. That article

Re: [PHP] RE: Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
On Thu, Jan 20, 2011 at 21:40, Jerry Schwartz wrote: >>Thanks. I prefer the "parent tag" field, though, I feel that it is >>more flexible. >> >> > [JS] I disagree. The method I proposed can be extended to any depth, and any > leaf or branch can be retrieved with a single query. > I suppose for re

Re: [PHP] RE: Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread David Hutto
On Thu, Jan 20, 2011 at 2:40 PM, Jerry Schwartz wrote: >>-Original Message- >>From: Dotan Cohen [mailto:dotanco...@gmail.com] >>Sent: Thursday, January 20, 2011 11:25 AM >>To: Jerry Schwartz >>Cc: mysql.; php-general. >>Subject: Re: Organisational question: surely someone has implemented m

[PHP] RE: Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Jerry Schwartz
>-Original Message- >From: Dotan Cohen [mailto:dotanco...@gmail.com] >Sent: Thursday, January 20, 2011 11:25 AM >To: Jerry Schwartz >Cc: mysql.; php-general. >Subject: Re: Organisational question: surely someone has implemented many >Boolean values (tags) and a solution exist > > >> As for

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread David Hutto
On Thu, Jan 20, 2011 at 2:26 PM, Dotan Cohen wrote: > On Thu, Jan 20, 2011 at 21:24, David Hutto wrote: >>> Is this a troll? Am I about to be baited? >> >> Baited to deploy what is designed to the consumer's specification? >> Surely. From what is wanted to what is needed. Troll on that. > > Actua

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
On Thu, Jan 20, 2011 at 21:24, David Hutto wrote: >> Is this a troll? Am I about to be baited? > > Baited to deploy what is designed to the consumer's specification? > Surely. From what is wanted to what is needed. Troll on that. Actually, I'm the customer! But assuming that a customer exists, th

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread David Hutto
> Is this a troll? Am I about to be baited? Baited to deploy what is designed to the consumer's specification? Surely. From what is wanted to what is needed. Troll on that. > > -- > Dotan Cohen > > http://gibberish.co.il > http://what-is-what.com > -- The lawyer in me says argue...even if you'

[PHP] Re: News Server Time Outs

2011-01-20 Thread Shawn McKenzie
On 01/19/2011 10:09 AM, Al wrote: > The newsgroup server seems to have a repeated-visit throttle, or whatever. > > For the last two weeks at least, I can only open 2 or 3 messages and > them I get repeated time-outs. It acts like the DoS or flood prevention > is kidding in to aggressively. > > A

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
On Thu, Jan 20, 2011 at 20:50, David Hutto wrote: > Pseudo = Design Algorithm > Design Algorithm = Actual Code > Actual Code = Alterable db tables > Alterable db tables = manipulated data through the app interface with data > > -- > The lawyer in me says argue...even if you're wrong. The scientist

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
On Thu, Jan 20, 2011 at 19:21, Richard Quadling wrote: >> That is terrific, at least the first half. The second half, with the >> Venn diagrams, is awkward! > > When you get heavily nested data, the adjacent set model (where you > have a parentid for every uniqueid), you very quickly get into > co

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread David Hutto
Pseudo = Design Algorithm Design Algorithm = Actual Code Actual Code = Alterable db tables Alterable db tables = manipulated data through the app interface with data -- The lawyer in me says argue...even if you're wrong. The scientist in me... says shut up, listen, and then argue. But the lawyer

Re: [PHP] Class and interface location

2011-01-20 Thread David Harkness
Larry, I suggested the docblock tag because it seemed you didn't want to mandate that plugins that extend other plugins be forced to include the interface in an actual PHP implements clause. Duplicating the implements clause doesn't cause any problems for PHP as you said, so that's one route. Adv

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread David Harkness
I cannot agree more with the others about using a join table. While it's tempting to go with your first solution due to fear of performance issues, you can usually address performance issues with a technical solution. Addressing problems that arise from a constraining design choice is much more dif

Re: [PHP] email address syntax checker

2011-01-20 Thread Donovan Brooke
Nilesh Govindarajan wrote: On 01/20/2011 09:44 AM, Donovan Brooke wrote: Hi Guys, I'm waddling my way through database interaction and thought someone on the list may already have a simple email checker that they'd like to share... you know, looking for the @ char and dots etc.. I did a quick

Re: [PHP] email address syntax checker

2011-01-20 Thread Donovan Brooke
Peter Lind wrote: [snip] if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "Bad user! Bad user!"; } Regards Peter thanks peter... wish I would have known about filter_var before writing the other checkers. ;-) Donovan -- D Brooke -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Richard Quadling
On 20 January 2011 16:20, Dotan Cohen wrote: > On Thu, Jan 20, 2011 at 17:00, Richard Quadling wrote: >> I'd have my items table, my tags table and a join table for the two. >> My join table is really simple. UniqueID, ItemID, TagID. >> > > Yes, that is the first approach that I mentioned. It loo

[PHP] Re: Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
On Thu, Jan 20, 2011 at 17:22, Jerry Schwartz wrote: > I think the canonical way would be to have one table for your items, one table > for your tags, and one table for your tag assignments. > Thank you, I do agree that this is the best way. Other posters seem to agree as well! > Using an ever-

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
On Thu, Jan 20, 2011 at 18:20, Dotan Cohen wrote: > On Thu, Jan 20, 2011 at 17:00, Richard Quadling wrote: >> I'd have my items table, my tags table and a join table for the two. >> My join table is really simple. UniqueID, ItemID, TagID. >> > > Yes, that is the first approach that I mentioned. I

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Dotan Cohen
On Thu, Jan 20, 2011 at 17:00, Richard Quadling wrote: > I'd have my items table, my tags table and a join table for the two. > My join table is really simple. UniqueID, ItemID, TagID. > Yes, that is the first approach that I mentioned. It looks to be a good compromise. > I'd recommend using a

[PHP] RE: Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Jerry Schwartz
I think the canonical way would be to have one table for your items, one table for your tags, and one table for your tag assignments. CREATE TABLE items ( item_id INT(11) AUTO-INCREMENT PRIMARY KEY, item_name VARCHAR(100) NOT NULL KEY, ... ); CREATE TABLE tags ( tag_id INT(11) AUTO-INCREMENT PRI

Re: [PHP] Organisational question: surely someone has implemented many Boolean values (tags) and a solution exist

2011-01-20 Thread Richard Quadling
On 20 January 2011 14:32, Dotan Cohen wrote: > I am designing an application that make heavy usage of one-to-many > tags for items. That is, each item can have multiple tags, and there > are tens of tags (likely to grow to hundreds). Most operation on the > database are expected to be searches for

RE: [PHP] Class and interface location

2011-01-20 Thread Tommy Pham
> -Original Message- > From: Steve Staples [mailto:sstap...@mnsi.net] > Sent: Thursday, January 20, 2011 5:16 AM > To: Larry Garfield > Cc: php-general@lists.php.net > Subject: Re: [PHP] Class and interface location > > On Wed, 2011-01-19 at 21:46 -0600, Larry Garfield wrote: > > On Wednes

Re: [PHP] email address syntax checker

2011-01-20 Thread Nilesh Govindarajan
On 01/20/2011 09:44 AM, Donovan Brooke wrote: Hi Guys, I'm waddling my way through database interaction and thought someone on the list may already have a simple email checker that they'd like to share... you know, looking for the @ char and dots etc.. I did a quick search of the archives and

Re: [PHP] Class and interface location

2011-01-20 Thread Steve Staples
On Wed, 2011-01-19 at 21:46 -0600, Larry Garfield wrote: > On Wednesday, January 19, 2011 8:56:50 pm Tommy Pham wrote: > > > > And actually, thinking about it, I wonder if requiring the explicit > > declaration > > > is a good thing anyway because then it's immediately obvious and > > > greppable

Re: [PHP] Class and interface location

2011-01-20 Thread Richard Quadling
On 20 January 2011 03:46, Larry Garfield wrote: > Does that make it clearer what I'm trying to do? Some ideas. I've no idea if any of them are any good. 1 - All plugins implement a self-registration mechanism. A analogy to this in the Windows world would be an ActiveX component. All ActiveX com