[PHP-DEV] Re: trans-sid warning?

2002-08-13 Thread Yasuo Ohgaki

Rasmus Lerdorf wrote:
> As much as I think trans-sid sucks from a performance perspective, what's
> with this comment in php.ini-dist?
> 
> ; trans sid support is disabled by default.
> ; Use of trans sid may risk your users security. It may not be
> ; feasible to use this option for some sites. Use this option with caution.
> session.use_trans_sid = 0
> 
> What security issue is this referring to?
> 

One of security risk is sending URL that contains
active session ID to others.

Another is storing URL that contains session
ID to history. Computer may be public one.
User may access server with the same session ID
always. etc

--
Yasuo Ohgaki


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




[PHP-DEV] Re: results of mysql_fetch are returning the incorrect records

2002-08-13 Thread David Robley

In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] 
says...
> I have problems with mysql_fetch return the wrong records.  If I execute the
> sql statement in mysql, I receive the correct results.  When I used
> mysql_fetch function, it does not return the correct results.  Below is my
> function and the format sql statement
> 
> function companiesByBusiness_ZipCode_BusinessOrContactName( $ctgyno,
> $zipcode, $businessandcontactname ) {
>  $sql = "select company_no, name, contact, business_phone, mobile_phone,
> services_desc, brief_bio, pager, address, city, state, zipcode,
> picture_file, case ifnull(picture_file, 'No Picture') when 'No Picture' then
> 'b' else 'a' end pic_ind from company";
>  if( $ctgyno != "ALL") {
>   $sql .= " where business_ctgy_no = $ctgyno";
>   if( $zipcode != "" ) {
>$sql .= " and (zipcode like '".substr( $zipcode, 0, 3 )."%' and zipcode
> != '$zipcode')";
>   }
>   if( $businessandcontactname != "" ) {
>$sql .= " and (name = '$businessandcontactname'";
>$sql .= " or contact = '$businessandcontactname')";
> 
>   }
>   $sql .= " order by pic_ind, name, company_no";
>  }
> 
>   $query = mysql_query( $sql ) or die( $sql."".mysql_error() );
> 
>  //$numrows = mysql_num_rows( $query );
>  while( $assoc = mysql_fetch_assoc( $query ) ) {
>   $rows[] = $assoc;
> 
> sql statement:
> select company_no, name, contact, business_phone, mobile_phone,
> services_desc, brief_bio, pager, address, city, state, zipcode,
> picture_file, case ifnull(picture_file, 'No Picture') when 'No Picture' then
> 'b' else 'a' end pic_ind from company where business_ctgy_no = 1 and
> (zipcode like '276%' and zipcode != '27616') and (name = 'Gil Bryan' or
> contact = 'Gil Bryan') order by pic_ind, name, company_no
> 
> It seems like it is ignoring the last condition, name = 'Gil Bryan' or
> contact = 'Gil Bryan').  Any help is greatly appreciated.
> 
>  }
> 
>  return $rows;
> }

First, I'd suggest echoing $sql just before you send it to mysql to ensure 
that what you hope is there is actually there. Also, what are you 
returning from your function? Or how are you using the data gathered from 
your tables?

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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




[PHP-DEV] results of mysql_fetch are returning the incorrect records

2002-08-13 Thread K. Lee

I have problems with mysql_fetch return the wrong records.  If I execute the
sql statement in mysql, I receive the correct results.  When I used
mysql_fetch function, it does not return the correct results.  Below is my
function and the format sql statement

function companiesByBusiness_ZipCode_BusinessOrContactName( $ctgyno,
$zipcode, $businessandcontactname ) {
 $sql = "select company_no, name, contact, business_phone, mobile_phone,
services_desc, brief_bio, pager, address, city, state, zipcode,
picture_file, case ifnull(picture_file, 'No Picture') when 'No Picture' then
'b' else 'a' end pic_ind from company";
 if( $ctgyno != "ALL") {
  $sql .= " where business_ctgy_no = $ctgyno";
  if( $zipcode != "" ) {
   $sql .= " and (zipcode like '".substr( $zipcode, 0, 3 )."%' and zipcode
!= '$zipcode')";
  }
  if( $businessandcontactname != "" ) {
   $sql .= " and (name = '$businessandcontactname'";
   $sql .= " or contact = '$businessandcontactname')";

  }
  $sql .= " order by pic_ind, name, company_no";
 }

  $query = mysql_query( $sql ) or die( $sql."".mysql_error() );

 //$numrows = mysql_num_rows( $query );
 while( $assoc = mysql_fetch_assoc( $query ) ) {
  $rows[] = $assoc;

sql statement:
select company_no, name, contact, business_phone, mobile_phone,
services_desc, brief_bio, pager, address, city, state, zipcode,
picture_file, case ifnull(picture_file, 'No Picture') when 'No Picture' then
'b' else 'a' end pic_ind from company where business_ctgy_no = 1 and
(zipcode like '276%' and zipcode != '27616') and (name = 'Gil Bryan' or
contact = 'Gil Bryan') order by pic_ind, name, company_no

It seems like it is ignoring the last condition, name = 'Gil Bryan' or
contact = 'Gil Bryan').  Any help is greatly appreciated.

 }

 return $rows;
}




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




Re: [PHP-DEV] php_error_docref

2002-08-13 Thread Wez Furlong

It's needed because a lot of the doc pages are long, and there is not
always going to be a 1:1 mapping between the active function and a
description of the error.

For example, in the stream wrappers, when someone tries to open an
http connection for write, or tries to overwrite an existing file via
ftp, we will want to inform the user that we don't support this action.
Now, if fopen was the only function that createdwrappers, we could use
a NULL for the docref.

In actual fact fopen(), copy(), and other extensions will all be using
wrappers, so the active function becomes meaningless.  Couple that with
the main description of using URLs not actually being on the fopen manual
page (it's under features.remote-files), and because that page is really
long, finding the two lines that say you can't do that is pretty hard
work.

So, we do need the '#target' syntax in there :-)

--Wez.

On 08/13/02, "Dan Kalowsky" <[EMAIL PROTECTED]> wrote:
> > NULL or "#" is best here since it allows the phpdoc group to change
> > their mind for naming the pages.
> 
> Then again, I don't understand what this parameter is for.  If not for the
> developer to declare which help file this is in, what is the point?  Yes I
> see the anchor tags option, but what is the difference between using an
> anchor and declaring specifically?
> 
> It just seems that if this variable is going to be 90% of the time (random
> guess) NULL, it's not really all the necessary to be included.



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




Re: [PHP-DEV] php_error_docref

2002-08-13 Thread Marcus Börger

At 22:22 13.08.2002, 'Ricky' S Dhatt wrote:
>On Tue, 13 Aug 2002, Dan Kalowsky wrote:
>
> > On Tue, 13 Aug 2002, Marcus [iso-8859-1] Börger wrote:
> >
> > > The point is to be able to direct to external sites not on php.net! For
> > > example
> > > when a function is just a wrapper around a library then you can use the
> > > absolute
> > > form of the docref parameter ("http://") to point to the library's
> > > website.
> >
> > Okay thats a point I hadn't thought of.  Though I'm not sure why we'd be
> > referencing outside sites.  Can we then change the CODING_STANDARD
> > example to NOT use the php.net website?  Hopefully stopping anyone from
> > using it as a reference to any php-specific documentation, and only for
> > external sites.
>
>Do you think this will help the lost PHP script writer?  For example, the
>cURL extension is really just a wrapper around libcurl.  If they get an
>error on curl_setopt() do you really want to direct them to the C API
>docs on the cURL site? I think it should always point to the php.net
>manual; external sites won't help the PHP script writer with their PHP
>code.  From the PHP manual they can go to library website if need be.

I thought of situations where an external document explains a standard that
must be used. For example when a database extension can deliver any url
describing the query error you can use php_error_docref() to point to that 
page.
It is no solution for cURL where only C library or a standard exists as 
external
URLs.

regards
marcus


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




Re: [PHP-DEV] php_error_docref

2002-08-13 Thread Marcus Börger

At 22:04 13.08.2002, Dan Kalowsky wrote:
>On Tue, 13 Aug 2002, Marcus [iso-8859-1] Börger wrote:
>
> > The point is to be able to direct to external sites not on php.net! For
> > example
> > when a function is just a wrapper around a library then you can use the
> > absolute
> > form of the docref parameter ("http://") to point to the library's
> > website.
>
>Okay thats a point I hadn't thought of.  Though I'm not sure why we'd be
>referencing outside sites.  Can we then change the CODING_STANDARD
>example to NOT use the php.net website?  Hopefully stopping anyone from
>using it as a reference to any php-specific documentation, and only for
>external sites.
>
> > NULL or "#" is best here since it allows the phpdoc group to change
> > their mind for naming the pages.
>
>Then again, I don't understand what this parameter is for.  If not for the
>developer to declare which help file this is in, what is the point?  Yes I
>see the anchor tags option, but what is the difference between using an
>anchor and declaring specifically?

It is there for directing to one specific page. For example i am going to 
write the
common errors for exif only on the exif_read_data page. So i must set docref
parameter of all calls to php_error_docref() within exif to 
exif-read-data#error.
Another problem is that you can direct to configuration pages and so on if the
error coccured due to a missconfiguration.


>It just seems that if this variable is going to be 90% of the time (random
>guess) NULL, it's not really all the necessary to be included.

It was intended to be the right parameter for abot 95%.

>And judging from the comment by Gabor, the PHPDOC group isn't going to
>change this format anytime soon.

I hoped so :-)

marcus


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




Re: [PHP-DEV] php_error_docref

2002-08-13 Thread 'Ricky' S Dhatt

On Tue, 13 Aug 2002, Dan Kalowsky wrote:

> On Tue, 13 Aug 2002, Marcus [iso-8859-1] Börger wrote:
>
> > The point is to be able to direct to external sites not on php.net! For
> > example
> > when a function is just a wrapper around a library then you can use the
> > absolute
> > form of the docref parameter ("http://") to point to the library's
> > website.
>
> Okay thats a point I hadn't thought of.  Though I'm not sure why we'd be
> referencing outside sites.  Can we then change the CODING_STANDARD
> example to NOT use the php.net website?  Hopefully stopping anyone from
> using it as a reference to any php-specific documentation, and only for
> external sites.

Do you think this will help the lost PHP script writer?  For example, the
cURL extension is really just a wrapper around libcurl.  If they get an
error on curl_setopt() do you really want to direct them to the C API
docs on the cURL site? I think it should always point to the php.net
manual; external sites won't help the PHP script writer with their PHP
code.  From the PHP manual they can go to library website if need be.

My $.02.

--Ricky


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




Re: [PHP-DEV] php_error_docref

2002-08-13 Thread Dan Kalowsky

On Tue, 13 Aug 2002, Marcus [iso-8859-1] Börger wrote:

> The point is to be able to direct to external sites not on php.net! For
> example
> when a function is just a wrapper around a library then you can use the
> absolute
> form of the docref parameter ("http://") to point to the library's
> website.

Okay thats a point I hadn't thought of.  Though I'm not sure why we'd be
referencing outside sites.  Can we then change the CODING_STANDARD
example to NOT use the php.net website?  Hopefully stopping anyone from
using it as a reference to any php-specific documentation, and only for
external sites.

> NULL or "#" is best here since it allows the phpdoc group to change
> their mind for naming the pages.

Then again, I don't understand what this parameter is for.  If not for the
developer to declare which help file this is in, what is the point?  Yes I
see the anchor tags option, but what is the difference between using an
anchor and declaring specifically?

It just seems that if this variable is going to be 90% of the time (random
guess) NULL, it's not really all the necessary to be included.

And judging from the comment by Gabor, the PHPDOC group isn't going to
change this format anytime soon.

>---<
Dan Kalowsky"A little less conversation,
http://www.deadmime.org/~danka little more action."
[EMAIL PROTECTED]- "A Little Less Conversation",
[EMAIL PROTECTED]Elvis Presley



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




[PHP-DEV] CVS Account Request: zer0fill

2002-08-13 Thread Tarek

Join the PHP DOC Arabic Translation Team

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




Re: [PHP-DEV] Method memory handling from an instanced object

2002-08-13 Thread Brad LaFountain


--- Dan Hardiker <[EMAIL PROTECTED]> wrote:
> Hi All,
> 
> If I was to code something like:
> 
>  
>   class Example {
> var $abc = false;
> function Demo($param) {
>   // etc //
>   return $param;
> }
>   }
> 
>   $ex1 = new Example;
>   $ex2 = new Example;
> 
> ?>
> 
> There are now 2 variables, both with a copy of the object Example in them.
> Now, I would expect the variables in the objects to be duplicated (eg: the
> memory space for $ex1->abc to be separate from $ex2->abc). However, is the
> method definition the same?

 Yes the method is only compiled once. Altho when you extend an object the
opcodes will get copied. (opcodes being compiled php code)

> Is the method definition and contents duplicated each instancing? (eg: if
> I have 100,000 instances of an object with a "print()" method - would that
> method be copied to each object - or would the reference the same memory
> space).

 Again only compiled once.

> If the method is shared, then would a static variable in a method be
> shared across the entire class - or would it still reference to that
> object instance's variable memory space?

 Static varibles by definition (in all languages) are across all instances of
an object.

> If the method is not shared, could this cause an issue with a class that
> has a lot of methods being instanced lots of time and taking up lots of
> memory?

 Not an issue.



 -brad

__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

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




[PHP-DEV] CVS Account Request: nicolt

2002-08-13 Thread nicolau silva

fun

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




[PHP-DEV] trans-sid warning?

2002-08-13 Thread Rasmus Lerdorf

As much as I think trans-sid sucks from a performance perspective, what's
with this comment in php.ini-dist?

; trans sid support is disabled by default.
; Use of trans sid may risk your users security. It may not be
; feasible to use this option for some sites. Use this option with caution.
session.use_trans_sid = 0

What security issue is this referring to?

-Rasmus


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




[PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] php_error_docref

2002-08-13 Thread Gabor Hojtsy

>php_error_docref("function.fopen" TSRMLS_CC, E_WARNING, "Spongebob Square
>Pants lives in a pineapple under the sea");
>
>To me that should be the recommended method, as it will allow the php.ini
>values for language to override everything nicely, and everyone can see
>the PHP manual in their desired language.  The error of course is still in
>English but thats another matter.

| NULL or "#" is best here since it allows the phpdoc group to
| change their mind for naming the pages.

It's not likely that this naming scheme will change. Internal linking,
php.net/funcname lookups, IDE integrations all depend on this naming
scheme...

Goba



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




Re: [PHP-DEV] pair numbers

2002-08-13 Thread Dan Hardiker

> i,m new in this confference

I think your looking for [EMAIL PROTECTED]

> can u help me with small problem? i,m looking 4 function which checking
> pair int. number true/false (1=false, 2=true, 3=flase, 4=true, etc.)

Seen as this is a quick one ... I think your looking to see if a number is
odd or even... for this you will probably want to check the modulus from
2.

EG: if ($var % 2) { echo "Odd!"; } else { echo "Even!"; }
or a more compact version ... echo ($var%2) ? "Odd!" : "Even!";


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



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




Re: [PHP-DEV] php_error_docref

2002-08-13 Thread Marcus Börger

At 17:05 13.08.2002, Dan Kalowsky wrote:
>On Tue, 13 Aug 2002, Marcus [iso-8859-1] Börger wrote:
>
> > >2) Can we please remove the "http://www.php.net/manual/en/blahblahblah";
> > >style of use for this?  It will tend to force users into one language or
> > >another, and not make PHP as friendly/usable to other languages.
> >
> > NO! First you can simply set docref_root in your ini to point to your local
> > copy of the manual in whatever language and Second it is a problem of
> > the php website. It should automatically redirect from
> > php.net/function.
> > to php.net/manual//.php
>
>I'm not sure I see the point still.  What I'm proposing is not allowing:
>
>php_error_docref("http://www.php.net/manual/en/function.fopen"; TSRMLS_CC,
>E_WARNING, "Spongebob Square Pants rules");

The point is to be able to direct to external sites not on php.net! For 
example
when a function is just a wrapper around a library then you can use the 
absolute
form of the docref parameter ("http://") to point to the library's 
website.


>as a valid call from within an extension.  Because this limits anytime
>this error occurs to the English manual description only, or any language
>which is defined really.  There is no need for this, as you have provided
>another option which works much cleaner and better (through the ini
>options) in my opinion.  While the PHP website may have a bug (or two) in
>it, it's no reason to force end users to be reading languages that they
>don't know or prefer.
>
>I have nothing wrong with:
>
>php_error_docref("function.fopen" TSRMLS_CC, E_WARNING, "Spongebob Square
>Pants lives in a pineapple under the sea");
>
>To me that should be the recommended method, as it will allow the php.ini
>values for language to override everything nicely, and everyone can see
>the PHP manual in their desired language.  The error of course is still in
>English but thats another matter.

NULL or "#" is best here since it allows the phpdoc group to change 
their
mind for naming the pages.

regards
marcus


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




[PHP-DEV] pair numbers

2002-08-13 Thread kuna

Hello,

i,m new in this confference

can u help me with small problem? i,m looking 4 function which checking pair
int. number true/false (1=false, 2=true, 3=flase, 4=true, etc.)

any idea? i can make cycle, but i,m sure 4 some function (maybe)

thanx :))

k,.







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




Re: [PHP-DEV] php_error_docref

2002-08-13 Thread Dan Kalowsky

On Tue, 13 Aug 2002, Marcus [iso-8859-1] Börger wrote:

> >2) Can we please remove the "http://www.php.net/manual/en/blahblahblah";
> >style of use for this?  It will tend to force users into one language or
> >another, and not make PHP as friendly/usable to other languages.
>
> NO! First you can simply set docref_root in your ini to point to your local
> copy of the manual in whatever language and Second it is a problem of
> the php website. It should automatically redirect from
> php.net/function.
> to php.net/manual//.php

I'm not sure I see the point still.  What I'm proposing is not allowing:

php_error_docref("http://www.php.net/manual/en/function.fopen"; TSRMLS_CC,
E_WARNING, "Spongebob Square Pants rules");

as a valid call from within an extension.  Because this limits anytime
this error occurs to the English manual description only, or any language
which is defined really.  There is no need for this, as you have provided
another option which works much cleaner and better (through the ini
options) in my opinion.  While the PHP website may have a bug (or two) in
it, it's no reason to force end users to be reading languages that they
don't know or prefer.

I have nothing wrong with:

php_error_docref("function.fopen" TSRMLS_CC, E_WARNING, "Spongebob Square
Pants lives in a pineapple under the sea");

To me that should be the recommended method, as it will allow the php.ini
values for language to override everything nicely, and everyone can see
the PHP manual in their desired language.  The error of course is still in
English but thats another matter.

>---<
Dan Kalowsky"A little less conversation,
http://www.deadmime.org/~danka little more action."
[EMAIL PROTECTED]- "A Little Less Conversation",
[EMAIL PROTECTED]Elvis Presley


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




Re: [PHP-DEV] php_error_docref

2002-08-13 Thread Marcus Börger

At 16:37 13.08.2002, Dan Kalowsky wrote:
>A few comments on this.
>
>1) is it possible to cut down on the number of php_error_docref functions
>to just one?  I really don't see a reason for this many different formats.

There is no solution for reducing php_error_docref() to one function
call but we could exchange all php_error() calls to php_error_docref().

Again see automatic exchange script: 
http://marcus-boerger.de/php/ext/docref.txt
But who will do this? Me not.

>2) Can we please remove the "http://www.php.net/manual/en/blahblahblah";
>style of use for this?  It will tend to force users into one language or
>another, and not make PHP as friendly/usable to other languages.

NO! First you can simply set docref_root in your ini to point to your local
copy of the manual in whatever language and Second it is a problem of
the php website. It should automatically redirect from 
php.net/function.
to php.net/manual//.php

marcus


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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /main network.c

2002-08-13 Thread Dan Kalowsky

There was a suggestion, I don't remember if it was agreed upon or not.
Regardless as I see it this is still a bug, and until an ini value is
added, this shouldn't be allowed out as-is in the next release.

If an ini value is added by that time though, it would be nice :)

On Tue, 13 Aug 2002, Edin Kadribasic wrote:

> Hello Dan,
>
> Wasn't there an agreement that the timout is going to be a an .ini
> setting whith a default value of 60?
>
> Edin
>
> - Original Message -
> From: "Dan Kalowsky" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 13, 2002 4:39 PM
> Subject: [PHP-CVS] cvs: php4 /main network.c
>
>
> > kalowsky Tue Aug 13 10:39:03 2002 EDT
> >
> >   Modified files:
> > /php4/main network.c
> >   Log:
> >   Bug Fix #16113, as reflective of a php-dev convo between wez and
> iliaa
> >
> >
> > Index: php4/main/network.c
> > diff -u php4/main/network.c:1.57 php4/main/network.c:1.58
> > --- php4/main/network.c:1.57 Sun Aug 11 07:25:24 2002
> > +++ php4/main/network.c Tue Aug 13 10:39:03 2002
> > @@ -15,7 +15,7 @@
> > | Author: Stig Venaas <[EMAIL PROTECTED]>
> |
> >
> +---
> ---+
> >   */
> > -/* $Id: network.c,v 1.57 2002/08/11 11:25:24 wez Exp $ */
> > +/* $Id: network.c,v 1.58 2002/08/13 14:39:03 kalowsky Exp $ */
> >
> >  /*#define DEBUG_MAIN_NETWORK 1*/
> >  #define MAX_CHUNKS_PER_READ 10
> > @@ -515,7 +515,7 @@
> >
> >   sock->is_blocked = 1;
> >   sock->chunk_size = FG(def_chunk_size);
> > - sock->timeout.tv_sec = -1;
> > + sock->timeout.tv_sec = 60;
> >   sock->socket = socket;
> >
> >   stream = php_stream_alloc_rel(&php_stream_socket_ops, sock,
> persistent, "r+");
> >
> >
> >
> > --
> > PHP CVS Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> >
>

>---<
Dan Kalowsky"A little less conversation,
http://www.deadmime.org/~danka little more action."
[EMAIL PROTECTED]- "A Little Less Conversation",
[EMAIL PROTECTED]Elvis Presley


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




[PHP-DEV] CVS Account Request: mw21st

2002-08-13 Thread Markus Wolff

I want to use the CVS to develop PEAR packages together with other developers. At this 
time, I´m working on a new Authorisation system for PEAR together with Lukas Smith.

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




[PHP-DEV] Re: [PHP-CVS] cvs: php4 /main network.c

2002-08-13 Thread Edin Kadribasic

Hello Dan,

Wasn't there an agreement that the timout is going to be a an .ini
setting whith a default value of 60?

Edin

- Original Message -
From: "Dan Kalowsky" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 13, 2002 4:39 PM
Subject: [PHP-CVS] cvs: php4 /main network.c


> kalowsky Tue Aug 13 10:39:03 2002 EDT
>
>   Modified files:
> /php4/main network.c
>   Log:
>   Bug Fix #16113, as reflective of a php-dev convo between wez and
iliaa
>
>
> Index: php4/main/network.c
> diff -u php4/main/network.c:1.57 php4/main/network.c:1.58
> --- php4/main/network.c:1.57 Sun Aug 11 07:25:24 2002
> +++ php4/main/network.c Tue Aug 13 10:39:03 2002
> @@ -15,7 +15,7 @@
> | Author: Stig Venaas <[EMAIL PROTECTED]>
|
>
+---
---+
>   */
> -/* $Id: network.c,v 1.57 2002/08/11 11:25:24 wez Exp $ */
> +/* $Id: network.c,v 1.58 2002/08/13 14:39:03 kalowsky Exp $ */
>
>  /*#define DEBUG_MAIN_NETWORK 1*/
>  #define MAX_CHUNKS_PER_READ 10
> @@ -515,7 +515,7 @@
>
>   sock->is_blocked = 1;
>   sock->chunk_size = FG(def_chunk_size);
> - sock->timeout.tv_sec = -1;
> + sock->timeout.tv_sec = 60;
>   sock->socket = socket;
>
>   stream = php_stream_alloc_rel(&php_stream_socket_ops, sock,
persistent, "r+");
>
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>


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




[PHP-DEV] php_error_docref

2002-08-13 Thread Dan Kalowsky

A few comments on this.

1) is it possible to cut down on the number of php_error_docref functions
to just one?  I really don't see a reason for this many different formats.

2) Can we please remove the "http://www.php.net/manual/en/blahblahblah";
style of use for this?  It will tend to force users into one language or
another, and not make PHP as friendly/usable to other languages.



>---<
Dan Kalowsky"A little less conversation,
http://www.deadmime.org/~danka little more action."
[EMAIL PROTECTED]- "A Little Less Conversation",
[EMAIL PROTECTED]Elvis Presley


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




[PHP-DEV] PHP_SELF confusion

2002-08-13 Thread Piotr Klaban

Hi,

I have found PHP_SELF variable very confusing.
Maybe you can prove me wrong.

I thought that this variable can be used as a self reference
URL address for the currently running script, e.g.:

  uri, 
track_vars_array TSRMLS_CC);

in sapi/cgi/cgi_main.c PHP_SELF is equal to PHP_INFO
env. variable if it exists, otherwise it is copied from SCRIPT_NAME:

php_register_variable("PHP_SELF", (SG(request_info).request_uri
   ? SG(request_info).request_uri:""), track_vars_array TSRMLS_CC);

  and later:

SG(request_info).request_uri = getenv("PATH_INFO");
if (!SG(request_info).request_uri) {
SG(request_info).request_uri = getenv("SCRIPT_NAME");
}

I.e. if I call: http://server/dir/file.php/path-info?q=1
I would get:

   Apache module  PHP CGI
PHP_SELF   /dir/file.php/path-info/path-info

and if I call http://server/dir/file.php?q=1, the result is:

   Apache module  PHP CGI
PHP_SELF   /dir/file.php/path-info/dir/file.php


IMHO:
I think cgi_main.c should be patched in such a way, that PHP_SELF
should always be equal to concatenation of SCRIPT_NAME and PATH_INFO.

But there is a catch - php_fopen_primary_script() function
assumes that SG(request_info).request_uri contains PATH_INFO
variable and glues together doc_root (if set) and that path_info
string to build php file path. Maybe someone else, who understands
dependencies deeper could generate apropriate patch for PHP_SELF variable.

Best regards,

-- 
Piotr Klaban

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




[PHP-DEV] Search on bugs.php.net

2002-08-13 Thread Edin Kadribasic

Could someone please fix the search on bugs.php.net? This must be my
10th attemt at getting someone's attention.

Problems:
1. You cannot search for words with less than 4 characters. This
makes imposible to localise pow() related problems for example.
2. The search words used in boolean OR query. Pinpoiting the exect
bug report is very difficult because of this.
3. The search does not work. Period. Try searching for "GDFONTPATH"
and see if it will find #18879.

Fixing these problems would make life of people who want to hunt php
bugs down much easier.

I made initial bug report (#17391) on May 23rd.

Edin


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




Re: [PHP-DEV] coding standard addition proposal

2002-08-13 Thread derick

On Sun, 11 Aug 2002, Dan Kalowsky wrote:

> Any +/-1s on this idea?

+1

Derick

---
 Did I help you?   http://www.derickrethans.nl/link.php?url=giftlist
 Frequent ranting: http://www.derickrethans.nl/
---
 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] php_error_docref

2002-08-13 Thread derick

On Thu, 8 Aug 2002, Wez Furlong wrote:

> > On 08/08/02, "Marcus Börger" <[EMAIL PROTECTED]> wrote:
> > > First thanks to Wez for another great idea.
> > 
> > And it's not really my idea :-)
> > It's some anonymous persons idea (checking the cvs log for the
> > todo will reveal who!).
> 
> Derick :-)

I came to the conclusion myself... and I still wonder why I didn't do 
it right away myself. /me slams head against wall

Derick

---
 Did I help you?   http://www.derickrethans.nl/link.php?url=giftlist
 Frequent ranting: http://www.derickrethans.nl/
---
 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] Method memory handling from an instanced object

2002-08-13 Thread Dan Hardiker

Hi All,

If I was to code something like:



There are now 2 variables, both with a copy of the object Example in them.
Now, I would expect the variables in the objects to be duplicated (eg: the
memory space for $ex1->abc to be separate from $ex2->abc). However, is the
method definition the same?

Is the method definition and contents duplicated each instancing? (eg: if
I have 100,000 instances of an object with a "print()" method - would that
method be copied to each object - or would the reference the same memory
space).

If the method is shared, then would a static variable in a method be
shared across the entire class - or would it still reference to that
object instance's variable memory space?

If the method is not shared, could this cause an issue with a class that
has a lot of methods being instanced lots of time and taking up lots of
memory?

If anyone can let me know how this conceptually works, and (if possible) why.

Thanks,


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



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




Re: [PHP-DEV] Curl Wrapper now in HEAD

2002-08-13 Thread Sterling Hughes


> Hi Sterling,
>
> I've just commited my curl based wrapper.
> It's currently read-only (due to a temporary limitation in curl),
> and might not work properly for include/require statements (or
> passing streams to third-party libraries) on systems without
> fopencookie. Also, due to another bug in curl, redirects are not
> followed either.
>
> Because it's not yet a 100% compatible replacement for our own
> wrappers, you have to configure --with-curlwrappers to turn this code
> on.
>
> Hopefully this is enough to get things moving for bundling and
> integrating curl, although I'm not sure that we should enable this by
> default for 4.3 (it depends on how quickly curl can stabilize the
> "push" functionality we require for writing to curl streams).
>

yeah.. I'm not quite sure about that either, it also depends how far off 4.3
is :)  No offense to your coding skills (I'm quite surprised at how fast you
were able to get this off the ground, actually :), but imho, it should also
be tested a bit, before PHP 4.3...

> If you have some time to play with it, I would be grateful if you could
> test it with other protocols (such as ftp and ldap) that I'm unable to
> test due to lack of time or lack of a test server.
>

I will try, my only problem is that i have no cvs access during the week
(I'll go with snapshots), as I'm behind a *really* crappy firewalled
internet connection (actually, I'm behind 3 proxies:

Python NTLM Authenticating Proxy -> MS Proxy -> Squid -> Internet :)


> I'm hoping that we can keep php_curl_stream_opener as generic as
> possible for all the different protocols - I need your familiarity with
> the curl api here to help figure out what is best.
>

I'll take a look the best I can..  If you have any specific questions, ask
away...  Also, as daniel mentioned, the libcurl-dev mailing lists are a nice
place for this as well, if the question goes beyond my cURL knowledge.

-Sterling


> --Wez.
>
>
> --
> 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