[PHP-DEV] XSLT bug

2002-04-18 Thread Ken Egervari

If I have an XML document with 2 applications nodes and the following template in the 
style sheet

xsl:template match=application
xsl:number format=a value=position() /
xsl:value-of select=name /
br /
/xsl:template

the result is 

b. the name
d. the name2

When I think it should be a.  and b ..  For some reason, position() is returning 
the wrong result.



Re: [PHP-DEV] Proposed additional behaviour of str_replace()

2002-04-18 Thread Hartmut Holzgraefe

Mårten Gustafsson wrote:
 Ehrm. I should probably read through the entire manual, every day :)

wouldn't help in this case, the optional behavior of strtr() is really
hard to find (even i as a member of a doc team and parttime german manual
translater found it only by chance),
we should try to find a better name for it ...

-- 
Hartmut Holzgraefe  [EMAIL PROTECTED]  http://www.six.de/  +49-711-99091-77


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




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread derick

Hello,

this is not a PHP bug, I even wonder if it's really a bug at all. If there 
is a bug, which I dont think there is, it's in sablotron.

Derick

On Thu, 18 Apr 2002, Ken Egervari wrote:

 If I have an XML document with 2 applications nodes and the following template in 
the style sheet
 
 xsl:template match=application
 xsl:number format=a value=position() /
 xsl:value-of select=@name /
 br /
 /xsl:template
 
 the result is 
 
 b. the name
 d. the name2
 
 When I think it should be a.  and b ..  For some reason, position() is returning 
the wrong result.
 

---
 Did I help you? Consider a gift:
  http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
---
  PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---


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




Re: [PHP-DEV] The PHP Platform

2002-04-18 Thread Ken Egervari

I also recall that many of my first arguments were not saying that it sucks.
I think a majority of the problem is that everyone that sticks up for pear
sees anything that challenges where its going, its goals and what it current
has as an extremely large accusation and therefore it sucks.  The reason why
many of my statements now have been somewhat sour and negative are to
reflect the arguments that were already thrown my way in the beginning where
I thought my statements were from what everyone is making them out to be.
So don't be surprised if I seem to be this way and that others have left as
well.  Maybe it's not the accusers that have the problem.  Just something to
think about.

- Original Message -
From: Dave Mertens [EMAIL PROTECTED]
To: Ken Egervari [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 18, 2002 3:41 AM
Subject: Re: [PHP-DEV] The PHP Platform


  I for one have been using Java and .Net for all my applications
  now.

 Which is it, java most of the time, or java and .net
 for all my applications now.

 Big difference.
Is there alot of this sort of bickering on this mailing list, or is
this
out of the norm?
  
   He, you barch in, telling the PEAR community the PEAR sucks big time,
and
   you find it peculiar that some people are a bit picky about you??
  Look, with that attitude, no wonder why it doesn't any better.
 He, what would you to if i told you that the project you've worked on for
more than a year totaly sucks?!

 Every day there are commit thats make pear better and better. But don't
forget this is a company project where there is a management that is telling
what there have to be done.
 I know that sometimes it a problem. But people that ONLY saying pear sucks
aren't helping.

 Write some patches, and if you think PEAR DB is to heavy. Write a light
version of it. Nobody is keeping you from make pear better. And if you have
ideas how things might be better, write them with a friendly tone.
 Because barching in isn't helping anyone.

 So stop insulting people and do something about the points that you're
trying to make. We want no words, we want deeds!

 Dave Mertens



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




[PHP-DEV] php-dev was stuck.

2002-04-18 Thread Jim Winstead

in setting up php-dev to reject most types of attachments, particularly
text/html, (like php-general does), i accidently caused the php-dev
traffic to get stuck. everything sent in the last day should start
trickling through in the next few hours. (including what will no doubt
be at least a few is the mailing list broken? emails -- never send
those! just send an email to [EMAIL PROTECTED])

sorry about the inconvenience.

jim

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




Re: [PHP-DEV] The PHP Platform

2002-04-18 Thread Ken Egervari

Look, with that attitude, no wonder why it doesn't any better.

- Original Message -
From: Dave Mertens [EMAIL PROTECTED]
To: Dan Hardiker [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, April 17, 2002 1:18 PM
Subject: Re: [PHP-DEV] The PHP Platform


 On Wed, Apr 17, 2002 at 04:22:00PM -, Dan Hardiker wrote:
   Ken Egervari writes:
 I for one have been using Java and .Net for all my applications
now.
  
   Which is it, java most of the time, or java and .net
   for all my applications now.
  
   Big difference.
  Is there alot of this sort of bickering on this mailing list, or is this
  out of the norm?

 He, you barch in, telling the PEAR community the PEAR sucks big time, and
you find it peculiar that some people are a bit picky about you??

 Dave Mertens

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




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




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Ken Egervari

Sorry, but if you have a problem your tires, you usually go to the
dealership's service department instead of going to the manufacturer.  And
this is a bug.  It used to work 4.1.0/4.1.1 and now that I have 4.1.2 it
doesn't work (probably due to a newer sablotron release).



Re: [PHP-DEV] what does is happening to the list

2002-04-18 Thread Georg Richter

On Wednesday, 17. April 2002 22:11, Eduardo Melo wrote:
 htmldiv style='background-color:'DIV/DIV
 DIV/DIV
 PWhat is happening to the list .../P
 PNo body anwser .../P
 PInbsp;will be waiting for somenbsp;contact.BRBR--/P
 DIV/DIV
 H5Eduardonbsp;Melo/H5/divbr clear=allhrChegou o novo MSN
 Explorer. Instale já. É gratuito! a
 href='http://g.msn.com/1HM500201/N'http://explorer.msn.com.br/abr/htm
l

Could someone ban this guy from php-dev?

Georg

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




[PHP-DEV] URLs, fopen wrappers and RFC 2718

2002-04-18 Thread Wez Furlong

I've just been reading through RFC 2718 (Guidelines for new URL Schemes)
because the zlib and bzip2 wrappers have been playing on my mind recently.

With the new wrappers implementation, I changed zlib: to zlib:// and
required all wrappers to have :// after scheme part, as Sascha pointed
out that there is an ambiguity when dealing with file names or paths
that contain a : character.

RFC 2718 takes great pains in highlighting that :// should only be
used in URLs that refer to a commonly accessible root of a hierarchy.
So, the original zlib: wrapper was the correct way of specifying it,
even if it was ambiguous in the context of fopen wrappers.

The other side of things is that zlib (and now bzip2) wrappers are
polluting the URL namespace.

I'm wondering what the best way of avoiding ambiguities and namespace
pollution might be.  Here are some suggestions:

1. Don't change anything; keep things as they are.

2. For ambiguous URLs (that is, those that match scheme:schemespecific,
rather than scheme://genericipurl), the wrapper system will treat
scheme:foobar as a plain file named scheme:foobar, but will treat
scheme:foobar as the foobar resource using the wrapper named scheme.
Likewise for URL:scheme:foobar; IIRC there is an RFC for that, but I
couldn't find it.

3. To avoid/reduce namespace issues, move zlib and bzip wrappers into
our php:// namespace. So the new usage would look like this:

// create a bz2 version of the php tarball
copy(php://zlib:php-4.2.tar.gz, php://bzip2:php-4.2.tar.bz2);

There would be two wrapper registration functions; one for
top-level schemes, and another for registering wrappers within the PHP
namespace.  I actually quite like this idea; it is quite a clean solution.

4. Your suggestions...

--Wez.



-- 
Wez Furlong
The Brain Room Ltd.


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




Re: [PHP-DEV] The PHP Platform

2002-04-18 Thread Dan Hardiker

Agreed - but who are you to decide what the right tools are?

I signed up to this list expecting inteligent debates and information about
PHP, not a mass willy waving exercise by yourself (and Mike Robinson) over
who knows best.

Any developer who needs mom to tell them what to do still is on the wrong
list - or am I mistaken and this is really [EMAIL PROTECTED]?

To get the job done fast you do it the way you know best using the tools
you work with day in and day out. Who is to say there is a better way than
the way that Joe Bloggs is doing it?

Sure there may be easier ways to you, but are those ways as easy to Joe?
Sure there may be quicker ways for you, but would those ways be as quick
for Joe to traverse?

Advice is most welcome in many cultures in this world - but your not
offering advice. Your bitch slapping down any idea / concept / way of doing
things, other than the way you are doing it. Stop.

This message isn't designed to cause a metaphorical debate, nor is it to
twist the knife. With a little hope, its aim is to remove the bitching that
inside of 3 days has made me reconsider the maturity of some of the people
on this list, and also my place as a member of it.

I have already found much help in a socket based issue, and also found must
aggrovation over my inbox being filled with smarmy know-it-alls like our
friend Ken.

Would it not be more constructive just to get along, work as a team to
solve and extend PHP's core problems and value?

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software  Systems Engineer
First Creative Ltd

 You are completely avoiding the issue here.  Getting the job done and
 getting it done fast with the right tools are also 2 big differences.

 - Original Message -
 From: Dan Hardiker [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, April 17, 2002 12:22 PM
 Subject: RE: [PHP-DEV] The PHP Platform


 Is there alot of this sort of bickering on this mailing list, or is
 this out of the norm?

 Ken, Mike - does it *really* matter who uses what technology to get
 the
 job
 done? Isn't it much more important what the resulting code is capable
 of doing and in what manner?

 --
 Dan Hardiker [[EMAIL PROTECTED]]
 ADAM Software  Systems Engineer
 First Creative Ltd


  Ken Egervari writes:
 
  Actually, I use java most of the time.  Who's making the
  assumptions?
 
  I assume nothing.
  You posted earlier:
 
   I for one have been using Java and .Net for all my applications
   now.
 
  Which is it, java most of the time, or java and .net
  for all my applications now.
 
  Big difference.
 
  Mike Robinson




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




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




[PHP-DEV] CVS Account Request: romakhin

2002-04-18 Thread Dmitry Romakhin

Translating the documentation to Russian...

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




Re: [PHP-DEV] The PHP Platform

2002-04-18 Thread Brent R. Matzelle

--- Dave Mertens [EMAIL PROTECTED] wrote:
 Just in my case - We only have MS database servers at our company.
 Why, because Learning all the ins and outs of postgresql or MySQL
 takes a lot of time.
 PHP has very good support for MS SQL Server. But MS SQL Server is
 cheaper than Oracle.
 So, we have only 2 database administrators in stead of 4
 (postgresql, mysql, oracle and MS SQL).

Oh please.  MySQL and PostgreSQL?  What administration?  Any DBA
worth his salt can learn those databases in a week.  I don't need an
administrator because I literally can administrate these databases in
my sleep.  I run a cron cron job that performs backups and other
admin duties all while I'm in bed.  

Brent

__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

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




RE: [PHP-DEV] The PHP Platform

2002-04-18 Thread Christian Stocker

In [EMAIL PROTECTED], Joseph Tate
wrote:

 I didn't know that compiling with just domxml gave xslt as well. are
 you sure of this?
 
 --with-dom-xslt and --with-dom-exslt

But only since PHP 4.2

chregu

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




[PHP-DEV] Refcount question

2002-04-18 Thread Sam Liddicott

If I'm writing a C++ extension module and I want return_value to be the same
as this_ptr do I need to increase the ref count of the zval  this_ptr?

Or is it safe just to do as the last line:

return_Value=this_ptr;

or

*return_value=*this_ptr;

or what

??

Sam




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




[PHP-DEV] Re: Sending parameters to a HTML file

2002-04-18 Thread Manuzhai

1. Be patient.
2. Send questions about developing WITH PHP to the php-general mailing list.

Greetings,

Manuzhai
  Eduardo Melo [EMAIL PROTECTED] wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  How can i use an component of HTML as such as :

  SELECT name=editor 

  OPTION 1

  OPTION 2

  SELECT 

  The selected item must be avalailable to the page that will be submited .

  best regards,

  --

  Eduardo Melo


--
  Chegou o novo MSN Explorer. Instale já. É gratuito! http://explorer.msn.com.br




RE: [PHP-DEV] The PHP Platform

2002-04-18 Thread Tim Thorpe

You are neglecting the FreeBSD and OpenBSD projects.  Both of these
operating systems have proven track records of security and reliability,
both in the practical world and in the brutal world of technical
security audits (just ask CERT, NASA, and the NSA).

What relevance does my post have to the php-dev list?  NONE!  ABSOLUTELY
NOTHING!

I'm new to this list and an infrequent poster as of yet, but I still
know that this discussion belongs in an advocacy list.  This is a
mailing list for two kinds of people: PHP developers and the technically
curious.  Unless you have something to contribute in either respect, I
suggest you start a thread on slashdot.




-Original Message-
From: Dave Mertens [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 4:04 PM
To: [EMAIL PROTECTED]
Cc: Ken Egervari; [EMAIL PROTECTED]
Subject: Re: [PHP-DEV] The PHP Platform


On Wed, Apr 17, 2002 at 07:19:52PM +0200, Marcus B?rger wrote:
 And who wants to use MS in critical environments or with critical
 Data?
 Remember
 MS fail to secure their own DNS servers or who knows what MS is
capable to view
 on your server? Before XP they did not implement a full tcp/ip stack
and
 noone knows
 what they are doing on the net (besides themselfs - i hope). And what
about
 the
 resources of Windows - you must have lots of money to be fast with MS
Systems.
Aahh, the money. OK, what costs a server?? Let's say a server costs
7500. 2 X 2 loadbalanced servers (1 website, 1 database). That's about
$30.000. My boss is asking about $100 per developer a hour!
A project team within our company counts 4 developers, 1 development
manager and 1 contact for the customer. 30.000/6 = $5.000. So if every
person on the projecs makes 50 hours the 4 servers are paid! That's 5
and a half day programming.

Most projects take months before the total projects is deployed with all
the stages. Really, the resources needed Windows don't cost that much
for companies, not in comparisment with development costs.

Any idea what a requirement study (needed for every project), a
functional and a technical design costs? And than people even haven't
started programming!

Both Windows as Linux has some disadvantages. I won't deny that. Do you
every read security-focus?? Linux has just as much security bugs as
windows has! I work with both platforms, both have their charms.

And in critical enviroments even linux isn't used. They have their own
unix os. I even doubt that a space shuttle is running PHP.. (They also
don't run Windows ASP either).


 As said before by Kristian Koehntopp there is a large amount of LAMP
 installations.
 Because many people do not use XML/SOAP why should they? Not everyone
has
 to sell something on his site(AND some XML parts are in
development
 even tody).
So, more than 90% is running MSIE. Does that mean i don't have to care
about Netscape? LAMP installation are populair with ISP and hosting
providers. Because LAMP doesn't costs much.

Just in my case - We only have MS database servers at our company. Why,
because Learning all the ins and outs of postgresql or MySQL takes a lot
of time. PHP has very good support for MS SQL Server. But MS SQL Server
is cheaper than Oracle. So, we have only 2 database administrators in
stead of 4 (postgresql, mysql, oracle and MS SQL).

 When time comes and thinks like SRM become public maybe PHP gets the
 capabilities
 to run a web-application on multiple machines - then we will have the
need
 for full SOAP
 integration. Before that time we would only provide MS/Java folks with

 rapid prototyping
 utilities...
We now already running PHP webapplications on multiple machines. All
application data is placed on a nfs partition which is used by all the
machines. SOAP between you're own layers is a bit overkill.

Don't get me wrong. I like PHP. But please don't say that ASP is bad.
Because if it were so bad, why does it popularity grows. With good
administrators windows is also stable. And if you're not installing the
distribution updates, a linux system is just a much as exploitable as a
Windows machine.

The longest uptime allowed within our company is set to 180 days. After
that the hardware must be inspected. And because we're running clusters
nobody cares. With that inspection servers get also a full upgrade. Also
all coolers are replaced.

But these kind of discussions are useless. Most of those threads were
started in the early 90's.
And beside of that, it costs your energy if you reply on this one ;-)
Use your energy wise, make PHP better!

Dave Mertens

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



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




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Sterling Hughes

 Sorry, but if you have a problem your tires, you usually go to the
 dealership's service department instead of going to the manufacturer.  And
 this is a bug.  It used to work 4.1.0/4.1.1 and now that I have 4.1.2 it
 doesn't work (probably due to a newer sablotron release).

Hi, I'm Joe, outa ur friendly neighborhood tire dealership, outa
Alabamaa...  

Having eh problmmm wi disss free, err, softwaree, I'ze a
givin' uuu??  U complaining 'bout free stuff, u ingraterful
foreigne!?  Weeelll, dats ok, if _uu_ harve problemo's
wit dis software, __ karn contarct [EMAIL PROTECTED],
carmplain ta them, uuu, uuu, uuu,  microsoft freaX0r.  

I'sa takin' a break now, goin' ta go frog hunting wit my double barrel
shottoy! eehaaw!

- Jumpin' Joe Inbred

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




[PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: Zend / zend_hash.c zend_hash.h zend_list.c

2002-04-18 Thread Thies C. Arntzen

On Thu, Apr 18, 2002 at 05:37:30PM -, Thies C. Arntzen wrote:
 thies Thu Apr 18 13:37:30 2002 EDT
 
   Modified files:  
 /Zend zend_hash.c zend_hash.h zend_list.c 
   Log:
   make sure the resource-list is always consistent during shutdown. this fixes
   #15499 (which seems unrelated, but it isn't;-)

derick,

i'll MFH this one once 4.2 is out (and it's proven to be
stabe in -HEAD)

re,
tc
   
   
 Index: Zend/zend_hash.c
 diff -u Zend/zend_hash.c:1.83 Zend/zend_hash.c:1.84
 --- Zend/zend_hash.c:1.83 Sun Jan  6 10:21:09 2002
 +++ Zend/zend_hash.c  Thu Apr 18 13:37:28 2002
  -651,6 +651,23 
   SET_INCONSISTENT(HT_DESTROYED);
  }
  
 +ZEND_API void zend_hash_graceful_reverse_destroy(HashTable *ht)
 +{
 + Bucket *p;
 +
 + IS_CONSISTENT(ht);
 +
 + p = ht-pListTail;
 + while (p != NULL) {
 + zend_hash_apply_deleter(ht, p);
 + p = ht-pListTail;
 + }
 +
 + pefree(ht-arBuckets, ht-persistent);
 +
 + SET_INCONSISTENT(HT_DESTROYED);
 +}
 +
  /* This is used to selectively delete certain entries from a hashtable.
   * destruct() receives the data and decides if the entry should be deleted 
   * or not
 Index: Zend/zend_hash.h
 diff -u Zend/zend_hash.h:1.55 Zend/zend_hash.h:1.56
 --- Zend/zend_hash.h:1.55 Sun Jan  6 10:21:09 2002
 +++ Zend/zend_hash.h  Thu Apr 18 13:37:29 2002
  -119,6 +119,7 
  typedef int (*apply_func_args_t)(void *pDest, int num_args, va_list args, 
zend_hash_key *hash_key);
  
  ZEND_API void zend_hash_graceful_destroy(HashTable *ht);
 +ZEND_API void zend_hash_graceful_reverse_destroy(HashTable *ht);
  ZEND_API void zend_hash_apply(HashTable *ht, apply_func_t apply_func TSRMLS_DC);
  ZEND_API void zend_hash_apply_with_argument(HashTable *ht, apply_func_arg_t 
apply_func, void * TSRMLS_DC);
  ZEND_API void zend_hash_apply_with_arguments(HashTable *ht, apply_func_args_t 
apply_func, int, ...);
 Index: Zend/zend_list.c
 diff -u Zend/zend_list.c:1.52 Zend/zend_list.c:1.53
 --- Zend/zend_list.c:1.52 Sun Jan  6 10:21:09 2002
 +++ Zend/zend_list.c  Thu Apr 18 13:37:29 2002
  -230,32 +230,8 
  
  void zend_destroy_rsrc_list(HashTable *ht TSRMLS_DC)
  {
 - Bucket *p, *q;
 -
 - while (1) {
 - p = ht-pListTail;
 - if (!p) {
 - break;
 - }
 - q = p-pListLast;
 - if (q) {
 - q-pListNext = NULL;
 - }
 - ht-pListTail = q;
 -
 - if (ht-pDestructor) {
 - zend_try {
 - ht-pDestructor(p-pData);
 - } zend_end_try();
 - }
 - if (!p-pDataPtr  p-pData) {
 - pefree(p-pData, ht-persistent);
 - }
 - pefree(p, ht-persistent);
 - }
 - pefree(ht-arBuckets, ht-persistent);
 + zend_hash_graceful_reverse_destroy(ht);
  }
 -
  
  static int clean_module_resource(zend_rsrc_list_entry *le, int *resource_id 
TSRMLS_DC)
  {
 
 
 
 -- 
 Zend Engine CVS Mailing List (http://cvs.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

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




[PHP-DEV] overriding the php.ini path in apache2filter

2002-04-18 Thread Aaron Bannert

[2-part question]

I'd like to make an optional apache directive for the apache2filter
that can define an overriding search path for the php.ini file.
Ideally I'd like to just set this variable in on of the callbacks, but
I'm not sure which one. Is it appropriate to set this in a wrapper
around the php_module_startup callback, or is there a better place
to do this?


The followup question: I noticed that the sapi_module_struct contains
a member called php_init_path_override that can store an optional
overide for the php.ini patch. I also noticed that it appears that none
of the sapi modules appear to be properly initializing their struct,
even though this member was added over a year ago:

1.65 (zeev 02-Jan-01):  char *php_ini_path_override;

Methinks this is not a big problem, just a potential for garbage if
the modules is a dynamic shared object and the last few members of that
struct aren't expliclty initialized.

-aaron

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




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Wez Furlong

Have you tried running it through command line xslt processors?
xsltproc (part of libxslt) gives me this output:

bthe namebr/
dthe name2br/

Admittedly, it's not identical to the output you were getting,
but then it's using a different XSLT processor.
The point is that it is still b and d.

If there was a bug in sablotron, the php-dev volunteers cannot
be held responsible - you should talk to the sablotron people,
or the libxslt people - whoever it was that wrote your xslt library.

Please tone down the strength of your comments and remember that
most (all?) of the developers here are volunteers and that if the
situation were reversed you would not enjoy having your good will
gestures thrown back in your face by someone that has not taken
the time to do the most basic research into their problems.

php-dev is for constructive discussions about the development of
php, not for bitching about your dislikes of PHP.  If you have
something to say here, it had better be constructive, have concrete
research behind it and free from ego or personal opinions of the other
people here.  If it doesn't, there are other more appropriate forums.

--Wez.

On 18/04/02, Ken Egervari [EMAIL PROTECTED] wrote:
 Sorry, but if you have a problem your tires, you usually go to the
 dealership's service department instead of going to the manufacturer.  And
 this is a bug.  It used to work 4.1.0/4.1.1 and now that I have 4.1.2 it
 doesn't work (probably due to a newer sablotron release).




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




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Matt McClanahan

On Thu, Apr 18, 2002 at 12:57:21AM -0400, Ken Egervari wrote:

 If I have an XML document with 2 applications nodes and the following
 template in the style sheet
 
 xsl:template match=application
 xsl:number format=a value=position() /
 xsl:value-of select=name /
 br /
 /xsl:template
 
 the result is 
 
 b. the name
 d. the name2
 
 When I think it should be a.  and b ..  For some reason,
 position() is returning the wrong result.

Out of curiousity, why are you forcing the xsl:number value?  With
value=position() I see the same numbering (b, d) as you when I test
it with xsltproc (Which doesn't use sablotron).  Taking the value
attribute out gives the desired a, b listing.

So, perhaps it's not a bug, but instead sablotron was doing it wrong
beforehand, and has been fixed.  When behavior changes, it doesn't
always mean that the old behavior was correct.

Matt

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




RE: [PHP-DEV] Proposed additional behaviour of str_replace()

2002-04-18 Thread Mårten Gustafsson

 On Wed, Apr 17, 2002 at 01:01:29AM +0200, Mårten Gustafsson wrote : 
  Is there anyone else than me that would find it useful to be able to do:
  
  ?php
  $string = 'foo bar';
  $replacements = array(
  'foo'   = 'FOO',
  'bar'   = 'BAR');
  // Prints FOO BAR
  echo str_replace($replacements, $string);
  ?
  
  With current behaviour one has to do:
  
  ?php
  $string = 'foo bar';
  $replacements = array(
  'foo'   = 'FOO',
  'bar'   = 'BAR');
  // Prints FOO BAR
  echo str_replace(array_keys($replacements), array_values($string));
  ?
 
 The syntax is str_replace(search, replace, subject), btw.

Of course :)


 Personally, I don't see a need for this. On the other side,
 if it gets done, think about BC.

My point, which was not clear, was the ablity to provide one array with all needles 
and replacements. And yep, it would have to be a new function to preserve BC...but 
since I´m, obviously, blind I havn´t noticed that strtr() does exactly what I asked 
for :)



Marten.


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




[PHP-DEV] EDI / Acceess / Excel Import/Export

2002-04-18 Thread Rosen Marinov

Hi,
How can I import/Export data to database using PHP following formats:
EDI, Access, Excel ?

Where can I find information about this ?

Thanks,
Rosen Marinov



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




Re: [PHP-DEV] The PHP Platform

2002-04-18 Thread Dan Hardiker

For our systems, a windows machine (license fees, seats etc) costs in the
region of 10,000 in total. A FreeBSD machine running the same style of
software costs only 2,000 (and thats on the outer limit). What sensible
business throws away 8,000?

For your information, if your serious about delivering PHP over the web
reliably your looking at FreeBSD with Apache. If you know what your doing
you can secure it well enough.

In the past 12 months I have had 3 problems with FreeBSD where I have had
to patch it - with windows I have to update our Win2k server monthly and
even then there are times when I have to intervien within days of patching
it.

If your business is willing to throw away money then all be it - but here
in the UK at First Creative we believe in giving the money to RD rather
than waste it on a bloated peice of software which cant handle anywhere
near the load its UNIX based counter part can.

-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software  Systems Engineer
First Creative Ltd

 On Wed, Apr 17, 2002 at 07:19:52PM +0200, Marcus B?rger wrote:
 And who wants to use MS in critical environments or with critical
 Data?  Remember
 MS fail to secure their own DNS servers or who knows what MS is
 capable to view on your server? Before XP they did not implement a
 full tcp/ip stack and  noone knows
 what they are doing on the net (besides themselfs - i hope). And what
 about  the
 resources of Windows - you must have lots of money to be fast with MS
 Systems.
 Aahh, the money. OK, what costs a server?? Let's say a server costs
 7500. 2 X 2 loadbalanced servers (1 website, 1 database). That's about
 $30.000. My boss is asking about $100 per developer a hour!  A project
 team within our company counts 4 developers, 1 development manager and
 1 contact for the customer. 30.000/6 = $5.000. So if every person on
 the projecs makes 50 hours the 4 servers are paid! That's 5 and a half
 day programming.

 Most projects take months before the total projects is deployed with
 all the stages. Really, the resources needed Windows don't cost that
 much for companies, not in comparisment with development costs.

 Any idea what a requirement study (needed for every project), a
 functional and a technical design costs? And than people even haven't
 started programming!

 Both Windows as Linux has some disadvantages. I won't deny that. Do you
 every read security-focus?? Linux has just as much security bugs as
 windows has! I work with both platforms, both have their charms.

 And in critical enviroments even linux isn't used. They have their own
 unix os. I even doubt that a space shuttle is running PHP.. (They also
 don't run Windows ASP either).


 As said before by Kristian Koehntopp there is a large amount of LAMP
 installations.
 Because many people do not use XML/SOAP why should they? Not everyone
 has to sell something on his site(AND some XML parts are in
 development  even tody).
 So, more than 90% is running MSIE. Does that mean i don't have to care
 about Netscape? LAMP installation are populair with ISP and hosting
 providers. Because LAMP doesn't costs much.

 Just in my case - We only have MS database servers at our company. Why,
 because Learning all the ins and outs of postgresql or MySQL takes a
 lot of time. PHP has very good support for MS SQL Server. But MS SQL
 Server is cheaper than Oracle. So, we have only 2 database
 administrators in stead of 4 (postgresql, mysql, oracle and MS SQL).

 When time comes and thinks like SRM become public maybe PHP gets the
 capabilities
 to run a web-application on multiple machines - then we will have the
 need  for full SOAP
 integration. Before that time we would only provide MS/Java folks with
  rapid prototyping
 utilities...
 We now already running PHP webapplications on multiple machines. All
 application data is placed on a nfs partition which is used by all the
 machines. SOAP between you're own layers is a bit overkill.

 Don't get me wrong. I like PHP. But please don't say that ASP is bad.
 Because if it were so bad, why does it popularity grows. With good
 administrators windows is also stable. And if you're not installing the
 distribution updates, a linux system is just a much as exploitable as a
 Windows machine.

 The longest uptime allowed within our company is set to 180 days. After
 that the hardware must be inspected. And because we're running clusters
 nobody cares. With that inspection servers get also a full upgrade.
 Also all coolers are replaced.

 But these kind of discussions are useless. Most of those threads were
 started in the early 90's.  And beside of that, it costs your energy if
 you reply on this one ;-) Use your energy wise, make PHP better!

 Dave Mertens

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



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




Re: [PHP-DEV] Win32 build broken

2002-04-18 Thread Yasuo Ohgaki

Marcus Börger wrote:
 No that was S_ISDIR was introduced by me to have this -c option work 
 correctly.
 I had a short email discussion with Yasuo about the macros i used and their

Oh. I thought S_ISDIR is in .h but in .c :(

IMHO, if it's in .c, we are better to use usual way (not use/create
macro that has the same name)

If nobody objects, I'll remove S_ISDIR macro from php_ini.c.

--
Yasuo Ohgaki

 availability in Windows and we both thought they are available in Windows.
 Maybe we have to check whether to use S_ISDIR directly or have it 
 defined using
 S_IFMT/S_IFDIR which *should* be available in MickySoft.
 
 Could you give the following a try please:
 
 #ifndef S_ISDIR
 #define S_ISDIR( m )(((m)  S_IFMT) == S_IFDIR)
 #endif
 
 marcus
 
 
 At 09:57 17.04.2002, Wez Furlong wrote:
 
 On 17/04/02, Sebastian Bergmann [EMAIL PROTECTED] wrote:
  c:\home\php\php4\main\php_ini.c(271): warning C4013:
'S_ISDIR': undefined
 
php_ini.obj: error LNK2001: Unresolved external symbol _S_ISDIR

 I would suspect my last change to main/php.h to be the cause.
 I moved the stream/wrapper related includes to occur after the
 definition of MAXPATHLEN so that they can use it.
 I don't have time to try building under win32 right now; I have a go
 later this evening.

 --Wez.



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



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




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Ken Egervari

immature.
- Original Message -
From: Sterling Hughes [EMAIL PROTECTED]
To: Ken Egervari [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 18, 2002 2:31 PM
Subject: Re: [PHP-DEV] XSLT bug


  Sorry, but if you have a problem your tires, you usually go to the
  dealership's service department instead of going to the manufacturer.
And
  this is a bug.  It used to work 4.1.0/4.1.1 and now that I have 4.1.2 it
  doesn't work (probably due to a newer sablotron release).

 Hi, I'm Joe, outa ur friendly neighborhood tire dealership, outa
 Alabamaa...

 Having eh problmmm wi disss free, err, softwaree, I'ze a
 givin' uuu??  U complaining 'bout free stuff, u ingraterful
 foreigne!?  Weeelll, dats ok, if _uu_ harve problemo's
 wit dis software, __ karn contarct [EMAIL PROTECTED],
 carmplain ta them, uuu, uuu, uuu,  microsoft freaX0r.

 I'sa takin' a break now, goin' ta go frog hunting wit my double barrel
 shottoy! eehaaw!

 - Jumpin' Joe Inbred



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




RE: [PHP-DEV] Proposed additional behaviour of str_replace()

2002-04-18 Thread Mårten Gustafsson

 -Original Message-
 From: Hartmut Holzgraefe [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 17, 2002 11:07 AM
 To: [EMAIL PROTECTED]
 Cc: PHP-Dev
 Subject: Re: [PHP-DEV] Proposed additional behaviour of str_replace()
 
 
 Mårten Gustafsson wrote:
  Is there anyone else than me that would find it useful to be able to do:
  [...]
 
 
 have a look at http://php.net/strtr

Ehrm. I should probably read through the entire manual, every day :) Thanks!



Mårten.


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




Re: [PHP-DEV] The PHP Platform

2002-04-18 Thread Dave Mertens

 I for one have been using Java and .Net for all my applications
 now.
   
Which is it, java most of the time, or java and .net
for all my applications now.
   
Big difference.
   Is there alot of this sort of bickering on this mailing list, or is this
   out of the norm?
 
  He, you barch in, telling the PEAR community the PEAR sucks big time, and
  you find it peculiar that some people are a bit picky about you??
 Look, with that attitude, no wonder why it doesn't any better.
He, what would you to if i told you that the project you've worked on for more than a 
year totaly sucks?!

Every day there are commit thats make pear better and better. But don't forget this is 
a company project where there is a management that is telling what there have to be 
done.
I know that sometimes it a problem. But people that ONLY saying pear sucks aren't 
helping.

Write some patches, and if you think PEAR DB is to heavy. Write a light version of it. 
Nobody is keeping you from make pear better. And if you have ideas how things might be 
better, write them with a friendly tone.
Because barching in isn't helping anyone.

So stop insulting people and do something about the points that you're trying to make. 
We want no words, we want deeds!

Dave Mertens

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




[PHP-DEV] php extensions on windows

2002-04-18 Thread Igal Raizman

Hello,

Can someone point me in the directions of a tutorial or perhaps some info
on making PHP extensions on a Windows system ?

not on how to code them, but rather on how to compile them on a windows
system.

Thanks,



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




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Ken Egervari

I know that there is a workaround (which is obvious), but I just wanted to
report it.  position() is supposed to return the position of the node within
the current node list.  So i'd expect 1,2,3,4...N.  It's just strange why it
would behave otherwise.  As for doing it this way?  I'm just playing around
and noticed it.  this isn't production code at all.

- Original Message -
From: Matt McClanahan [EMAIL PROTECTED]
To: Ken Egervari [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 18, 2002 1:48 PM
Subject: Re: [PHP-DEV] XSLT bug


 On Thu, Apr 18, 2002 at 12:57:21AM -0400, Ken Egervari wrote:

  If I have an XML document with 2 applications nodes and the following
  template in the style sheet
 
  xsl:template match=application
  xsl:number format=a value=position() /
  xsl:value-of select=@name /
  br /
  /xsl:template
 
  the result is
 
  b. the name
  d. the name2
 
  When I think it should be a.  and b ..  For some reason,
  position() is returning the wrong result.

 Out of curiousity, why are you forcing the xsl:number value?  With
 value=position() I see the same numbering (b, d) as you when I test
 it with xsltproc (Which doesn't use sablotron).  Taking the value
 attribute out gives the desired a, b listing.

 So, perhaps it's not a bug, but instead sablotron was doing it wrong
 beforehand, and has been fixed.  When behavior changes, it doesn't
 always mean that the old behavior was correct.

 Matt



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




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Matt McClanahan

On Thu, Apr 18, 2002 at 02:09:01PM -0400, Ken Egervari wrote:

 I know that there is a workaround (which is obvious), but I just
 wanted to report it.  position() is supposed to return the position
 of the node within the current node list.  So i'd expect 1,2,3,4...N. 
 It's just strange why it would behave otherwise.  As for doing it
 this way?  I'm just playing around and noticed it.  this isn't
 production code at all.

This should've occured to me before sending the first reply, but, eh. 
Memory doesn't work so well so soon after waking up.

It actually is reporting the correct position, if your XML is
indendted.  For example:

root
  application name=a /
  application name=b /
/root

has two text nodes in it at positions 1 and 3.  So position() correctly
reports the application nodes as being at 2 and 4.  The only workaround
for that is to take all the whitespace out of your XML:

rootapplication name=a /application name=b //root

Matt

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




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Ken Egervari

ahh, that makes sense.  actually

template match=text()
/template

would do it too.  Cool.

- Original Message - 
From: Matt McClanahan [EMAIL PROTECTED]
To: Ken Egervari [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, April 18, 2002 2:12 PM
Subject: Re: [PHP-DEV] XSLT bug


 On Thu, Apr 18, 2002 at 02:09:01PM -0400, Ken Egervari wrote:
 
  I know that there is a workaround (which is obvious), but I just
  wanted to report it.  position() is supposed to return the position
  of the node within the current node list.  So i'd expect 1,2,3,4...N. 
  It's just strange why it would behave otherwise.  As for doing it
  this way?  I'm just playing around and noticed it.  this isn't
  production code at all.
 
 This should've occured to me before sending the first reply, but, eh. 
 Memory doesn't work so well so soon after waking up.
 
 It actually is reporting the correct position, if your XML is
 indendted.  For example:
 
 root
   application name=a /
   application name=b /
 /root
 
 has two text nodes in it at positions 1 and 3.  So position() correctly
 reports the application nodes as being at 2 and 4.  The only workaround
 for that is to take all the whitespace out of your XML:
 
 rootapplication name=a /application name=b //root
 
 Matt
 


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




[PHP-DEV] RE: [PHP] form posting to a fake page

2002-04-18 Thread Jaime Bozza

I've done some testing, and it seems that Apache messes with the server
variables when it sends the error document.

Basically, Apache does *NOT* send an HTTP 302 response.  It sends an
HTTP 404 response, but outputs the full code from the ErrorDocument.
Unfortunately, it changes the REQUEST_METHOD from POST to GET.
Also, it creates the following:

REDIRECT_ERROR_NOTES
REDIRECT_REQUEST_METHOD
REDIRECT_STATUS
REDIRECT_URL

(See http://httpd.apache.org/docs/custom-error.html for more information
on the variables)

REDIRECT_REQUEST_METHOD contains POST.  Also, CONTENT_TYPE is *still*
application/x-www-form-urlencoded and CONTENT_LENGTH still equals the
size of the POST data, so the data *IS* still being sent, though PHP is
most likely ignoring the data since the method does not equal POST.

Can anyone from the development team verify this?  (CC'ing to php-dev in
a separate email so additional comments don't get CC'd as well)

If this is the case, this may be a good one for a feature request.

If not, using the RewriteEngine may be your only choice.

(Looking in /main/main.c, it seems that POST data *is* only parsed when
REQUEST_METHOD=POST, so it may end up only being a single line patch)

Let us know if you plan on requesting a new feature.

Jaime Bozza

-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 17, 2002 4:04 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] form posting to a fake page


No, the error handler does not have access to the posted data.  The
problem 
in a nutshell:

1. Person fills out form; clicks submit

2. Form action property is called; server notices the page is not real

(Data is lost here)

3. Error handler is called


Original Message Follows
From: Miguel Cruz [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] form posting to a fake page
Date: Wed, 17 Apr 2002 16:00:17 -0500 (CDT)

Your error handler would read them and then construct a redirect
containing the form data in querystring format.

miguel

On Wed, 17 Apr 2002, [ rswfire ] wrote:
  $_POST[] variables do not exist on a redirected page; that's the
problem!
 
  Original Message Follows
  From: Miguel Cruz [EMAIL PROTECTED]
  To: [ rswfire ] [EMAIL PROTECTED]
  CC: [EMAIL PROTECTED]
  Subject: Re: [PHP] form posting to a fake page
  Date: Wed, 17 Apr 2002 15:56:32 -0500 (CDT)
 
  On Wed, 17 Apr 2002, [ rswfire ] wrote:
It would still require some knowledge of the posted data.  If
someone
  clicks
a submit button, and it is posting to a page that doesn't really 
exist,
  then
when the index.php file gets called as a 404 errordocument, the
posted
variables are already lost, so it wouldn't be possible to access
the
  posted
variables in any fashion.  The only possibility might be if Apache
had
  some
way of dealing with this scenario and I am not that familiar with
how
  Apache
works.  And so, that leaves me with the only workaround I do know,

post
  to a
page that does exist!  It's just not the ideal solution, but it
works.
 
  Well, depending on the quantity of posted data, you could go through
  $_POST[] and turn them into GET args and pass them along to the
  appropriate page (not that I really understand what you're trying to
do).
 
  miguel
 
 
 
 
 
  _
  Chat with friends online, try MSN Messenger: http://messenger.msn.com
 
 





_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




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




Re[2]: [PHP-DEV] what does is happening to the list

2002-04-18 Thread Daniel Lorch

Hi,

 On Wednesday, 17. April 2002 22:11, Eduardo Melo wrote:
 htmldiv style='background-color:'DIV/DIV
 DIV/DIV
 PWhat is happening to the list .../P
 PNo body anwser .../P
 PInbsp;will be waiting for somenbsp;contact.BRBR--/P
 DIV/DIV
 H5Eduardonbsp;Melo/H5/divbr clear=allhrChegou o novo MSN
 Explorer. Instale já. É gratuito! a
 href='http://g.msn.com/1HM500201/N'http://explorer.msn.com.br/abr/htm
l

 Could someone ban this guy from php-dev?
 Georg

I wrote him a nice and friendly mail. I hope he understands us
finally as he appears to be having language problems.

-
Hi,

 I am not joking it is true. (maybe now the list is working very
 well) I need to know the right address to use the list, may i have
 it please

people are ignoring you, as you are repeatedly posting to the *wrong*
list :) PHP-Dev is about developing the language (in C), not about
solving problems in PHP.

you should consider posting to the General user list which can be
found on:

  http://www.php.net/mailing-lists.php

at the bottom of this page there are Local Mailing Lists. I think
you are brazilian (or am  I wrong?). The Portuguese mailinglist might
be the right place for you:

  http://groups.yahoo.com/group/php-pt

Good luck :)
  
Daniel Lorch
-

-daniel



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




[PHP-DEV] Is dbug broken in 4.2.0RC4?

2002-04-18 Thread Balazs Nagy

Hi,

I bumped to another segfault:

#0  _db_return_ (_line_=1633, _sfunc_=0x1b4c1d8, _sfile_=0x1b4c1dc, 
_slevel_=0x1b4c1e0) at dbug.c:827
#1  0x006df19b in mysql_select_db (mysql=0x84454c8, db=0x87c52d8 tft)
at libmysql.c:1633
#2  0x006d9a4e in zif_mysql_select_db (ht=2, return_value=0x8628530, 
this_ptr=0x0, return_value_used=0, tsrm_ls=0x82e7680) at
php_mysql.c:797
#3  0x00425258 in execute (op_array=0x87e0988, tsrm_ls=0x82e7680)
at ./zend_execute.c:1598
#4  0x004278ec in execute (op_array=0x87cd980, tsrm_ls=0x82e7680)
at ./zend_execute.c:2141
...
(gdb) frame 0
#0  _db_return_ (_line_=1633, _sfunc_=0x1b4c1d8, _sfile_=0x1b4c1dc, 
_slevel_=0x1b4c1e0) at dbug.c:827
827   state-framep = (char **) *state-framep;
(gdb) print *state-framep
Cannot access memory at address 0xa
(gdb) print state-framep
$7 = (char **) 0xa

-- 
jul



signature.asc
Description: This is a digitally signed message part


Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Sterling Hughes

 tone down? I approached this bug as anything but inappropriate then everyone
 starts getting all defensive on me.

 I am free from ego.  I don't think my library is the stuff.  i just made
 some valid arguments and then everyone starts feeling like they are being
 threatened or accused and making my comments much more than they are.  Then
 everyone reads those comments, sees the obvious negativity and then rides
 the band wagon thinking they are siding with the right (but noticibly
 larger) crowd.  It kind of reminds me of the red wings.
 
 I'm actually very unimpressed with how the people get all defensive, witty,
 immature and whatever else to the list.  Don't read this like, Oh Ken is
 now attacking me.  I'm not doing that.  It just seems that I post (what I
 thought) to be a valid issue about XSLT with the idea in my mind that let's
 get this solved because that is a good thing that we fix bugs.  But one
 reply after the other and everything blown out of proportion.  It makes no
 sense.


Don't know why people don't like you?  Ever notice when you enter the room
people start giggling, like they've just seen a drooling gimp?  Its
because you might be free from ego, but you're most certainly full of
something else.

You wrote a bug report, which was not only bogus, but it was _certainly_ not 
related to PHP.  Derick, one of our most dedicated and knowledgeable
developers wrote back to you, and politely told you that it was not a PHP 
related bug, which is _quite_ correct.  You then wrote back and told
him, that you don't care, if you experience the bug using php, then
you're going to complain to the php developers.

Mix that with your recent PHP framework psuedo-intellectual
masturbation that you've so kindly ejaculated into our conciousness
for the past few days -- you get a group of very annoyed developers.

-Sterling


 - Original Message -
 From: Wez Furlong [EMAIL PROTECTED]
 To: Ken Egervari [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, April 18, 2002 1:42 PM
 Subject: Re: [PHP-DEV] XSLT bug
 
 
  Have you tried running it through command line xslt processors?
  xsltproc (part of libxslt) gives me this output:
 
  bthe namebr/
  dthe name2br/
 
  Admittedly, it's not identical to the output you were getting,
  but then it's using a different XSLT processor.
  The point is that it is still b and d.
 
  If there was a bug in sablotron, the php-dev volunteers cannot
  be held responsible - you should talk to the sablotron people,
  or the libxslt people - whoever it was that wrote your xslt library.
 
  Please tone down the strength of your comments and remember that
  most (all?) of the developers here are volunteers and that if the
  situation were reversed you would not enjoy having your good will
  gestures thrown back in your face by someone that has not taken
  the time to do the most basic research into their problems.
 
  php-dev is for constructive discussions about the development of
  php, not for bitching about your dislikes of PHP.  If you have
  something to say here, it had better be constructive, have concrete
  research behind it and free from ego or personal opinions of the other
  people here.  If it doesn't, there are other more appropriate forums.
 
  --Wez.
 
  On 18/04/02, Ken Egervari [EMAIL PROTECTED] wrote:
   Sorry, but if you have a problem your tires, you usually go to the
   dealership's service department instead of going to the manufacturer.
 And
   this is a bug.  It used to work 4.1.0/4.1.1 and now that I have 4.1.2 it
   doesn't work (probably due to a newer sablotron release).
 
 
 
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php

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




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Marcus Börger

Not noticing space is a *the* common pitfall in xslt!
If you before 4.1.2 had spaces and it spit out a,b then
the earlier version did not count the text-nodes and
therefore was erroneous.

marcus

and good morning to Matt - i am nearly going to bed
if there wasn't so much work left

At 20:12 18.04.2002, Matt McClanahan wrote:
On Thu, Apr 18, 2002 at 02:09:01PM -0400, Ken Egervari wrote:

  I know that there is a workaround (which is obvious), but I just
  wanted to report it.  position() is supposed to return the position
  of the node within the current node list.  So i'd expect 1,2,3,4...N.
  It's just strange why it would behave otherwise.  As for doing it
  this way?  I'm just playing around and noticed it.  this isn't
  production code at all.

This should've occured to me before sending the first reply, but, eh.
Memory doesn't work so well so soon after waking up.

It actually is reporting the correct position, if your XML is
indendted.  For example:

root
   application name=a /
   application name=b /
/root

has two text nodes in it at positions 1 and 3.  So position() correctly
reports the application nodes as being at 2 and 4.  The only workaround
for that is to take all the whitespace out of your XML:

rootapplication name=a /application name=b //root

Matt

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


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




Re: [PHP-DEV] what does is happening to the list

2002-04-18 Thread Hartmut Holzgraefe

Daniel Lorch wrote:
Could someone ban this guy from php-dev?
Georg
 
 
 I wrote him a nice and friendly mail. I hope he understands us
 finally as he appears to be having language problems.

have tried that in every possible way i could think of without any result

if he really has *that* big language problems that he doesn't get
the you are using the wrong list messages sent to him for month now
he won't read any sense out of the answers to his actual questions either,
so ...

-- 
Hartmut Holzgraefe  [EMAIL PROTECTED]  http://www.six.de/  +49-711-99091-77


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




Re: [PHP-DEV] The PHP Platform

2002-04-18 Thread Ken Egervari

You are completely avoiding the issue here.  Getting the job done and
getting it done fast with the right tools are also 2 big differences.

- Original Message -
From: Dan Hardiker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 17, 2002 12:22 PM
Subject: RE: [PHP-DEV] The PHP Platform


 Is there alot of this sort of bickering on this mailing list, or is this
 out of the norm?

 Ken, Mike - does it *really* matter who uses what technology to get the
job
 done? Isn't it much more important what the resulting code is capable of
 doing and in what manner?

 --
 Dan Hardiker [[EMAIL PROTECTED]]
 ADAM Software  Systems Engineer
 First Creative Ltd


  Ken Egervari writes:
 
  Actually, I use java most of the time.  Who's making the assumptions?
 
  I assume nothing.
  You posted earlier:
 
   I for one have been using Java and .Net for all my applications now.
 
  Which is it, java most of the time, or java and .net
  for all my applications now.
 
  Big difference.
 
  Mike Robinson




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




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




[PHP-DEV] HTML generate from PHP code

2002-04-18 Thread otto

Hi I have some problem when I try to generate HTML file from PHP.

I have a gen.php and inside
---
? 
if ($QUERY_STRING==generate){

   // I try on Linux and Win also 
   system(a.bat);
   // content of a.bat:
   // c:\php\php.exe -q gen.php index.htm

  
   //another try  system(/php/php.exe   .$DOCUMENT_ROOT.$PATH_INFO. index.html );


//   Header(Location:index.html);
   exit;
}


echo hello world. ?


when I run the a.bat from command line it's ok. I get index.html with content hello 
world. 
But when I try direct from PHP /in browser url gen.php?generate / calling 
system(a.bat) I get this in index.html:

X-Powered-By: PHP/4.1.1
Content-type: text/html


any idea why is that, or workaround solution ?

thanks

 otto



RE: [PHP-DEV] php extensions on windows

2002-04-18 Thread Joseph Tate

Look through the php4/ext directories for project files.  Add the project
files to the php4ts workspace in VC++, and then compile them.  If an
extension doesn't have a .dsp file for it, it hasn't been compiled for
windows.  (Though support for windows is not that hard to add, if all the
libraries are available.)

Joseph

 -Original Message-
 From: Igal Raizman [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 17, 2002 10:05 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DEV] php extensions on windows


 Hello,

 Can someone point me in the directions of a tutorial or perhaps some info
 on making PHP extensions on a Windows system ?

 not on how to code them, but rather on how to compile them on a windows
 system.

 Thanks,



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


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




[PHP-DEV] Re: php extensions on windows

2002-04-18 Thread J Smith


I've been working on this sort of thing for the past few weeks as I've been 
trying to make sure all of the PHP extensions I've written work on UNIX 
systems as well as Windows systems.

I think you can compile using gcc and cygwin, but I believe the recommended 
way is with Visual C++ 6, as the official binaries are done with VC++. (I 
think, I don't use PHP in Windows except to test portability.)

Anyways, here's what I do as far as settings. This is for a thread-safe 
release extension. I'm assuming you have a bit of experience working with 
VC++ and the PHP source, and that you're able to compile PHP in the first 
place.

0. Start a new project in VC++ and add your extension's files. 

1. In the Configurations dialog, add two configurations: Release_TS and 
Debug_TS. Release_TS should copy the settings from Release and Debug_TS 
should obviously copy from Debug. You can Remove Release and Debug and 
close the dialog. The next set of steps is for the Release_TS 
configuration. If you can figure that out, you should be able to get 
Debug_TS working fine.

2. Open up Project-Settings. On the C/C++ tab, General Category, added the 
following preprocessor definitions: ZEND_DEBUG=0, 
COMPILE_DL_YOUR_EXTENSION_NAME, ZTS=1, ZEND_WIN32, PHP_WIN32. 
YOUR_EXTENSION_NAME is the name you'll find in the sources generated by 
ext_skel.

3. In the Code Generation Category, change Use run-time Library to 
Multithreaded DLL. 

4. In the Preprocessor Category, add the following Additional include 
directories: ..\.., ..\..\main, ..\..\Zend, ..\..\TSRM, ..\..\bindlib_w32. 

5. On the Link tab in the General Category, change the Output file name to
..\..\Release_TS/php_yourextension.dll.

6. On that same tab, same category, add php4ts.lib to Object/library 
modules. 

7. In the Input Category, add the following to Additional library path: 
..\..\Release_TS.

That should be it. Close dialog and set the active configuration to 
Release_TS and (hopefully) build the DLL.

If you're using other libraries and such, make sure you compile them using 
the multithreaded DLL runtime library like you did with your extension. I 
found that out the hard way trying to get my cryptopp extension working on 
Windows.

Check out some of the VC++ project files included with the PHP source when 
you're stuck and try to replicate the settings they use in your own 
project. It takes a while to get used to building extensions with VC++ 
'cause that sort of thing is so poorly documented in the Windows world, but 
once you get it once you should be fine.

J


Igal Raizman wrote:

 Hello,
 
 Can someone point me in the directions of a tutorial or perhaps some info
 on making PHP extensions on a Windows system ?
 
 not on how to code them, but rather on how to compile them on a windows
 system.
 
 Thanks,


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




Re: [PHP-DEV] The PHP Platform

2002-04-18 Thread Gabriel Ricard

I wholeheartedly agree with Dan on this issue. This bickering really 
doesn't help anybody make PHP any better. From what I can gather this 
mailing list is oriented towards developing a certain tool, PHP. While 
Java and .Net discussions are relative in terms of their respective PHP 
extensions, and possibly in examining areas where PHP can be improved, 
arguing over using Java and/or .Net and how much one uses them, and for 
that matter, what they use them for, whether or not the use them with 
their toaster or if they use them with a cat or in a hat, doesn't matter 
at all.

This thread needs to become productive or die, or perhaps everyone 
should just ignore it?

Just my opinion...

- Gabriel

Ken Egervari wrote:
 You are completely avoiding the issue here.  Getting the job done and
 getting it done fast with the right tools are also 2 big differences.
 
 - Original Message -
 From: Dan Hardiker [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, April 17, 2002 12:22 PM
 Subject: RE: [PHP-DEV] The PHP Platform
 
 
 
Is there alot of this sort of bickering on this mailing list, or is this
out of the norm?

Ken, Mike - does it *really* matter who uses what technology to get the
 
 job
 
done? Isn't it much more important what the resulting code is capable of
doing and in what manner?

--
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software  Systems Engineer
First Creative Ltd



Ken Egervari writes:


Actually, I use java most of the time.  Who's making the assumptions?

I assume nothing.
You posted earlier:


I for one have been using Java and .Net for all my applications now.

Which is it, java most of the time, or java and .net
for all my applications now.

Big difference.

Mike Robinson




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


 
 
 



-- 
Gabriel Ricard
[EMAIL PROTECTED]


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




Re: [PHP-DEV] what does is happening to the list

2002-04-18 Thread Hartmut Holzgraefe

Eduardo Melo wrote:
 What is happening to the list ...
 
 No body anwser ...
 
 I will be waiting for some contact.
 

we are finaly ignoring you as you are neither able to switch of
HTML (as requested) as anybody else does nor understand the
concept of which list is which (by crosposting to php-general
*and* dev)



-- 
Hartmut Holzgraefe  [EMAIL PROTECTED]  http://www.six.de/  +49-711-99091-77


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




Re: [PHP-DEV] Re: php extensions on windows

2002-04-18 Thread Brent R. Matzelle

--- J Smith [EMAIL PROTECTED] wrote:
 0. Start a new project in VC++ and add your extension's files. 
 
 1. In the Configurations dialog, add two configurations: Release_TS
 and 
 Debug_TS. Release_TS should copy the settings from Release and
 Debug_TS 
 should obviously copy from Debug. You can Remove Release and Debug
 and 
 close the dialog. The next set of steps is for the Release_TS 
 configuration. If you can figure that out, you should be able to
 get 
 Debug_TS working fine.
 
 2. Open up Project-Settings. On the C/C++ tab, General Category,
 added the 
 following preprocessor definitions: ZEND_DEBUG=0, 
 COMPILE_DL_YOUR_EXTENSION_NAME, ZTS=1, ZEND_WIN32, PHP_WIN32. 
 YOUR_EXTENSION_NAME is the name you'll find in the sources
 generated by 
 ext_skel.
 
 3. In the Code Generation Category, change Use run-time Library to 
 Multithreaded DLL. 
 
 4. In the Preprocessor Category, add the following Additional
 include 
 directories: ..\.., ..\..\main, ..\..\Zend, ..\..\TSRM,
 ..\..\bindlib_w32. 
 
 5. On the Link tab in the General Category, change the Output file
 name to
 ..\..\Release_TS/php_yourextension.dll.
 
 6. On that same tab, same category, add php4ts.lib to
 Object/library 
 modules. 
 
 7. In the Input Category, add the following to Additional library
 path: 
 ..\..\Release_TS.
 
 That should be it. Close dialog and set the active configuration to
 
 Release_TS and (hopefully) build the DLL.

This information would be a terrific addition to the PHP
documentation.  How might we get it added?

Brent

__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

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




Re: [PHP-DEV] The PHP Platform

2002-04-18 Thread Stig S. Bakken

Did php-dev get a collective male version of PMS all of a sudden? :-)

For the record, I agree that PEAR DB is a bit on the heavy side today. 
A lean and mean redesign is planned for when aggregation and
overloading stabilizes.  And maybe even rewriting some parts in C. 
Ideally using PEAR DB should not be significantly slower than using
native functions.  Or at least that's my long-term goal.

 - Stig

On Thu, 2002-04-18 at 09:06, Ken Egervari wrote:
 I also recall that many of my first arguments were not saying that it sucks.
 I think a majority of the problem is that everyone that sticks up for pear
 sees anything that challenges where its going, its goals and what it current
 has as an extremely large accusation and therefore it sucks.  The reason why
 many of my statements now have been somewhat sour and negative are to
 reflect the arguments that were already thrown my way in the beginning where
 I thought my statements were from what everyone is making them out to be.
 So don't be surprised if I seem to be this way and that others have left as
 well.  Maybe it's not the accusers that have the problem.  Just something to
 think about.
 
 - Original Message -
 From: Dave Mertens [EMAIL PROTECTED]
 To: Ken Egervari [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, April 18, 2002 3:41 AM
 Subject: Re: [PHP-DEV] The PHP Platform
 
 
   I for one have been using Java and .Net for all my applications
   now.
 
  Which is it, java most of the time, or java and .net
  for all my applications now.
 
  Big difference.
 Is there alot of this sort of bickering on this mailing list, or is
 this
 out of the norm?
   
He, you barch in, telling the PEAR community the PEAR sucks big time,
 and
you find it peculiar that some people are a bit picky about you??
   Look, with that attitude, no wonder why it doesn't any better.
  He, what would you to if i told you that the project you've worked on for
 more than a year totaly sucks?!
 
  Every day there are commit thats make pear better and better. But don't
 forget this is a company project where there is a management that is telling
 what there have to be done.
  I know that sometimes it a problem. But people that ONLY saying pear sucks
 aren't helping.
 
  Write some patches, and if you think PEAR DB is to heavy. Write a light
 version of it. Nobody is keeping you from make pear better. And if you have
 ideas how things might be better, write them with a friendly tone.
  Because barching in isn't helping anyone.
 
  So stop insulting people and do something about the points that you're
 trying to make. We want no words, we want deeds!
 
  Dave Mertens
 
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP-DEV] MySQL support broken ?

2002-04-18 Thread Magnus Määttä

Latest CVS
MySQL 3.23.49 w/o server

/bin/sh /mnt/data1/Stuff/CVS/PHP/php4/libtool --mode=compile gcc  -Iext/mysql/ 
-I/mnt/data1/Stuff/CVS/PHP/php4/ext/mysql/ -DPHP_ATOM_INC 
-I/mnt/data1/Stuff/CVS/PHP/php4/include -I/mnt/data1/Stuff/CVS/PHP/php4/main 
-I/mnt/data1/Stuff/CVS/PHP/php4 -I/usr/local/www/httpd2/include
-I/mnt/data1/Stuff/CVS/PHP/php4/Zend -I/usr/include/libxml2 
-I/usr/include/freetype2/freetype -I/usr//include -I/usr//include/imap 
-I/usr/local/www/mysql3//include/mysql -I/usr/lib/qt2/include 
-I/mnt/data1/Stuff/CVS/PHP/php4/ext/xml/expat  -D_REENTRANT 
-I/mnt/data1/Stuff/CVS/PHP/php4/TSRM -g -O2 -pthread -Wall -DZTS  -prefer-pic -c 
/mnt/data1/Stuff/CVS/PHP/php4/ext/mysql/php_mysql.c -o ext/mysql/php_mysql.lo
gcc -Iext/mysql/ -I/mnt/data1/Stuff/CVS/PHP/php4/ext/mysql/ -DPHP_ATOM_INC 
-I/mnt/data1/Stuff/CVS/PHP/php4/include -I/mnt/data1/Stuff/CVS/PHP/php4/main 
-I/mnt/data1/Stuff/CVS/PHP/php4 -I/usr/local/www/httpd2/include 
-I/mnt/data1/Stuff/CVS/PHP/php4/Zend -I/usr/include/libxml2 
-I/usr/include/freetype2/freetype -I/usr//include -I/usr//include/imap 
-I/usr/local/www/mysql3//include/mysql -I/usr/lib/qt2/include 
-I/mnt/data1/Stuff/CVS/PHP/php4/ext/xml/expat -D_REENTRANT 
-I/mnt/data1/Stuff/CVS/PHP/php4/TSRM -g -O2 -pthread -Wall -DZTS -c 
/mnt/data1/Stuff/CVS/PHP/php4/ext/mysql/php_mysql.c-fPIC -DPIC -o 
ext/mysql/php_mysql.lo
/mnt/data1/Stuff/CVS/PHP/php4/ext/mysql/php_mysql.c:57: redefinition of `ushort'
/usr/include/sys/types.h:151: `ushort' previously declared here
/mnt/data1/Stuff/CVS/PHP/php4/ext/mysql/php_mysql.c: In function `zif_mysql_info':
/mnt/data1/Stuff/CVS/PHP/php4/ext/mysql/php_mysql.c:936: warning: suggest parentheses 
around assignment used as truth value
/mnt/data1/Stuff/CVS/PHP/php4/ext/mysql/php_mysql.c:921: warning: `id' might be used 
uninitialized in this function
make: *** [ext/mysql/php_mysql.lo] Error 1


// Magnus

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




Re: [PHP-DEV] EDI / Acceess / Excel Import/Export

2002-04-18 Thread Stig S. Bakken

On Thu, 2002-04-18 at 14:26, Rosen Marinov wrote:
 Hi,
 How can I import/Export data to database using PHP following formats:
 EDI, Access, Excel ?
 
 Where can I find information about this ?

There is an Excel package in PEAR now, see
http://cvs.php.net/cvs.php/pear/Excel/

 - Stig


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




Re: [PHP-DEV] HTML generate from PHP code

2002-04-18 Thread Stig S. Bakken

On Thu, 2002-04-18 at 00:56, otto wrote:
 Hi I have some problem when I try to generate HTML file from PHP.
 
 I have a gen.php and inside
 ---
 ? 
 if (@$QUERY_STRING==generate){
 
// I try on Linux and Win also 
system(a.bat);
// content of a.bat:
// c:\php\php.exe -q gen.php index.htm
 
   
//another try  system(/php/php.exe   .$DOCUMENT_ROOT.$PATH_INFO. index.html 
);
 
 
 //   Header(Location:index.html);
exit;
 }
 
 
 echo hello world. ?
 
 
 when I run the a.bat from command line it's ok. I get index.html with content 
hello world. 
 But when I try direct from PHP /in browser url gen.php?generate / calling 
 system(a.bat) I get this in index.html:
 
 X-Powered-By: PHP/4.1.1
 Content-type: text/html
 
 
 any idea why is that, or workaround solution ?

Add -q after php.exe.  And next time send questions like this to
[EMAIL PROTECTED] ;-)

 - Stig


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




RE: [PHP-DEV] EDI / Acceess / Excel Import/Export

2002-04-18 Thread Pierre-Alain Joye

 On Thu, 2002-04-18 at 14:26, Rosen Marinov wrote:
  Hi,
  How can I import/Export data to database using PHP following formats:
  EDI, Access, Excel ?
One way to import from excel/access/any odbc source data is ODBC.

check the documentation and the unixodbc site for further infos.

hth

pa

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




Re: [PHP-DEV] XSLT bug

2002-04-18 Thread Wez Furlong

On 18/04/02, Ken Egervari [EMAIL PROTECTED] wrote:
 I'm actually very unimpressed with how the people get all defensive, witty,
 immature and whatever else to the list.  Don't read this like, Oh Ken is
 now attacking me.  I'm not doing that.  It just seems that I post (what I
 thought) to be a valid issue about XSLT with the idea in my mind that let's
 get this solved because that is a good thing that we fix bugs.

Please re-read your own response to Dericks comment about it not being
a bug (I've kept it inline below).
How would you react if the situation were reversed?

  But one
 reply after the other and everything blown out of proportion.  It makes no
 sense.

Pretend that I just said that to you, and then re-read this email.
Then take this thread to /dev/null - I have more important things to do.

--Wez.
 
 - Original Message -
 From: Wez Furlong [EMAIL PROTECTED]
 To: Ken Egervari [EMAIL PROTECTED]
  On 18/04/02, Ken Egervari [EMAIL PROTECTED] wrote:
   Sorry, but if you have a problem your tires, you usually go to the
   dealership's service department instead of going to the manufacturer.
 And
   this is a bug.  It used to work 4.1.0/4.1.1 and now that I have 4.1.2 it
   doesn't work (probably due to a newer sablotron release).



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




Re: [PHP-DEV] URLs, fopen wrappers and RFC 2718

2002-04-18 Thread derick

Hello,

how funny, I was discussing this issue with Stig on IRC too. I want to 
implement encryption with streams too for the new encryption extension, 
and we came up with something like this:

crypt(des)://blaat.txt
crypt(blowfish)://blaat.txt

and then something for zippers:
compress(zlib)://
compress(bzip)://

seems another viable idea to me...

Derick

On Wed, 17 Apr 2002, Wez Furlong wrote:

 I've just been reading through RFC 2718 (Guidelines for new URL Schemes)
 because the zlib and bzip2 wrappers have been playing on my mind recently.
 
 With the new wrappers implementation, I changed zlib: to zlib:// and
 required all wrappers to have :// after scheme part, as Sascha pointed
 out that there is an ambiguity when dealing with file names or paths
 that contain a : character.
 
 RFC 2718 takes great pains in highlighting that :// should only be
 used in URLs that refer to a commonly accessible root of a hierarchy.
 So, the original zlib: wrapper was the correct way of specifying it,
 even if it was ambiguous in the context of fopen wrappers.
 
 The other side of things is that zlib (and now bzip2) wrappers are
 polluting the URL namespace.
 
 I'm wondering what the best way of avoiding ambiguities and namespace
 pollution might be.  Here are some suggestions:
 
 1. Don't change anything; keep things as they are.
 
 2. For ambiguous URLs (that is, those that match scheme:schemespecific,
 rather than scheme://genericipurl), the wrapper system will treat
 scheme:foobar as a plain file named scheme:foobar, but will treat
 scheme:foobar as the foobar resource using the wrapper named scheme.
 Likewise for URL:scheme:foobar; IIRC there is an RFC for that, but I
 couldn't find it.
 
 3. To avoid/reduce namespace issues, move zlib and bzip wrappers into
 our php:// namespace. So the new usage would look like this:
 
 // create a bz2 version of the php tarball
 copy(php://zlib:php-4.2.tar.gz, php://bzip2:php-4.2.tar.bz2);
 
 There would be two wrapper registration functions; one for
 top-level schemes, and another for registering wrappers within the PHP
 namespace.  I actually quite like this idea; it is quite a clean solution.
 
 4. Your suggestions...
 
 --Wez.
 
 
 
 -- 
 Wez Furlong
 The Brain Room Ltd.
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, visit: http://www.php.net/unsub.php
 

---
 Did I help you? Consider a gift:
  http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
---
  PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---


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




[PHP-DEV] [Fwd: new dns function, gethostent]

2002-04-18 Thread Shane Caraveo

Hi everyone,

I have a need not fullfilled by the current short set of dns functions
(no way to retrieve aliases), so I wrote a 'gethostent' function, which
accepts either hostname or ip, and returns a hash equivelant of the C
hostent struct.  patch is attached, if no objections in the next couple
hours I'll commit it.

Shane



? dns.diff
Index: basic_functions.c
===
RCS file: /repository/php4/ext/standard/basic_functions.c,v
retrieving revision 1.470
diff -d -u -r1.470 basic_functions.c
--- basic_functions.c   16 Apr 2002 22:14:19 -  1.470
+++ basic_functions.c   18 Apr 2002 20:50:42 -
 -406,6 +406,7 
PHP_FE(gethostbyaddr,  
 NULL)
PHP_FE(gethostbyname,  
 NULL)
PHP_FE(gethostbynamel, 
 NULL)
+   PHP_FE(gethostent, 
+ NULL)
 
 #if HAVE_RES_SEARCH  !(defined(__BEOS__) || defined(PHP_WIN32))
PHP_FE(checkdnsrr, 
 NULL)
Index: dns.c
===
RCS file: /repository/php4/ext/standard/dns.c,v
retrieving revision 1.38
diff -d -u -r1.38 dns.c
--- dns.c   28 Feb 2002 08:26:44 -  1.38
+++ dns.c   18 Apr 2002 20:50:42 -
 -63,7 +63,7 
 #include dns.h
 /* }}} */
 
-static char *php_gethostbyaddr(char *ip);
+struct hostent *php_gethostbyaddr(char *ip);
 static char *php_gethostbyname(char *name);
 
 /* {{{ proto string gethostbyaddr(string ip_address)
 -71,7 +71,8 
 PHP_FUNCTION(gethostbyaddr)
 {
zval **arg;
-   char *addr; 
+   char *addr, *ip;
+   struct hostent *hp;

if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, arg) == FAILURE) {
ZEND_WRONG_PARAM_COUNT();
 -79,7 +80,14 
 
convert_to_string_ex(arg);

-   addr = php_gethostbyaddr(Z_STRVAL_PP(arg));
+ip = Z_STRVAL_PP(arg);
+   hp = php_gethostbyaddr(ip);
+   if (!hp) {
+   addr =  estrdup(ip);
+   } else {
+   addr = estrdup(hp-h_name);
+   }
+
 
if(addr == NULL) {
 #if HAVE_IPV6  !defined(__MacOSX__)
 -96,9 +104,80 
 }
 /* }}} */
 
+
+/* {{{ proto string gethostent(string ip_address|host)
+   Get the Internet hostent structure corresponding to a given IP address or host 
+name */
+PHP_FUNCTION(gethostent)
+{
+   zval **arg, *hostent_alias=NULL, *hostent_addr_list=NULL;
+   char *ip;   
+   struct hostent *hp;
+   struct in_addr in;
+   int i;
+
+   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, arg) == FAILURE) {
+   ZEND_WRONG_PARAM_COUNT();
+   }
+
+   convert_to_string_ex(arg);
+
+   /* start with clean arrays */
+   pval_destructor(return_value); 
+   if ( array_init(return_value) == FAILURE ) {
+   RETURN_FALSE;
+   }
+   
+   ip = Z_STRVAL_PP(arg);
+   hp = php_gethostbyaddr(ip);
+   if (!hp) {
+   /* not an ip address, try it as a hostname */
+   hp = gethostbyname(ip);
+   }
+
+if (!hp) {
+   RETVAL_FALSE;
+   }
+
+   MAKE_STD_ZVAL(hostent_alias);
+   MAKE_STD_ZVAL(hostent_addr_list);
+   if ( array_init(hostent_alias) == FAILURE ||
+array_init(hostent_addr_list) == FAILURE) {
+   RETURN_FALSE;
+   }
+
+   add_assoc_string(return_value, name, hp-h_name, 1);
+   add_assoc_long(return_value, addrtype, hp-h_addrtype);
+   add_assoc_long(return_value, length, hp-h_length);
+   /* make a sublist of aliases */
+   if (hp-h_aliases[0]) {
+   for (i = 0 ; hp-h_aliases[i] != 0 ; i++) {
+   add_next_index_string(hostent_alias, hp-h_aliases[i], 1);
+   }
+   zend_hash_update(return_value-value.ht, aliases, strlen(aliases) 
++ 1, (void *)hostent_alias, sizeof(zval *), NULL);
+   } else {
+   add_assoc_null(return_value, aliases);
+   }
+   if (hp-h_addr_list[0]) {
+   for (i = 0 ; hp-h_addr_list[i] != 0 ; i++) {
+   in = *(struct in_addr *) hp-h_addr_list[i];
+   add_next_index_string(hostent_addr_list, inet_ntoa(in), 1);
+   if (i ==0) {
+   add_assoc_string(return_value, addr, inet_ntoa(in), 
+1);
+   }
+   }
+   zend_hash_update(return_value-value.ht, addr_list, 
+strlen(addr_list) + 1, (void *)hostent_addr_list, 

Re: [PHP-DEV] Re: php extensions on windows

2002-04-18 Thread J Smith


Get somebody with enough karma to update it I guess. But I'd recommend 
opening up one of the VC++ projects from the source and checking the 
settings out, 'cause I might have forgotten something there.

J


Brent R. Matzelle wrote:
 
 This information would be a terrific addition to the PHP
 documentation.  How might we get it added?
 
 Brent
 


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




Re: [PHP-DEV] [Fwd: new dns function, gethostent]

2002-04-18 Thread Marcus Börger

At 23:13 18.04.2002, Shane Caraveo wrote:
Hi everyone,

I have a need not fullfilled by the current short set of dns functions
(no way to retrieve aliases), so I wrote a 'gethostent' function, which
accepts either hostname or ip, and returns a hash equivelant of the C
hostent struct.  patch is attached, if no objections in the next couple
hours I'll commit it.

Shane

Why not use a more meaningful functionname? Something like gethostentry?



? dns.diff
Index: basic_functions.c
===
RCS file: /repository/php4/ext/standard/basic_functions.c,v
retrieving revision 1.470
diff -d -u -r1.470 basic_functions.c
--- basic_functions.c   16 Apr 2002 22:14:19 -  1.470
+++ basic_functions.c   18 Apr 2002 20:50:42 -
 -406,6 +406,7 
 PHP_FE(gethostbyaddr, 
NULL)
 PHP_FE(gethostbyname, 
NULL)
 PHP_FE(gethostbynamel, 
NULL)
+   PHP_FE(gethostent, 
  NULL)

  #if HAVE_RES_SEARCH  !(defined(__BEOS__) || defined(PHP_WIN32))
 PHP_FE(checkdnsrr, 
NULL)
Index: dns.c
===
RCS file: /repository/php4/ext/standard/dns.c,v
retrieving revision 1.38
diff -d -u -r1.38 dns.c
--- dns.c   28 Feb 2002 08:26:44 -  1.38
+++ dns.c   18 Apr 2002 20:50:42 -
 -63,7 +63,7 
  #include dns.h
  /* }}} */

-static char *php_gethostbyaddr(char *ip);
+struct hostent *php_gethostbyaddr(char *ip);
  static char *php_gethostbyname(char *name);

  /* {{{ proto string gethostbyaddr(string ip_address)
 -71,7 +71,8 
  PHP_FUNCTION(gethostbyaddr)
  {
 zval **arg;
-   char *addr;
+   char *addr, *ip;
+   struct hostent *hp;

 if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, arg) == 
 FAILURE) {
 ZEND_WRONG_PARAM_COUNT();
 -79,7 +80,14 

 convert_to_string_ex(arg);

-   addr = php_gethostbyaddr(Z_STRVAL_PP(arg));
+ip = Z_STRVAL_PP(arg);
+   hp = php_gethostbyaddr(ip);
+   if (!hp) {
+   addr =  estrdup(ip);
+   } else {
+   addr = estrdup(hp-h_name);
+   }
+

 if(addr == NULL) {
  #if HAVE_IPV6  !defined(__MacOSX__)
 -96,9 +104,80 
  }
  /* }}} */

+
+/* {{{ proto string gethostent(string ip_address|host)
+   Get the Internet hostent structure corresponding to a given IP address 
or host name */
+PHP_FUNCTION(gethostent)
+{
+   zval **arg, *hostent_alias=NULL, *hostent_addr_list=NULL;
+   char *ip;
+   struct hostent *hp;
+   struct in_addr in;
+   int i;
+
+   if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, arg) == 
FAILURE) {
+   ZEND_WRONG_PARAM_COUNT();
+   }
+
+   convert_to_string_ex(arg);
+
+   /* start with clean arrays */
+   pval_destructor(return_value);
+   if ( array_init(return_value) == FAILURE ) {
+   RETURN_FALSE;
+   }
+
+   ip = Z_STRVAL_PP(arg);
+   hp = php_gethostbyaddr(ip);
+   if (!hp) {
+   /* not an ip address, try it as a hostname */
+   hp = gethostbyname(ip);
+   }
+
+if (!hp) {
+   RETVAL_FALSE;
+   }
+
+   MAKE_STD_ZVAL(hostent_alias);
+   MAKE_STD_ZVAL(hostent_addr_list);
+   if ( array_init(hostent_alias) == FAILURE ||
+array_init(hostent_addr_list) == FAILURE) {
+   RETURN_FALSE;
+   }
+
+   add_assoc_string(return_value, name, hp-h_name, 1);
+   add_assoc_long(return_value, addrtype, hp-h_addrtype);
+   add_assoc_long(return_value, length, hp-h_length);
+   /* make a sublist of aliases */
+   if (hp-h_aliases[0]) {
+   for (i = 0 ; hp-h_aliases[i] != 0 ; i++) {
+   add_next_index_string(hostent_alias, 
hp-h_aliases[i], 1);
+   }
+   zend_hash_update(return_value-value.ht, aliases, 
strlen(aliases) + 1, (void *)hostent_alias, sizeof(zval *), NULL);
+   } else {
+   add_assoc_null(return_value, aliases);
+   }
+   if (hp-h_addr_list[0]) {
+   for (i = 0 ; hp-h_addr_list[i] != 0 ; i++) {
+   in = *(struct in_addr *) hp-h_addr_list[i];
+   add_next_index_string(hostent_addr_list, 
inet_ntoa(in), 1);
+   if (i ==0) {
+   add_assoc_string(return_value, addr, 
inet_ntoa(in), 1);
+   }
+   }
+   zend_hash_update(return_value-value.ht, addr_list, 
strlen(addr_list) + 1, (void *)hostent_addr_list, sizeof(zval *), NULL);
+   } else {
+   add_assoc_null(return_value, addr);
+   add_assoc_null(return_value, 

Re: [PHP-DEV] URLs, fopen wrappers and RFC 2718

2002-04-18 Thread Wez Furlong

Hi Derick,

I like it too, but (and I hate this but) its not an rfc2396 compliant
scheme name.  Valid characters in the scheme part are:
alpha digit + - .

So how are these?

 crypt-des://blaat.txt
 crypt-blowfish://blaat.txt

 compress.zlib://file.gz
 compress.bzip2://file.bz2

 crypt+des://blaat.txt
 crypt+blowfish://blaat.txt


I think I prefer your parentheses, but a second best would be using
- (IMHO).
I think it is important that our wrapper urls can be parsed using
parse_url() without changing it's behaviour.

Hmmm. I really like the parentheses, it's just not standards compliant :-/

--Wez.

On 18/04/02, [EMAIL PROTECTED] wrote:
 how funny, I was discussing this issue with Stig on IRC too. I want to 
 implement encryption with streams too for the new encryption extension, 
 and we came up with something like this:
 
 crypt(des)://blaat.txt
 crypt(blowfish)://blaat.txt
 
 and then something for zippers:
 compress(zlib)://
 compress(bzip)://
 
 seems another viable idea to me...




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




[PHP-DEV] Need Quick assistance

2002-04-18 Thread brad lafountain

Hello,

 I know im not sposta send posts here for help.. but this is on a live server..


 i just upgraded my 4.0.6 server to 4.1.2 when i call system or shell_exec
functions it parses out all but one parameter. this only happens in the
mod_php4 as a cgi it works fine.

so 

shell_exec(php -q file.php);
will result in a No file input

but
shell_exec(php file.php blah);

will execute the php code but it won't pass blah to the script.
this isn't just the php executable its all programs.

shell_exec(./test one two);

//test
#!/bin/bash
echo $1 $2

will only print 'one'



anyone please help me.. i wanna go home!!


 - Brad


__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

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




[PHP-DEV] Quicktime movie

2002-04-18 Thread Rosen Marinov

Hi,
Can someone tell me how to put on WEB page QuickTime movie ?
I tried with some code, but nothing happens... !


Can you send me a code for this ?

Thanks




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




[PHP-DEV] Re: php extensions on windows

2002-04-18 Thread Igal Raizman

Thanks a lot, i'll give it a try.

J Smith [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

 I've been working on this sort of thing for the past few weeks as I've
been
 trying to make sure all of the PHP extensions I've written work on UNIX
 systems as well as Windows systems.

 I think you can compile using gcc and cygwin, but I believe the
recommended
 way is with Visual C++ 6, as the official binaries are done with VC++. (I
 think, I don't use PHP in Windows except to test portability.)

 Anyways, here's what I do as far as settings. This is for a thread-safe
 release extension. I'm assuming you have a bit of experience working with
 VC++ and the PHP source, and that you're able to compile PHP in the first
 place.

 0. Start a new project in VC++ and add your extension's files.

 1. In the Configurations dialog, add two configurations: Release_TS and
 Debug_TS. Release_TS should copy the settings from Release and Debug_TS
 should obviously copy from Debug. You can Remove Release and Debug and
 close the dialog. The next set of steps is for the Release_TS
 configuration. If you can figure that out, you should be able to get
 Debug_TS working fine.

 2. Open up Project-Settings. On the C/C++ tab, General Category, added
the
 following preprocessor definitions: ZEND_DEBUG=0,
 COMPILE_DL_YOUR_EXTENSION_NAME, ZTS=1, ZEND_WIN32, PHP_WIN32.
 YOUR_EXTENSION_NAME is the name you'll find in the sources generated by
 ext_skel.

 3. In the Code Generation Category, change Use run-time Library to
 Multithreaded DLL.

 4. In the Preprocessor Category, add the following Additional include
 directories: ..\.., ..\..\main, ..\..\Zend, ..\..\TSRM,
..\..\bindlib_w32.

 5. On the Link tab in the General Category, change the Output file name to
 ..\..\Release_TS/php_yourextension.dll.

 6. On that same tab, same category, add php4ts.lib to Object/library
 modules.

 7. In the Input Category, add the following to Additional library path:
 ..\..\Release_TS.

 That should be it. Close dialog and set the active configuration to
 Release_TS and (hopefully) build the DLL.

 If you're using other libraries and such, make sure you compile them using
 the multithreaded DLL runtime library like you did with your extension. I
 found that out the hard way trying to get my cryptopp extension working on
 Windows.

 Check out some of the VC++ project files included with the PHP source when
 you're stuck and try to replicate the settings they use in your own
 project. It takes a while to get used to building extensions with VC++
 'cause that sort of thing is so poorly documented in the Windows world,
but
 once you get it once you should be fine.

 J


 Igal Raizman wrote:

  Hello,
 
  Can someone point me in the directions of a tutorial or perhaps some
info
  on making PHP extensions on a Windows system ?
 
  not on how to code them, but rather on how to compile them on a windows
  system.
 
  Thanks,




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




[PHP-DEV] Re: Proposed additional behaviour of str_replace()

2002-04-18 Thread Yasuo Ohgaki

Mårten gustafsson wrote:
 Is there anyone else than me that would find it useful to be able to do:
 
 ?php
 $string = 'foo bar';
 $replacements = array(
   'foo'   = 'FOO',
   'bar'   = 'BAR');
 // Prints FOO BAR
 echo str_replace($replacements, $string);
 ?
 
 With current behaviour one has to do:
 
 ?php
 $string = 'foo bar';
 $replacements = array(
   'foo'   = 'FOO',
   'bar'   = 'BAR');
 // Prints FOO BAR
 echo str_replace(array_keys($replacements), array_values($string));
 ?
 

-1

uless multibyte char keys are handled well.

Currently, multibyte char does not work well
as hash key. Fixing this is not simpile.

--
Yasuo Ohgaki


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




[PHP-DEV] CVS Account Request: peter

2002-04-18 Thread Peter Moulding

The documentation seems to be behind 4.1.2 and lacking a few examples I could provide. 
If you want help updating the documentation and expanding the examples, I can 
contribute the odd hour some weeks. I have several pages of updates to contribute for 
sockets based on PHP 4.1.2.

I am not interested in updating code or bugs as C I never code in C. My wife's pet cat 
knows more about C than me.  Writing documentation is more my style.

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