[PHP-DEV] KINDLY GET BACK TO ME.

2003-02-25 Thread wesleymougata
MEMO

TEL :+31-621-454-271.

ATTN:
   URGENT ASSISTANCE NEEDED
You may be surprise to receive this Email from me since you do not know me personally. 
However, I would like to introduce myself. I am Mr. wesly mougata, the son of Dr. 
Stephen Mougata who was murdered few months ago in Zimbabwe as a result of land 
dispute. Before the death of my father (Dr. Mougata), he had taken me to AMSTERDAM to 
deposit the sum of Forty-Two Million United States dollars (US$42,000,000) in a 
security company, as he foresaw the looming danger in Zimbabwe. The money in question 
was deposited in a box as Gemstones to avoid much demurrage from the security company. 
The proposed amount was meant for the purchase of new machines and chemicals for the 
farms and establishment of new farms on Swaziland. As you may be aware this land 
problem came into force when Zimbabwe president Mr. Robert Mugabe Introduced the Land 
Reformed Act of which my father rich farmers and some black farmers where affec! ! 
ted. This resulted to the killing and Mob action by Zimbabwe war veterans and some 
lunatics in the society, infact, a lot of people were killed because of this Land 
Reformed act of which my dad was one of the victims. It is against this background 
that my family and I who are currently staying in Amsterdam decided to transfer my 
father’s money to a foreign account. Since the Dutch law prohibit a refugee (asylum 
seeker) to open any account or be involved in any financial transaction. As the eldest 
son of my father, I am saddled with the responsibility of seeking a genuine foreign 
account where the money could be transferred . I am faced with the dilemma of 
investing this amount of money in Holland for the fear of going through the same 
experience in future since both countries have similar history. Moreover, The 
Netherlands foreign exchange policy does not allow such investment from asylum 
seekers. As a businessman, whom I have entrusted my future and my family in his hands! 
, ! I must let you know that this transaction is risk free. If you accept to assist me 
and my family, all I need you to do for me is to make arrangement and come to 
AMSTERDAM ,THE NETHERLANDS, so that we can open the non-resident account which will 
aid us in transferring the money into any account you will nominate overseas. This 
money I intend using for investment. I have options to offer you, first you can choose 
to have certain percentage of the money for nominating your account for the 
transaction, or you can go into partnership for a proper profitable investment of the 
money in your country. Which ever option you choose, feel free to notify me. I have 
mapped out 5% of this money for all expenses incurred in processing the transaction. 
If for some reasons you do not prefer a partnership, I am willing to give you 25% of 
the money while the remaining 70% that is meant for me, will be for the investment in 
your country. Please, contact me on the above Email or telephone so ! we c! an discuss 
further and a chance for you to ask me any question you may have in mind, while you 
maintain the absolute secrecy required in the transaction.
Yours faithfully,
MR. WESLEY MOUGATA.

-
Demo Version Sent.
--



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

[PHP-DEV] KINDLY GET BACK TO ME.

2003-02-25 Thread wesleymougata
MEMO

TEL :+31-621-454-271.

ATTN:
   URGENT ASSISTANCE NEEDED
You may be surprise to receive this Email from me since you do not know me personally. 
However, I would like to introduce myself. I am Mr. wesly mougata, the son of Dr. 
Stephen Mougata who was murdered few months ago in Zimbabwe as a result of land 
dispute. Before the death of my father (Dr. Mougata), he had taken me to AMSTERDAM to 
deposit the sum of Forty-Two Million United States dollars (US$42,000,000) in a 
security company, as he foresaw the looming danger in Zimbabwe. The money in question 
was deposited in a box as Gemstones to avoid much demurrage from the security company. 
The proposed amount was meant for the purchase of new machines and chemicals for the 
farms and establishment of new farms on Swaziland. As you may be aware this land 
problem came into force when Zimbabwe president Mr. Robert Mugabe Introduced the Land 
Reformed Act of which my father rich farmers and some black farmers where affec! ! 
ted. This resulted to the killing and Mob action by Zimbabwe war veterans and some 
lunatics in the society, infact, a lot of people were killed because of this Land 
Reformed act of which my dad was one of the victims. It is against this background 
that my family and I who are currently staying in Amsterdam decided to transfer my 
father’s money to a foreign account. Since the Dutch law prohibit a refugee (asylum 
seeker) to open any account or be involved in any financial transaction. As the eldest 
son of my father, I am saddled with the responsibility of seeking a genuine foreign 
account where the money could be transferred . I am faced with the dilemma of 
investing this amount of money in Holland for the fear of going through the same 
experience in future since both countries have similar history. Moreover, The 
Netherlands foreign exchange policy does not allow such investment from asylum 
seekers. As a businessman, whom I have entrusted my future and my family in his hands! 
, ! I must let you know that this transaction is risk free. If you accept to assist me 
and my family, all I need you to do for me is to make arrangement and come to 
AMSTERDAM ,THE NETHERLANDS, so that we can open the non-resident account which will 
aid us in transferring the money into any account you will nominate overseas. This 
money I intend using for investment. I have options to offer you, first you can choose 
to have certain percentage of the money for nominating your account for the 
transaction, or you can go into partnership for a proper profitable investment of the 
money in your country. Which ever option you choose, feel free to notify me. I have 
mapped out 5% of this money for all expenses incurred in processing the transaction. 
If for some reasons you do not prefer a partnership, I am willing to give you 25% of 
the money while the remaining 70% that is meant for me, will be for the investment in 
your country. Please, contact me on the above Email or telephone so ! we c! an discuss 
further and a chance for you to ask me any question you may have in mind, while you 
maintain the absolute secrecy required in the transaction.
Yours faithfully,
MR. WESLEY MOUGATA.

-
Demo Version Sent.
--



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

Re: [PHP-DEV] Performance degradation part 2 the module version

2003-02-25 Thread Wez Furlong
On Mon, 24 Feb 2003, Rasmus Lerdorf wrote:

 if (stream) {
 if (self-is_pipe) {
 stream-flags |= PHP_STREAM_FLAG_NO_SEEK;
 } else {
 stream-position = ftell(file);
 }
 }

 We should be able to skip that ftell() call on a script or include file we
 have just opened, right?

Yes; prior to my fixes this week, the ftell was sometimes important;
streams should be able manage just fine without it now.

 _php_stream_open_wrapper_as_file() what are you trying to guard against
 with that stream_cast call?

 if (php_stream_cast(stream, 
 PHP_STREAM_AS_STDIO|PHP_STREAM_CAST_TRY_HARD|PHP_STREAM_CAST_RELEASE,
 (void**)fp, REPORT_ERRORS) == FAILURE)
 {
 php_stream_close(stream);
 if (opened_path  *opened_path)
 efree(*opened_path);
 return NULL;
 }

 We have already stat()'ed the file to death.  We know it is there, that we
 are allowed to open it, etc.  What could go wrong that the open call just
 above it wouldn't have caught?  Is it just a case of getting too general
 and we need a special-case simpler function for the most common operation
 of simply opening script files?

Yes and no. (we need this approach in order to be able to
include/require from any wrapper).

In php_stream_cast, we need to ensure that when we pass back the file
pointer, it is seeked to the correct offset (as we see it) in the file.
This is because the underlying FILE* has its own buffer, and its own
idea of the file position.

[Yes, using FILE*/stdio streams with buffers is causing headaches, which
is why I'm moving away from them in PHP 5].

Admittedly, when opening the file for the first time, we do not need to
seek - so we can avoid it by passing a flag (OR'd with the REPORT_ERRORS
flag).

I'm sure we can eliminate those seeks.  Are there any other areas in the
streams code that you can see that could do with a syscall tune-up?

--Wez.


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



[PHP-DEV] KINDLY GET BACK TO ME.

2003-02-25 Thread wesleymougata
MEMO

TEL :+31-621-454-271.

ATTN:
   URGENT ASSISTANCE NEEDED
You may be surprise to receive this Email from me since you do not know me personally. 
However, I would like to introduce myself. I am Mr. wesly mougata, the son of Dr. 
Stephen Mougata who was murdered few months ago in Zimbabwe as a result of land 
dispute. Before the death of my father (Dr. Mougata), he had taken me to AMSTERDAM to 
deposit the sum of Forty-Two Million United States dollars (US$42,000,000) in a 
security company, as he foresaw the looming danger in Zimbabwe. The money in question 
was deposited in a box as Gemstones to avoid much demurrage from the security company. 
The proposed amount was meant for the purchase of new machines and chemicals for the 
farms and establishment of new farms on Swaziland. As you may be aware this land 
problem came into force when Zimbabwe president Mr. Robert Mugabe Introduced the Land 
Reformed Act of which my father rich farmers and some black farmers where affec! ! 
ted. This resulted to the killing and Mob action by Zimbabwe war veterans and some 
lunatics in the society, infact, a lot of people were killed because of this Land 
Reformed act of which my dad was one of the victims. It is against this background 
that my family and I who are currently staying in Amsterdam decided to transfer my 
father’s money to a foreign account. Since the Dutch law prohibit a refugee (asylum 
seeker) to open any account or be involved in any financial transaction. As the eldest 
son of my father, I am saddled with the responsibility of seeking a genuine foreign 
account where the money could be transferred . I am faced with the dilemma of 
investing this amount of money in Holland for the fear of going through the same 
experience in future since both countries have similar history. Moreover, The 
Netherlands foreign exchange policy does not allow such investment from asylum 
seekers. As a businessman, whom I have entrusted my future and my family in his hands! 
, ! I must let you know that this transaction is risk free. If you accept to assist me 
and my family, all I need you to do for me is to make arrangement and come to 
AMSTERDAM ,THE NETHERLANDS, so that we can open the non-resident account which will 
aid us in transferring the money into any account you will nominate overseas. This 
money I intend using for investment. I have options to offer you, first you can choose 
to have certain percentage of the money for nominating your account for the 
transaction, or you can go into partnership for a proper profitable investment of the 
money in your country. Which ever option you choose, feel free to notify me. I have 
mapped out 5% of this money for all expenses incurred in processing the transaction. 
If for some reasons you do not prefer a partnership, I am willing to give you 25% of 
the money while the remaining 70% that is meant for me, will be for the investment in 
your country. Please, contact me on the above Email or telephone so ! we c! an discuss 
further and a chance for you to ask me any question you may have in mind, while you 
maintain the absolute secrecy required in the transaction.
Yours faithfully,
MR. WESLEY MOUGATA.

-
Demo Version Sent.
--



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

Re: [PHP-DEV] KINDLY GET BACK TO ME.

2003-02-25 Thread Gareth Ardron
On Tuesday 25 Feb 2003 10:55 am, wesleymougata wrote:
 MEMO

snip

Just an idea, but why not have 2 lists rather than one.
One is php-dev, other is php-dev-post which ecoes content to php-dev and not 
to any of it's subscribers and make this list subscriber postings only.
Ergo, when sombody subscribes to php-dev, they're automagicakally subscribed 
to php-dev and php-dev-post and people who post using 2 or 3 email addresses 
can subscribe all their email addresses to php-dev-post without getting 3 
copies of the list.
Also, all mail to [EMAIL PROTECTED] gets checked against the subscriber 
list of php-dev-post.
At least, this is the best solution to spam I've seen in the past.

I'm not sure I explained myself that well there, but I've not have my regular 
amount of caffeine required to wake me up yet. Apologies.

-- 
Gareth Ardron
Visualcode :: 01584 861597 :: http://www.visualcode.co.uk

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



Re: [PHP-DEV] Libtool for RH8

2003-02-25 Thread Derick Rethans
On Mon, 24 Feb 2003, Joseph Tate wrote:

 Derick, would you post the SRPM for libtool?

sure,

http://files.derickrethans.nl/libtool-1.4.3-4.src.rpm

Derick

-- 
Stop mad cowboy disease!
-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-


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



[PHP-DEV] CVS Account Request: seth

2003-02-25 Thread Christopher Korn
I want to help to translate the php documentation in the german language. because 
there are not all pages translatet i wanna help to do this.

i hope this is enough :)

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



Re: [PHP-DEV] Performance degradation part 2 the module version

2003-02-25 Thread Rasmus Lerdorf
 Admittedly, when opening the file for the first time, we do not need to
 seek - so we can avoid it by passing a flag (OR'd with the REPORT_ERRORS
 flag).
 
 I'm sure we can eliminate those seeks.  Are there any other areas in the
 streams code that you can see that could do with a syscall tune-up?

Those are the only ones I have seen so far that stood out as being 
extraneous.  

I think we should do our best to add whatever shortcuts are necessary to
ensure the most common execution path is as fast as we can possibly get
it.  If it takes getting a little ugly passing in flags, so be it.  I'd
like to get 4.3 up to the same level as 4.2.  I still need to hack and
slash away code for Yahoo! on top of that since syscall thrashing is our
limiting factor at this point.

There is other ugliness hiding in there.  For example, include_once on a 
file that has already been included will still stat() (many times) and 
open() the file.  Only later on does it go and check the included_list to 
see if it should actually have done that.  Not quite on the primary 
execution path, but still.  If you have a case where that scenario happens 
a lot, it is actually mesurably faster to do manual multiple include 
prevention with a PHP-level flag.  The _once stuff was added distinctly to 
prevent that kind of ugly code, but we stuffed it up.

-Rasmus


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



[PHP-DEV] new construct

2003-02-25 Thread michel 'ziobudda' morelli
Hi, I need to know which is the correct new construct: class_name or
__construct.

From Zend_Changes:

The Zend Engine 2.0 introduces a standard way of declaring
constructor methods by calling them by the name __construct().
...
For backwards compatibility, if the Zend Engine 2.0 cannot find
a __construct() function for a given class, it will search for
the old-style constructor function, by the name of the class.


But: 

?php

class A {
 function __construct()
 {
   echo into A::__construct();
 }
 
 function A()
 {
   echo into A::A();
 }
}
$a = new A;
?

and /usr/local/php5-230202003/bin/php test.php give this result:

into A::A()

And this is not correct, or not ?

tnx

-- 
michel 'ziobudda' morelli [EMAIL PROTECTED]


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



[PHP-DEV] buildconf warning

2003-02-25 Thread michel 'ziobudda' morelli
From today's cvs

using default Zend directory
buildconf: checking installation...
buildconf: autoconf version 2.53 (ok)
buildconf: Your version of autoconf likely contains buggy cache code.
   Running cvsclean for you.
   To avoid this, install autoconf-2.13 and automake-1.5.
buildconf: automake version 1.6.3 (ok)
buildconf: libtool version 1.4.3 (ok)
rebuilding configure
rebuilding acconfig.h
rebuilding main/php_config.h.in
WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
WARNING: and `config.h.top', to define templates for `config.h.in'
WARNING: is deprecated and discouraged.

WARNING: Using the third argument of `AC_DEFINE' and
WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
WARNING: `acconfig.h':

WARNING:   AC_DEFINE([NEED_MAIN], 1,
WARNING: [Define if a function `main' is needed.])

WARNING: More sophisticated templates can also be produced, see the
WARNING: documentation.
autoheader: `main/php_config.h.in' is created


bye

-- 
michel 'ziobudda' morelli [EMAIL PROTECTED]


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



[PHP-DEV] Re: new construct

2003-02-25 Thread Andrew Heebner
__construct is the new method of defining a constructor, but the 'bug' you
suspect is not a bug.  The parser will search for a function of the same
name in the class as the constructor for backwards compatibility with Older
scripts, etc...

This is done by design, not by 'bugginess'.

~ Andrew Heebner



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



Re: [PHP-DEV] Re: new construct

2003-02-25 Thread Hartmut Holzgraefe
Andrew Heebner wrote:
This is done by design, not by 'bugginess'.

For backwards compatibility, if the Zend Engine 2.0 cannot find
 a __construct() function for a given class, it will search for
 the old-style constructor function, by the name of the class.
in the exmaple it uses the 'old style' constructor *although*
__construct() could have been found ...?
--
Six Offene Systeme GmbH http://www.six.de/
i.A. Hartmut Holzgraefe Email: [EMAIL PROTECTED]   Tel.: +49-711-99091-77
Sie finden uns auf der CeBIT in Halle 6/H44   http://www.six.de/cebit2003/

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


RE: [PHP-DEV] Re: new construct

2003-02-25 Thread John Coggeshall

__construct is the new method of defining a constructor, but 
the 'bug' you suspect is not a bug.  The parser will search 
for a function of the same name in the class as the 
constructor for backwards compatibility with Older scripts, etc...

But shouldn't __construct() be searched for and used prior to the
old-style constructor? Intuitively it seems it should.

John


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



Re: [PHP-DEV] Re: new construct

2003-02-25 Thread Andrew Heebner
Perhaps i may be mistaken, but it seems logical to search for the old-style
constructor first in order to be backwards compatible with old-style
scripts.  Putting __construct in old style classes would yield a classname
of  '__construct', an ugly and unlikely name for a class.  Seeing as A::A()
would be much nicer, i can see the logic behind parsing the old-style first,
rather than the new-style.

That's just my two cents, feel free to correct me otherwise..

~ Andrew Heebner


 __construct is the new method of defining a constructor, but
 the 'bug' you suspect is not a bug.  The parser will search
 for a function of the same name in the class as the
 constructor for backwards compatibility with Older scripts, etc...

 But shouldn't __construct() be searched for and used prior to the
 old-style constructor? Intuitively it seems it should.

 John




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



RE: [PHP-DEV] Re: new construct

2003-02-25 Thread John Coggeshall

I was asking myself -- I had assumed that __construct() would be
searched for first. I was /am under the impression __construct() is a
special function that the engine wouldn't allow you to use  in PHP5 in
any other context than its intended purpose. 

I don't know what Zeev plans on doing with this, but perhaps an option
would be to issue a notice or warning if both A::A() and __construct()
exist in a single class A and call __construct() in those cases... 

Just a thought.

John
 
Perhaps i may be mistaken, but it seems logical to search for 
the old-style constructor first in order to be backwards 
compatible with old-style scripts.  Putting __construct in old 
style classes would yield a classname of  '__construct', an 
ugly and unlikely name for a class.  Seeing as A::A() would be 
much nicer, i can see the logic behind parsing the old-style 
first, rather than the new-style.

That's just my two cents, feel free to correct me otherwise..

~ Andrew Heebner


 __construct is the new method of defining a constructor, but the 
 'bug' you suspect is not a bug.  The parser will search for a 
 function of the same name in the class as the constructor for 
 backwards compatibility with Older scripts, etc...

 But shouldn't __construct() be searched for and used prior to the 
 old-style constructor? Intuitively it seems it should.

 John




-- 
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] buildconf warning

2003-02-25 Thread michel 'ziobudda' morelli
Il mar, 2003-02-25 alle 18:13, Magnus Mb@) ha scritto:
 This is because you are running autoconf version 2.53 (which is buggy).
 Downgrading to 2.13 will remove those warnings.

Tnx.

-- 
michel 'ziobudda' morelli [EMAIL PROTECTED]


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



Re: [PHP-DEV] buildconf warning

2003-02-25 Thread Magnus Mb@)
On 25 Feb 2003 17:19:28 +0100
michel 'ziobudda' morelli [EMAIL PROTECTED] wrote:

 buildconf: autoconf version 2.53 (ok)
 buildconf: Your version of autoconf likely contains buggy cache code.
Running cvsclean for you.
To avoid this, install autoconf-2.13 and automake-1.5.

This is because you are running autoconf version 2.53 (which is buggy).
Downgrading to 2.13 will remove those warnings.


/ Magnus

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



[PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/tokenizer tokenizer.c

2003-02-25 Thread J Smith

I think that HEAD is getting slightly screwed up recently, as a couple of
recent cvs updates have got me some code from 4.3.x, or at least it looks
that way. (Specifically, Zend isn't coming down right, and I get missing
symbols like ZEND_INI_PARSER_POP_ENTRY and such, which should be defined in
zend_ini.h.) Checking out php5 seemed to correct this.

J


Sebastian Bergmann wrote:

 Stig Bakken wrote:
 +#ifdef ZEND_ENGINE_2
 
   Why the #ifdef? Isn't HEAD supposed to be PHP 5 / ZE2 only?
 


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



Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/tokenizer tokenizer.c

2003-02-25 Thread Magnus M
On Tue, 25 Feb 2003 14:45:26 -0500
J Smith [EMAIL PROTECTED] wrote:

 I get missing
 symbols like ZEND_INI_PARSER_POP_ENTRY and such, which should be defined in
 zend_ini.h.) Checking out php5 seemed to correct this.

That is because php5 is HEAD. I have no idea what php4 is, except not-working.
So you should checkout php5, not php4.

/ Magnus

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



Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/tokenizer tokenizer.c

2003-02-25 Thread J Smith

A lesson I learned yesterday after wondering why the hell the thing wouldn't
compile for the past three or four days... php5 works fine, though, like
you say.

J


Magnus N wrote:

 On Tue, 25 Feb 2003 14:45:26 -0500
 J Smith [EMAIL PROTECTED] wrote:
 
 I get missing
 symbols like ZEND_INI_PARSER_POP_ENTRY and such, which should be defined
 in zend_ini.h.) Checking out php5 seemed to correct this.
 
 That is because php5 is HEAD. I have no idea what php4 is, except
 not-working. So you should checkout php5, not php4.
 
 / Magnus


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



Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/tokenizer tokenizer.c

2003-02-25 Thread Ilia A.
On February 25, 2003 05:05 pm, Magnus M wrote:
 On Tue, 25 Feb 2003 14:45:26 -0500

 J Smith [EMAIL PROTECTED] wrote:
  I get missing
  symbols like ZEND_INI_PARSER_POP_ENTRY and such, which should be defined
  in zend_ini.h.) Checking out php5 seemed to correct this.

 That is because php5 is HEAD. I have no idea what php4 is, except
 not-working. So you should checkout php5, not php4.

PHP5 - co php5
PHP4 - co -rPHP_4_3 php4

Ilia

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



Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/tokenizer tokenizer.c

2003-02-25 Thread Sascha Schumann
Or more accurately:

 PHP5 - co php5
 PHP4.3 - co -rPHP_4_3 php4
 PHP4 - co -rPHP_4 php4

- Sascha

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



Re: [PHP-DEV] Performance degradation part 2 the module version

2003-02-25 Thread Rasmus Lerdorf
 I'm sure we can eliminate those seeks.  Are there any other areas in the
 streams code that you can see that could do with a syscall tune-up?

Ok, found two more.  In _php_stream_fopen() we fstat() the script to be 
opened:

realpath = expand_filepath(filename, NULL TSRMLS_CC);

fp = fopen(realpath, mode);

if (fp) {
/* sanity checks for include/require */
if (options  STREAM_OPEN_FOR_INCLUDE  (fstat(fileno(fp), st) == -1 || 
!S_ISREG(st.st_mode))) {
#ifdef PHP_WIN32
/* skip the sanity check; fstat doesn't appear to work on
 * UNC paths */
if (!IS_UNC_PATH(filename, strlen(filename)))
#endif
goto err;
}
ret = php_stream_fopen_from_file_rel(fp, mode);


That sequence of code is a trainwreck.  The expand_filepath() ends up 
doing an lstat() on every component of the path and then the file itself, 
and then we fstat() the file.  I can't afford the realpath() here, so I 
turn it off in expand_filepath(), but I don't think the fstat() is needed 
there.

Then right after that in _php_stream_fopen_from_file() we have:

#ifdef S_ISFIFO
/* detect if this is a pipe */
if (self-fd = 0) {
struct stat sb;
self-is_pipe = (fstat(self-fd, sb) == 0  S_ISFIFO(sb.st_mode)) ? 1 : 0;
}
#endif

which does yet another fstat() on the file.  At the very least, this one 
should use the result of the previous one.  Basically if these checks are 
still needed, we need a stat cache here.  

There is a 3rd fstat() after that, but I can't really make any sense of 
the backtrace to it:

#0  0x202d0c58 in fstat () from /usr/lib/libc.so.4
#1  0x202e42e6 in __swhatbuf () from /usr/lib/libc.so.4
#2  0x202e4236 in __smakebuf () from /usr/lib/libc.so.4
#3  0x202d454f in __srefill () from /usr/lib/libc.so.4
#4  0x202b3ea6 in fread () from /usr/lib/libc.so.4
#5  0x203f9bb4 in yy_get_next_buffer () at Zend/zend_language_scanner.c:5359
#6  0x203f98cd in lex_scan (zendlval=0x9fbfd770) at Zend/zend_language_scanner.c:5193
#7  0x20401814 in zendlex (zendlval=0x9fbfd76c) at 
/homes/rasmus/php4/Zend/zend_compile.c:2459
#8  0x203f38e8 in zendparse () at /home/y/share/bison.simple:432
#9  0x203f6685 in compile_file (file_handle=0x9fbff758, type=2) at 
/homes/rasmus/php4/Zend/zend_language_scanner.l:348
#10 0x2040b3a6 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at 
/homes/rasmus/php4/Zend/zend.c:860
#11 0x203e41ce in php_execute_script (primary_file=0x9fbff758) at 
/homes/rasmus/php4/main/main.c:1591
#12 0x204235d6 in apache_php_module_main (r=0xdc040, display_source_mode=0)
at /homes/rasmus/php4/sapi/apache/sapi_apache.c:55
#13 0x2042419e in send_php (r=0xdc040, display_source_mode=0, filename=0x0)
at /homes/rasmus/php4/sapi/apache/mod_php4.c:617
#14 0x204241fe in send_parsed_php (r=0xdc040) at 
/homes/rasmus/php4/sapi/apache/mod_php4.c:632
#15 0x48e84 in ap_invoke_handler (r=0xdc040) at http_config.c:518
#16 0x59cec in process_request_internal (r=0xdc040) at http_request.c:1352
#17 0x59d47 in ap_process_request (r=0xdc040) at http_request.c:1368
#18 0x52977 in child_main (child_num_arg=0) at http_main.c:5229
#19 0x52b18 in make_child (s=0xa4930, slot=0, now=1046217441) at http_main.c:5400
#20 0x52c49 in startup_children (number_to_start=25) at http_main.c:5498
#21 0x53165 in standalone_main (argc=2, argv=0x9fbffa80) at http_main.c:5859
#22 0x538ec in main (argc=2, argv=0x9fbffa80) at http_main.c:6246

-Rasmus


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



[PHP-DEV] Re: Announcement: Next generation ext_skel

2003-02-25 Thread l0t3k
Hartmut,
  will this also generate zend_parse_parameters calls based on prototype ?

l0t3k
Hartmut Holzgraefe [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 i've just added the first working results of a replacement for the good
 old ext_skel script in php/scripts/ext_skel_ng




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



Re: [PHP-DEV] Re: Announcement: Next generation ext_skel

2003-02-25 Thread Rasmus Lerdorf
The current one does, so it better...

On Wed, 19 Feb 2003, l0t3k wrote:

 Hartmut,
   will this also generate zend_parse_parameters calls based on prototype ?

 l0t3k
 Hartmut Holzgraefe [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 
  i've just added the first working results of a replacement for the good
  old ext_skel script in php/scripts/ext_skel_ng




 --
 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, Windows and COM.

2003-02-25 Thread Harald Radi
 
hi richard,
 
currently there is no way of calling a function with named arguments. your
proposed array syntax wouldn't allow for passing arrays. on the other hand
variant arrays can only be indexed arrays and not hash arrays so i could treat
all string indices as named parameters. this would be a possibility though i
still find it very confusing. if anybody has a good suggestion that is
feasable on top of the engine (meaning without modifying the scanner/parser)
don't hesitate to post it to the list.
 
back to your actual problem:
you still can call all functions without naming parameters, though you have to
specify the full list of parameters up to at least the last optional parameter
that should not be set to its default value (uuh, does this make sence ?
actually its exactly the same as calling a php function with optional
parameters). you can look up the default values for optional parameters in the
components typelibrary which is browsable using the oleview tool. 
 
i hope that helps.
 

regards,
Harald Radi
--
nme - we can heal you
http://www.nme.at http://www.nme.at/ 

Ortner Radi Schwenk GnbR
Tumpenweg 528
5084 Grossgmain, Salzburg
Austria 

-Original Message-
From: Richard Quadling [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 5:53 PM
To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]';
'[EMAIL PROTECTED]'
Subject: PHP, Windows and COM.


Hi.
 
As authors of the COM.c within the PHP Source code, I am hoping one of you
clever people can help me.
 
I am trying to use PHP to control MS Word.
 
Simple stuff like opening a document, writing and saving I have no problem
with, and many of the online tutorials on this show this and very little else.
 
My problem is that I want to use functions from within Word where the
parameters would be named.
 
e.g.
 
In VBA, the GoTo function is defined as;
 
expression.GoTo(What, Which, Count, Name)
 
The following examples are all valid.
 
Selection.GoTo What:=wdGoToHeading, Which:=wdGoToFirst
Selection.GoTo What:=wdGoToHeading, Which:=wdGoToAbsolute, Count:=1
Selection.GoTo What:=wdGoToField, Name:=Date
 
The What parameter can be ...
 
wdGoToBookmark 
wdGoToComment 
wdGoToEndnote 
wdGoToEquation 
wdGoToField 
wdGoToFootnote 
wdGoToGrammaticalError 
wdGoToGraphic 
wdGoToHeading 
wdGoToLine 
wdGoToObject 
wdGoToPage 
wdGoToPercent 
wdGoToProofreadingError 
wdGoToRevision 
wdGoToSection 
wdGoToSpellingError 
wdGoToTable 
 
The Which parameter can be ...
 
wdGoToAbsolute 
wdGoToFirst 
wdGoToLast 
wdGoToNext 
wdGoToPrevious 
wdGoToRelative 

 
All the parameters are optional. Not all work together. For example, you can't
say goto the page named fred as pages don't have names!
 
The problem I have within PHP is I can't work out how to use any function that
has optional parameters.
 
e.g.
 

$word-Documents[1]-GoTo(array(What=wdGoToBookmark,Name=YourName));

$word-Documents[1]-GoTo(wdGoToBookmark,YourName);
etc.
 
The function seems to have been defined as requiring 4 parameters from PHP's
pov.
 
Is there any known method within PHP to support named parameters for COM
functions that have optional parameters.
 
Search and Replace is another one I can get working, which is why I tried
using bookmarks, but still no joy.
 
Now, if I've lost the plot, then let me know.
 
Alternatively/also, how do I know what typelibrary to load?
 
Is ...
 
com_load_typelib(C:\\Program Files\\Common Files\\Microsoft
Shared\\Office10);
 
correct when ...
 
?php
set_time_limit(0);
error_reporting(E_ALL);
 
com_load_typelib(C:\\Program Files\\Common Files\\Microsoft
Shared\\Office10);
$word = new COM(word.application) or die(Unable to create Word);
print Loaded Word, version {$word-Version}\n;

$word-Documents-Open(C:\\Empty.DOC);
print Document loaded;

$word-Documents[1]-GoTo(array(What=-1,Name=YourName));
print Goto 1 done;

$word-Selection-TypeText({$_GET['YourName']});
print Typetext 1 done;

$word-Documents[1]-GoTo(array(What=-1,Name=YourAge));
print Goto 2 done;

$word-Selection-TypeText({$_GET['YourAge']});
print Typetext 2 done;

$word-Documents[1]-SaveAs(C:\\filled.doc);
print New saved document;

$word-Quit();
$word-Release();
$word = null;
print Word closed.\n;
?


The word document has 2 bookmarks. I called YourName and one called
YourAge.
 
The above script is called as word.php?YourName=RichardYourAge=35
 
Please help!
 
Regards,
 
Richard Quadling