[PHP-DEV] XMLSec support in PHP

2003-03-06 Thread Mark J. Hershenson
I use libxml2 in PHP as almost a daily task, and I love it, but as my
company is going further and further into XML as a data transport/storage
format, I've become piqued at the idea of actually using xmlsec to securely
store and/or transfer our files and RPC data.

I know that there is an xmlsec project (http://www.aleksey.com/xmlsec/)
which is building off of or related to both libxml2 and OpenSSL, so I was
curious if anyone had started work to expose xmlsec functionality to PHP. I
know the xmlsec project listed above is fairly early on in its development,
but if someone knew of a proof of concept implementation of xmlsec in PHP,
I'd love to play with it.

If there isn't, has anyone started such a project, or are planning to?

Just curious. Thanks!

Mark J. Hershenson
[EMAIL PROTECTED]
http://green-ant.com/


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] ZE2 dev snaps

2003-01-06 Thread Mark J. Hershenson
Hi all,

I know there are "Win32+ZE2 Package" snapshots on snaps.php.net, but I don't
believe I've read why there isn't a ZE2 source code snapshot for everyone
else. Checking out the source with CVS may not be the world's most difficult
practice, but automating that process likely isn't either. ;)

Is there a timeline for this, or is this being intentionally kept off the
radar?

--  mjh


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Serializer / deserializer error information?

2002-08-18 Thread Mark J. Hershenson

I am currently debugging an issue which I am finding hard to find which
centers on trying to serialize and deserialize very complex objects which,
when serialized, are around 580k in size. It's all part of a custom session
handler.

However, when I go to deserialize the value, I get back boolean false ( ===
false). Seems to me that some sort of error message might be in store, no?
Is there some reason why deserialize() does not at least throw an error like
the main parser. Something like:

"Deserialize error: Unexpected character encountered at offset 4687"

Would it be possible to incorporate this type of error reporting into PHP?

I'd be happy to provide print_r() dumps of the data involved if it would
help to diagnose the issue at hand...

As it is, it seems as though I'll just have to create a runtime file to keep
track of the important values and then recreate the objects on each page,
but it would be so much easier to serialize the dumb things. :)

   Mark J. Hershenson
   [EMAIL PROTECTED]
   http://www.green-ant.com/



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Zend API question: PHP_INI_ENTRY and PHP_INI_PERDIR

2001-02-17 Thread Mark J. Hershenson

What is the function of PHP_INI_PERDIR in PHP_INI_ENTRY's? The API docs
state:

"There's also a fourth level, PHP_INI_PERDIR, for which we couldn't verify
its behavior yet."

I figure it's got to have a purpose. Does it have something to do with
"Virtual Directory" support? I'm just swinging blindly here...:)

  Mark J. Hershenson
  [EMAIL PROTECTED]
  http://www.green-ant.com/


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] wrong implementation of isset()?

2001-02-06 Thread Mark J. Hershenson

>> Great analysis. What about answering the question? Stanislav Malyshev
>> said some months ago this is 'strange', see the discussion around bug
>> 6076. Tell us at least, why this actually isn't strange.
> 
> By default, any unset variable has value NULL - and isset(NULL) returns
> false to indicate that. Similarly, assigning NULL to a variable unsets
> it.
> 
> -Andrei
> * The great thing about standards is that there are so many to choose from. *

Well, sure, isset(NULL) should return false, it's not a variable set in the
scope. A constant(?) yes, but not a variable.

But if you set a variable at some point in a script, would it not stand to
reason that that name is in the global/local namespace, and therefore IS
set?

It's somewhat conflicting when you reason:



Yields:


   [GLOBALS] => Array
 *RECURSION*
[a] => 1
[b] => 2
[c] => 
)

So, $c is set, since it is contained in $GLOBALS. Yet it's not, because it's
NULL.

I vote for isset() on a NULL value should be true if it's in the namespace.

  Mark J. Hershenson
  [EMAIL PROTECTED]
  http://www.green-ant.com/


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] database abstraction layers [from: MySQLfeature/bug]

2001-01-31 Thread Mark J. Hershenson

> 
>> I have been crafting my own database abstraction layer, and in doing so
>> create an array of the results of a query.
> 
> Is this an db abstraction layer written in php (script), or written as a
> module for php (C)?
> 
> I was thinking of writing an (open source) db-abstraction module (that uses
> existing db-modules, of course), which could then be used from php-script as
> well as from other modules that need db-functionality without committing to
> a specific database.
> 
> Or, does such a module exist already and should I concentrate on using
> and/or co-developing that one?
> 
> Thanks, Marc.

I'd be open to turning it into C, as all my layer is really doing at its
core is to do every single bit of error checking and API utilization for all
the different DB drivers present on the system.

What I've seen of PHPLIB and PEAR's DB function don't interest me. I hardly
see the point of using objects to do the work that a general function would
do just as well and without any need to instantiate it.

I need to spend some time with the Zend API to see if it's really worth it
for my time to go about doing it, but yes, I am very much considering
turning it into C.

I've really been hoping that someone was going to take an intermediately
complex Zend extension and put together a how-to that would help beginners
and advanced programmers alike.

I think there is a real need for someone or a group of programmers to get
together and write a step-by-step theory/implementation "cookbook" for the
sake of the community. Should I reach that point, I'd be happy to do it, but
I tend to believe that the community could do it faster and better than I
could right now, and that if if such a document were made publicly
available, the community could build more and better core tools faster.

My 2 cents...:)

--

Per the initial question I posted, can there at least by made available a
newer option for mysql_fetch_array() such as MYSQL_ALL, which would then
give you null and non-null associative names?

  Mark J. Hershenson
  [EMAIL PROTECTED]
  http://www.green-ant.com/


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] MySQL feature/bug?

2001-01-31 Thread Mark J. Hershenson

I wasn't sure it was bug report worthy, so I decided to post it and find out
if this is a feature or a bug.

I have been crafting my own database abstraction layer, and in doing so
create an array of the results of a query.

So, for instance:

antQuery("select UNIX_TIMESTAMP() as utime, NULL as col2");

would (there's tons more to this function) return:

$data[0][0] = 980931929;
$data[0][utime] = 980931929;
$data[0][1] = "";
$data[0][col2] = "";

The first array is the row of the results, starting with, in this case, 0.
Then the second array is both the numeric and associative array values of
the returned data set.

NOW...I figured I'd just use mysql_fetch_array, which should give my both
numeric and associative keys to my data, but what happens is that
mysql_fetch_array() does not return the associative key for NULL values.

This annoyed me, so I ended up having to combine mysql_fetch_row() and
mysql_fetch_assoc() to get what I desired.

I set up a testbed, and here are the results.

---

Query: select UNIX_TIMESTAMP() as utime, NULL as col2



Using mysql_fetch_array( , MYSQL_BOTH)

Array
(
[0] => 980933202
[utime] => 980933202
[1] => 
)

Using mysql_fetch_assoc()

Array
(
[utime] => 980933202
[col2] => 
)

Using mysql_fetch_row()

Array
(
[0] => 980933202
[1] => 
)

Using mysql_fetch_row() with mysql_fetch_assoc()

Array
(
[utime] => 980933202
[col2] => 
[0] => 980933202
[1] => 
)

--

I honestly can't imagine that this is a feature. Why would you not label a
null field's column name? In numerous cases, a null field is just as or more
important than a filled one.

The comments at http://php.net/manual/en/function.mysql-fetch-array.php
don't seem to tell me much except that that is how it's supposed to work.

I am running "Apache/1.3.17 (Unix) mod_ssl/2.8.0 OpenSSL/0.9.5a DAV/1.0.2
PHP/4.0.4pl1" on RH 7.

It's not the version of Apache either. It was the same with 1.3.14.

-

In the end, I guess my question is this: If mysql_fetch_array() by itself
will not return associative names for NULL characters, certainly
mysql_fetch_array( , MYSQL_BOTH) should.

Can this be changed?

I have a sneaking suspicion that I'm missing something here, but I felt it
should at least be asked.

Thanks!

  Mark J. Hershenson
  [EMAIL PROTECTED]
  http://www.green-ant.com/


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]