[nyphp-talk] PHP on a Corporate IntrAnet w/ AD

2007-03-20 Thread Michael B Allen
n so locals will get four star support for peanuts. I'm pretty sure I'll be at the LUG meeting tomorrow too if you have any questions. Thanks, Mike -- Michael B Allen PHP Active Directory Kerberos SSO http://www.ioplex.com/ ___ New York PH

Re: [nyphp-talk] PHP on a Corporate IntrAnet w/ AD

2007-03-20 Thread Michael B Allen
out how to parameterize all of the possible differences in LDAP schemas, how to query for groups, how to abstract the concept of a Windows SID, etc but right now we are focused on AD since that is almost exclusively what the Megacorps are using. Mike -- Michael B Allen PHP Active Directory Kerb

Re: [nyphp-talk] PHP + UTF-8 + mb_string issue.

2007-03-20 Thread Michael B Allen
erations as opposed to byte-wise (and that assumes you're running in the UTF-8 locale). Mike -- Michael B Allen PHP Active Directory Kerberos SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/

Re: [nyphp-talk] CSV file Reading

2007-03-26 Thread Michael B Allen
errno = EILSEQ; PMNF(errno, ": bad end quote in element %d", (r + 1)); return -1; } } if (ch == -1) { AMSG(""); return -1; } if (bn == 0) { PMNO(errno = E2BIG);

Re: [nyphp-talk] Single Signon Multiple Domains

2007-03-26 Thread Michael B Allen
ou would need to mcrypt the cookie and traffic with the central server with a secret shared by all participating servers. There are no doubt other permutations of this but I think all would need to satisfy the two problems regarding where to store the state and how to determine the identity. M

Re: [nyphp-talk] Single Signon Multiple Domains

2007-03-26 Thread Michael B Allen
ot logged in, then you reauthenticate them and submit the updated state to erenetwork.com. Then when the client goes to another site, the same thing happends but this time the session state indicates they are already logged in and thus they do not have to log in again. Mike > On 3/26/07, Micha

Re: [nyphp-talk] pagination of search results with ldap

2007-04-06 Thread Michael B Allen
nf($i['value'], '{iO}', &$pagesize, &$cookie); $paged_control_found = TRUE; break; } } } if (!$paged_control_found) { echo "Not OK: paged control not found in response \n"; ex

Re: [nyphp-talk] PHP and SFTP

2007-04-19 Thread Michael B Allen
xtension but you could simply use popen to call scp. To validate the file was transferred successfully you could then follow up with a call to popen and a command like: ssh host.foo.net "ls -l file.txt" and then parse the size from the output and compare it to the local file size.

Re: [nyphp-talk] Support Ticket Sytem

2007-05-17 Thread Michael B Allen
> ticket. > > 2. Read the contents of the mail. > > I am working on LAMP. How can accomplish the two tasks in a PHP-MYSQL? Can > someone help me ? > > > > Regards > Aniesh Joseph > -- Michael B Allen PHP Active Directory Kerberos SSO http://www.ioplex.com/

Re: [nyphp-talk] Support Ticket Sytem

2007-05-17 Thread Michael B Allen
On Thu, 17 May 2007 18:10:46 -0400 Jon Baer <[EMAIL PROTECTED]> wrote: > http://trac.edgewall.org/ Just looked at it and clearly it's nothing like I described. Mike ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/ta

Re: [nyphp-talk] Support Ticket Sytem

2007-05-17 Thread Michael B Allen
icket numbers if someone submits additional messages with a new ticket number. Depending on how you generate the ticket numbers you wouldn't even need a database. It's just two php scripts - one for processsing incoming mail and another for searching / submitting tickets. Mike > On May 17,

Re: [nyphp-talk] Support Ticket Sytem

2007-05-17 Thread Michael B Allen
Oh, and it can't have any XML, AJAX, Web 2.0 or fuzz like that. I don't want to win awards, I just want to get s**t done. Mike On Thu, 17 May 2007 18:56:50 -0400 Michael B Allen <[EMAIL PROTECTED]> wrote: > On Thu, 17 May 2007 18:38:02 -0400 > Jon Baer <[EMAIL PROT

Re: [nyphp-talk] Support Ticket Sytem

2007-05-17 Thread Michael B Allen
e. It's just two php scripts - one for processsing incoming > > mail and another for searching / submitting tickets. > > > > Mike > > > > > ___ > New York PHP Community Talk Mailing List > http://lists.nyphp.or

Re: [nyphp-talk] Support Ticket Sytem

2007-05-17 Thread Michael B Allen
On Fri, 18 May 2007 01:09:06 -0400 Rolan Yang <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > The support ticket system I always wanted was one that just used IMAP > > for everything where the "tickets" where really just emails. > This brings up anot

Re: [nyphp-talk] Support Ticket Sytem

2007-05-18 Thread Michael B Allen
el can continue to just do everything with emails (but with an occasional ticket number fixup) while devs can give interesting things a priority so that it shows up in some colorful web table with priority, status, SquirrelMail links, etc. Than maybe later on when they want something more sophist

Re: [nyphp-talk] Support Ticket Sytem

2007-05-18 Thread Michael B Allen
On Fri, 18 May 2007 08:44:17 -0400 csnyder <[EMAIL PROTECTED]> wrote: > On 5/17/07, Michael B Allen <[EMAIL PROTECTED]> wrote: > > Hi CED, > > > > That does look like it's worth a look but it still doesn't look like the > > "IMAP server is t

Re: [nyphp-talk] Support Ticket Sytem

2007-05-18 Thread Michael B Allen
On Fri, 18 May 2007 11:40:41 -0400 Rolan Yang <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > On Fri, 18 May 2007 08:44:17 -0400 > > csnyder <[EMAIL PROTECTED]> wrote: > > > >> Mike, build it this weekend, then sell it to Aniesh. ;-) > >

Re: [nyphp-talk] Support Ticket Sytem

2007-05-18 Thread Michael B Allen
orities, b.) due dates, c.) simultaneous multiple users, and finally > > > d.) performance? > > > > On 5/18/07, Michael B Allen <[EMAIL PROTECTED]> wrote: > > > > You could do some of these thing though. You would need an actual database > > but consider

[nyphp-talk] How not to save HTML entities to the DB when using htmlentities()?

2007-05-27 Thread Michael B Allen
ayed correctly. How can I protect my pages from script injection and display content in form fields correctly? Mike -- Michael B Allen PHP Active Directory Kerberos SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyp

Re: [nyphp-talk] How not to save HTML entities to the DB when using htmlentities()?

2007-05-27 Thread Michael B Allen
On Sun, 27 May 2007 18:14:15 -0400 Chris Shiflett <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > I am using htmlentities($text, ENT_COMPAT, 'UTF-8'); to escape text > > from the db to be displayed in form fields. This works fine but when > > the text

[nyphp-talk] Array Reference Strangeness

2007-05-27 Thread Michael B Allen
0] => a1 [key1] => val1 ) [2] => Array ( [0] => a2 [key2] => val2 What's the problem? Mike -- Michael B Allen PHP Active Directory Kerberos SSO http://www.ioplex.com/ ___ New York PHP Comm

Re: [nyphp-talk] Array Reference Strangeness

2007-05-28 Thread Michael B Allen
On Mon, 28 May 2007 08:55:39 -0400 Flavio daCosta <[EMAIL PROTECTED]> wrote: > Remember from the php manual: References in php are not like C pointers. > (they are symbol table aliases) > > On 05/28/2007 12:20 AM, Michael B Allen wrote: > > > for ($i = 0; $i <

[nyphp-talk] The page you are tring to view contains POSTDATA ...

2007-06-03 Thread Michael B Allen
Good Afternoon NYPHP Talk, If you hit the browser's Back button after submitted POST, that dialog box pops up that reads: "The page you are trying to view contains POSTDATA ... To resend the data hit Ok. Otherwise hit Cancel." The way I see it, this message box must NEVER appear on a professio

Re: [nyphp-talk] The page you are tring to view contains POSTDATA ...

2007-06-03 Thread Michael B Allen
On Sun, 03 Jun 2007 18:53:03 -0400 Chris Shiflett <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > If you hit the browser's Back button after submitted POST, that dialog > > box pops up that reads: > > > > "The page you are trying to view contai

Re: [nyphp-talk] The page you are tring to view contains POSTDATA ...

2007-06-03 Thread Michael B Allen
On Sun, 3 Jun 2007 23:17:30 -0400 Michael B Allen <[EMAIL PROTECTED]> wrote: > One special case is the search box which uses POST so I'll have to use > some JavaScript to make that use GET. Actually what am I talking about, I can just set the form method to GET. Fee

Re: [nyphp-talk] ucfirst question

2007-06-12 Thread Michael B Allen
ely coarse about things that different systems may or may not support (e.g. i18n). This is contrary to the top-down method of designing more modern and user friendly scripting languages but it provides somewhat of a guarantee that there will be no holes in the API since C is the common denom

[nyphp-talk] Determining if cmd line script is running as root?

2007-07-26 Thread Michael B Allen
Hi, How does one determine if a command line PHP script is being executed as root? If there's no posix extension there's no posix_getuid and if the user did 'su' and not 'su -' then the USER environment variable may not be root. Any other ways? Mike

Re: [nyphp-talk] Determining if cmd line script is running as root?

2007-07-29 Thread Michael B Allen
On 7/26/07, Jon Baer <[EMAIL PROTECTED]> wrote: > One possible way ... > > > > $php whoami.php > jonbaer > $sudo php whoami.php > root Hi Guys, Actually what I settled on was: function is_root() { if (is_writable('/')) return TRUE; if (extension_loaded('posix') && posix_getuid()

[nyphp-talk] Incomplete Objects, Class Definitions and require_once

2007-08-05 Thread Michael B Allen
Hi, Every once in a while I run into this and it takes a few hours to figure out what the right sequence of require_once statements are required to wriggle out of it: Notice: [...] The script tried to execute a method or access a property of an incomplete object. Please ensure that the class defi

Re: [nyphp-talk] Incomplete Objects, Class Definitions and require_once

2007-08-05 Thread Michael B Allen
ges to something that invalidated the class definition of that object. As soon as I logged out the Auth object in the session was reinstantiated and the error went away. No big deal. Thanks, Mike > On Aug 5, 2007, at 2:49 PM, Michael B Allen wrote: > > > Hi, > > > > Every once in a

Re: [nyphp-talk] Incomplete Objects, Class Definitions and require_once

2007-08-05 Thread Michael B Allen
> Hi Brent, > > Well I figured out what the problem was. I was putting an 'Auth' > object in the session. I made some changes to something that > invalidated the class definition of that object. As soon as I logged > out the Auth object in the session was reinstantiated and the error > went away.

[nyphp-talk] preg_match (related to Many pages one script discussion)

2007-08-06 Thread Michael B Allen
Hey, It so happens I'm working on a CMS component and the 'Many pages one script' discussion has inspired me to add mod_rewrite capability. I have a catch-all RewriteRule that just sends everything through index.php at the top of which I have a "handler table" that maps the REQUEST_URI to a handle

Re: [nyphp-talk] preg_match (related to Many pages one script discussion)

2007-08-06 Thread Michael B Allen
. Thanks, Mike > On Aug 6, 2007, at 9:46 PM, Michael B Allen wrote: > > > '@/news/([0-9]+)/([0-9]+)/([0-9]+)@' > > ___ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > &g

[nyphp-talk] Good Font Size Control

2007-08-08 Thread Michael B Allen
Hi Again, I'm working on a site and I'd like to give the user a little more control over the font size throughout the site. Something like those "A" controls on sites that allow the user to select x-large, large, regular, small, or x-small. How is that best done? So far I've just been using

Re: [nyphp-talk] Good Font Size Control

2007-08-08 Thread Michael B Allen
On 8/8/07, Tom Sartain <[EMAIL PROTECTED]> wrote: > As far as the AAA controls, the easiest way I've seen to do this is to > have alternate style sheets for each font size, then use javascript to > switch between them. I'm hoping you have a few sites to refer to and > figure out the logistics of it

Re: [nyphp-talk] Good Font Size Control

2007-08-10 Thread Michael B Allen
On 8/8/07, Dan Cech <[EMAIL PROTECTED]> wrote: > My personal preference is to use the following rule: > > * { > font-size: 100%; > } > > to reset the size of all fonts to 100% of the parent element, then set a > size on the body tag as your baseline, eg: > > body { > font-size: small; > } > > N

[nyphp-talk] Accessing First Element of Array

2007-08-26 Thread Michael B Allen
Hi, How do you access the first element of an array? I'm looking for something like array_shift but without modifying the array. Mike ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations

Re: [nyphp-talk] Accessing First Element of Array

2007-08-26 Thread Michael B Allen
write something myself: function array_first($array) { foreach ($array as $element) return element; } > > > "Michael B Allen" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > How do you access the first element of an array? I'm lo

Re: [nyphp-talk] Accessing First Element of Array

2007-08-26 Thread Michael B Allen
On 8/26/07, Jon Baer <[EMAIL PROTECTED]> wrote: > Is it anything that $array[0] would not be able to get access to? Hi Jon, Nope. The 0 element is not necessarily first. Consider the following example: $array = array(); $array['first'] = 'foo'; $array[] = 'bar'; $ ./t.php Array ( [first] =>

Re: [nyphp-talk] Accessing First Element of Array

2007-08-26 Thread Michael B Allen
On 8/26/07, Dell Sala <[EMAIL PROTECTED]> wrote: > On Aug 26, 2007, at 9:08 PM, Michael B Allen wrote: > > > On 8/26/07, Jon Baer <[EMAIL PROTECTED]> wrote: > >> Is it anything that $array[0] would not be able to get access to? > > > > Nope. The 0 e

Re: [nyphp-talk] Accessing First Element of Array

2007-08-26 Thread Michael B Allen
On 8/26/07, Ken Downs <[EMAIL PROTECTED]> wrote: > "Michael B Allen" <[EMAIL PROTECTED]> wrote: > > > On 8/26/07, Ken Downs <[EMAIL PROTECTED]> wrote: > > > look at "each", it is a (mostly deprecate) form of array iteration. The > &g

Re: [nyphp-talk] Accessing First Element of Array

2007-08-26 Thread Michael B Allen
On 8/26/07, Ken Downs <[EMAIL PROTECTED]> wrote: > "Michael B Allen" <[EMAIL PROTECTED]> wrote: > > > On 8/26/07, Ken Downs <[EMAIL PROTECTED]> wrote: > > > "Michael B Allen" <[EMAIL PROTECTED]> wrote: > > > > > &g

Re: [nyphp-talk] Accessing First Element of Array

2007-08-27 Thread Michael B Allen
On 8/27/07, Ken Downs <[EMAIL PROTECTED]> wrote: > "Michael B Allen" <[EMAIL PROTECTED]> wrote: > > > > > > > > > > Um, you could, uh, write a function called array_first() that does the > > > reset() and then calls each()? Th

[nyphp-talk] array_get_value?

2007-09-21 Thread Michael B Allen
Hey, I find myself doing a lot of: if (isset($data['foo'])) // use $data['foo'] Is there an existing array function that gets the array value or returns a default value like: function array_get_value($arr, $key, $def) { return array_key_exists($arr, $key) ? $arr[$key] : $def;

Re: [nyphp-talk] array_get_value?

2007-09-21 Thread Michael B Allen
On 9/21/07, Kenneth Downs <[EMAIL PROTECTED]> wrote: > > $state = ArrayValue($_POST,'state','NY'); Theres a mistake in your code. It should be: $state = ArrayValue($_POST,'state','NJ'); :-) Mike ___ New York PHP Community Talk Mailing List http://li

Re: [nyphp-talk] Integration Strategies

2007-09-24 Thread Michael B Allen
On 9/22/07, Hans Zaunere <[EMAIL PROTECTED]> wrote: > > Hello all, > > A recent presentation suggestion was on the topic of integration. For > instance, taking the best of breed CMS, calendar and shopping cart > application and getting them to cross-connect. Namely, for user > authentication, aut

[nyphp-talk] Re: Digest Authentication w/ Login Form

2007-09-27 Thread Michael B Allen
On 9/27/07, Michael B Allen <[EMAIL PROTECTED]> wrote: > Is it possible to do digest authentication from a login form? Of course I just figured out how to do this in record time. I also just realized that, for reasons not worth going into I can't use this. But for posterity here&

[nyphp-talk] Digest Authentication w/ Login Form

2007-09-27 Thread Michael B Allen
Hi, I think I already know the answer to this is a simple "no" but I suppose it can't hurt to ask. Is it possible to do digest authentication from a login form? I'm curious as to why there isn't a special form element type like "password" that doesn't compute a digest. Otherwise, is there a rea

Re: [nyphp-talk] SPL - Do you use?

2007-09-29 Thread Michael B Allen
On 9/27/07, Jon Baer <[EMAIL PROTECTED]> wrote: > Do many here use the SPL library? > > I could never really understand this "library", on one side part of the Java > programming that I really felt to be a burden of added / bloated code was > the idea of the "Iterator" (you always had to grab one)

[nyphp-talk] Apache Directives to Disable All Scripts in Sub-Directory?

2007-10-02 Thread Michael B Allen
Hey, I would like to have a directory under ~/public_html that completely disables all mime time interpretations. Specifically, if I put a php or cgi file in there I want people to see the PHP. I tried the following just to see if I could disable .php but it had no effect. RemoveType

Re: [nyphp-talk] Apache Directives to Disable All Scripts in Sub-Directory?

2007-10-02 Thread Michael B Allen
On 10/2/07, Matteo Rinaudo <[EMAIL PROTECTED]> wrote: > > I tried the following just to see if I could disable .php but it had no > > effect. > > > > > >RemoveType .php > >Order allow,deny > >Allow from all > >Options Indexes > > > > Hi, > I am not sure if

Re: [nyphp-talk] Is it hard to compile and install php from source?

2007-10-10 Thread Michael B Allen
so makes it easy to upgrade to RHEL if you're business takes off an you want better support. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.o

Re: [nyphp-talk] Is it hard to compile and install php from source?

2007-10-10 Thread Michael B Allen
ap # ... Yum will figure out all the deps and get and install the right packages. It's not the fastest thing in the world but it does the job and works out of the box. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/

Re: [nyphp-talk] Character set issues revisited

2007-10-19 Thread Michael B Allen
th two or more bytes, it's probably UTF-8. Note that if you have a lot of pages in the wrong encoding you might want to look into the iconv utility found on *nix machines. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___

Re: [nyphp-talk] Character set issues revisited

2007-10-19 Thread Michael B Allen
n is doing some transliteration. > Where should I start looking? What is the best charset to use anyway? > Iso-8859-1 or utf-8? Look at the page with hexdump to see verify what the encoding is and what the unicode value of one of the errant characters really i

Re: [nyphp-talk] Character set issues revisited

2007-10-20 Thread Michael B Allen
___ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com > > Show Your Participation in New York PHP > http://www.nyphp.org/show_participation.php >

Re: [nyphp-talk] Character set issues revisited

2007-10-23 Thread Michael B Allen
to be pedantic about it, "overlap" is more accurate. UTF-8 is a multibyte encoding of the Unicode charset. ISO-8859-1 is a single byte encoding of the ISO-8859-1 charset. So yes, Unicode is a superset of ISO-8859-1 but the UTF-8 encoding of values above 0x7f are not the same. Mike

Re: [nyphp-talk] Learning SQL - Resources & Recommendations

2007-11-03 Thread Michael B Allen
Hi Nelly, There is a book called "Oracle The Complete Reference" which is considered by many to be the best all-around database book. There are some Oracle specific bits in it but it's mostly applicable to just about any database. Mike -- Michael B Allen PHP Active Direct

Re: [nyphp-talk] OOP Books & Resources

2007-12-13 Thread Michael B Allen
tly been modelling my code after Zend Framework. Some of the ZF components are a little over-designed but I think the coding standards and organization is excellent. Just looking at some good examples might be all that you need to get on the right track. Mike -- Michael B Allen PHP Active Directory

Re: [nyphp-talk] Method overloading

2007-12-14 Thread Michael B Allen
nd in fact I find it to be superior in many ways). Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online

Re: [nyphp-talk] Setting a catch dynamically

2007-12-14 Thread Michael B Allen
f exceptions will be caught here } Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon

[nyphp-talk] static variable variable?

2007-12-19 Thread Michael B Allen
s less memory. Is there any way to do this? Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online

Re: [nyphp-talk] static variable variable?

2007-12-20 Thread Michael B Allen
this one. Thanks, Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Sho

Re: [nyphp-talk] static variable variable?

2007-12-20 Thread Michael B Allen
;nothing" if that make sense. > > > Yeah the method to wrap the variable is a bit annoying, but you can think of > it this way... the parent class doesn't care if it's static or not. It just > wants the variable. The fact the children wanted to use a static is their &g

Re: [nyphp-talk] Editing a PDF

2008-01-03 Thread Michael B Allen
rk can probably do what you want: http://framework.zend.com/manual/en/zend.pdf.html Note that even though ZF looks like you would have to commit to a whole new set of rules, there are actually little or no dependencies between components. Mike -- Michael B Allen PHP Active Directory SPNEGO SS

[nyphp-talk] Writing large files to client efficiently

2008-01-10 Thread Michael B Allen
sthru? Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Particip

Re: [nyphp-talk] Writing large files to client efficiently

2008-01-10 Thread Michael B Allen
On 1/10/08, John Campbell <[EMAIL PROTECTED]> wrote: > On Jan 10, 2008 1:49 PM, Michael B Allen <[EMAIL PROTECTED]> wrote: > > What is the most efficient way to write large files to the client? > > > > fpassthru? > > > > Mike > > Yes. Make sur

Re: [nyphp-talk] Writing large files to client efficiently

2008-01-10 Thread Michael B Allen
ing fpassthru on multiple servers, do you mean that with > > static files you can redirect to other servers and distribute the > > load? > > Yeah that was what I was getting at. You have a lot of options, but I > recommend designing your system so it separates the "what

Re: [nyphp-talk] Question about explicit returns

2008-01-11 Thread Michael B Allen
$this->setRestrictedItemList($restrictedItems); return true; } } } return false; } -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing Lis

Re: [nyphp-talk] Question about explicit returns

2008-01-11 Thread Michael B Allen
he number of exit points because it simplifies the function contract. If you have to modify the code later, there are fewer exit points to consider. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk

Re: [nyphp-talk] Question about explicit returns

2008-01-11 Thread Michael B Allen
estrictedItems() } // undo sometihng from loadObjectByRecordId() } return false; } 3) If you're trying to debug using a few log statements you might have to breakup the condition. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/

Re: [nyphp-talk] Why do "cool kids" choose PHP to build websites instead of Java

2008-01-15 Thread Michael B Allen
's a non-trivial error prone exercise. It's all very disappointing really since the language by itself is great. Mike > ___ > New York PHP Community Talk Mailing List > http://lists.nyphp.org/mailman/listinfo/talk > > NYPHPCon 2006 Presentations Online > http://www.nyphpcon.com

[nyphp-talk] Web Services

2008-01-15 Thread Michael B Allen
On 1/15/08, Tim Gales <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > [...] > > PHP is not Mathematica. It's primarily a template based system for > > emitting text... > > Peter Yared (who gave a presentation back in '05) says many application >

Re: [nyphp-talk] htmlentities charset bug

2008-01-23 Thread Michael B Allen
fix them and someone swipes that text off the page and pastes it into an email that's ISO-8859-1 then they'll be squashed to '?' or sometimes ugly rectangles. I always use UTF-8. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/

Re: [nyphp-talk] htmlentities charset bug

2008-01-23 Thread Michael B Allen
On 1/23/08, Cliff Hirsch <[EMAIL PROTECTED]> wrote: > On 1/23/08 12:58 PM, "Michael B Allen" <[EMAIL PROTECTED]> wrote:>> Reason: > > if the browser was really sophisticated about it > > it could pop-up a dialog that warns you and asks you if you would

[nyphp-talk] Dynamic Form Elements

2008-02-01 Thread Michael B Allen
I'm familiar with DOM, DHTML, JavaScript, etc but I'm not sure what the best way to do dynamic forms is. Basically I just want to dynamically insert or remove one element in a form. The form is normally just a select with a submit button immediately to it's right. But depending on what option in t

Re: [nyphp-talk] Dynamic Form Elements

2008-02-01 Thread Michael B Allen
On 2/1/08, Jake McGraw <[EMAIL PROTECTED]> wrote: > Then I'd use JavaScript to hide the optional select > list, remove the "Applicable only for value XYZ" and detect an > onchange event on the first select list for ... But w/ JavaScript turned on how do I hide the select so that it no longer occup

Re: [nyphp-talk] Dynamic Form Elements

2008-02-01 Thread Michael B Allen
On 2/1/08, Allen Shaw <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > Basically I just want to dynamically insert or remove one element in a > > form. The form is normally just a select with a submit button > > immediately to it's right. But depending on

Re: [nyphp-talk] preserving cross-domain login?

2008-02-04 Thread Michael B Allen
can't access much info about the user once your authenticate and of course you have to use a Windows web server. Finally, my company (yes this is a proprietary pitch after all) offers a full featured SPNEGO solution specifically for PHP on Linux and FreeBSD. See sig for details. Mike -- Michae

[nyphp-talk] JavaScript just above form in body?

2008-02-06 Thread Michael B Allen
used no? Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your

Re: [nyphp-talk] JavaScript just above form in body?

2008-02-06 Thread Michael B Allen
On 2/6/08, John Campbell <[EMAIL PROTECTED]> wrote: > On Feb 6, 2008 2:06 PM, Michael B Allen <[EMAIL PROTECTED]> wrote: > > Is it considered bad practice to emit scripts within the body of a > > page such as immediately preceeding the form that uses it? It seems to >

Re: [nyphp-talk] JavaScript just above form in body?

2008-02-06 Thread Michael B Allen
generally have to change the javascript, so why > not keep it in one place? I was not going to have a .js for each page. I think one .js will do. And I don't see how this is any different from another cached .gif or .css. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://w

[nyphp-talk] htmlspecialchars: ENT_COMPAT or ENT_QUOTES

2008-02-09 Thread Michael B Allen
e any way to get into trouble with htmlspecialchars? Are there pitfalls to using ENT_COMPAT? Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/lis

Re: [nyphp-talk] Drupalcon in Boston, March 3 - 6

2008-02-10 Thread Michael B Allen
oft bid that Yahoo denied? They're referring to the New England Patriot's loss to the New York Giants in Super Bowl XXLII last Sunday. New England was 18-0 and a win in the Super Bowl would have been a "perfect season". Almost 100 million people watched the game, second only to

Re: [nyphp-talk] Drupalcon in Boston, March 3 - 6

2008-02-10 Thread Michael B Allen
On 2/10/08, David Krings <[EMAIL PROTECTED]> wrote: > I thought the FCC > prohibits brutality (football) and sex (cheerleaders) on daytime TV. Not if you're wearing protection. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http

[nyphp-talk] linebreak not emitted after ?>

2008-02-13 Thread Michael B Allen
irk? Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Y

Re: [nyphp-talk] Urgent: Help in Defending Attack

2008-02-28 Thread Michael B Allen
pattern and replace your stop gap code with it: if (is_annoying()) { sleep(10); die(); } Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailma

Re: [nyphp-talk] Charsets are still driving me nuts

2008-03-05 Thread Michael B Allen
don't recall which, I think it was SHIFT-JIS). -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online ht

[nyphp-talk] Is @$arr['key'] ok?

2008-03-08 Thread Michael B Allen
Is there any preference for: $val = isset($arr['key']) ? $arr['key'] : null; vs: $val = @$arr['key']; ? -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Maili

Re: [nyphp-talk] Is @$arr['key'] ok?

2008-03-08 Thread Michael B Allen
I've been using the following function a lot too: function _array_val($a, $k, $d = null) { if (array_key_exists($k, $a)) return $a[$k]; if (func_num_args() == 3) return $d; throw new Exception("No such array key: $k"); } --8<-- example --8<-- $val =

Re: [nyphp-talk] Slightly OT - Apache Stress Test

2008-03-12 Thread Michael B Allen
e command retrieves the supplied URL 1000 times with at most 3 concurrent requests at one time. It's not very comprehensive but it's great for sanity testing. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ _

Re: [nyphp-talk] Splitting multi-page PDFs

2008-03-14 Thread Michael B Allen
but > those seem more concerned with building documents rather than tearing > them apart... > > Anyone know how to do this? Zend_Pdf from Zend Framework can import PDFs. But I've never used it so I have no idea if it can do what you want or if it's worth using. Mike -- Mi

Re: [nyphp-talk] Did you know that each integer in a PHP array takes 68 bytes of storage?

2008-04-01 Thread Michael B Allen
;t smart enough to insert enough elements to see elements hash to the same bucket. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/t

Re: [nyphp-talk] ColdFusion vs PHP (Ruby, Perl....)

2008-05-01 Thread Michael B Allen
ions and don't get duped if their skills are going to be the tie breaker. There area lot of smooth talkers out there. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ New York PHP Community Talk Mailing Lis

[nyphp-talk] Abstracting CSS: Reusable HTML UI Components

2008-05-03 Thread Michael B Allen
and have things line up into columns. So for now I'm going to use tables but I would be very interested in hearing someone make a case for tableless forms. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/ ___ Ne

Re: [nyphp-talk] Abstracting CSS: Reusable HTML UI Components

2008-05-03 Thread Michael B Allen
On Sat, May 3, 2008 at 10:57 PM, Mark Armendariz <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > > > Secondarily, would you expect a professional library of this type to use > > tableless forms? Personally I have never been able to create tableless > > f

Re: [nyphp-talk] Abstracting CSS: Reusable HTML UI Components

2008-05-04 Thread Michael B Allen
On Sun, May 4, 2008 at 10:28 AM, Daniel Convissor <[EMAIL PROTECTED]> wrote: > Hi Mike: > > > On Sat, May 03, 2008 at 09:57:06PM -0400, Michael B Allen wrote: > > > > > > > > Account Information > > Username:abaker > > > >

Re: [nyphp-talk] Abstracting CSS: Reusable HTML UI Components

2008-05-04 Thread Michael B Allen
On Sun, May 4, 2008 at 11:27 AM, tedd <[EMAIL PROTECTED]> wrote: > At 11:10 AM -0400 5/4/08, Michael B Allen wrote: > > > > > On Sun, May 4, 2008 at 10:28 AM, Daniel Convissor > > > > > On Sat, May 03, 2008 at

Re: [nyphp-talk] protecting download directory in PHP app on Unix box?

2008-05-28 Thread Michael B Allen
name so that you can send a Content-Disposition header with the friendly filename. Of course there are many permutations of this. It really depends on your specific needs and constraints. Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www.ioplex.com/

Re: [nyphp-talk] Disabling browser back button.

2008-06-21 Thread Michael B Allen
ining a random token. The server stores a copy of the random token in the user's session. When the form is submitted, check to make sure the token matches the one in the session. If it does destroy it and perform the desired operation. Now if the user later backs into the form and submits it

  1   2   3   >