[PHP-DEV] Piping to the PHP binary

2003-02-26 Thread Dan Hardiker
Hey all,

echo ?php echo \hi\; ? | /path/to/php

That works on php v4.2.x but Ive got 3 machines on v4.3.x and none of them
seem to respond to the piping of the php config.


v4.2.x Response

[13:56:[EMAIL PROTECTED]:~$ echo ?php echo 'hi'; ? |
/usr/local/bin/php
X-Powered-By: PHP/4.2.3
Content-type: text/html

hi[13:56:[EMAIL PROTECTED]:~$

v4.3.x Response

[13:58:[EMAIL PROTECTED]:~$ echo ?php echo 'hi'; ? |
/usr/local/bin/php
Status: 404
Content-type: text/html
X-Powered-By: PHP/4.3.2-dev

No input file specified.
[13:59:[EMAIL PROTECTED]:~$


Anyone else with the same results on a v4.3.x cgi-binary?
Is this modified behavoir limited to me, or expected?

I tried asking php-general@ but no response.


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



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



[PHP-DEV] --with-apache broken in PHP_4_3?

2003-02-26 Thread Sebastian Bergmann
  I have installed Apache 1.3.28-dev in /usr/local/apache:

checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
configure: error: Invalid Apache directory -
unable to find httpd.h under /usr/local/apache

  httpd.h is in /usr/local/apache/include/.

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

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



Re: [PHP-DEV] --with-apache broken in PHP_4_3?

2003-02-26 Thread Jani Taskinen

eh? Are your apache sources there? :)

--Jani


On Wed, 26 Feb 2003, Sebastian Bergmann wrote:

  I have installed Apache 1.3.28-dev in /usr/local/apache:

checking for Apache 1.x module support via DSO through APXS... no
checking for Apache 1.x module support... no
configure: error: Invalid Apache directory -
unable to find httpd.h under /usr/local/apache

  httpd.h is in /usr/local/apache/include/.



-- 
- For Sale! -


-- 
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-26 Thread Hartmut Holzgraefe
l0t3k wrote:
Hartmut,
  will this also generate zend_parse_parameters calls based on prototype ?
Sure, see the two samples below. It even adds return statements for the
return type specified in the proto where possible.
But unlike the current ext_skel it also supports code generation for
php.ini values, module globals, constants and resourcetypes ... :)
---

function role='public' name='dummy_int'
  summarydummy integer conversion/summary
  protoint dummy_int(int bar)/proto
/function
/* {{{ func int dummy_int(int bar)
  dummy integer conversion */
PHP_FUNCTION(dummy_int)
{
  int argc = ZEND_NUM_ARGS();
  long bar = 0;

  if (zend_parse_parameters(argc TSRMLS_CC, l, bar) == FAILURE) return;

  php_error(E_WARNING, dummy_int: not yet implemented);

  RETURN_LONG(0);
}
/* }}} */
---

function role='public' name='dummy_resource'
  summarydummy resource test/summary
  protoresource dummy_resource(resource bar)/proto
/function
/* {{{ proto resource dummy_resource(resource bar)
  dummy resource test */
PHP_FUNCTION(dummy_resource)
{
  zval * bar = NULL;
  int * bar_id = -1;
  int argc = ZEND_NUM_ARGS();
  if (zend_parse_parameters(argc TSRMLS_CC, r, bar, bar_id) == FAILURE) return;

  if (bar) {
ZEND_FETCH_RESOURCE(???, ???, bar, bar_id, ???, ???_rsrc_id);
  }
  php_error(E_WARNING, dummy_resource: not yet implemented);
}
/* }}} */
--
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: Announcement: Next generation ext_skel

2003-02-26 Thread Jani Taskinen

Krhm...you should make it to produce code that meets 
our coding standards.. :)

Use tabs,  
if (foo) {
   ...
}

etc. 

--Jani



On Wed, 26 Feb 2003, Hartmut Holzgraefe wrote:

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

Sure, see the two samples below. It even adds return statements for the
return type specified in the proto where possible.

But unlike the current ext_skel it also supports code generation for
php.ini values, module globals, constants and resourcetypes ... :)

---

function role='public' name='dummy_int'
   summarydummy integer conversion/summary
   protoint dummy_int(int bar)/proto
/function

/* {{{ func int dummy_int(int bar)
   dummy integer conversion */
PHP_FUNCTION(dummy_int)
{
   int argc = ZEND_NUM_ARGS();

   long bar = 0;

   if (zend_parse_parameters(argc TSRMLS_CC, l, bar) == FAILURE) return;

   php_error(E_WARNING, dummy_int: not yet implemented);

   RETURN_LONG(0);
}
/* }}} */


---

function role='public' name='dummy_resource'
   summarydummy resource test/summary
   protoresource dummy_resource(resource bar)/proto
/function

/* {{{ proto resource dummy_resource(resource bar)
   dummy resource test */
PHP_FUNCTION(dummy_resource)
{
   zval * bar = NULL;
   int * bar_id = -1;
   int argc = ZEND_NUM_ARGS();


   if (zend_parse_parameters(argc TSRMLS_CC, r, bar, bar_id) == FAILURE) return;

   if (bar) {
 ZEND_FETCH_RESOURCE(???, ???, bar, bar_id, ???, ???_rsrc_id);
   }

   php_error(E_WARNING, dummy_resource: not yet implemented);
}
/* }}} */




-- 
- For Sale! -


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



Re: [PHP-DEV] --with-apache broken in PHP_4_3?

2003-02-26 Thread Sebastian Bergmann
Sebastian Bergmann wrote:
 checking for Apache 1.x module support via DSO through APXS... no
 checking for Apache 1.x module support... no
 configure: error: Invalid Apache directory -
 unable to find httpd.h under /usr/local/apache

  Not enough tea for me this morning, I wager. ;-)

-- 
  Sebastian Bergmann
  http://sebastian-bergmann.de/ http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

-- 
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-26 Thread Hartmut Holzgraefe
Jani Taskinen wrote:
Krhm...you should make it to produce code that meets 
our coding standards.. :)

Use tabs,  ...
sure, but especially tabs have a very low priority on my list,
as having them as '\t' in the generating PHP code hurt readability
a lot (and emacs is not clever enough to enforce c-mode indentation
settings on code embedded into PHP strings)
--
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


[PHP-DEV] CVS Account Request: ordnas

2003-02-26 Thread Sandro Zic
For maintenance of the new PEAR::DB_DOM package, see 
http://marc.theaimsgroup.com/?l=pear-devm=104383385210419w=2 

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



[PHP-DEV] Re: Piping to the PHP binary

2003-02-26 Thread moshe doron
use the cli not cgi:

[EMAIL PROTECTED] moshe]$ php -v
PHP 4.3.2-dev (cli) (built: Feb 24 2003 18:43:23)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
[EMAIL PROTECTED] moshe]$ echo ?php echo \hi\; ? | php
[EMAIL PROTECTED] moshe]$

Dan Hardiker [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hey all,

 echo ?php echo \hi\; ? | /path/to/php

 That works on php v4.2.x but Ive got 3 machines on v4.3.x and none of them
 seem to respond to the piping of the php config.

 
 v4.2.x Response
 
 [13:56:[EMAIL PROTECTED]:~$ echo ?php echo 'hi'; ? |
 /usr/local/bin/php
 X-Powered-By: PHP/4.2.3
 Content-type: text/html

 hi[13:56:[EMAIL PROTECTED]:~$
 
 v4.3.x Response
 
 [13:58:[EMAIL PROTECTED]:~$ echo ?php echo 'hi'; ? |
 /usr/local/bin/php
 Status: 404
 Content-type: text/html
 X-Powered-By: PHP/4.3.2-dev

 No input file specified.
 [13:59:[EMAIL PROTECTED]:~$
 

 Anyone else with the same results on a v4.3.x cgi-binary?
 Is this modified behavoir limited to me, or expected?

 I tried asking php-general@ but no response.


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





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



Re: [PHP-DEV] Re: Piping to the PHP binary

2003-02-26 Thread Dan Hardiker
Hi,

So there is no upgrade path for the cgi - it's lost this functionality?
(please confirm, as that breaks backward compatability for alot of my
scripts)

Surely the CGI should be able to handle piping too? [btw: if I build a CLI
version, I get the same problem... Im guessing that its caused by one of
the modules included]

Im just rebuilding my CLI binary, but here is a listing of the php CGI's
modules, incase the CGI binary is supposed to accept piping:

[14:06:[EMAIL PROTECTED]:~$ /usr/local/bin/php-4.3.2 -v
PHP 4.3.2-dev (cgi), Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
[14:06:[EMAIL PROTECTED]:~$ /usr/local/bin/php-4.3.2 -m
[PHP Modules]
bcmath
bz2
ctype
curl
dba
domxml
ftp
gd
gettext
hyperwave
iconv
imap
ldap
mbstring
mcal
mcrypt
mcve
mhash
ming
mysql
openssl
overload
pcre
pdf
pgsql
posix
pspell
session
snmp
sockets
standard
tokenizer
wddx
xml
xmlrpc
xslt
zlib

[Zend Modules]

[14:11:[EMAIL PROTECTED]:~$ /usr/local/bin/php-4.1.2 -v
4.1.2
[14:08:[EMAIL PROTECTED]:~$ /usr/local/bin/php-4.1.2 -m
Running PHP 4.1.2
Zend Engine v1.1.1, Copyright (c) 1998-2001 Zend Technologies

[PHP Modules]
xml
standard
sockets
session
posix
pdf
pcre
mysql
ming
imap
gd
zlib

[Zend Modules]
Not Implemented

[14:11:[EMAIL PROTECTED]:~$


 use the cli not cgi:

 [EMAIL PROTECTED] moshe]$ php -v
 PHP 4.3.2-dev (cli) (built: Feb 24 2003 18:43:23)
 Copyright (c) 1997-2003 The PHP Group
 Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
 [EMAIL PROTECTED] moshe]$ echo ?php echo \hi\; ? | php
 [EMAIL PROTECTED] moshe]$
 [13:58:[EMAIL PROTECTED]:~$ echo ?php echo 'hi'; ? |
 /usr/local/bin/php
 Status: 404
 Content-type: text/html
 X-Powered-By: PHP/4.3.2-dev

 No input file specified.
 [13:59:[EMAIL PROTECTED]:~$


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



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



[PHP-DEV] bug notification ?

2003-02-26 Thread Corne' Cornelius
Are maintainers of extensions automagically notified of bugs submitted 
regarding the ext's they maintain ?

Corne'

!Exclude Disclaimer!

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


Re: [PHP-DEV] Re: Piping to the PHP binary

2003-02-26 Thread moshe doron
 So there is no upgrade path for the cgi - it's lost this functionality?
 (please confirm, as that breaks backward compatability for alot of my
 scripts)

well, i'm not the right person asking him just tried helping.

 version, I get the same problem... Im guessing that its caused by one of
 the modules included]

so try plain configure, anyway it's doesnt make sense to me.

 Im just rebuilding my CLI binary

u may just want filling bug on  bugs.php.net.



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



Re: [PHP-DEV] bug notification ?

2003-02-26 Thread Jani Taskinen

No.

--Jani


On Wed, 26 Feb 2003, Corne' Cornelius wrote:

Are maintainers of extensions automagically notified of bugs submitted 
regarding the ext's they maintain ?

Corne'

!Exclude Disclaimer!




-- 
- For Sale! -


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



[PHP-DEV] Of string constants, bytecode, and concatenation

2003-02-26 Thread David Brown
Hi everyone:

This may well be a stupid question, but I've spend enough time staring
blankly at zend_compile.c/zend_execute.c that I figured it was time to
ask. :)

Say I have a section of code like this:

?php
  $s1 = 'foo' . 'bar' . 'baz';
  $s2 = 'foobarbaz';
?

In the PHP bytecode (I hope I'm using the right terminology - I mean the
stuff in the opline; the stuff that gets stored in the cache under APC
or Zend cache), is there any functional difference between the
assignment to $s1 and the assignment to $s2? Or, to put it more
precisely, is Zend currently able to figure out that the strings on both
sides of the concatenation operator are constants, and don't need to be
concatenated at runtime?

If not, can anyone explain the barriers to doing something like this?
I'm attempting to learn a bit of the gory details of the interpreter, so
the more pointers into the source anyone can provide, the better off
I'll be.


Thanks a lot,

- Dave
  [EMAIL PROTECTED]


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



Re: [PHP-DEV] Of string constants, bytecode, and concatenation

2003-02-26 Thread Derick Rethans
On Wed, 26 Feb 2003, David Brown wrote:

 This may well be a stupid question, but I've spend enough time staring
 blankly at zend_compile.c/zend_execute.c that I figured it was time to
 ask. :)
 
 Say I have a section of code like this:
 
 ?php
   $s1 = 'foo' . 'bar' . 'baz';
   $s2 = 'foobarbaz';
 ?
 
 In the PHP bytecode (I hope I'm using the right terminology - I mean the
 stuff in the opline; the stuff that gets stored in the cache under APC
 or Zend cache), is there any functional difference between the
 assignment to $s1 and the assignment to $s2? Or, to put it more
 precisely, is Zend currently able to figure out that the strings on both
 sides of the concatenation operator are constants, and don't need to be
 concatenated at runtime?

No, the engine doesn't do this at compile time. This first one produces:

number of ops:  5
line #  op   fetch  ext operands
---
   1 0  CONCAT  ~1, 'foo', 'bar'
 1  CONCAT  ~2, ~1, 'baz'
 2  FETCH_W  local  $0, 's1'
 3  ASSIGN  $3, $0, ~2
   3 4  RETURN  1

The second one:

line #  op   fetch  ext operands
---
   1 0  FETCH_W  local  $0, 's2'
 1  ASSIGN  $1, $0, 'foobarbaz'
   2 2  RETURN  1

 If not, can anyone explain the barriers to doing something like this?

It's the job of an optimizer, not of a compiler. And because PHP doesn't 
have an internal optimizer, this is not optimized out. You can either 
check the ZendOptimiser (I can't show you the opcodes that that 
generates) or PEAR::Optimizer, which is in Pecl (which might not do this 
optimization yet btw).

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



Re: [PHP-DEV] Of string constants, bytecode, and concatenation

2003-02-26 Thread George Schlossnagle
It's the job of an optimizer, not of a compiler. And because PHP 
doesn't
have an internal optimizer, this is not optimized out. You can either
check the ZendOptimiser (I can't show you the opcodes that that
generates) or PEAR::Optimizer, which is in Pecl (which might not do 
this
optimization yet btw).
It does.

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


Re: [PHP-DEV] Of string constants, bytecode, and concatenation

2003-02-26 Thread David Brown
On Wed, Feb 26, 2003 at 05:36:54PM +0100, Derick Rethans wrote:
| No, the engine doesn't do this at compile time. This first one produces:
| 
| number of ops:  5
| line #  op   fetch  ext operands
| ---
|1 0  CONCAT  ~1, 'foo', 'bar'
|  1  CONCAT  ~2, ~1, 'baz'
|  2  FETCH_W  local  $0, 's1'
|  3  ASSIGN  $3, $0, ~2
|3 4  RETURN  1
| 
| The second one:
| 
| line #  op   fetch  ext operands
| ---
|1 0  FETCH_W  local  $0, 's2'
|  1  ASSIGN  $1, $0, 'foobarbaz'
|2 2  RETURN  1

Is that output a ZEND_DEBUG thing, or is that an external tool?


|  If not, can anyone explain the barriers to doing something like this?
| 
| It's the job of an optimizer, not of a compiler. And because PHP doesn't 
| have an internal optimizer, this is not optimized out. You can either 

Okay. Makes complete sense. I was thinking more along the lines of
wouldn't it be nice if...?. I hadn't quite made it to where would
that belong?. :)

I'll check out the optimizers. I noticed that the new CVS version of APC
seems to have a configuration option for optimization as well, though
I'm not sure how far along it is.


Thanks again,

- Dave
  [EMAIL PROTECTED]

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



Re: [PHP-DEV] Of string constants, bytecode, and concatenation

2003-02-26 Thread Daniel Cowgill
On Wed, 26 Feb 2003, David Brown wrote:

 Okay. Makes complete sense. I was thinking more along the lines of
 wouldn't it be nice if...?. I hadn't quite made it to where would
 that belong?. :)
 
 I'll check out the optimizers. I noticed that the new CVS version of APC
 seems to have a configuration option for optimization as well, though
 I'm not sure how far along it is.

That configuration option doesn't do anything right now (see the INSTALL file
for details)--the plan is to integrate the PEAR optimizer with APC (since
having separate extensions isn't particularly user-friendly), but I've been
too busy to get to it. It's on the to-do list...




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



Re: [PHP-DEV] Of string constants, bytecode, and concatenation

2003-02-26 Thread Derick Rethans
On Wed, 26 Feb 2003, David Brown wrote:

 Is that output a ZEND_DEBUG thing, or is that an external tool?

It's an external tool: VLD from http://www.derickrethans.nl/vld.php

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



Re: [PHP-DEV] Piping to the PHP binary

2003-02-26 Thread Shane Caraveo
4.3.1 works fine.
Shane
Dan Hardiker wrote:
Hey all,

echo ?php echo \hi\; ? | /path/to/php

That works on php v4.2.x but Ive got 3 machines on v4.3.x and none of them
seem to respond to the piping of the php config.

v4.2.x Response

[13:56:[EMAIL PROTECTED]:~$ echo ?php echo 'hi'; ? |
/usr/local/bin/php
X-Powered-By: PHP/4.2.3
Content-type: text/html
hi[13:56:[EMAIL PROTECTED]:~$

v4.3.x Response

[13:58:[EMAIL PROTECTED]:~$ echo ?php echo 'hi'; ? |
/usr/local/bin/php
Status: 404
Content-type: text/html
X-Powered-By: PHP/4.3.2-dev
No input file specified.
[13:59:[EMAIL PROTECTED]:~$

Anyone else with the same results on a v4.3.x cgi-binary?
Is this modified behavoir limited to me, or expected?
I tried asking php-general@ but no response.




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


[PHP-DEV] CVS Account Request: thierry_bo

2003-02-26 Thread Thierry Bothorel
HELP IN MAINTENANCE :

- help Pierre-Alain Joye [EMAIL PROTECTED] and pearfr.org to translate pear manual 
and pear weekly news in french

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



[PHP-DEV] parser generator for php

2003-02-26 Thread Pete James
I hope that this is not the wrong venue for this.

I've seen references to questions about this before, but is there any
tool similar to yacc, written in php?

I know that there is the tokenizer ext., which forms one half of the
equation.  Perl, Python, etc, have their YAPP, and YAPPS tools.  Is
something similar in the works for PHP?

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

Re: [PHP-DEV] [PATCH][NEW FEATURE][HELP NEEDED] Forcing -f via mail()(ext/standard/mail.c)

2003-02-26 Thread Derick Rethans
On Sat, 22 Feb 2003, Daniel Lorch wrote:

  I don't really know to start. I've made a patch and want to ask for
  the offical way to bring this patch into the php engine (if this is
  possible). [..]
 
 This has been done several times now. Once by me, once by someone else,
 and once by you. The decision was: No. Rationale: PHP should not fix
 other applications' bugs. I disagree, but probably there have to be
 a couple of more people writing such patches until someone understands
 that this IS a serious problem.

http://news.php.net/article.php?group=php.cvsarticle=19210

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



Re: [PHP-DEV] CVS Account Request: thierry_bo

2003-02-26 Thread Pierre-Alain Joye
On 26 Feb 2003 18:15:42 -
Thierry Bothorel [EMAIL PROTECTED] wrote:

 HELP IN MAINTENANCE :
 
 - help Pierre-Alain Joye [EMAIL PROTECTED] and pearfr.org to
 translate pear manual and pear weekly news in french

I confirm this request. See my post on peardoc ML. He needs access to
/peardoc and pearweb/weeklynews

thank's in advance,

pierre

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



[PHP-DEV] Flex never-interactive mode

2003-02-26 Thread Rasmus Lerdorf
I think we can add %option never-interactive to the ini-scanner lexer to
speed it up a tiny little bit.  Speeding up the ini scanner might be
important for the folks running the cgi version.  More importantly, to me
anyway, when we know we are not interactive, should we not
programmatically set is_interactive to false for the language scanner as
well?  I did this here and the ioctl syscalls that come from the isatty()
calls in the lexer dropped away speeding things up nicely.  

-Rasmus


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



Re: [PHP-DEV] Flex never-interactive mode

2003-02-26 Thread Andi Gutmans
At 12:48 PM 2/26/2003 -0800, Rasmus Lerdorf wrote:
I think we can add %option never-interactive to the ini-scanner lexer to
speed it up a tiny little bit.  Speeding up the ini scanner might be
important for the folks running the cgi version.  More importantly, to me
anyway, when we know we are not interactive, should we not
programmatically set is_interactive to false for the language scanner as
well?  I did this here and the ioctl syscalls that come from the isatty()
calls in the lexer dropped away speeding things up nicely.
Do you have any figures? (req/s wise)
I think we can set it to false when we know we're not interactive. It 
shouldn't be a problem.

Andi

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


Re: [PHP-DEV] Flex never-interactive mode

2003-02-26 Thread Rasmus Lerdorf
On Wed, 26 Feb 2003, Andi Gutmans wrote:

 At 12:48 PM 2/26/2003 -0800, Rasmus Lerdorf wrote:
 I think we can add %option never-interactive to the ini-scanner lexer to
 speed it up a tiny little bit.  Speeding up the ini scanner might be
 important for the folks running the cgi version.  More importantly, to me
 anyway, when we know we are not interactive, should we not
 programmatically set is_interactive to false for the language scanner as
 well?  I did this here and the ioctl syscalls that come from the isatty()
 calls in the lexer dropped away speeding things up nicely.
 
 Do you have any figures? (req/s wise)
 I think we can set it to false when we know we're not interactive. It 
 shouldn't be a problem.

Not really.  I've hacked and slashed a bunch of things and this is just
one of them.  I could pull out just this change and try to time it, I
guess.  But it can't help but be faster just by looking at the syscall
profiles before and after the change.  On a simple Hello World script
before the change you have this: (PHP 4.2 with realpath turned off)

 83757 apache  0.10 CALL  __getcwd(0x9fbfe674,0xfff)
 83757 apache  0.10 RET   __getcwd 0
 83757 apache  0.10 CALL  chdir(0x9fbfe614)
 83757 apache  0.30 RET   chdir 0
 83757 apache  0.23 CALL  open(0x167588,0,0x1b6)
 83757 apache  0.31 RET   open 5
 83757 apache  0.09 CALL  __getcwd(0x9fbfdc14,0x400)
 83757 apache  0.32 RET   __getcwd 0
 83757 apache  0.31 CALL  ioctl(0x5,TIOCGETA,0x9fbfe4e4)
 83757 apache  0.10 RET   ioctl -1 errno 25 Inappropriate ioctl for device
 83757 apache  0.34 CALL  fstat(0x5,0x9fbfd42c)
 83757 apache  0.10 RET   fstat 0
 83757 apache  0.08 CALL  read(0x5,0x148000,0x2000)
 83757 apache  0.23 RET   read 42/0x2a
 83757 apache  0.08 CALL  read(0x5,0x148000,0x2000)
 83757 apache  0.13 RET   read 0
 83757 apache  0.46 CALL  ioctl(0x5,TIOCGETA,0x9fbfd4c0)
 83757 apache  0.09 RET   ioctl -1 errno 25 Inappropriate ioctl for device
 83757 apache  0.20 CALL  close(0x5)
 83757 apache  0.10 RET   close 0
 83757 apache  0.53 CALL  setitimer(0,0x9fbfe29c,0x9fbfe28c)
 83757 apache  0.14 RET   setitimer 0
 83757 apache  0.59 CALL  setitimer(0,0x9fbfe29c,0x9fbfe28c)
 83757 apache  0.09 RET   setitimer 0
 83757 apache  0.26 CALL  chdir(0x9fbfe674)
 83757 apache  0.30 RET   chdir 0

The 3rd column there is the time it took for the call.  A failed ioctl is
one of the heavier syscalls and both of the ioctls disappear for this
request when you turn off is_interactive.  The ioctls are the same in 4.3.  
Here is what I am currently down to in 4.3.  I still need to get rid of 
that one lseek and am hoping to nuke the fstat as well.  I also need to 
figure out why setitimer is being called more in 4.3 than it was in 4.2.

 88046 apache  0.09 CALL  __getcwd(0x9fbfe654,0xfff)
 88046 apache  0.13 RET   __getcwd 0
 88046 apache  0.09 CALL  chdir(0x9fbfe5f4)
 88046 apache  0.32 RET   chdir 0
 88046 apache  0.10 CALL  setitimer(0x2,0x9fbfe63c,0)
 88046 apache  0.08 RET   setitimer 0
 88046 apache  0.08 CALL  setitimer(0x2,0x9fbfe61c,0)
 88046 apache  0.06 RET   setitimer 0
 88046 apache  0.28 CALL  sigaction(0x1b,0x9fbfe5b4,0x9fbfe59c)
 88046 apache  0.08 RET   sigaction 0
 88046 apache  0.07 CALL  sigprocmask(0x2,0x9fbfe60c,0)
 88046 apache  0.06 RET   sigprocmask 0
 88046 apache  0.30 CALL  open(0x12ce0c,0,0x1b6)
 88046 apache  0.33 RET   open 5
 88046 apache  0.21 CALL  lseek(0x5,0,0,0,0)
 88046 apache  0.08 RET   lseek 0
 88046 apache  0.43 CALL  fstat(0x5,0x9fbfd40c)
 88046 apache  0.13 RET   fstat 0
 88046 apache  0.09 CALL  read(0x5,0x13f000,0x2000)
 88046 apache  0.22 RET   read 42/0x2a
 88046 apache  0.06 CALL  read(0x5,0x13f000,0x2000)
 88046 apache  0.15 RET   read 0
 88046 apache  0.66 CALL  close(0x5)
 88046 apache  0.15 RET   close 0
 88046 apache  0.47 CALL  setitimer(0,0x9fbfdf7c,0x9fbfdf6c)
 88046 apache  0.12 RET   setitimer 0
 88046 apache  0.43 CALL  setitimer(0,0x9fbfdf7c,0x9fbfdf6c)
 88046 apache  0.09 RET   setitimer 0
 88046 apache  0.21 CALL  chdir(0x9fbfe654)
 88046 apache  0.31 RET   chdir 0

-Rasmus


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



Re: [PHP-DEV] Flex never-interactive mode

2003-02-26 Thread Wez Furlong


On Wed, 26 Feb 2003, Andi Gutmans wrote:

 At 12:48 PM 2/26/2003 -0800, Rasmus Lerdorf wrote:
 I think we can add %option never-interactive to the ini-scanner lexer to
 ^

Yes, this is a good idea - INI files are never interactive.

--Wez.


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



Re: [PHP-DEV] [PATCH] imagesavealpha()

2003-02-26 Thread Pierre-Alain Joye
On Thu, 20 Feb 2003 22:17:48 +0200
Jukka Holappa [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi,
 
 I have reported at http://bugs.php.net/?id=22323 that it's impossible
 to actually create png images that are partially transparent. I needed
 that feature yesterday so I have created a patch (attached - mailer
 mangles patches) for this.

Fixed in cvs.

Thank's for your patch.

pierre

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



[PHP-DEV] upcoming plans for servers

2003-02-26 Thread James Cox
All,

I am about to start a process of upgrading/moving all of the services
php.net offers. This is to take advantage of new servers, and to distribute
our load so that servers are not doing everything but instead optimized
and configured to be perfect for a particular service.

full details (or, more full details) are available here:
http://master.php.net/sysmatrix.php

The first step is to split cvs.php.net from pair1.php.net onto its own
server. This will result in some cvs _WRITE_ downtime, as dns updates.
However, cvs checkouts will be unaffected, and the changeover should not be
noticed.

If anyone has any further questions, please feel free to email me,
[EMAIL PROTECTED] or simply reply to this email.

Thanks,

 James

--
James Cox :: [EMAIL PROTECTED] :: http://imajes.info/
Was I helpful?  http://www.amazon.co.uk/exec/obidos/wishlist/23IVGHQ61RJGO/



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



[PHP-DEV] CVS Account Request: hatem

2003-02-26 Thread Ben Yacoub Hatem
arabic php  pear manual translation

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



Re: [PHP-DEV] parser generator for php

2003-02-26 Thread Alan Knowles
Pete James wrote:

I hope that this is not the wrong venue for this.

I've seen references to questions about this before, but is there any
tool similar to yacc, written in php?
It's not written in PHP - but it generates PHP code
have a look at http://php-sharp.sourceforge.net
In CVS is
phpLex a derivative of csLex (requires mono/.net runtime)
phpJay a derivative of Jay (a bison type grammer parser)
There are a few examples in the PHPSharp folder. look for .lex  .jay files.

phpLex is a bit better tested as I've been using it on 
HTML_Template_Flexy as well..

Regards
Alan

I know that there is the tokenizer ext., which forms one half of the
equation.  Perl, Python, etc, have their YAPP, and YAPPS tools.  Is
something similar in the works for PHP?
Thanks,
Pete.
 



--
Can you help out? 
Need Consulting Services or Know of a Job?
http://www.akbkhome.com



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


[PHP-DEV] CVS Account Request: abboussy

2003-02-26 Thread Abbas El-Meslem
hi

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



Re: [PHP-DEV] CVS Account Request: abboussy

2003-02-26 Thread Magnus M
On 27 Feb 2003 05:27:24 -
Abbas El-Meslem [EMAIL PROTECTED] wrote:

 hi

You don't need a CVS account to say hi.

/ Magnus

-- 
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-26 Thread Harald Radi
hi richard

 The problem with some of the VBA functions is that the first and last
 parameter need to be set and the ones in the middle have no 
 meaning and
 cannot be present. This can only be achieved by using named 
 parameters. The
 GoTo method, as a function, in VBA would be ...

sooner or later everything ends up in a native c(++) function call and there
are no such things as named parameters. therefore nonpresent parameters will
be assigned a default value (iirc NULL if no explicit default value is
specified.)

so try calling

GoTo(wdGoToBookmark, NULL, NULL, BookmarkName);

or, if it doesn't work

$empty = new VARIANT();
GoTo(wdGoToBookmark, $empty, $empty, BookmarkName);

the difference is, that there exists two different variant types with nearly
the same meaning, VT_NULL and VT_EMPTY. PHP's NULL will be marshalled to
VT_NULL, VT_EMPTY has to be created by explicitly creating an empty variant
container in php.

ad. your previous question:
there are two other ways of importing a type library, you can either
com_load_typelib(Word.Application) which will search for the typelib
assigned to that component or you can enable com.autoregister_typelib in your
php.ini which will cause php to load the typelib for every component you
instanciate.

harald


-- 
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-26 Thread Richard Quadling
Genius!

Thank you very much.

Can this example be added to the PHP Manual? All the online examples I've
seen relate to functions which you can pass the first few params and no
more. In this case having to pass the first and last param is not mentioned.

This simple example demonstrates the use of php's VARIANT() type and now to
call functions that use it.

Thank you VERY much!!

Regards,

Richard.

-Original Message-
From: Harald Radi [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 26, 2003 10:41 AM
To: 'Richard Quadling'
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: PHP, Windows and COM.


hi richard

 The problem with some of the VBA functions is that the first and last 
 parameter need to be set and the ones in the middle have no meaning 
 and cannot be present. This can only be achieved by using named
 parameters. The
 GoTo method, as a function, in VBA would be ...

sooner or later everything ends up in a native c(++) function call and there
are no such things as named parameters. therefore nonpresent parameters will
be assigned a default value (iirc NULL if no explicit default value is
specified.)

so try calling

GoTo(wdGoToBookmark, NULL, NULL, BookmarkName);

or, if it doesn't work

$empty = new VARIANT();
GoTo(wdGoToBookmark, $empty, $empty, BookmarkName);

the difference is, that there exists two different variant types with nearly
the same meaning, VT_NULL and VT_EMPTY. PHP's NULL will be marshalled to
VT_NULL, VT_EMPTY has to be created by explicitly creating an empty variant
container in php.

ad. your previous question:
there are two other ways of importing a type library, you can either
com_load_typelib(Word.Application) which will search for the typelib
assigned to that component or you can enable com.autoregister_typelib in
your php.ini which will cause php to load the typelib for every component
you instanciate.

harald

-- 
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-26 Thread Richard Quadling
Hi Harald.

The problem with some of the VBA functions is that the first and last
parameter need to be set and the ones in the middle have no meaning and
cannot be present. This can only be achieved by using named parameters. The
GoTo method, as a function, in VBA would be ...

GoTo(wdGoToBookmark,,,BookmarkName)

OLEView shows the GoTo method as ...

[id(0x00ad), helpcontext(0x095e00ad)]
HRESULT _stdcall GoTo(
[in] VARIANT* What, 
[in, optional] VARIANT* Which, 
[in, optional] VARIANT* Count, 
[in, optional] VARIANT* Name, 
[out, retval, optional] Range** prop);


I only want to supply What and Name, Which and Count are not valid for
bookmarks. Is there a true NULL type I can send?

Richard.

P.S. Thanks for the OLEView pointer.

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



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.

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