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

2002-04-19 Thread derick

On Fri, 19 Apr 2002, Dan Kalowsky wrote:

> >  compress.zlib://file.gz
> >  compress.bzip2://file.bz2
> 
> I like this version best.  Looks more like what people are starting to see
> as standard notation in things like JavaScript (document.getElementByTag,
> etc etc), sql selects (select a.username from blah), and other
> technologies.

I have to agree with Dan here, but both the - and . is fine with me.

Derick

---
 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 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] CVS Account Request: n0nick

2002-04-19 Thread Sagie Maoz

Participate in the Hebrew manual translation
(requires access to the phpdoc module)

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




[PHP-DEV] [phpbugs@priorwebsites.com: Bug #16681 Updated: Request new words(), word(), wordindex(), wordlength() functions]

2002-04-19 Thread Markus Fischer

Well, I like the idea(s).

I think returning (bool)false instead of NULL is more
consistent though.

Maybe the naming convention should be changed to:

word()
word_count()
word_index()
word_lenght()


- Markus

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
"Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none :)"

--- Begin Message ---

 ID:   16681
 Updated by:   [EMAIL PROTECTED]
-Summary:  Request new words() function returning no of words in
   string
 Reported By:  [EMAIL PROTECTED]
 Status:   Open
 Bug Type: Feature/Change Request
 Operating System: Windows XP Home Edition
 PHP Version:  4.1.2
 New Comment:

I wish to expand this request to suggest full support for word
processing in strings.  This is something which is extremely useful (it
appears for example in REXX) when processing strings.

word (str, num) 
Returns the num'th word from string str. If num is greater than the
number of words in str, the null string is returned. 
 
wordindex (str, num) 
Returns the character position of the first letter of the num'th word
in string str, or 0 if num is greater than the number of characters in
str. 
 
wordlength (str, num) 
Returns the length of the num'th word in string str, or 0 if num is
greater than the number of words in str. 
 
words (str, num)
Returns the number of words in the string str.


Previous Comments:


[2002-04-19 03:56:33] [EMAIL PROTECTED]

In my opinion this function doesn't that much value to PHP.



[2002-04-19 02:09:53] [EMAIL PROTECTED]

I would strongly favour the name words() rather than word_count(). 
Though there might be arguments for consistency with other functions to
call it word_count(), I think that words() is the more natural name and
more easily rememebered.

if (words($mystring) > 1) do_something();

You talk abouts "words" in a string and not "word count" in a string.

Hugh



[2002-04-18 12:08:04] [EMAIL PROTECTED]

I think in PHP it would look like this:

function word_count($string) {
  return count(preg_split("/\s+/", $string));
}



[2002-04-18 10:15:04] [EMAIL PROTECTED]

I notice that PHP does not have a words() function; I propose that one
is added.

For anybody doing string processing this is an extremely useful
function.  It is a commonly found function in other languages (e.g.
REXX).  It is not just for general text processing that such a function
is useful, but whenever dealing with strings.

For example, I had a string where I had to take different actions if
there was only 1 word in a string than if there were many.  

I agree that you can do this sort of thing with regular expressions,
but hey, you can do a Leveshtein function too with regular expressions
;).

I can guarantee if there was one, it would be widely used.

words(), simply should return the number of words in a string, e.g.

words("hello") -> 1

words("this is my example") -> 4

words(" ah how about this, eh   smartass?") -> 6

words("thank you PHP team for taking the time to read this and giving
due consideration for this suggestion rather than just throwing it in
the waste bin because you've got more urgent things to do") -> 35

Hugh Prior




-- 
Edit this bug report at http://bugs.php.net/?id=16681&edit=1


--- End Message ---

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


Re: [PHP-DEV] [phpbugs@priorwebsites.com: Bug #16681 Updated: Request new words(), word(), wordindex(), wordlength() functions]

2002-04-19 Thread Daniel Lorch

hi,

> Well, I like the idea(s).

> I think returning (bool)false instead of NULL is more
> consistent though.

> Maybe the naming convention should be changed to:

..while paying attention to english orthography:

> word()
> word_count()
> word_index()
> word_lenght()

word_length()

common pitfall - maybe we should provide an alias? :)

> - Markus

word_* functions can be easily solved in userland, but nevertheless,
after thinking about it, it might be a good addition. At least it does
not hurt anyone, does it? :)

-daniel



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




Re: [PHP-DEV] [phpbugs@priorwebsites.com: Bug #16681 Updated: Requestnew words(), word(), wordindex(), wordlength() functions]

2002-04-19 Thread derick

Hey,

why not make a PEAR thingy for this?

Derick

On Fri, 19 Apr 2002, Daniel Lorch wrote:

> hi,
> 
> > Well, I like the idea(s).
> 
> > I think returning (bool)false instead of NULL is more
> > consistent though.
> 
> > Maybe the naming convention should be changed to:
> 
> ..while paying attention to english orthography:
> 
> > word()
> > word_count()
> > word_index()
> > word_lenght()
> 
> word_length()
> 
> common pitfall - maybe we should provide an alias? :)
> 
> > - Markus
> 
> word_* functions can be easily solved in userland, but nevertheless,
> after thinking about it, it might be a good addition. At least it does
> not hurt anyone, does it? :)
> 
> -daniel
> 
> 
> 
> -- 
> PHP Development Mailing List 
> 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 
To unsubscribe, visit: http://www.php.net/unsub.php




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

2002-04-19 Thread Wez Furlong

On 19/04/02, [EMAIL PROTECTED] wrote:
> On Fri, 19 Apr 2002, Dan Kalowsky wrote:
> > >  compress.zlib://file.gz
> > >  compress.bzip2://file.bz2
> > 
> > I like this version best.  Looks more like what people are starting to see
> > as standard notation in things like JavaScript (document.getElementByTag,
> > etc etc), sql selects (select a.username from blah), and other
> > technologies.
> I have to agree with Dan here, but both the - and . is fine with me.

OK; I'll change the relevant wrapper names etc.
It really helps to talk about these things; I had visions of implementing
some complex wrapper subsystem, but now all that needs to be done is
changing a couple of strings :-)

--Wez.


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




Re[2]: [PHP-DEV] [phpbugs@priorwebsites.com: Bug #16681 Updated: Request new words(), word(), wordindex(), wordlength() functions]

2002-04-19 Thread Daniel Lorch

Hi,

Great idea. I could take care of this - how do I "assign" it to me?
Just start writing code?

-daniel

- Original Message -
>From   : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent   : Freitag, 19. April 2002
Subject: [PHP-DEV] [[EMAIL PROTECTED]: Bug #16681 Updated: Request new 
words(), word(), wordindex(),  wordlength() functions]

> Hey,

> why not make a PEAR thingy for this?

> Derick

> On Fri, 19 Apr 2002, Daniel Lorch wrote:

>> hi,
>> 
>> > Well, I like the idea(s).
>> 
>> > I think returning (bool)false instead of NULL is more
>> > consistent though.
>> 
>> > Maybe the naming convention should be changed to:
>> 
>> ..while paying attention to english orthography:
>> 
>> > word()
>> > word_count()
>> > word_index()
>> > word_lenght()
>> 
>> word_length()
>> 
>> common pitfall - maybe we should provide an alias? :)
>> 
>> > - Markus
>> 
>> word_* functions can be easily solved in userland, but nevertheless,
>> after thinking about it, it might be a good addition. At least it does
>> not hurt anyone, does it? :)
>> 
>> -daniel
>> 
>> 
>> 
>> -- 
>> PHP Development Mailing List 
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 



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




Re: [PHP-DEV] [phpbugs@priorwebsites.com: Bug #16681 Updated: Request new words(), word(), wordindex(), wordlength() functions]

2002-04-19 Thread Markus Fischer

On Fri, Apr 19, 2002 at 11:28:32AM +0200, Daniel Lorch wrote : 
> hi,
> 
> > Well, I like the idea(s).
> 
> > I think returning (bool)false instead of NULL is more
> > consistent though.
> 
> > Maybe the naming convention should be changed to:
> 
> ..while paying attention to english orthography:
> 
> > word()
> > word_count()
> > word_index()
> > word_lenght()
> 
> word_length()
> 
> common pitfall - maybe we should provide an alias? :)

No.

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
"Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none :)"

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




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

2002-04-19 Thread Markus Fischer

Peter,

It's your take. A few have changed again in 4.2 and a few
will for 4.3.

- Markus

On Fri, Apr 19, 2002 at 07:52:05PM +1000, Peter wrote : 
> Hello Marcus,
> PHP functions regularly change from the old system of returning a negative value to 
>using false. The PHP 
> documentation for sockets show all the sockets functions using a negative number. In 
>4.1.12 there are at least two 
> functions changed to return false for an error. I could update those pages now as I 
>worked on sockets with 4.1.2 today.
> 
> I might test the same code with RC4 on Sunday. Either way, some pages would be 
>updated and gain examples.
> 
> Peter
> 
> 
> 4/19/02 4:25:40 PM, Markus Fischer <[EMAIL PROTECTED]> wrote:
> 
> >On Fri, Apr 19, 2002 at 05:43:13AM -, Peter Moulding wrote : 
> >> 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.
> >
> >Based on 4.1.2 ? Updating the docs then would not be a good
> >idea. They changed quite a lot since 4.1.2 and some
> >parameters/return values in current CVS HEAD are already
> >different (the joy of development ...)
> >
> >[sorry if I maybe missunderstood the sockets thing
> >completely].
> >
> >Er, anyway, contributors are always welcome ;-)
> >
> >- Markus
> >
> >-- 
> >Please always Cc to me when replying to me on the lists.
> >GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> >"Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none :)"
> >
> 
> 

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
"Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none :)"

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




Re: [PHP-DEV] Quicktime movie

2002-04-19 Thread Dave Mertens

On Fri, Apr 19, 2002 at 03:05:39AM +0300, Rosen Marinov wrote:
> Can someone tell me how to put on WEB page QuickTime movie ?
> I tried with some code, but nothing happens... !

First, PHP can do a lot, but i don't think PHP can create QuickTime movies. 
This is more a HTML question than an PHP question.

But here is your answer:
There are three tags (as far i know) to embed QuickTime (But also avi, mpeg, etc) 
movies into a webpage. They're browser depended.

Microsoft :


Netscape:


If you want to use both:






Note that the visitor of your site need a quicktime plugin. You can also just put the 
movie url in a  tag. Or show it to your users in a popup (ofcourse only 
when a user wants this, most people don't like popup's).

But again, this is not the right place to ask questions about video embedding in a 
webpage.

Dave Mertens

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




Re: [PHP-DEV] Quicktime movie

2002-04-19 Thread Rosen Marinov

Thanks,
but my problem is thath when Quicktime plugin start loading movie, it don't
show nothing ( except Quicktime logo ). I've seen from another site, thath,
Quicktime plugin shows controller and part of movie were downloaded.
Is possible this to be a settings, when create movie - i.e. streaming ?

Thanks,
Rosen


Dave Mertens <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Fri, Apr 19, 2002 at 03:05:39AM +0300, Rosen Marinov wrote:
> > Can someone tell me how to put on WEB page QuickTime movie ?
> > I tried with some code, but nothing happens... !
>
> First, PHP can do a lot, but i don't think PHP can create QuickTime
movies.
> This is more a HTML question than an PHP question.
>
> But here is your answer:
> There are three tags (as far i know) to embed QuickTime (But also avi,
mpeg, etc) movies into a webpage. They're browser depended.
>
> Microsoft :
> 
>
> Netscape:
> 
>
> If you want to use both:
>
> 
> 
> 
> 
>
> Note that the visitor of your site need a quicktime plugin. You can also
just put the movie url in a  tag. Or show it to your users in a
popup (ofcourse only when a user wants this, most people don't like
popup's).
>
> But again, this is not the right place to ask questions about video
embedding in a webpage.
>
> Dave Mertens





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




RE: [PHP-DEV] Quicktime movie

2002-04-19 Thread Robinson, Mike
Title: RE: [PHP-DEV] Quicktime movie





Take your discussion to quicktime list. There are plenty,
and good ones.


Mike Robinson
IT/Developer - Torstar Media Group Television
Phone: 416.945.8786 Fax: 416.869.4566
Email: [EMAIL PROTECTED]



> -Original Message-
> From: Rosen Marinov [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 19, 2002 8:17 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP-DEV] Quicktime movie
> 
> 
> Thanks,
> but my problem is thath when Quicktime plugin start loading 
> movie, it don't
> show nothing ( except Quicktime logo ). I've seen from 
> another site, thath,
> Quicktime plugin shows controller and part of movie were downloaded.
> Is possible this to be a settings, when create movie - i.e. 
> streaming ?
> 
> Thanks,
> Rosen
> 
> 
> Dave Mertens <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]" TARGET="_blank">news:[EMAIL PROTECTED]...
> > On Fri, Apr 19, 2002 at 03:05:39AM +0300, Rosen Marinov wrote:
> > > Can someone tell me how to put on WEB page QuickTime movie ?
> > > I tried with some code, but nothing happens... !
> >
> > First, PHP can do a lot, but i don't think PHP can create QuickTime
> movies.
> > This is more a HTML question than an PHP question.
> >
> > But here is your answer:
> > There are three tags (as far i know) to embed QuickTime 
> (But also avi,
> mpeg, etc) movies into a webpage. They're browser depended.
> >
> > Microsoft :
> > 
> loop="infinite" border="0"
> />
> >
> > Netscape:
> > 
> loop="true" oncursor="play" />
> >
> > If you want to use both:
> >
> > 
> loop="true" oncursor="play" />
> > 
> > 
> > 
> >
> > Note that the visitor of your site need a quicktime plugin. 
> You can also
> just put the movie url in a " tag. Or show it to 
> your users in a
> popup (ofcourse only when a user wants this, most people don't like
> popup's).
> >
> > But again, this is not the right place to ask questions about video
> embedding in a webpage.
> >
> > Dave Mertens
> 
> 
> 
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 




To find out more about what we can do for you, please visit us at:
http://www.tmgtv.ca/ and http://www.thestar.com/ 



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


Re: [PHP-DEV] [phpbugs@priorwebsites.com: Bug #16681 Updated: Requestnew words(), word(), wordindex(), wordlength() functions]

2002-04-19 Thread Gabriel Ricard

Markus Fischer wrote:

> word (str, num) 
> Returns the num'th word from string str. If num is greater than the
> number of words in str, the null string is returned. 

We've implemented a userland function like this for some code at work 
and I welcome an implementation in C. The only thing I'd add is an 
optional field one could use to change the character that separates the 
words in the sentence. But perhaps that makes it a bit too close to a 
str_* type function, like explode().

-- 
Gabriel Ricard
[EMAIL PROTECTED]


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




Re: [PHP-DEV] Quicktime movie

2002-04-19 Thread Dave Mertens

On Fri, Apr 19, 2002 at 03:16:46PM +0300, Rosen Marinov wrote:
> Thanks,
> but my problem is thath when Quicktime plugin start loading movie, it don't
> show nothing ( except Quicktime logo ). I've seen from another site, thath,
> Quicktime plugin shows controller and part of movie were downloaded.
> Is possible this to be a settings, when create movie - i.e. streaming ?

Like i said before, this is not the correct list for QuickTime problems. This is a PHP 
list. Try Google to find more resources for QuickTime.
Maybe you can even try the Adobe website..

Good luck,

Dave Mertens

BTW: Don't forget that PHP isn't playing your quicktime movie, the browser is!

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




[PHP-DEV] php extentions as module

2002-04-19 Thread Dave Mertens

Hi,

I was wondering. PHP is within our company compiled as a apache module (libphp4.so).
But i want to do some experiments with domxml. Therefor is it possible to create an 
extention as a module and load it with dl()?

We're running Linux (Debian).

Thanks,

Dave Mertens

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




Re: [PHP-DEV] php extentions as module

2002-04-19 Thread derick

On Fri, 19 Apr 2002, Dave Mertens wrote:

> Hi,
> 
> I was wondering. PHP is within our company compiled as a apache module (libphp4.so).
> But i want to do some experiments with domxml. Therefor is it possible to create an 
>extention as a module and load it with dl()?

yes it is, but this kind of question can better be asked on 
[EMAIL PROTECTED] 

Derick

---
 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 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] streams and options

2002-04-19 Thread Derick Rethans

Hey Wez,

I wonder if it is possible to set options after a stream has been opened. 
Something like:

$fp = fopen ("crypt.des://secretfile.des", "r");
stream_option ($fp, "key", "very secret key");

And if it's there, is there an example in the source of it?

regards,
Derick


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




[PHP-DEV] Inline optimization

2002-04-19 Thread Yasuo Ohgaki

Any objection for changing -O2 -> -O3 when
--enable-inline-optimization is used? (when GCC is used)

--
Yasuo Ohgaki


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




[PHP-DEV] zend_execute.c and -O0 option.

2002-04-19 Thread Yasuo Ohgaki

zend_execute.c is compiled as follows

 $(LIBTOOL) --mode=compile $(CC)  -IZend/ 
-I/home/yohgaki/cvs/php/HEAD/Zend/ $(COMMON_FLAGS) $(CFLAGS_CLEAN) 
$(EXTRA_CFLAGS) -prefer-pic -c 
/home/yohgaki/cvs/php/HEAD/Zend/zend_execute.c -o Zend/zend_execute.lo -O0

Is -O0 is needed? It seems works fine with -O2 or -O3.
(Or is it need some violate?)

--
Yasuo Ohgaki




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




Re: [PHP-DEV] Inline optimization

2002-04-19 Thread Sebastian Bergmann

Yasuo Ohgaki wrote:
> Any objection for changing -O2 -> -O3 when
> --enable-inline-optimization is used? (when GCC is used)

  What happened to the plan of making --enable-inline-optimization the
  default?

-- 
  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 
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /sapi/apache2filter README phpdoc/cs/reference/apache .cvsignore phpdoc/cs/reference/array .cvsignore phpdoc/cs/reference/aspell .cvsignore phpdoc/cs/reference/bc .cvsignore phpdoc/cs/reference/calendar .cvsignore phpdoc/cs/r

2002-04-19 Thread Aaron Bannert

I'm not sure I understand this post. I didn't add these files.
What do you mean by "harmut"?

-aaron


On Fri, Apr 19, 2002 at 03:26:28AM +0100, James Cox wrote:
> this was also harmut with his .cvsignore commits. (i believe)
> 
> -Original Message-
> From: Aaron Bannert [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 18, 2002 11:58 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-CVS] cvs: php4 /sapi/apache2filter README
> phpdoc/cs/reference/apache .cvsignore phpdoc/cs/reference/array
> .cvsignore phpdoc/cs/reference/aspell .cvsignore phpdoc/cs/reference/bc
> .cvsignore phpdoc/cs/reference/calendar .cvsignore phpdoc/cs/refer
> 
> 
> aaron Thu Apr 18 18:58:00 2002 EDT
> 
>   Added files: 
> /phpdoc/cs/reference/apache   .cvsignore 
> /phpdoc/cs/reference/array.cvsignore 
> /phpdoc/cs/reference/aspell   .cvsignore 
> /phpdoc/cs/reference/bc   .cvsignore 
> /phpdoc/cs/reference/calendar .cvsignore 
> /phpdoc/cs/reference/ccvs .cvsignore 
> /phpdoc/cs/reference/classobj .cvsignore 
> /phpdoc/cs/reference/com  .cvsignore 
> /phpdoc/cs/reference/curl .cvsignore 
> /phpdoc/cs/reference/cybercash.cvsignore 
> /phpdoc/cs/reference/dbm  .cvsignore 
> /phpdoc/cs/reference/dir  .cvsignore 
> /phpdoc/cs/reference/dl   .cvsignore 
> /phpdoc/cs/reference/domxml   .cvsignore 
> /phpdoc/cs/reference/exec .cvsignore 
> /phpdoc/cs/reference/filepro  .cvsignore 
> /phpdoc/cs/reference/filesystem   .cvsignore 
> /phpdoc/cs/reference/funchand .cvsignore 
> /phpdoc/cs/reference/gettext  .cvsignore 
> /phpdoc/cs/reference/http .cvsignore 
> /phpdoc/cs/reference/icap .cvsignore 
> /phpdoc/cs/reference/info .cvsignore 
> /phpdoc/cs/reference/mail .cvsignore 
> /phpdoc/cs/reference/mhash.cvsignore 
> /phpdoc/cs/reference/misc .cvsignore 
> /phpdoc/cs/reference/mysql.cvsignore 
> /phpdoc/cs/reference/nis  .cvsignore 
> /phpdoc/cs/reference/openssl  .cvsignore 
> /phpdoc/cs/reference/outcontrol   .cvsignore 
> /phpdoc/cs/reference/pdf  .cvsignore 
> /phpdoc/cs/reference/pfpro.cvsignore 
> /phpdoc/cs/reference/readline .cvsignore 
> /phpdoc/cs/reference/recode   .cvsignore 
> /phpdoc/cs/reference/satellite.cvsignore 
> /phpdoc/cs/reference/sem  .cvsignore 
> /phpdoc/cs/reference/shmop.cvsignore 
> /phpdoc/cs/reference/strings  .cvsignore 
> /phpdoc/cs/reference/url  .cvsignore 
> /phpdoc/cs/reference/wddx .cvsignore 
> /phpdoc/cs/reference/xslt .cvsignore 
> /phpdoc/de/reference/apache   .cvsignore 
> /phpdoc/de/reference/array.cvsignore 
> /phpdoc/de/reference/aspell   .cvsignore 
> /phpdoc/de/reference/bc   .cvsignore 
> /phpdoc/de/reference/bzip2.cvsignore 
> /phpdoc/de/reference/calendar .cvsignore 
> /phpdoc/de/reference/ccvs .cvsignore 
> /phpdoc/de/reference/classobj .cvsignore 
> /phpdoc/de/reference/com  .cvsignore 
> /phpdoc/de/reference/cpdf .cvsignore 
> /phpdoc/de/reference/crack.cvsignore 
> /phpdoc/de/reference/cybercash.cvsignore 
> /phpdoc/de/reference/cybermut .cvsignore 
> /phpdoc/de/reference/datetime .cvsignore 
> /phpdoc/de/reference/dba  .cvsignore 
> /phpdoc/de/reference/dbase.cvsignore 
> /phpdoc/de/reference/dbm  .cvsignore 
> /phpdoc/de/reference/dbx  .cvsignore 
> /phpdoc/de/reference/dio  .cvsignore 
> /phpdoc/de/reference/dir  .cvsignore 
> /phpdoc/de/reference/domxml   .cvsignore 
> /phpdoc/de/reference/dotnet   .cvsignore 
> /phpdoc/de/reference/errorfunc.cvsignore 
> /phpdoc/de/reference/exec .cvsignore 
> /phpdoc/de/reference/fdf  .cvsignore 
> /phpdoc/de/reference/filepro  .cvsignore 
> /phpdoc/de/reference/filesystem   .cvsignore 
> /phpdoc/de/reference/fribidi  .cvsignore 
> /phpdoc/de/reference/ftp  .cvsignore 
> /phpdoc/de/reference/funchand .cvsignore 
> /phpdoc/de/reference/gettext  .cvsignore 
> /phpdoc/de/reference/http .cvsignore 
> /phpdoc/de/reference/ibase.cvsignore 
> /phpdoc/de/reference/image.cvsignore 
> /phpdoc/de/reference/imap .cvsignore 
> /phpdoc/de/reference/info .cvsignore 
> /phpdoc/de/reference/ingres-ii.cvsignore 
> /phpdoc/de/reference/ircg .cvsignore 
> /phpdoc/de/reference/java .cvsignore 
> /phpdoc/de/reference/ldap .cvsignore 
> /phpdoc/de/reference/mail .cvsignore 
> /phpdoc/de/reference/math .cvsignore 
> /phpdoc/de/reference/mcal .cvsignore 
> /phpdoc/de/reference/mhash.cvsignore 
> /phpdoc/de/reference/misc .cvsignore 
> /phpdoc/de/reference/mnogosearch  .cvsignore 
> /phpdoc/de/reference/msession .cvsignore 
> /phpdoc/de/reference/msql .cvsignore 
> /phpdoc/de/reference/mss

Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /sapi/apache2filter README phpdoc/cs/reference/apache .cvsignore phpdoc/cs/reference/array .cvsignore phpdoc/cs/reference/aspell .cvsignore phpdoc/cs/reference/bc

2002-04-19 Thread derick

On Fri, 19 Apr 2002, Aaron Bannert wrote:

> I'm not sure I understand this post. I didn't add these files.
> What do you mean by "harmut"?

It's a bug in the cvs commit script, and harmut is the guy which added / 
removed those files.

Derick

> On Fri, Apr 19, 2002 at 03:26:28AM +0100, James Cox wrote:
> > this was also harmut with his .cvsignore commits. (i believe)
> > 
> > -Original Message-
> > From: Aaron Bannert [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, April 18, 2002 11:58 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-CVS] cvs: php4 /sapi/apache2filter README
> > phpdoc/cs/reference/apache .cvsignore phpdoc/cs/reference/array
> > .cvsignore phpdoc/cs/reference/aspell .cvsignore phpdoc/cs/reference/bc
> > .cvsignore phpdoc/cs/reference/calendar .cvsignore phpdoc/cs/refer
> > 
> > 
> > aaron   Thu Apr 18 18:58:00 2002 EDT
> > 
> >   Added files: 
> > /phpdoc/cs/reference/apache .cvsignore 
> > /phpdoc/cs/reference/array  .cvsignore 
> > /phpdoc/cs/reference/aspell .cvsignore 
> > /phpdoc/cs/reference/bc .cvsignore 
> > /phpdoc/cs/reference/calendar   .cvsignore 
> > /phpdoc/cs/reference/ccvs   .cvsignore 
> > /phpdoc/cs/reference/classobj   .cvsignore 
> > /phpdoc/cs/reference/com.cvsignore 
> > /phpdoc/cs/reference/curl   .cvsignore 
> > /phpdoc/cs/reference/cybercash  .cvsignore 
> > /phpdoc/cs/reference/dbm.cvsignore 
> > /phpdoc/cs/reference/dir.cvsignore 
> > /phpdoc/cs/reference/dl .cvsignore 
> > /phpdoc/cs/reference/domxml .cvsignore 
> > /phpdoc/cs/reference/exec   .cvsignore 
> > /phpdoc/cs/reference/filepro.cvsignore 
> > /phpdoc/cs/reference/filesystem .cvsignore 
> > /phpdoc/cs/reference/funchand   .cvsignore 
> > /phpdoc/cs/reference/gettext.cvsignore 
> > /phpdoc/cs/reference/http   .cvsignore 
> > /phpdoc/cs/reference/icap   .cvsignore 
> > /phpdoc/cs/reference/info   .cvsignore 
> > /phpdoc/cs/reference/mail   .cvsignore 
> > /phpdoc/cs/reference/mhash  .cvsignore 
> > /phpdoc/cs/reference/misc   .cvsignore 
> > /phpdoc/cs/reference/mysql  .cvsignore 
> > /phpdoc/cs/reference/nis.cvsignore 
> > /phpdoc/cs/reference/openssl.cvsignore 
> > /phpdoc/cs/reference/outcontrol .cvsignore 
> > /phpdoc/cs/reference/pdf.cvsignore 
> > /phpdoc/cs/reference/pfpro  .cvsignore 
> > /phpdoc/cs/reference/readline   .cvsignore 
> > /phpdoc/cs/reference/recode .cvsignore 
> > /phpdoc/cs/reference/satellite  .cvsignore 
> > /phpdoc/cs/reference/sem.cvsignore 
> > /phpdoc/cs/reference/shmop  .cvsignore 
> > /phpdoc/cs/reference/strings.cvsignore 
> > /phpdoc/cs/reference/url.cvsignore 
> > /phpdoc/cs/reference/wddx   .cvsignore 
> > /phpdoc/cs/reference/xslt   .cvsignore 
> > /phpdoc/de/reference/apache .cvsignore 
> > /phpdoc/de/reference/array  .cvsignore 
> > /phpdoc/de/reference/aspell .cvsignore 
> > /phpdoc/de/reference/bc .cvsignore 
> > /phpdoc/de/reference/bzip2  .cvsignore 
> > /phpdoc/de/reference/calendar   .cvsignore 
> > /phpdoc/de/reference/ccvs   .cvsignore 
> > /phpdoc/de/reference/classobj   .cvsignore 
> > /phpdoc/de/reference/com.cvsignore 
> > /phpdoc/de/reference/cpdf   .cvsignore 
> > /phpdoc/de/reference/crack  .cvsignore 
> > /phpdoc/de/reference/cybercash  .cvsignore 
> > /phpdoc/de/reference/cybermut   .cvsignore 
> > /phpdoc/de/reference/datetime   .cvsignore 
> > /phpdoc/de/reference/dba.cvsignore 
> > /phpdoc/de/reference/dbase  .cvsignore 
> > /phpdoc/de/reference/dbm.cvsignore 
> > /phpdoc/de/reference/dbx.cvsignore 
> > /phpdoc/de/reference/dio.cvsignore 
> > /phpdoc/de/reference/dir.cvsignore 
> > /phpdoc/de/reference/domxml .cvsignore 
> > /phpdoc/de/reference/dotnet .cvsignore 
> > /phpdoc/de/reference/errorfunc  .cvsignore 
> > /phpdoc/de/reference/exec   .cvsignore 
> > /phpdoc/de/reference/fdf.cvsignore 
> > /phpdoc/de/reference/filepro.cvsignore 
> > /phpdoc/de/reference/filesystem .cvsignore 
> > /phpdoc/de/reference/fribidi.cvsignore 
> > /phpdoc/de/reference/ftp.cvsignore 
> > /phpdoc/de/reference/funchand   .cvsignore 
> > /phpdoc/de/reference/gettext.cvsignore 
> > /phpdoc/de/reference/http   .cvsignore 
> > /phpdoc/de/reference/ibase  .cvsignore 
> > /phpdoc/de/reference/image  .cvsignore 
> > /phpdoc/de/reference/imap   .cvsignore 
> > /phpdoc/de/reference/info   .cvsignore 
> > /phpdoc/de/reference/ingres-ii  .cvsignore 
> > /phpdoc/de/reference/ircg   .cvsignore 
> > /phpdoc/de/reference/java   .cvsignore 
> >   

Re: [PHP-DEV] Inline optimization

2002-04-19 Thread Aaron Bannert

On Fri, Apr 19, 2002 at 03:50:16PM +0200, Sebastian Bergmann wrote:
> Yasuo Ohgaki wrote:
> > Any objection for changing -O2 -> -O3 when
> > --enable-inline-optimization is used? (when GCC is used)
> 
>   What happened to the plan of making --enable-inline-optimization the
>   default?

Is making these kinds of optimizations by default such a good idea? I've
seen many a broken gcc install produce incorrect binaries with the larger
-O optimizations turned on (unfortunately).

-aaron

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




Re: [PHP-DEV] streams and options

2002-04-19 Thread Wez Furlong

Hi Derick,

I'm leading up to be able to do this sort of thing, but want/need to
discuss/brainstorm it here before I do much more to it.

In a recent commit I added a context parameter to fopen.  The context
is intended to hold these kind of options, plus other data that is or
will be relevant to streams and/or wrappers.  A context may be shared
by multiple streams/wrappers, so common options can apply to a group
of streams.

At the moment, there are a couple of user-space APIs for manipulating
contexts:
file_context_create([array options]) and
file_context_set_params(array options).

I think that it would generally be useful to store context data on
3 levels:

1. The very general "context" level.  Here we set things like status
notification callbacks, or other stream/wrapper tuning parameters,
like default chunk size for network streams, or whatever.

2. The "common" wrapper level.  Here we set things that are common to
a family of wrappers.  So, "net" would store settings common to various
network wrappers (a bit like .netrc), "compress" would store settings
common to various zippers, "crypt" for common crypt settings etc.

3. The specific wrapper level: "net.http" stores http specific settings,
"crypt.des" stores des specific settings etc. etc.

ATM, file_context_set_params will only operate at the "context" level.
I think introducing a new API like this:
file_context_set_option(resource $context|resource $stream,
   string $wrapperkey, string $optionname, mixed $optionvalue);
would do that job just fine.

The reason for having a separate function is that it means that we
won't risk collisions between context level setting names and
user-registered wrapper names.

So, your example below would look like this:
$fp = fopen ("crypt.des://secretfile.des", "r");
file_context_set_option ($fp, "crypt", "key", "very secret key");

Although my feeling is that setting the options before opening
might make more sense (or might be the only option, particularly
for network wrappers):

$ctx = file_context_create();
file_context_set_option ($ctx, "net", "proxy", "myproxy:8080");
$fp = fopen ("http://www.php.net";, "r", false, $ctx);

Then we will need functions to retrieve those settings, both in 
the php core and in user land (for user-space wrappers).

PHPAPI int php_stream_context_get_option(
   php_stream_context *context,
   const char *wrapperkey,
   const char *optionname,
   zval **optionvalue);

This would really just be a wrapper around the zend_hash_find
function, so I might implement it as a macro.

Extension code would use it a bit like this:

php_stream *stream; // already filled in somewhere with a valid stream

if (stream->context) {
zval *keyval = NULL;
if (SUCCESS == php_stream_context_get_option(stream->context,
"crypt", "key", &keyval)) {
// it's safe to use keyval
}
}

Any comments?

--Wez.

On 19/04/02, "Derick Rethans" <[EMAIL PROTECTED]> wrote:
> Hey Wez,
> 
> I wonder if it is possible to set options after a stream has been opened. 
> Something like:
> 
> $fp = fopen ("crypt.des://secretfile.des", "r");
> stream_option ($fp, "key", "very secret key");
> 
> And if it's there, is there an example in the source of it?
> 
> regards,
> Derick
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php




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




Re: [PHP-DEV] Inline optimization

2002-04-19 Thread J Smith


I've also seen gcc go beserk and start taking up over 150 MB of memory on a 
pretty simple compile 'cause it got confused and take forever to compile. 
Last time I saw this happen, I waited a half-hour to see if it would 
eventually compile. Meanwhile, the memory usage was pegged at 99% or so. 
Eventually I just killed the process. With -O2, the same file took 10 
seconds to compile.

J


Aaron Bannert wrote:

> On Fri, Apr 19, 2002 at 03:50:16PM +0200, Sebastian Bergmann wrote:
>> Yasuo Ohgaki wrote:
>> > Any objection for changing -O2 -> -O3 when
>> > --enable-inline-optimization is used? (when GCC is used)
>> 
>>   What happened to the plan of making --enable-inline-optimization the
>>   default?
> 
> Is making these kinds of optimizations by default such a good idea? I've
> seen many a broken gcc install produce incorrect binaries with the larger
> -O optimizations turned on (unfortunately).
> 
> -aaron


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




RE: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /sapi/apache2filter README phpdoc/cs/reference/apache .cvsignore phpdoc/cs/reference/array .cvsignore phpdoc/cs/reference/aspell .cvsignore phpdoc/cs/reference/bc .cvsignore phpdoc/cs/reference/calendar .cvsignor

2002-04-19 Thread James Cox

I was pointing out that the .cvsignore files were added by harmut, so it was
clear, given that cvs/loginfo collided.

james

-Original Message-
From: Aaron Bannert [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 3:53 PM
To: James Cox
Cc: [EMAIL PROTECTED]
Subject: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /sapi/apache2filter README
phpdoc/cs/reference/apache .cvsignore phpdoc/cs/reference/array
.cvsignore phpdoc/cs/reference/aspell .cvsignore phpdoc/cs/reference/bc
.cvsignore phpdoc/cs/reference/calendar .cvsignore p


I'm not sure I understand this post. I didn't add these files.
What do you mean by "harmut"?

-aaron


On Fri, Apr 19, 2002 at 03:26:28AM +0100, James Cox wrote:
> this was also harmut with his .cvsignore commits. (i believe)
>
> -Original Message-
> From: Aaron Bannert [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 18, 2002 11:58 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-CVS] cvs: php4 /sapi/apache2filter README
> phpdoc/cs/reference/apache .cvsignore phpdoc/cs/reference/array
> .cvsignore phpdoc/cs/reference/aspell .cvsignore phpdoc/cs/reference/bc
> .cvsignore phpdoc/cs/reference/calendar .cvsignore phpdoc/cs/refer
>
>
> aaron Thu Apr 18 18:58:00 2002 EDT
>
>   Added files:
> /phpdoc/cs/reference/apache   .cvsignore
> /phpdoc/cs/reference/array.cvsignore
> /phpdoc/cs/reference/aspell   .cvsignore
> /phpdoc/cs/reference/bc   .cvsignore
> /phpdoc/cs/reference/calendar .cvsignore
> /phpdoc/cs/reference/ccvs .cvsignore
> /phpdoc/cs/reference/classobj .cvsignore
> /phpdoc/cs/reference/com  .cvsignore
> /phpdoc/cs/reference/curl .cvsignore
> /phpdoc/cs/reference/cybercash.cvsignore
> /phpdoc/cs/reference/dbm  .cvsignore
> /phpdoc/cs/reference/dir  .cvsignore
> /phpdoc/cs/reference/dl   .cvsignore
> /phpdoc/cs/reference/domxml   .cvsignore
> /phpdoc/cs/reference/exec .cvsignore
> /phpdoc/cs/reference/filepro  .cvsignore
> /phpdoc/cs/reference/filesystem   .cvsignore
> /phpdoc/cs/reference/funchand .cvsignore
> /phpdoc/cs/reference/gettext  .cvsignore
> /phpdoc/cs/reference/http .cvsignore
> /phpdoc/cs/reference/icap .cvsignore
> /phpdoc/cs/reference/info .cvsignore
> /phpdoc/cs/reference/mail .cvsignore
> /phpdoc/cs/reference/mhash.cvsignore
> /phpdoc/cs/reference/misc .cvsignore
> /phpdoc/cs/reference/mysql.cvsignore
> /phpdoc/cs/reference/nis  .cvsignore
> /phpdoc/cs/reference/openssl  .cvsignore
> /phpdoc/cs/reference/outcontrol   .cvsignore
> /phpdoc/cs/reference/pdf  .cvsignore
> /phpdoc/cs/reference/pfpro.cvsignore
> /phpdoc/cs/reference/readline .cvsignore
> /phpdoc/cs/reference/recode   .cvsignore
> /phpdoc/cs/reference/satellite.cvsignore
> /phpdoc/cs/reference/sem  .cvsignore
> /phpdoc/cs/reference/shmop.cvsignore
> /phpdoc/cs/reference/strings  .cvsignore
> /phpdoc/cs/reference/url  .cvsignore
> /phpdoc/cs/reference/wddx .cvsignore
> /phpdoc/cs/reference/xslt .cvsignore
> /phpdoc/de/reference/apache   .cvsignore
> /phpdoc/de/reference/array.cvsignore
> /phpdoc/de/reference/aspell   .cvsignore
> /phpdoc/de/reference/bc   .cvsignore
> /phpdoc/de/reference/bzip2.cvsignore
> /phpdoc/de/reference/calendar .cvsignore
> /phpdoc/de/reference/ccvs .cvsignore
> /phpdoc/de/reference/classobj .cvsignore
> /phpdoc/de/reference/com  .cvsignore
> /phpdoc/de/reference/cpdf .cvsignore
> /phpdoc/de/reference/crack.cvsignore
> /phpdoc/de/reference/cybercash.cvsignore
> /phpdoc/de/reference/cybermut .cvsignore
> /phpdoc/de/reference/datetime .cvsignore
> /phpdoc/de/reference/dba  .cvsignore
> /phpdoc/de/reference/dbase.cvsignore
> /phpdoc/de/reference/dbm  .cvsignore
> /phpdoc/de/reference/dbx  .cvsignore
> /phpdoc/de/reference/dio  .cvsignore
> /phpdoc/de/reference/dir  .cvsignore
> /phpdoc/de/reference/domxml   .cvsignore
> /phpdoc/de/reference/dotnet   .cvsignore
> /phpdoc/de/reference/errorfunc.cvsignore
> /phpdoc/de/reference/exec .cvsignore
> /phpdoc/de/reference/fdf  .cvsignore
> /phpdoc/de/reference/filepro  .cvsignore
> /phpdoc/de/reference/filesystem   .cvsignore
> /phpdoc/de/reference/fribidi  .cvsignore
> /phpdoc/de/reference/ftp  .cvsignore
> /phpdoc/de/reference/funchand .cvsignore
> /phpdoc/de/reference/gettext  .cvsignore
> /phpdoc/de/reference/http .cvsignore
> /phpdoc/de/reference/ibase.cvsignore
> /phpdoc/de/reference/image.cvsignore
> /phpdoc/de/reference/imap .cvsignore
> /phpdoc/de/reference/info .cvsignore
> /phpdoc/de/reference/ingres-ii.cvsignore
> /phpdoc/de/reference/ircg .cvsignore
> /phpdoc/de/reference/java .cvsignore
> /phpdoc/de/

RE: [PHP-DEV] CVS Account Request: peter

2002-04-19 Thread James Cox

Personally I always think it's a good idea if someone wants to keep examples
up to date. :)

-Original Message-
From: Markus Fischer [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 19, 2002 11:30 AM
To: Peter
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DEV] CVS Account Request: peter


Peter,

It's your take. A few have changed again in 4.2 and a few
will for 4.3.

- Markus

On Fri, Apr 19, 2002 at 07:52:05PM +1000, Peter wrote :
> Hello Marcus,
> PHP functions regularly change from the old system of returning a negative
value to using false. The PHP
> documentation for sockets show all the sockets functions using a negative
number. In 4.1.12 there are at least two
> functions changed to return false for an error. I could update those pages
now as I worked on sockets with 4.1.2 today.
>
> I might test the same code with RC4 on Sunday. Either way, some pages
would be updated and gain examples.
>
> Peter
>
>
> 4/19/02 4:25:40 PM, Markus Fischer <[EMAIL PROTECTED]> wrote:
>
> >On Fri, Apr 19, 2002 at 05:43:13AM -, Peter Moulding wrote :
> >> 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.
> >
> >Based on 4.1.2 ? Updating the docs then would not be a good
> >idea. They changed quite a lot since 4.1.2 and some
> >parameters/return values in current CVS HEAD are already
> >different (the joy of development ...)
> >
> >[sorry if I maybe missunderstood the sockets thing
> >completely].
> >
> >Er, anyway, contributors are always welcome ;-)
> >
> >- Markus
> >
> >--
> >Please always Cc to me when replying to me on the lists.
> >GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> >"Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none
:)"
> >
>
>

--
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
"Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none :)"

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


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




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

2002-04-19 Thread Markus Fischer

Yes, but Peter, we should coordinate. Actually I had in mind
to update all the functions (including examples) to their
current (CVS HEAD) state this weekend (read: today, tomorrow
and sunday). But well, no haste needed ;-)

- Markus

On Fri, Apr 19, 2002 at 04:57:53PM +0100, James Cox wrote : 
> Personally I always think it's a good idea if someone wants to keep examples
> up to date. :)
> 
> -Original Message-
> From: Markus Fischer [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 19, 2002 11:30 AM
> To: Peter
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DEV] CVS Account Request: peter
> 
> 
> Peter,
> 
> It's your take. A few have changed again in 4.2 and a few
> will for 4.3.
> 
> - Markus
> 
> On Fri, Apr 19, 2002 at 07:52:05PM +1000, Peter wrote :
> > Hello Marcus,
> > PHP functions regularly change from the old system of returning a negative
> value to using false. The PHP
> > documentation for sockets show all the sockets functions using a negative
> number. In 4.1.12 there are at least two
> > functions changed to return false for an error. I could update those pages
> now as I worked on sockets with 4.1.2 today.
> >
> > I might test the same code with RC4 on Sunday. Either way, some pages
> would be updated and gain examples.
> >
> > Peter
> >
> >
> > 4/19/02 4:25:40 PM, Markus Fischer <[EMAIL PROTECTED]> wrote:
> >
> > >On Fri, Apr 19, 2002 at 05:43:13AM -, Peter Moulding wrote :
> > >> 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.
> > >
> > >Based on 4.1.2 ? Updating the docs then would not be a good
> > >idea. They changed quite a lot since 4.1.2 and some
> > >parameters/return values in current CVS HEAD are already
> > >different (the joy of development ...)
> > >
> > >[sorry if I maybe missunderstood the sockets thing
> > >completely].
> > >
> > >Er, anyway, contributors are always welcome ;-)
> > >
> > >- Markus
> > >
> > >--
> > >Please always Cc to me when replying to me on the lists.
> > >GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> > >"Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none
> :)"
> > >
> >
> >
> 
> --
> Please always Cc to me when replying to me on the lists.
> GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> "Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none :)"
> 
> --
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
"Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none :)"

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




Re: [PHP-DEV] Inline optimization

2002-04-19 Thread Marcus Börger

At 15:46 19.04.2002, you wrote:
>Any objection for changing -O2 -> -O3 when
>--enable-inline-optimization is used? (when GCC is used)
>
>--
>Yasuo Ohgaki


What about leaving -O2 but adding -finline-functions

marcus



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




Re: [PHP-DEV] streams and options

2002-04-19 Thread l0t3k

Wez,
  scream at me if it seems dumb, but in my never-finished extension, 
each  plugin accepts an option hash in the init callback which is used 
to set up the object. the framework also stores this hash as an member 
of the object, and there are accessor methods to query the options.
  this keeps it simple for me..

Wez Furlong wrote:

> Hi Derick,
> 
> I'm leading up to be able to do this sort of thing, but want/need to
> discuss/brainstorm it here before I do much more to it.
> 

> 
> Any comments?
> 
> --Wez.
> 
> On 19/04/02, "Derick Rethans" <[EMAIL PROTECTED]> wrote:
> 
>>Hey Wez,
>>
>>I wonder if it is possible to set options after a stream has been opened. 
>>Something like:
>>
>>$fp = fopen ("crypt.des://secretfile.des", "r");
>>stream_option ($fp, "key", "very secret key");
>>
>>And if it's there, is there an example in the source of it?
>>
>>regards,
>>Derick
>>
>>
>>-- 
>>PHP Development Mailing List 
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
> 
> 
> 


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




Re: [PHP-DEV] Inline optimization

2002-04-19 Thread Aaron Bannert

On Fri, Apr 19, 2002 at 06:17:16PM +0200, Marcus Börger wrote:
> What about leaving -O2 but adding -finline-functions

You can add all of these things to CFLAGS while running configure,
I believe.

I normally run with:

CFLAGS="-Wall -g" ./configure ...

-aaron

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




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

2002-04-19 Thread Andrei Zmievski

Wez Furlong wrote:
> [snip]
>
> 4. Your suggestions...

Wez,

Take a look at this document:

http://primates.ximian.com/~miguel/monikers.html

Monikers seem to be similar to what you are describing. Maybe there are
some ideas to be gleaned from there.

-Andrei

Nobody tried to design Windows - it just grew in random
directions without any kind of thought behind it.

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




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

2002-04-19 Thread Sebastian Bergmann

Derick Rethans wrote:
> derick  Fri Apr 19 10:57:49 2002 EDT
>
>   Modified files:
> /php4/ext/pcre  php_pcre.c
>   Log:
>   - Fix warnings in VC

  Now I have warnings, where I hadn't warnings before :-)

-- 
  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 
To unsubscribe, visit: http://www.php.net/unsub.php




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

2002-04-19 Thread Sebastian Bergmann

Andi Gutmans wrote:
> Please update Engine 2 also.

  Done.

-- 
  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 
To unsubscribe, visit: http://www.php.net/unsub.php




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

2002-04-19 Thread Sebastian Bergmann

Andi Gutmans wrote:
> Please update Engine 2 also.

  Done.

-- 
  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 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] streams and options

2002-04-19 Thread Wez Furlong

On 19/04/02, "l0t3k" <[EMAIL PROTECTED]> wrote:
> Wez,
>   scream at me if it seems dumb, but in my never-finished extension, 
> each  plugin accepts an option hash in the init callback which is used 
> to set up the object. the framework also stores this hash as an member 
> of the object, and there are accessor methods to query the options.
>   this keeps it simple for me..

It doesn't sound dumb at all; that is (in effect) what the streams are
already doing :-)
It's made a bit more complicated because we have potentially a very wide
variety of options/settings, and we also have a two or more layer system:
a stream might be wrapped, and/or it may contain other streams; the single
context parameter holds the options hash for all those associated streams
and their wrappers.

I did forget to mention that file_context_set_option($fp, array(...))
should also be supported, to reduce the number of function calls that
need to be made, and simplify the php scripts.

--Wez.
 



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




[PHP-DEV] file_get_contents source code??

2002-04-19 Thread Giovanni Lenzi

file_get_contents function is supposed to return the contents of a file in a
binary safe manner. I tried it on two different servers which has different
versions of APACHE+PHP but it still not works.
The server give me this response:

Fatal error: Call to undefined function: file_get_contents() in
/usr/home/s/a/sauzer/public_html/sfidario/readstreams/1.0/warsupcoming.php
on line 17

Surely i have to update PHP version but i can't do it onto the remote
server.
So i have to create myself this function.

Can anyone help me please??
Does anyone have the full source code of this function??




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




[PHP-DEV] Re: Bug #16687 Updated: Constants not being interpreted in "variablevariables"

2002-04-19 Thread Derick Rethans

On 19 Apr 2002 [EMAIL PROTECTED] wrote:

>  ID:   16687
>  Updated by:   [EMAIL PROTECTED]
>  Reported By:  [EMAIL PROTECTED]
>  Status:   Bogus
>  Bug Type: Scripting Engine problem
>  Operating System: Red Hat Linux 7.1
>  PHP Version:  4.2.0
>  New Comment:
> 
> But then why does it work under certain circumstances and not others? 
> Regardless whether intended or not, this is inconsistent behaviour.

Yes it is indeed.

> I also think that having these differences between regular variables
> and the "superglobals" shouldn't be necessary.  If I can't use them in
> the same contexts as regular variables, then I would personally prefer
> the $HTTP_*_VARS instead, because you can.
> 
> I have found my approach to abstracting this difference ($HTTP_*_VARS
> vs. $_*) between PHP versions to be really beneficial to my scripts.  I
> can abstract them both down to one name, and use a single reference to
> the appropriate one instead of sticking if statements every time I need
> to know which one to use.

Then just stick to $HTTP_*_VARS and you dont need no fancy references. 
This works with akk versions of PHP. But I strongly recommend to use the 
$_* variant for new projects.

regards,

Derick

> Previous Comments:
> 
> 
> [2002-04-19 10:33:59] [EMAIL PROTECTED]
> 
> You can't use superglobals indirectly, check this:
> 
> $t = "_GET";
> var_dump ($$t);
> 
> doesn't work neither, and it wasn't supposed to work.
> 
> However, this does work (because $HTTP_GET_VARS is not a superglobal):
> 
> $t = "HTTP_GET_VARS";
> var_dump ($$t);
> 
> 
> Derick
> 
> 
> 
> [2002-04-18 19:09:09] [EMAIL PROTECTED]
> 
> reclassified
> 
> 
> 
> [2002-04-18 17:30:28] [EMAIL PROTECTED]
> 
> It seems to be happening only under certain contexts.  Here is a script
> that works fine:
> 
>  
> $test = 'asdf';
> 
> define ('_TEST', 'test');
> 
> echo 'constant: ';
> print_r (${_TEST});
> 
> echo 'direct: ';
> print_r ($test);
> 
> ?>
> 
> And here is code that does not:
> 
>  
> if (PHP_VERSION < '4.1.0') {
>   define ('_GET', 'HTTP_GET_VARS');
> } else {
>   define ('_GET', '_GET');
> }
> 
> class CGI {
>   var $param = array ();
> 
>   function CGI () {
>   global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_POST_FILES;
> 
>   if (${_GET}) {
>   reset (${_GET});
>   while (list ($k, $v) = each (${_GET})) {
>   if (get_magic_quotes_gpc () == 1) {
>   $this->{$k} = stripslashes ($v);
>   } else {
>   $this->{$k} = $v;
>   }
>   array_push ($this->param, $k);
>   }
>   } else {
>   echo '_GET value: '; print_r (_GET);
>   echo '$_GET value: '; print_r ($_GET);
>   echo '${_GET} value: '; print_r (${_GET});
>   }
>   }
> }
> 
> $cgi = new CGI;
> 
> echo '$cgi value: '; print_r ($cgi);
> 
> ?>
> 
> 
> 
> [2002-04-18 16:43:17] [EMAIL PROTECTED]
> 
> Constants do not appear to be interpreted properly in the following
> context:
> 
> ${CONSTANT}
> 
> I found this problem with the following code:
> 
>  
> if (PHP_VERSION < '4.1.0') {
>   define ('_GET', 'HTTP_GET_VARS');
>   // etc.
> } else {
>   define ('_GET', '_GET');
>   // etc.
> }
> 
> print_r (${_GET});
> 
> ?>
> 
> This should print out the $_GET hash in 4.2.0RC4, but it prints
> nothing.  A quick check of the _GET constant shows that it does contain
> the proper value.
> 
> I compile php with:
> 
> './configure' '--with-pgsql=shared' '--with-gd'
> '--with-mysql=/usr/local/mysql'
> '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-shmop'
> '--enable-xslt' '--with-xslt-sablot'
> 
> Thanks!
> 
> 
> 
> 
> -- 
> Edit this bug report at http://bugs.php.net/?id=16687&edit=1
> 


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




[PHP-DEV] Re: Bug #16687 Updated: Constants not being interpreted in "variablevariables"

2002-04-19 Thread Derick Rethans

On 19 Apr 2002 [EMAIL PROTECTED] wrote:

>  ID:   16687
>  Updated by:   [EMAIL PROTECTED]
>  Reported By:  [EMAIL PROTECTED]
>  Status:   Bogus
>  Bug Type: Scripting Engine problem
>  Operating System: Red Hat Linux 7.1
>  PHP Version:  4.2.0
>  New Comment:
> 
> True true. Derick (or someone else) mind briefly explaining why this
> is/has to be different?

Zeev, can you elaborate why this was implemented like this? I forgot it :)

Derick

> 
> 
> Previous Comments:
> 
> 
> [2002-04-19 11:11:00] [EMAIL PROTECTED]
> 
> But then why does it work under certain circumstances and not others? 
> Regardless whether intended or not, this is inconsistent behaviour.
> 
> I also think that having these differences between regular variables
> and the "superglobals" shouldn't be necessary.  If I can't use them in
> the same contexts as regular variables, then I would personally prefer
> the $HTTP_*_VARS instead, because you can.
> 
> I have found my approach to abstracting this difference ($HTTP_*_VARS
> vs. $_*) between PHP versions to be really beneficial to my scripts.  I
> can abstract them both down to one name, and use a single reference to
> the appropriate one instead of sticking if statements every time I need
> to know which one to use.
> 
> Sorry to keep buggin' ya, but I think this may be a fair enough
> argument for change.
> 
> 
> 
> [2002-04-19 10:33:59] [EMAIL PROTECTED]
> 
> You can't use superglobals indirectly, check this:
> 
> $t = "_GET";
> var_dump ($$t);
> 
> doesn't work neither, and it wasn't supposed to work.
> 
> However, this does work (because $HTTP_GET_VARS is not a superglobal):
> 
> $t = "HTTP_GET_VARS";
> var_dump ($$t);
> 
> 
> Derick
> 
> 
> 
> [2002-04-18 19:09:09] [EMAIL PROTECTED]
> 
> reclassified
> 
> 
> 
> [2002-04-18 17:30:28] [EMAIL PROTECTED]
> 
> It seems to be happening only under certain contexts.  Here is a script
> that works fine:
> 
>  
> $test = 'asdf';
> 
> define ('_TEST', 'test');
> 
> echo 'constant: ';
> print_r (${_TEST});
> 
> echo 'direct: ';
> print_r ($test);
> 
> ?>
> 
> And here is code that does not:
> 
>  
> if (PHP_VERSION < '4.1.0') {
>   define ('_GET', 'HTTP_GET_VARS');
> } else {
>   define ('_GET', '_GET');
> }
> 
> class CGI {
>   var $param = array ();
> 
>   function CGI () {
>   global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_POST_FILES;
> 
>   if (${_GET}) {
>   reset (${_GET});
>   while (list ($k, $v) = each (${_GET})) {
>   if (get_magic_quotes_gpc () == 1) {
>   $this->{$k} = stripslashes ($v);
>   } else {
>   $this->{$k} = $v;
>   }
>   array_push ($this->param, $k);
>   }
>   } else {
>   echo '_GET value: '; print_r (_GET);
>   echo '$_GET value: '; print_r ($_GET);
>   echo '${_GET} value: '; print_r (${_GET});
>   }
>   }
> }
> 
> $cgi = new CGI;
> 
> echo '$cgi value: '; print_r ($cgi);
> 
> ?>
> 
> 
> 
> [2002-04-18 16:43:17] [EMAIL PROTECTED]
> 
> Constants do not appear to be interpreted properly in the following
> context:
> 
> ${CONSTANT}
> 
> I found this problem with the following code:
> 
>  
> if (PHP_VERSION < '4.1.0') {
>   define ('_GET', 'HTTP_GET_VARS');
>   // etc.
> } else {
>   define ('_GET', '_GET');
>   // etc.
> }
> 
> print_r (${_GET});
> 
> ?>
> 
> This should print out the $_GET hash in 4.2.0RC4, but it prints
> nothing.  A quick check of the _GET constant shows that it does contain
> the proper value.
> 
> I compile php with:
> 
> './configure' '--with-pgsql=shared' '--with-gd'
> '--with-mysql=/usr/local/mysql'
> '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-shmop'
> '--enable-xslt' '--with-xslt-sablot'
> 
> Thanks!
> 
> 
> 
> 
> -- 
> Edit this bug report at http://bugs.php.net/?id=16687&edit=1
> 


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




[PHP-DEV] Re: Bug #16687 Updated: Constants not being interpreted in "variable variables"

2002-04-19 Thread Zeev Suraski

At 21:08 19/04/2002, Derick Rethans wrote:
>on 19 apr 2002 [EMAIL PROTECTED] wrote:
>
> >  id:   16687
> >  updated by:   [EMAIL PROTECTED]
> >  reported by:  [EMAIL PROTECTED]
> >  status:   bogus
> >  bug type: scripting engine problem
> >  operating system: red hat linux 7.1
> >  php version:  4.2.0
> >  new comment:
> >
> > true true. derick (or someone else) mind briefly explaining why this
> > is/has to be different?
>
>zeev, can you elaborate why this was implemented like this?

Because it's the cleanest and most elegant way of implementing it.

Zeev


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




[PHP-DEV] Re: Bug #16687 Updated: Constants not being interpreted in"variable variables"

2002-04-19 Thread Lux

On Fri, 2002-04-19 at 13:07, Derick Rethans wrote:
> On 19 Apr 2002 [EMAIL PROTECTED] wrote:
> 
> >  ID:   16687
> >  Updated by:   [EMAIL PROTECTED]
> >  Reported By:  [EMAIL PROTECTED]
> >  Status:   Bogus
> >  Bug Type: Scripting Engine problem
> >  Operating System: Red Hat Linux 7.1
> >  PHP Version:  4.2.0
> >  New Comment:
> > 
> > But then why does it work under certain circumstances and not others? 
> > Regardless whether intended or not, this is inconsistent behaviour.
> 
> Yes it is indeed.

Shouldn't this be made consistent then?

> 
> > I also think that having these differences between regular variables
> > and the "superglobals" shouldn't be necessary.  If I can't use them in
> > the same contexts as regular variables, then I would personally prefer
> > the $HTTP_*_VARS instead, because you can.
> > 
> > I have found my approach to abstracting this difference ($HTTP_*_VARS
> > vs. $_*) between PHP versions to be really beneficial to my scripts.  I
> > can abstract them both down to one name, and use a single reference to
> > the appropriate one instead of sticking if statements every time I need
> > to know which one to use.
> 
> Then just stick to $HTTP_*_VARS and you dont need no fancy references. 
> This works with akk versions of PHP. But I strongly recommend to use the 
> $_* variant for new projects.

But aren't the $HTTP_*_VARS deprecated in favour of the new $_*
variables?  That's why I was trying to come up with a singular syntax
(ie ${_GET}) to reference whichever is appropriate, because I do like
the $_* vars much better, and I don't want to invest effort in one then
have to switch later.  Also, with regards to this behavioral
inconsistency, if I do stick to $HTTP_*_VARS, and come to rely on them
behaving like ordinary variables do, then it might break something later
on to switch.  Predictability here and now could prevent problems down
the road.

One other quick question:  Can you make references to the superglobals,
then call these as "variable variables"?  That still makes it more
troublesome because then I have to be careful to call global $a, $b, $c
on any ones I want to use, in addition to already having to call global
$HTTP_*_VARS in case they're using 4.0.6 or earlier.

Thanks for the feedback!

Lux

> 
> regards,
> 
> Derick
> 
> > Previous Comments:
> > 
> > 
> > [2002-04-19 10:33:59] [EMAIL PROTECTED]
> > 
> > You can't use superglobals indirectly, check this:
> > 
> > $t = "_GET";
> > var_dump ($$t);
> > 
> > doesn't work neither, and it wasn't supposed to work.
> > 
> > However, this does work (because $HTTP_GET_VARS is not a superglobal):
> > 
> > $t = "HTTP_GET_VARS";
> > var_dump ($$t);
> > 
> > 
> > Derick
> > 
> > 
> > 
> > [2002-04-18 19:09:09] [EMAIL PROTECTED]
> > 
> > reclassified
> > 
> > 
> > 
> > [2002-04-18 17:30:28] [EMAIL PROTECTED]
> > 
> > It seems to be happening only under certain contexts.  Here is a script
> > that works fine:
> > 
> >  > 
> > $test = 'asdf';
> > 
> > define ('_TEST', 'test');
> > 
> > echo 'constant: ';
> > print_r (${_TEST});
> > 
> > echo 'direct: ';
> > print_r ($test);
> > 
> > ?>
> > 
> > And here is code that does not:
> > 
> >  > 
> > if (PHP_VERSION < '4.1.0') {
> > define ('_GET', 'HTTP_GET_VARS');
> > } else {
> > define ('_GET', '_GET');
> > }
> > 
> > class CGI {
> > var $param = array ();
> > 
> > function CGI () {
> > global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_POST_FILES;
> > 
> > if (${_GET}) {
> > reset (${_GET});
> > while (list ($k, $v) = each (${_GET})) {
> > if (get_magic_quotes_gpc () == 1) {
> > $this->{$k} = stripslashes ($v);
> > } else {
> > $this->{$k} = $v;
> > }
> > array_push ($this->param, $k);
> > }
> > } else {
> > echo '_GET value: '; print_r (_GET);
> > echo '$_GET value: '; print_r ($_GET);
> > echo '${_GET} value: '; print_r (${_GET});
> > }
> > }
> > }
> > 
> > $cgi = new CGI;
> > 
> > echo '$cgi value: '; print_r ($cgi);
> > 
> > ?>
> > 
> > 
> > 
> > [2002-04-18 16:43:17] [EMAIL PROTECTED]
> > 
> > Constants do not appear to be interpreted properly in the following
> > context:
> > 
> > ${CONSTANT}
> > 
> > I found this problem with the following code:
> > 
> >  > 
> > if (PHP_VERSION < '4.1.0') {
> >   define ('_GET', 'HTTP_GET_VARS');
> >   // etc.
> > } else {
> >   define ('_GET', '_GET');
> >   

Re: [PHP-DEV] file_get_contents source code??

2002-04-19 Thread Markus Fischer

It's not in any released version. I wonder where you have
heard of it and why that source didn't mentioned it is not in
any released version yet. It's only available in the current
CVS HEAD branch.

See also the manual entry at
http://www.php.net/manual/en/function.file-get-contents.php:

"Note: This function was introduced in PHP 4.3.0."

You can lookup the source yourself at current cvs
php4/ext/standard/file.c

- Markus

On Fri, Apr 19, 2002 at 07:53:49PM +0200, Giovanni Lenzi wrote : 
> file_get_contents function is supposed to return the contents of a file in a
> binary safe manner. I tried it on two different servers which has different
> versions of APACHE+PHP but it still not works.
> The server give me this response:
> 
> Fatal error: Call to undefined function: file_get_contents() in
> /usr/home/s/a/sauzer/public_html/sfidario/readstreams/1.0/warsupcoming.php
> on line 17
> 
> Surely i have to update PHP version but i can't do it onto the remote
> server.
> So i have to create myself this function.
> 
> Can anyone help me please??
> Does anyone have the full source code of this function??
> 
> 
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
"Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none :)"

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




Re: [PHP-DEV] Re: Bug #16687 Updated: Constants not being interpreted in "variable variables"

2002-04-19 Thread Zeev Suraski

At 21:18 19/04/2002, Lux wrote:
>One other quick question:  Can you make references to the superglobals,
>then call these as "variable variables"?

Yes.

Can you explain when you need to use these global structures indirectly?

Zeev


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




[PHP-DEV] Stream Filters and Interfaces (a bit long) (was Re: URLs, fopen wrappers and RFC 2718)

2002-04-19 Thread Wez Furlong

On 19/04/02, "Andrei Zmievski" <[EMAIL PROTECTED]> wrote:
> Take a look at this document:
>   http://primates.ximian.com/~miguel/monikers.html
> Monikers seem to be similar to what you are describing. Maybe there are
> some ideas to be gleaned from there.

Monikers are a very powerful system.  The problem is that you get to the
more powerful stringified monikers, it starts getting hard to parse,
both by human eyes and by PHP code :-/

I did already have the following thoughts/notions about where I'd like
the streams stuff to go, but I also don't want to make it too complex
because I don't think PHP needs it to be that complicated.

Stream Filters
==
At the moment, it is possible to "stack" wrappers together like this:
fopen("compress.zlib://http://server.com/pricelist.gz";, "r");

While that is useful, it's not all that readable. It actually looks
like it is a garbage URL :-)

I'm definitely planning on some mechanism for stacking dynamically:



The nice thing about this is that a range of encodings/decodings
can be applied/removed based on the data that has just been read
from the file.

I think this sort of thing might be useful for things like
templating processors:



It is useful to be able to specify that as a single URL parameter;
gnome concatenates things with the '#' sign - I also think that
specifying an array would also be useful, because it could be built
dynamically:



I'm still not sure if I like using '#' as a separator for filters,
but can't think of another character that isn't likely to force
a lot of otherwise unneccessary URL encoding, or make it too cumbersome.

Stream Interfaces
=

I was thinking that it could be useful for streams to offer interfaces
for operations that can be carried out on similar types of stream.
Right now in CVS we have network streams, file streams, memory streams
and user-space streams.  If you want to change the chunk-size for a network
stream, you need to check if it is a network stream using code like this:

if (php_stream_is(stream, PHP_STREAM_IS_SOCKET)) {
   ... use socket-stream functions here ...
   // this is a real function that assumes that stream->abstract
   // points to a php_netstream_data_t.
   php_stream_sock_set_chunk_size(stream, newsize);
}

That's works OK now, but what if a user-space stream uses an underlying
network stream?  If we had some kind of simple interface mechanism, we
could write code like this instead, and be future compatible:

if (php_stream_has(stream, PHP_STREAM_IFACE_SOCKET)) {
   ... use socket-stream functions here ...
   // would probably still use a macro with the same name as above,
   // but would implement the call in this way.
   // no assumptions are made about the streams internal data
   stream->sock_iface->set_chunk_size(stream, newsize);
}

The interfaces in streams would be very basic: we could have a bitfield
where each bit corresponds to a pre-defined interface, and indicates that
a particular pointer in the stream structure is valid and points to a
"method table" (just like the stream_ops structure, but with different
methods).
With just a little bit more code, we can implement a system where
extensions can register and query stream interfaces at runtime without
risking a collision with interfaces from other extensions.

At the moment I can think of 3 basic interfaces: the standard
file/stream interface (that we have currently), an interface with
network functions (set chunk size, blocking/non-blocking, timeouts),
and an interface for streams that can expose their contents as a
memory buffer - this would be implemented by the memory streams as
well as by plain file streams (using mmap or equivalent).

Where do we go from here?
=

I really like both of these concepts; something like Dericks crypto
extension could be implemented using filters rather than streams, and
that would make them more versatile - just push them onto an existing
stream and you won't need to think harder than that.

Interfaces would be useful for cross-extension interoperation.
In fact, it might be better to implement them as a lightweight
layer that could be used for any non-stream resources, if the
extension author desired.

This would allow domxml XML resources to interoperate with other
XML based extensions (as Stig mentioned recently), provided that
we define a sensible set of operations that are likely to be required.

Sterlings XSLT extension could benefit here too: ext/xslt would define
the actual PHP user-land functions that call into xslt objects from
different back-ends.  The actual back-end that gets used could be
decided at run-time (dynamic loading), rather than compile time.


Right, I think I've go on for long enough now... all comments
are welcome...

--Wez.


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




Re: [PHP-DEV] file_get_contents source code??

2002-04-19 Thread Wez Furlong

On 19/04/02, "Giovanni Lenzi" <[EMAIL PROTECTED]> wrote:
> Fatal error: Call to undefined function: file_get_contents() in
> /usr/home/s/a/sauzer/public_html/sfidario/readstreams/1.0/warsupcoming.php
> on line 17

file_get_contents is only in the current CVS (development) version of PHP.
 
> So i have to create myself this function.
> 
> Can anyone help me please??
> Does anyone have the full source code of this function??

in your PHP script:

   function file_get_contents($filename) {
   $fp = fopen($filename, "rb");
   if (!is_resource($fp))
   return false;
   $data = fread($fp, filesize($filename));
   fclose($fp);
   return $data;
   }

In the future, please read the manual on php.net, as there are examples
in the user-contributed notes for this and similar functions (like file()),
that will help you.

This mailing list of the for development of PHP, not for writing scripts
with PHP: you would be better off with php-users or php-general or something
like that.

--Wez.


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




Re: [PHP-DEV] Re: Bug #16687 Updated: Constants not beinginterpreted in "variable variables"

2002-04-19 Thread Lux

On Fri, 2002-04-19 at 15:08, Zeev Suraski wrote:
> At 21:18 19/04/2002, Lux wrote:
> >One other quick question:  Can you make references to the superglobals,
> >then call these as "variable variables"?
> 
> Yes.
> 
> Can you explain when you need to use these global structures indirectly?

Sure!

In an effort to be compatible with PHP 4.0.6 and under as well as
4.1.0+, I found myself using the following code more than once:

if (PHP_VERSION < '4.1.0') {
  // use $HTTP_*_VARS
} else {
  // use $_* vars
}

While I know I can still use the $HTTP_*_VARS in all new versions of
PHP, the docs on php.net stated that these were deprecated, so I am
preparing for versions that didn't have them by starting to move towards
the new variables now.  But I can't ditch the $HTTP_*_VARS way
completely for a while still, because there are a lot of PHP users still
running 4.0.6.  So I thought of a method of only having to code this if
statement once, which was:

if (PHP_VERSION < '4.1.0') {
  define ('_GET', 'HTTP_GET_VARS');
  define ('_POST', 'HTTP_POST_VARS');
  // etc.
} else {
  define ('_GET', '_GET');
  define ('_POST', '_POST');
  // etc.
}

Now I can refer to the appropriate values automatically by saying
${_GET} or ${_POST}, which is only two characters off from using the new
syntax, so it's nice and simple.  The only catch here is that in any
block that I use these, I have to call global $HTTP_*_VARS first to
whichever I use, otherwise it keeps my code nice and clean.

Reasons aside though, we are talking about an inconsistency in the way
PHP handles these new "superglobals", one that makes them look and feel
and act (for the most part) just like ordinary variables, but makes them
differ in small but potentially problematic ways.  Using my method works
in the global namespace, but once you enter another it fails.  This
sounds like a pretty clear bug to me, not something to be excused as "we
meant for it to be that way".  Nobody plans to add tiny inconsistencies;
those only make peoples' lives more difficult.

Lux

> 
> Zeev
> 
> 
> 



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




[PHP-DEV] Re: Stream Filters and Interfaces (a bit long) (was Re: URLs, fopen wrappers and RFC 2718)

2002-04-19 Thread Andrei Zmievski

On Fri, 19 Apr 2002, Wez Furlong wrote:
> The nice thing about this is that a range of encodings/decodings
> can be applied/removed based on the data that has just been read
> from the file.
> 
> I think this sort of thing might be useful for things like
> templating processors:
> 
>  $fp = fopen("data.xml", "r");
> stream_stack_push("xslt:style.xsl?param1=value1¶m2=value2", $fp);
> stream_stack_push("compress.zlib", $fp);
> stream_stack_push("crypt.des", $fp);
> // this reads the result of applying an XSLT transform
> // (setting parameters param1 and param2) to data.xml,
> // and gzipping the ouput, and then encrypting it with DES
> $data = fread($fp, 4096);
> // now send the result somewhere over the internet.
> ?>

How about going in reverse: decrypting the data, then uncompressing it,
and then transforming?

> It is useful to be able to specify that as a single URL parameter;
> gnome concatenates things with the '#' sign - I also think that
> specifying an array would also be useful, because it could be built
> dynamically:
> 
>  // Gnome style
> $fp = fopen("data.xml#xslt:style.xsl#compress.zlib#crypt.des"), "r");
> $data = fread($fp, 4096);
> // Array style
> $fp = fopen(array("data.xml", "xslt:style.xsl", "compress.zlib",
> "crypt.des"), "r");
> $data = fread($fp, 4096);
> ?>
> 
> I'm still not sure if I like using '#' as a separator for filters,
> but can't think of another character that isn't likely to force
> a lot of otherwise unneccessary URL encoding, or make it too cumbersome.

A pipe (|)? It would be familiar to those with Unix heritage. And why
not use colon (:) for separating filter type from filter name?

By the way, I am not too keen on specifying all this stuff as a direct
parameter to fopen(). I'd rather see something like this:



> At the moment I can think of 3 basic interfaces: the standard
> file/stream interface (that we have currently), an interface with
> network functions (set chunk size, blocking/non-blocking, timeouts),
> and an interface for streams that can expose their contents as a
> memory buffer - this would be implemented by the memory streams as
> well as by plain file streams (using mmap or equivalent).

Why not blocking/non-blocking stuff for other types of streams? I can
see some possible ones that could benefit from that.

-Andrei

"Music expresses that which can not be said
 and on which it is impossible to be silent."
 -Victor Hugo

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




[PHP-DEV] can nawk work with php

2002-04-19 Thread David Kuku

Can someone help me!!!
How can i use unix-commands in php scripts

Like this:
ldapsearch -h ldaphost -b 'ou=people,o=ubs,c=ch' 'cn=*t113469'* | nawk
-F"=" 
'/uid;short/ { print $2 }' " );

this commands works on unix-shell

how can i use this so that php will be able to interprete this?
any Help 'll be highly appreciated!

david

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




[PHP-DEV] some php.net maintenance this weekend.

2002-04-19 Thread Jim Winstead

i'll be shifting around some of the php.net services this weekend
(particularly handling of @php.net mail addresses, and bugs.php.net), so
don't be alarmed if you're unable to reach some of the php.net sites for
a few hours while the dns switches over.

(in theory, there won't be any interruption in php.net mail, and i'll
try to avoid it for the web services, too. but theory and practice don't
always march to the same drummer. :)

the mailing lists and cvs shouldn't be impacted at all.

jim

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




[PHP-DEV] Re: Stream Filters and Interfaces (a bit long) (was Re: URLs, fopen wrappers and RFC 2718)

2002-04-19 Thread Wez Furlong

On 19/04/02, "Andrei Zmievski" <[EMAIL PROTECTED]> wrote:
> On Fri, 19 Apr 2002, Wez Furlong wrote:
> >  > $fp = fopen("data.xml", "r");
> > stream_stack_push("xslt:style.xsl?param1=value1¶m2=value2", $fp);
> > stream_stack_push("compress.zlib", $fp);
> > stream_stack_push("crypt.des", $fp);
> > // this reads the result of applying an XSLT transform
> > // (setting parameters param1 and param2) to data.xml,
> > // and gzipping the ouput, and then encrypting it with DES
> > $data = fread($fp, 4096);
> > // now send the result somewhere over the internet.
> > ?>
> 
> How about going in reverse: decrypting the data, then uncompressing it,
> and then transforming?

Stack the filters in the desired order :-)

$fp = fopen("encrypted.dat", "r");
stream_stack_push("crypt.des:decrypt", $fp);
stream_stack_push("compress.zlib:decompress", $fp);
// XSLT is in most cases not likely to be 1:1 reversible transform
// so this is probably a bad example.
stream_stack_push("xslt:style.xsl", $fp);

The filters would need to be told in which direction they should be working,
if appropriate: for example, XSLT filters can only work one-way, but
crypt or compress could be encoding/encrypting or decoding/decrypting.
 
> > I'm still not sure if I like using '#' as a separator for filters,
> > but can't think of another character that isn't likely to force
> > a lot of otherwise unneccessary URL encoding, or make it too cumbersome.
> 
> A pipe (|)? It would be familiar to those with Unix heritage. And why
> not use colon (:) for separating filter type from filter name?

The issue is in how those names are interpreted; the main thing is to
prevent a lot of quoting because we chose the wrong delimiter.
I like the pipe, but if it's something that is otherwise a no-quoting
required character in a URL, I'd like to avoid it.
But - read on...
 
> By the way, I am not too keen on specifying all this stuff as a direct
> parameter to fopen(). I'd rather see something like this:
> 
>  // Gnome style
> $stream = stream_create("data.xml|xslt:style.xsl|compress:zlib|crypt:des");
> $fp = fopen($stream, 'r');
> ...
> 
> // Array style
> $stream = stream_create('data.xml', array("xslt:style.xsl",
> "compress:zlib", "crypt:des"));
> $fp = fopen($stream, 'r');
> ...
> 
> ?>

The drawback is that the mode used to open the underlying data.xml stream
is separated from the code that instantiates it, which kind of makes it
impossible to open the stream.

We can eliminate the URL encoding/quoting issue mentioned above by
using a syntax like this:

$stream = stream_create(
 "data.xml",
 // this could be an array as discussed above
 "xslt:style.xsl|compress:zlib|crypt:des",
 "r"
  );

So this would replace the fopen call entirely.
I think I like that better than overloading fopen too much;
even overloading the filename with some kind of stream/pipeline
resource is probably too much.
 
> > At the moment I can think of 3 basic interfaces: the standard
> > file/stream interface (that we have currently), an interface with
> > network functions (set chunk size, blocking/non-blocking, timeouts),
> > and an interface for streams that can expose their contents as a
> > memory buffer - this would be implemented by the memory streams as
> > well as by plain file streams (using mmap or equivalent).
> 
> Why not blocking/non-blocking stuff for other types of streams? I can
> see some possible ones that could benefit from that.

I have undoubtably only touched the tip of the iceberg :-)
Yes, there bound to be quite a few other streams and operations
where this makes sense.

--Wez.


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




[PHP-DEV] Feature request: anonymous usage of returned values

2002-04-19 Thread Derek Moore

I've been playin' around with Horde and IMP lately...  And I've done a lot of 
PHP and Perl work in the past...  One of the things I really like about PHP is 
how it has most of the really cool features of Perl that I enjoy, but lacks 
some of the things that annoy me about Perl.

I was making some modifications to IMP's configurations when I tried to use a 
feature of Perl that I thought for sure would have been carried over to PHP.

I'm not sure the exact vernacular to describe this feature, but Perl allows 
you to anonymously use whatever was returned by a function--e.g., $year = 
(localtime($time))[5], so $year takes only the year value of the data returned 
by localtime() instead of the entire array.

In IMP I was trying to do:

$conf['spam']['email'] = 'postmaster@' . (posix_uname())['nodename'];

But instead I have to do:

$uname = posix_uname();
$conf['spam']['email'] = 'postmaster@' . $uname['nodename'];


I realize this is nitpicking a little bit, but being able to handle returned 
values in such a manner is quite, quite useful.  Or does PHP provide this 
functionality through some other syntax?

Anyways, I just thought I'd say somethin' about it.  Btw, please reply-to-all, 
as I'm not subscribed to this list.

Okay, I'm done now,

Derek

[ derek p. moore ]---[ http://hackunix.org/~derekm/pubkey.asc ]
[ [EMAIL PROTECTED] ][ bfd2 fad6 1014 80c9 aaa8 ]
[ http://hackunix.org/~derekm/ ]---[ a4a0 f449 3461 a443 51b9 ]

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




Re: [PHP-DEV] Inline optimization

2002-04-19 Thread Yasuo Ohgaki

Aaron Bannert wrote:
> On Fri, Apr 19, 2002 at 03:50:16PM +0200, Sebastian Bergmann wrote:
> 
>>Yasuo Ohgaki wrote:
>>
>>>Any objection for changing -O2 -> -O3 when
>>>--enable-inline-optimization is used? (when GCC is used)
>>
>>  What happened to the plan of making --enable-inline-optimization the
>>  default?
> 
> 
> Is making these kinds of optimizations by default such a good idea? I've
> seen many a broken gcc install produce incorrect binaries with the larger
> -O optimizations turned on (unfortunately).
> 
> -aaron

Fair.

Experienced users can choose optimization as they want, so
we may want to remove "--enable-inline-optimization" option
since it does nothing.

Any comments for removing "--enable-inline-optimization" option?
(Is there any condition that it affects to build?)

Instead, should we add -finline-functions?

--
Yasuo Ohgaki






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




[PHP-DEV] ext/pgsql build broken on win32 (HEAD)

2002-04-19 Thread Edin Kadribasic

Same error in the following functions:

php_pgsql_metadata
php_pgsql_convert
php_pgsql_insert
php_pgsql_update
php_pgsql_delete
php_pgsql_result2array
php_pgsql_select

The error is:

error C2491: 'php_pgsql_metadata' : definition of dllimport function not
allowed

Edin


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




Re: [PHP-DEV] Feature request: anonymous usage of returned values

2002-04-19 Thread Markus Fischer

I've brought this up on the Zend Engine2 list a while ago.
The result was that it is not planned to support
dereferencing of arrays from e.g. return value on the fly.

- Markus

On Fri, Apr 19, 2002 at 07:26:26PM -0500, Derek Moore wrote : 
> I've been playin' around with Horde and IMP lately...  And I've done a lot of 
> PHP and Perl work in the past...  One of the things I really like about PHP is 
> how it has most of the really cool features of Perl that I enjoy, but lacks 
> some of the things that annoy me about Perl.
> 
> I was making some modifications to IMP's configurations when I tried to use a 
> feature of Perl that I thought for sure would have been carried over to PHP.
> 
> I'm not sure the exact vernacular to describe this feature, but Perl allows 
> you to anonymously use whatever was returned by a function--e.g., $year = 
> (localtime($time))[5], so $year takes only the year value of the data returned 
> by localtime() instead of the entire array.
> 
> In IMP I was trying to do:
> 
> $conf['spam']['email'] = 'postmaster@' . (posix_uname())['nodename'];
> 
> But instead I have to do:
> 
> $uname = posix_uname();
> $conf['spam']['email'] = 'postmaster@' . $uname['nodename'];
> 
> 
> I realize this is nitpicking a little bit, but being able to handle returned 
> values in such a manner is quite, quite useful.  Or does PHP provide this 
> functionality through some other syntax?
> 
> Anyways, I just thought I'd say somethin' about it.  Btw, please reply-to-all, 
> as I'm not subscribed to this list.
> 
> Okay, I'm done now,
> 
> Derek
> 
> [ derek p. moore ]---[ http://hackunix.org/~derekm/pubkey.asc ]
> [ [EMAIL PROTECTED] ][ bfd2 fad6 1014 80c9 aaa8 ]
> [ http://hackunix.org/~derekm/ ]---[ a4a0 f449 3461 a443 51b9 ]
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
"Mind if I MFH ?" "What QA did you do on it?" "the usual?" "ah... none :)"

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




Re: [PHP-DEV] ext/pgsql build broken on win32 (HEAD)

2002-04-19 Thread Edin Kadribasic

The following patch solves problems with win32 build. I don't know what it
breaks :)

Edin

Btw. vc++ 6.0 spits out these warnings:

c:\php4build\HEAD\ext\pgsql\pgsql.c(1073) : warning C4018: '==' :
signed/unsigned mismatch
c:\php4build\HEAD\ext\pgsql\pgsql.c(3196) : warning C4244: '=' : conversion
from 'double ' to 'long ', possible loss of data
c:\php4build\HEAD\ext\pgsql\pgsql.c(3761) : warning C4005:
'MAX_LENGTH_OF_LONG' : macro redefinition
..\..\Zend\zend_operators.h(36) : see previous definition of
'MAX_LENGTH_OF_LONG'
c:\php4build\HEAD\ext\pgsql\pgsql.c(3762) : warning C4005:
'MAX_LENGTH_OF_DOUBLE' : macro redefinition
..\..\Zend\zend_operators.h(37) : see previous definition of
'MAX_LENGTH_OF_DOUBLE'
c:\php4build\HEAD\ext\pgsql\pgsql.c(4525) : warning C4018: '<' :
signed/unsigned mismatch

- Original Message -
From: "Edin Kadribasic" <[EMAIL PROTECTED]>
To: "Yasuo Ohgaki" <[EMAIL PROTECTED]>; "PHP developer list"
<[EMAIL PROTECTED]>
Sent: Saturday, April 20, 2002 2:59 AM
Subject: [PHP-DEV] ext/pgsql build broken on win32 (HEAD)


> Same error in the following functions:
>
> php_pgsql_metadata
> php_pgsql_convert
> php_pgsql_insert
> php_pgsql_update
> php_pgsql_delete
> php_pgsql_result2array
> php_pgsql_select
>
> The error is:
>
> error C2491: 'php_pgsql_metadata' : definition of dllimport function not
> allowed
>
> Edin
>
>
> --
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>


Index: php_pgsql.h
===
RCS file: /repository/php4/ext/pgsql/php_pgsql.h,v
retrieving revision 1.42
diff -u -b -B -r1.42 php_pgsql.h
--- php_pgsql.h 8 Apr 2002 01:37:37 -   1.42
+++ php_pgsql.h 20 Apr 2002 01:35:36 -
@@ -129,12 +129,12 @@
 PHP_FUNCTION(pg_delete);
 PHP_FUNCTION(pg_select);
 
-PHPAPI int php_pgsql_metadata(PGconn *pg_link, const char *table_name, zval *meta 
TSRMLS_DC);
-PHPAPI int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval 
*values, zval *result TSRMLS_DC);
-PHPAPI int php_pgsql_insert(PGconn *pg_link, const char *table, zval *values, 
zend_bool convert, zend_bool async TSRMLS_DC);
-PHPAPI int php_pgsql_update(PGconn *pg_link, const char *table, zval *values, zval 
*ids, zend_bool convert, zend_bool async TSRMLS_DC);
-PHPAPI int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids, zend_bool 
convert, zend_bool async TSRMLS_DC);
-PHPAPI int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids, zval 
*ret_array, zend_bool convert TSRMLS_DC);
+static int php_pgsql_metadata(PGconn *pg_link, const char *table_name, zval *meta 
+TSRMLS_DC);
+static int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval 
+*values, zval *result TSRMLS_DC);
+static int php_pgsql_insert(PGconn *pg_link, const char *table, zval *values, 
+zend_bool convert, zend_bool async TSRMLS_DC);
+static int php_pgsql_update(PGconn *pg_link, const char *table, zval *values, zval 
+*ids, zend_bool convert, zend_bool async TSRMLS_DC);
+static int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids, zend_bool 
+convert, zend_bool async TSRMLS_DC);
+static int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids, zval 
+*ret_array, zend_bool convert TSRMLS_DC);
 
 static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent);
 /* static int php_pgsql_get_default_link(INTERNAL_FUNCTION_PARAMETERS); */
Index: pgsql.c
===
RCS file: /repository/php4/ext/pgsql/pgsql.c,v
retrieving revision 1.180
diff -u -b -B -r1.180 pgsql.c
--- pgsql.c 19 Apr 2002 13:09:09 -  1.180
+++ pgsql.c 20 Apr 2002 01:35:37 -
@@ -2726,7 +2726,7 @@
 /* {{{ php_pgsql_metadata
 
  */
-PHPAPI int php_pgsql_metadata(PGconn *pg_link, const char *table_name, zval *meta 
TSRMLS_DC) 
+static int php_pgsql_metadata(PGconn *pg_link, const char *table_name, zval *meta 
+TSRMLS_DC) 
 {
PGresult *pg_result;
char query_buf[QUERY_BUF_SIZE+1], *tmp_name;
@@ -2967,7 +2967,7 @@
 /* {{{ php_pgsql_convert
  * check and convert array values (fieldname=>vlaue pair) for sql
  */
-PHPAPI int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval 
*values, zval *result TSRMLS_DC) 
+static int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval 
+*values, zval *result TSRMLS_DC) 
 {
HashPosition pos;
char *field = NULL;
@@ -3763,7 +3763,7 @@
 
 /* {{{ php_pgsql_insert
  */
-PHPAPI int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var_array, 
zend_bool convert, zend_bool async TSRMLS_DC)
+static int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var_array, 
+zend_bool convert, zend_bool async TSRMLS_DC)
 {
zval **val, *converted = NULL;
char *query_tpl = "INSERT INTO %s (%s) VALUES (%s);";
@@ -3984,7 +3984,7 @@

 /* {{{ php_pgsql_update
  */
-PHPA

[PHP-DEV] Re: ext/pgsql build broken on win32 (HEAD)

2002-04-19 Thread Yasuo Ohgaki

This is probably due to missing PHP_EXPORTS definition, but
I don't use VC...

Could anyone take care of this?
Thank you.

--
Yasuo Ohgaki

Edin Kadribasic wrote:
> Same error in the following functions:
> 
> php_pgsql_metadata
> php_pgsql_convert
> php_pgsql_insert
> php_pgsql_update
> php_pgsql_delete
> php_pgsql_result2array
> php_pgsql_select
> 
> The error is:
> 
> error C2491: 'php_pgsql_metadata' : definition of dllimport function not
> allowed
> 
> Edin
> 
> 




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




Re: [PHP-DEV] ext/pgsql build broken on win32 (HEAD)

2002-04-19 Thread Yasuo Ohgaki

Edin Kadribasic wrote:
> The following patch solves problems with win32 build. I don't know what it
> breaks :)
> 

I need to export PHPAPI function. Removing PHPAPI disables exports
under windows... It's not a big deal now, though.
We need other solution.

> 
> Btw. vc++ 6.0 spits out these warnings:
> 
> c:\php4build\HEAD\ext\pgsql\pgsql.c(1073) : warning C4018: '==' :
> signed/unsigned mismatch
> c:\php4build\HEAD\ext\pgsql\pgsql.c(3196) : warning C4244: '=' : conversion
> from 'double ' to 'long ', possible loss of data
> c:\php4build\HEAD\ext\pgsql\pgsql.c(3761) : warning C4005:
> 'MAX_LENGTH_OF_LONG' : macro redefinition
> ..\..\Zend\zend_operators.h(36) : see previous definition of
> 'MAX_LENGTH_OF_LONG'
> c:\php4build\HEAD\ext\pgsql\pgsql.c(3762) : warning C4005:
> 'MAX_LENGTH_OF_DOUBLE' : macro redefinition
> ..\..\Zend\zend_operators.h(37) : see previous definition of
> 'MAX_LENGTH_OF_DOUBLE'
> c:\php4build\HEAD\ext\pgsql\pgsql.c(4525) : warning C4018: '<' :
> signed/unsigned mismatch

Thank you.
These warnings helped me to fix 2 bugs :)

--
Yasuo Ohgaki



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