Re: [PHP] how to build env to develop php extension

2006-09-18 Thread Michael B Allen
Thank you very much. I don't have a definitive answer for you but there's not much to the bare skeleton of an extension. Just copy one of the existing ones and start from that. That's what I did (although I didn't use Windows). Mike -- Michael B Allen PHP Active Directory SS

Re: [PHP] Odd PHP memory issue

2006-09-15 Thread Michael B Allen
ts. Then I would scale down your test. Create a db connection and close it printing memory usage along the way to make sure all memory is restored within the script execution. If that doesn't work there are memory references hanging around *somewhere*. Mike -- Michael B Allen PHP Active Directory S

Re: [PHP] Filter MS Word Garbage

2006-09-12 Thread Michael B Allen
then when the HTML field use htmlentities() to escape any special HTML character. That might preserve formatting information embedded in the clipboard fragment (if that's something you want). Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP General Mailing List (http://w

Re: [PHP] substr and UTF-8

2006-08-30 Thread Michael B Allen
Yeah, I guess that's the right thing to do. Otherwise, in a year you won't remember what the cryptic masking is all about. Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] substr and UTF-8

2006-08-30 Thread Michael B Allen
On Wed, 30 Aug 2006 10:08:36 -0400 Michael B Allen <[EMAIL PROTECTED]> wrote: > On Wed, 30 Aug 2006 18:34:20 +0700 > "Peter Lauri" <[EMAIL PROTECTED]> wrote: > > > Hi group, > > > > I want to limit the number of characters that are shown in a

Re: [PHP] substr and UTF-8

2006-08-30 Thread Michael B Allen
UTF-8 character does not have bit 8 set whereas all preceeding bytes do. Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problems with UTF

2006-08-28 Thread Michael B Allen
the META tag is for. I suspect it's for caching or when you open an HTML file from disk perhaps. Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Email with pregmatch

2006-08-27 Thread Michael B Allen
/", > $_POST['email']); This is what I use: eregi("[EMAIL PROTECTED],6}$", $email) Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] active directory and PHP

2006-08-17 Thread Michael B Allen
ldap_bind because those credentials are passed in clear text so a sniffer could collect passwords. At least use ldap_sasl_bind or do a TLS connection. 2) It's slow. Kerberos does not require communication between the web server and AD. With LDAP you would need to communicate with AD at least on

Re: [PHP] active directory and PHP

2006-08-17 Thread Michael B Allen
it requires communication with the DC whereas Kerberos does not. And it's insecure because you have to cache the users "credentials" in the user's session. -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ On Thu, 17 Aug 2006 12:14:18 +0200 "Alain Roger&

Re: [PHP] PHPSESSID used sporatically

2006-08-17 Thread Michael B Allen
On Thu, 17 Aug 2006 12:06:08 +1000 Chris <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > Searching through the logs and browsing my site (see sig) I sometimes see > > PHPSESSID is used as opposed to cookies. I know it's not simply that the > > client doesn

Re: [PHP] PHPSESSID used sporatically

2006-08-16 Thread Michael B Allen
On Thu, 17 Aug 2006 14:26:17 +1000 Chris <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > On Thu, 17 Aug 2006 12:06:08 +1000 > > Chris <[EMAIL PROTECTED]> wrote: > > > >> Michael B Allen wrote: > >>> Searching through the logs and brow

[PHP] PHPSESSID used sporatically

2006-08-16 Thread Michael B Allen
ning? I'm using PHP 4. Thanks, Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem Loading Extension

2006-08-11 Thread Michael B Allen
ppears in the apache error log. Also, of course the .so needs to be in the right location and the php.ini needs the appropriate extension directive. Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Greek Characters from MySQL to PHP to the Browser: ??????

2006-08-08 Thread Michael B Allen
ith MySQL and work your way down. Mike BTW: htmlentities has nothing to do with character conversions. -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP Frameworks - Opinion

2006-08-01 Thread Michael B Allen
he source for a few it should become apparent what techniques are superior to others. Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Return Values Copied? Copied if By Reference?

2006-07-26 Thread Michael B Allen
tion foo(&$arr) { $arr[] = "bar"; return $arr; // is this copied? } I'm working on some code that would be called to generate a cell in a possibly large table and therefore a small difference in performance may have a significant impact. Thanks, Mike -- Michael B Allen

Re: [PHP] SQL Result Set -> HTML Table Fragment (but Simple)

2006-07-24 Thread Michael B Allen
oice_date" => "Date", "invoice_amount" => "Amount", "invoice_transaction_id" => "Txn. ID", "invoice_approval_code" => "App. Code", "invoice_name" => "Name", "invoice_email"

[PHP] SQL Result Set -> HTML Table Fragment (but Simple)

2006-07-24 Thread Michael B Allen
spect. If so, can you post it? Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Different php.ini files for different apache processes on one server

2006-07-18 Thread Michael B Allen
in the process verify that one does not already exist). Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Separation between View and State (The Back Button)

2006-07-13 Thread Michael B Allen
e and takes them back to the > form page. Actually what would be even better is if there were a header that indicated the form data should NOT be reposted on back or reload. Anyone heard of such a thing? Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Separation between View and State (The Back Button)

2006-07-13 Thread Michael B Allen
rt contents I don't get to do much web programming so I'm wondering what the PHP crowd thinks of this method. Can anyone improve on this? Is it fatally flawed? How would you solve this problem in general? Thanks, Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authoriz

Re: [PHP] Debugging Log

2006-07-12 Thread Michael B Allen
On Wed, 12 Jul 2006 22:44:23 +0100 Stut <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > Thanks for the tip dipshit. > > Maybe I'm in a sensitive mood, but that was uncalled for. Michael, meet > /dev/null, I hope you live happily ever after. Oh, no. What am I

Re: [PHP] Debugging Log

2006-07-12 Thread Michael B Allen
On Wed, 12 Jul 2006 21:13:31 +0100 Stut <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Michael B Allen wrote: > > On Wed, 12 Jul 2006 19:13:53 +0100 > > Stut <[EMAIL PROTECTED]> wrote: > >> Michael B Allen wrote:

Re: [PHP] Debugging Log

2006-07-12 Thread Michael B Allen
On Wed, 12 Jul 2006 19:13:53 +0100 Stut <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Michael B Allen wrote: > > What is the standard method of logging debug info? Should I just fopen > > a file for append and write the message o

[PHP] Debugging Log

2006-07-12 Thread Michael B Allen
What is the standard method of logging debug info? Should I just fopen a file for append and write the message or is there a facility provided? Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- PHP General Mailing List (http://www.php.net

[PHP] List of Restricted Countries to Leave Out of Credit Card Form?

2006-07-11 Thread Michael B Allen
For my credit card form I provide the user with a list of countries. I suppose these are ISO country codes? For the US is there an official list of countries with which I'm not supposed to do business with? Will Authorize.Net catch those transactions? Thanks, Mike -- Michael B Alle

[PHP] Shopping Carts

2006-07-08 Thread Michael B Allen
I need a (free) shopping cart. The simpler the better. This one is what I'm looking for: http://www.zend.com/codex.php?id=112&single=1 but it doesn't use current session handling, needs validation, etc. Any ideas? Thanks, Mike -- Michael B Allen PHP Extension for SSO w/

Re: [PHP] Connection: close Always?

2005-12-22 Thread Michael B Allen
On Thu, 22 Dec 2005 17:16:03 -0500 Michael B Allen <[EMAIL PROTECTED]> wrote: > On Thu, 22 Dec 2005 09:42:08 +0100 > Jochem Maas <[EMAIL PROTECTED]> wrote: > > > Michael B Allen wrote: > > > Why does PHP always close the connection with Connection: close? I

Re: [PHP] Connection: close Always?

2005-12-22 Thread Michael B Allen
On Thu, 22 Dec 2005 09:42:08 +0100 Jochem Maas <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > Why does PHP always close the connection with Connection: close? I'm > > using PHP 4.3.11 w/ Firefox 1.0.4. Requests are HTTP/1.1 and Connection: > > keep-aliv

[PHP] Connection: close Always?

2005-12-21 Thread Michael B Allen
Why does PHP always close the connection with Connection: close? I'm using PHP 4.3.11 w/ Firefox 1.0.4. Requests are HTTP/1.1 and Connection: keep-alive is requested. Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Logging within Extension

2005-12-20 Thread Michael B Allen
On Tue, 20 Dec 2005 20:02:58 -0500 Michael B Allen <[EMAIL PROTECTED]> wrote: > I'm writing a PHP 4 extension and I would like to write debugging > information to the Apache error log.Does anyone know how to do > that? Basically I want error_log() but for within a C extension

[PHP] Logging within Extension

2005-12-20 Thread Michael B Allen
I'm writing a PHP 4 extension and I would like to write debugging information to the Apache error log.Does anyone know how to do that? Basically I want error_log() but for within a C extension. Thanks, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.

[PHP] Access Headers Submitted by Browser

2005-12-19 Thread Michael B Allen
I want to read headers submitted by the client. Are these available through some global array somewhere? Thanks, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] CSS and Tables

2005-12-09 Thread Michael B Allen
On Fri, 9 Dec 2005 19:07:36 -0800 Curt Zirzow <[EMAIL PROTECTED]> wrote: > On Fri, Dec 09, 2005 at 09:16:32PM -0500, Michael B Allen wrote: > > This question is a little OT but no doubt everyone and their brother is > > generating tables here so heres my question. > &

Re: [PHP] CSS and Tables

2005-12-09 Thread Michael B Allen
On Fri, 9 Dec 2005 20:42:14 -0600 Afan Pasalic <[EMAIL PROTECTED]> wrote: > table, tr, th, td, p, { (note there is no dot in front of the class name!) > font-size: small; > border-bottom: 1px lightgrey solid; > border-right: 1px lightgrey solid; > } > > and yo don't ned to add c

[PHP] CSS and Tables

2005-12-09 Thread Michael B Allen
This question is a little OT but no doubt everyone and their brother is generating tables here so heres my question. I'm a little frustrated with CSS. Sure I can define styles for TH, TD, and so on. But mildly sophisticated pages are buried in tables within tables. Specifying global styles for the

[PHP] static functions w/ PHP 4?

2005-12-09 Thread Michael B Allen
Is there any way to have static functions and members of an Object w/ PHP 4.3? Like: class Auth { static var error; static function authenticate() { ... } } Auth::authenticate(); ? The documentation suggests this is possible but I can't seem to make it work.

Re: [PHP] Re: QUERY_STRING Variables and POST

2005-12-08 Thread Michael B Allen
Solved. My mistake. I was visiting the form with a URL that had QUERY_STRING parameters but when I submit the form the QUERY_STRING is not propagated. In my particular case I replaced the form tag with the following PHP: "; ?> Also, regarding my original question, I think parse_str is what I wan

Re: [PHP] Re: QUERY_STRING Variables and POST

2005-12-08 Thread Michael B Allen
On Thu, 08 Dec 2005 17:56:14 -0500 Roman Ivanov <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > I'm using the POST method but I would also like to access QUERY_STRING > > parameters. Is there a convienient global array for these? If not, > > what is the

[PHP] QUERY_STRING Variables and POST

2005-12-08 Thread Michael B Allen
I'm using the POST method but I would also like to access QUERY_STRING parameters. Is there a convienient global array for these? If not, what is the definitive method for accessing them? Thanks, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

Re: [PHP] Preventing Cross Site Scripting Vulnerbilities

2005-12-08 Thread Michael B Allen
On Wed, 07 Dec 2005 14:33:07 -0500 Chris Shiflett <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > Can someone recommend a general method for avoiding / eliminating XSS > > vulnerbilities with PHP? > > Yeah, escape output. It's really that simple. Well aft

[PHP] Preventing Cross Site Scripting Vulnerbilities

2005-12-07 Thread Michael B Allen
Can someone recommend a general method for avoiding / eliminating XSS vulnerbilities with PHP? Specifically is there a library function for validating fields? If not, can someone recommend a regex that detects HTML tags? Similarly is there a library function for escaping database content for incl

[PHP] Pls check my style.

2005-12-05 Thread Michael B Allen
I'm very new to PHP so I have yet to develop a style. I would love to see how you would write this fragment of code so that I might get a better understanding of good PHP techniques and best practices. Consider the following fragment: class Account { function store() { switch ($this->sta

[PHP] String Validation / SQL Injection Vulnerbilities

2005-12-05 Thread Michael B Allen
I want to validate a string for storage into a database so that it cannot contain any content that might be interpreted as SQL, Javascript, PHP, etc. Is there a standard function or technique to perform this validation? Thanks, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] How would you write this?

2005-12-04 Thread Michael B Allen
On Sun, 4 Dec 2005 11:44:12 -0800 Curt Zirzow <[EMAIL PROTECTED]> wrote: > > .errored { > color: #FF; > } > > $set_class = array(0 => '', 1 => 'errored'); > define('SET_USERNAME', 0x01); > define('SET_PASSWORD', 0x02); > define('SET_ALL', SET_USERNAME & SET_PASSW

[PHP] XSLT Processing w/ Embedded PHP Strips Trailing '?'

2005-12-03 Thread Michael B Allen
If I run an xslt processor on some xml w/ PHP in it, the closing '?' gets removed: Username: "; } else { echo ""; } echo ""; > Would anyone happen to know why this is happening? I'm using xmlproc from libxslt-1.1.11. Thanks, Mike original XML input: Username: ";

[PHP] How would you write this?

2005-12-03 Thread Michael B Allen
The following code works but I'm a little new to PHP and I'd like to know if there are better ways to achive the same thing. In the below form example, if the user supplies one or more fields but not all that are required, the form is redisplayed but fields that were supplied are prepopulated and

[PHP] Simple Authentication Infrastructure

2005-12-02 Thread Michael B Allen
Hi, I scoping out an Internet site project and my primary consideration at the moment is authentication infrastructure. Conceptually I was thinking about something like the pseudocode at the bottom of this message (pardon all the Java-esc typing). Can PHP do this sort of thing? I'm wonderin

[PHP] Why do Sessions use Cookies?

2005-12-02 Thread Michael B Allen
Why do sessions use cookies? Isn't a session just a container associated with the user's socket? Thanks, Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php