[PHP-DEV] Interface for __get, __set, __isset, __unset?

2008-05-25 Thread Michael B Allen
Is there an interface for: interface ??? { public function __get($name); public function __set($name, $value); public function __isset($name); public function __unset($name); } I have a bunch of classes that use this and I'm trying to normalize things. I'm been tryin

[PHP-DEV] How to abort MINIT?

2008-05-21 Thread Michael B Allen
t the extension is still loaded. It's just not initialized. Is there any way to abort within PHP_MINIT_FUNCTION or call a function to remove the extension from the runtime such that calling extension_loaded('plexcel') returns FALSE? Mike -- Michael B Allen PHP Active Directory SPNEG

Re: [PHP-DEV] Supporting External Authentication in the Oracle OCI8 Extension

2008-05-08 Thread Michael B Allen
. Then Kerberos aware clients (e.g. pgsql_connect) look at the KRB5CCNAME environment variable and use that ccache file to acquire credentials for the desired resource. Does the PHP oci8 extension handle this scenario? Mike -- Michael B Allen PHP Active Directory SPNEGO SSO http://www

[PHP-DEV] zval taint bits

2008-04-22 Thread Michael B Allen
Hi, I saw Wietse's taint presentation at nyphp last night and I just wanted to express my support for the feature. It seems to me OR-ing bits together between zval fields is relatively harmless. Clearly it will not catch everything as extensions can introduce clean zvals that are in fact tainted

Re: [PHP-DEV] FPE in ld-linux-x86-64.so loading custom extension

2008-04-13 Thread Michael B Allen
On 4/11/08, Michael B Allen <[EMAIL PROTECTED]> wrote: > On 4/11/08, Antony Dovgal <[EMAIL PROTECTED]> wrote: > > On 10.04.2008 21:19, Michael B Allen wrote: > > > > > Can anyone recommend a method for debugging this issue? > > > > &g

Re: [PHP-DEV] FPE in ld-linux-x86-64.so loading custom extension

2008-04-11 Thread Michael B Allen
On 4/11/08, Antony Dovgal <[EMAIL PROTECTED]> wrote: > On 10.04.2008 21:19, Michael B Allen wrote: > > > Can anyone recommend a method for debugging this issue? > > > > I'd start with --enable-debug and valgrind. > > > > It seems to be this

[PHP-DEV] FPE in ld-linux-x86-64.so loading custom extension

2008-04-10 Thread Michael B Allen
Dear All, One of my clients is seeing an FPE in ld-linux-x86-64.so when loading extensions with my custom extension loaded. The backtrace is inlined below. With my extension disabled, everything loads and runs ok. I can't tell if the loader is in the process of loading my extension. I have an Op

Re: [PHP-DEV] Asymmetric Module Init / Deinit

2008-01-18 Thread Michael B Allen
gh I did not compile php --with-mysql) on x86_64-redhat-linux. Mike [1] http://www.php.net/manual/en/install.unix.apache2.php > Michael B Allen wrote: > > I have someone using my extension who is seeing some strange behavior > > where the module initializes which Apache starts, the

[PHP-DEV] Asymmetric Module Init / Deinit

2008-01-17 Thread Michael B Allen
I have someone using my extension who is seeing some strange behavior where the module initializes which Apache starts, the extension works perfectly and then, without warning, after about 40 seconds, the deinitialization routine runs. This kills some state in a global context and everything goes v

Re: [PHP-DEV] Referencing constants in extension code

2008-01-17 Thread Michael B Allen
On 1/18/08, Antony Dovgal <[EMAIL PROTECTED]> wrote: > On 18.01.2008 04:39, Michael B Allen wrote: > >> You have to copy the string if you want to store it. > > > > Ok. Doesn't look like I have much choice. I just wanted to understand > > the problem better

Re: [PHP-DEV] Referencing constants in extension code

2008-01-17 Thread Michael B Allen
On 1/17/08, Antony Dovgal <[EMAIL PROTECTED]> wrote: > On 17.01.2008 23:33, Michael B Allen wrote: > > This has worked fine > > Are you really sure? It has worked just fine under load in production with PHP 5, 5.0 and 5.1. It *seems* there's something different about 5.2

[PHP-DEV] Referencing constants in extension code

2008-01-17 Thread Michael B Allen
Hi, It seems something has changed recently regarding referencing constants that has broken my extension and I'm trying to figure out exactly what the right thing to do is. When passing a string constant to an extension function, within the extension I have been saving that string directly for po

Re: [PHP-DEV] [SOLVED] Unexpected Extension Deinitializing on Startup

2007-04-20 Thread Michael B Allen
One word: SELinux On Thu, 19 Apr 2007 23:46:08 -0400 Michael B Allen <[EMAIL PROTECTED]> wrote: > We have an extension that forks a process from the initial Apache root > process and does privileged work. The regular Apache workers running as > 'apache' communicate with

Re: [PHP-DEV] Unexpected Extension Deinitializing on Startup

2007-04-20 Thread Michael B Allen
On Fri, 20 Apr 2007 01:57:45 -0700 Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > On Fri, 20 Apr 2007 09:20:26 +0200 (CEST) > > Derick Rethans <[EMAIL PROTECTED]> wrote: > > > >> On Thu, 19 Apr 2007, Michael B Allen wrote: > &g

Re: [PHP-DEV] Unexpected Extension Deinitializing on Startup

2007-04-20 Thread Michael B Allen
On Fri, 20 Apr 2007 09:20:26 +0200 (CEST) Derick Rethans <[EMAIL PROTECTED]> wrote: > On Thu, 19 Apr 2007, Michael B Allen wrote: > > > Is there an Apache or PHP setting that would cause an extension to be > > deinitilized in the initial root process on startup? > &g

[PHP-DEV] Unexpected Extension Deinitializing on Startup

2007-04-19 Thread Michael B Allen
ke that or a bug that could cause the deinitialization routine to run? Env is CentOS 4.4 with stock packages (PHP 5.1.6). Any help with this would be greatly appreciated. Mike -- Michael B Allen PHP Active Directory Kerberos SSO http://www.ioplex.com/ -- PHP Internals - PHP Runtime Developme

Re: [PHP-DEV] The PHP.net Google Summer of Code Application

2007-03-26 Thread Michael B Allen
On Mon, 26 Mar 2007 01:53:53 -0400 [EMAIL PROTECTED] wrote: > I am ready to work 64 hr/week with you. Now this guy is qualified. Not because he's willing to work 64 hr/week but because the hr/week chosen is a power of 2. He even thinks like a computer! :-> -- Michael B Allen

[PHP-DEV] php_free does not accept NULL?

2007-03-24 Thread Michael B Allen
I've noticed that unlike stdlib's 'free' php_free does not accept the value NULL. Is that correct? I would think it would be harmless to have it check for NULL and return quietly no? Mike -- Michael B Allen PHP Active Directory Kerberos SSO http://www.ioplex.com/ --

Re: [PHP-DEV] Bug # 33500 | imap auth fails when server advertises gssapi

2007-03-23 Thread Michael B Allen
quot;; } The first 5 lines are specific to our product but if you used mod_auth_kerb instead with the option: KrbSaveCredentials on the ldap_sasl_bind should work with the above code (never tried it but I would be surprised if it didn't work). One thing that I have noticed that does n

Re: [PHP-DEV] Module init not called when loaded by dl from CLI?

2007-03-22 Thread Michael B Allen
On Thu, 22 Mar 2007 20:02:53 -0400 Michael B Allen <[EMAIL PROTECTED]> wrote: > I'm seeing that PHP_MINIT_FUNCTION does not get called if it's loaded > with dl from a CLI script. Anyone else seeing that? > > If I add two lines to write a file like: > > PHP_

[PHP-DEV] Module init not called when loaded by dl from CLI?

2007-03-22 Thread Michael B Allen
le initializing ...\n"); fflush(out); The file is never created. Is there something fundamentally new about doing extensions in 5.2? Mike -- Michael B Allen PHP Active Directory Kerberos SSO http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Bug # 33500 | imap auth fails when server advertises gssapi

2007-03-22 Thread Michael B Allen
uire Kerberos credentials in three ways - 1 Single Sign-On (the delegated credential from the web client); 2 use the HTTP service account cred; or 3 explicit logon with username and password. So you could use any one of those three credentials (with the putenv_krb5ccname option) to get a Kerberos

Re: [PHP-DEV] Re: PHP version and Zend API Number

2007-03-20 Thread Michael B Allen
On Tue, 20 Mar 2007 13:17:24 +0100 Michael Wallner <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > Hi, > > > > Is there a way to get the version of the PHP binary that loaded an > > extension from within the extension? I don't mean the PHP versi

[PHP-DEV] PHP version and Zend API Number

2007-03-19 Thread Michael B Allen
nsion? Similarly is there a way to get the zend API version of the PHP binary (not the version the extension was compiled with)? Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.ph

[PHP-DEV] zend_parse_parameters 's!' for NULL string ok?

2007-02-04 Thread Michael B Allen
'!' character also work with strings (s)? It seems to work but I just want to make sure. Mike [1] http://www.zend.com/apidoc/zend.arguments.retrieval.php -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscr

Re: [PHP-DEV] Comments on PHP security

2007-01-12 Thread Michael B Allen
imestamp desc", $page_id); This is much easier on the eyes since it only parameterizes the parameter. Does JDBC have some intelligence about fields that makes this difficult to implement? This would be very simple to implement if the query method just called mysql_real_escape string or whatever escape function the db required (e.g. pgsql's string escape fn). Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Semaphores - feature request

2007-01-02 Thread Michael B Allen
You must use some additional application specific logic to trigger semaphore removal. For example you could have a "boss" process that collects the exit status of each "worker". When the boss process has an exit status for all workers the semaphore can be removed. Am I getting

Re: [PHP-DEV] Semaphores - feature request

2007-01-02 Thread Michael B Allen
removed whenever it is determined to be "unlocked"? Meaning you want to call semget() and semctl(IPC_RMID) for every single lock/unlock? Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Semaphores - feature request

2007-01-02 Thread Michael B Allen
ess to wake up, find the semaphore value greater than 0, decrement it, and continue on to perform it's critical section. So the point is that you cannot remove the semaphore when there are no callers waiting in semop because that is a perfectly valid state. Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Semaphores - feature request

2007-01-02 Thread Michael B Allen
d even then there's no guarantee that the semaphore will be cleaned up properly because any exit routine will not run if the application is killed, crashes, aborts, etc. The left-over SysV semaphore problem is notoriously impossible. There basically is no solution other than to simply use something

[PHP-DEV] Where to setlocale(3)?

2006-11-06 Thread Michael B Allen
, NULL) within a script returns 'C' which is to say the locale is not set. Where do I look? Thanks, Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] What version introduced RTLD_DEEPBIND?

2006-10-27 Thread Michael B Allen
extension.deepbind would be a good options (if I had > time to work on it). On second thought I suppose it should be: extension.nodeepbind = othermodule.so Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] What version introduced RTLD_DEEPBIND?

2006-10-27 Thread Michael B Allen
On Fri, 27 Oct 2006 12:12:46 -0400 "Brian J. France" <[EMAIL PROTECTED]> wrote: > On Oct 27, 2006, at 11:57 AM, Michael B Allen wrote: > > Is there any way to determine exactly which version of PHP first > > used the > > RTLD_DEEPBIND flag to dlopen(3)?

[PHP-DEV] What version introduced RTLD_DEEPBIND?

2006-10-27 Thread Michael B Allen
Hey, Is there any way to determine exactly which version of PHP first used the RTLD_DEEPBIND flag to dlopen(3)? Can webcvs be used somehow. I *think* it's between 4.3 and 4.4 but I'm not sure. Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP Inter

Re: [PHP-DEV] Upload progress

2006-10-18 Thread Michael B Allen
On Wed, 18 Oct 2006 12:39:00 -0700 Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > On Wed, 18 Oct 2006 09:31:58 -0700 > > Rasmus Lerdorf <[EMAIL PROTECTED]> wrote: > > > >> Fred Moses wrote: > >>> What ever became

Re: [PHP-DEV] Upload progress

2006-10-18 Thread Michael B Allen
ercial client of mine whose customers upload large image > > files. > > It's in 5.2. You can see it running here: > > http://progphp.com/progress.php This is cool! How big can the files be? Are they limited to post_max_size and similar? Mike -- Michael B Allen PHP Ac

Re: [PHP-DEV] Two modules w/ different instances of same lib causes crash

2006-09-15 Thread Michael B Allen
On Fri, 15 Sep 2006 15:23:16 -0400 Michael B Allen <[EMAIL PROTECTED]> wrote: > So now, I have to wonder why my customer had a problem in the first place. > > Based on the above macros, is it possible that RTLD_DEEPBIND could NOT > be chosen? The customer is using 4.3.4 whic

Re: [PHP-DEV] Two modules w/ different instances of same lib causes crash

2006-09-15 Thread Michael B Allen
... # endif On my Linux glibc 2.3 systems RTLD_DEEPBIND is chosen. So now, I have to wonder why my customer had a problem in the first place. Based on the above macros, is it possible that RTLD_DEEPBIND could NOT be chosen? Mike On Fri, 15 Sep 2006 11:43:56 -0400 Michael B Allen <[EMAI

[PHP-DEV] Two modules w/ different instances of same lib causes crash

2006-09-15 Thread Michael B Allen
case) some symbol mixing occurs and the application crashes. Can two modules use different instances of the same library? Before I go try to become an expert in linking and the Linux loader can anyone give me advice as to how to I might workaround (for Linux at least)? Mike -- Michael B Allen

Re: [PHP-DEV] What's wrong with dl?

2006-09-15 Thread Michael B Allen
On Fri, 15 Sep 2006 09:10:49 +0100 Edin Kadribasic <[EMAIL PROTECTED]> wrote: > Michael B Allen wrote: > > Our CLI module installer uses dl() to manually load the module and > > validate some basic functionality. This is a very nice feature and I'm > > disappoint

[PHP-DEV] What's wrong with dl?

2006-09-14 Thread Michael B Allen
nario because it would require running a separate script. Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Module API Changes

2006-09-14 Thread Michael B Allen
ND_MODULE_API_NO changes. Obviously the installer needs that to pick the right module to install based on phpversion(). Mike -- Michael B Allen PHP Active Directory SSO http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Module API Changes

2006-09-14 Thread Michael B Allen
On Thu, 14 Sep 2006 16:49:16 +0200 Pierre <[EMAIL PROTECTED]> wrote: > Hello, > > On 9/14/06, Michael B Allen <[EMAIL PROTECTED]> wrote: > > > Are there any other module API changes between 4 and the current version > > of PHP that would cause my module to

[PHP-DEV] Module API Changes

2006-09-14 Thread Michael B Allen
there an easier way to ship module binaries? Is the major verion number guaranteed to change when the module API changes? Are there any other module API changes between 4 and the current version of PHP that would cause my module to fail to load? Thanks, Mike -- Michael B Allen PHP Active

Re: [PHP-DEV] Mod Deinit Not Called if Bad Cmdline Option

2006-06-13 Thread Michael B Allen
On Tue, 13 Jun 2006 05:45:26 +0200 "Steph Fox" <[EMAIL PROTECTED]> wrote: > Actually it's not true either... what made you think that, Michael? Care to > describe what you're seeing? Consider the following php script: #!/usr/bin/php -q -c foo http://www.ioplex.com/ -- PHP Internals - PHP

[PHP-DEV] Can you spot the bug?

2006-06-10 Thread Michael B Allen
/extension-writing2.php#Heading3 -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Mod Deinit Not Called if Bad Cmdline Option

2006-06-10 Thread Michael B Allen
If php exits due to a bad commandline option it never calls module deinitialization routines. Is that a bug or a feature? Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe

Re: [PHP-DEV] Extension Installer Catch 22

2006-06-10 Thread Michael B Allen
unlink' first you get a new inode and I guess the old module is copy-on-write'd. Thanks, Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Extension Installer Catch 22

2006-06-10 Thread Michael B Allen
r=yes to enable the extension to detect when it is being loaded by the installer and return FALSE to indicate the extension was not loaded. The downside to this is that a warning is printed if the modudule initialization routine fails to load. Any other ideas? Thanks, Mike -- Michael B Alle

[PHP-DEV] Extension Installation

2006-06-09 Thread Michael B Allen
Is /etc/php.d a standard part of *every* php4 installation? Can I rely on it's existance? Is it's location a configuable option? Thanks, Mike -- Michael B Allen PHP Extension for SSO w/ Windows Group Authorization http://www.ioplex.com/ -- PHP Internals - PHP Runtime Development Ma

Re: [PHP-DEV] Extensions building tutorial

2006-05-25 Thread Michael B Allen
On Thu, 25 May 2006 16:58:04 +0300 "Artzi, Yoav (Yoav)" <[EMAIL PROTECTED]> wrote: > I am looking for a good place to learn about the following: > 1. Writing a customized extension > 2. Compiling PHP with customized extensions, including how can I set up > a customized location their code and what

[PHP-DEV] Signals in Extensions

2006-05-24 Thread Michael B Allen
I have an extension that interfaces with a library that sets a signal handler for some common signals. In particular the library forks processes and does socket writes so it needs to be able to handle SIGCHLD and SIGPIPE. It also registers some other signals for debugging purposes. Can I anticipate

[PHP-DEV] configure caching

2005-12-22 Thread Michael B Allen
Running configure after tweeking my extension's config.m4 has little or no effect. Where is it caching information? How do I re-configure? Thanks, Mike -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Maintaining State Across Requests / An SSO Extension

2005-12-21 Thread Michael B Allen
On Wed, 21 Dec 2005 14:06:13 +0100 Pierre <[EMAIL PROTECTED]> wrote: > On Wed, 21 Dec 2005 03:56:06 -0500 > [EMAIL PROTECTED] (Michael B Allen) wrote: > > > On Wed, 21 Dec 2005 01:58:41 -0500 > > Wez Furlong <[EMAIL PROTECTED]> wrote: > > > > >

Re: [PHP-DEV] Maintaining State Across Requests / An SSO Extension

2005-12-21 Thread Michael B Allen
On Wed, 21 Dec 2005 12:27:39 +0200 (EET) Jani Taskinen <[EMAIL PROTECTED]> wrote: > > So you're duplicating the ldap extension? :) Yeah, you might be able to do it that way. But considering the Kerberos ticket has the SIDs and LDAP would have to perform group expansion each time I think a D

Re: [PHP-DEV] Maintaining State Across Requests / An SSO Extension

2005-12-21 Thread Michael B Allen
On Wed, 21 Dec 2005 01:58:41 -0500 Wez Furlong <[EMAIL PROTECTED]> wrote: > Just curious, why aren't you writing this as an apache module? > > Is this of any use; it seems a bit dated, but could save you some effort: > http://meta.cesnet.cz/cms/opencms/en/docs/software/devel/negotiate.html Well

[PHP-DEV] Maintaining State Across Requests / An SSO Extension

2005-12-20 Thread Michael B Allen
Hello, I have a question that is maybe a little too advanced for the usual list so I'm hoping I can ask here. I want to write an extension for Kerberos 5 Single Sign On using GSSAPI. The problem is that GSSAPI is an iterative, multistep, statefull exchange. The request response flow might look li