[PHP-DOC] #30033 [Bgs-Opn]: unpack('n') never returns negative values

2004-09-09 Thread jsgoupil at lookstrike dot com
 ID:   30033
 User updated by:  jsgoupil at lookstrike dot com
 Reported By:  jsgoupil at lookstrike dot com
-Status:   Bogus
+Status:   Open
-Bug Type: Scripting Engine problem
+Bug Type: Documentation problem
 Operating System: WinXP - Linux
 PHP Version:  5.0.1
 New Comment:

OMG, i saw your message and I was angry ! but i check and in French it
is written entier court signé
so it means signed short
It means that there is a doc error.


Previous Comments:


[2004-09-09 08:04:34] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

http://php.net/pack:

n   unsigned short (always 16 bit, big endian byte order)



[2004-09-09 06:21:40] jsgoupil at lookstrike dot com

Description:

With the following code, i receive the max positive value.
Same error in PHP4.3.7.

Reproduce code:
---
?php
$val = -1;
$val2 = pack('n',$val);
$val3 = unpack('nint',$val2);
echo $val3['int'];
?

Expected result:

-1

Actual result:
--
65535





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


[PHP-DOC] documentation about mysql_fetch_array

2004-09-09 Thread cristina . attori
Hi,
I was reading the documentation on the web about mysql functions, and it
occours to me that on your page about mysql_fetch_array you says nothing
on the cursor repositioning. I think it could be useful documenting it.

Thanks a lot for you site, it is really a source of help.

Cristina Attori


Re: [PHP-DOC] documentation about mysql_fetch_array

2004-09-09 Thread Friedhelm Betz
On Thursday 02 September 2004 13:44, [EMAIL PROTECTED] wrote:
 Hi,
 I was reading the documentation on the web about mysql functions, and it
 occours to me that on your page about mysql_fetch_array you says nothing
 on the cursor repositioning. I think it could be useful documenting it.

 Thanks a lot for you site, it is really a source of help.

Please file a bug report at http://bugs.php.net, classified as Documentation 
problem.

Thanks
Friedhelm

-- 
http://www.jungle-world.com/


[PHP-DOC] cvs: phpdoc /en/reference/image/functions imagecreatefromgif.xml

2004-09-09 Thread Aidan Lister
aidan   Thu Sep  9 04:30:14 2004 EDT

  Modified files:  
/phpdoc/en/reference/image/functionsimagecreatefromgif.xml 
  Log:
  GIF support is back!
  
http://cvs.php.net/diff.php/phpdoc/en/reference/image/functions/imagecreatefromgif.xml?r1=1.9r2=1.10ty=u
Index: phpdoc/en/reference/image/functions/imagecreatefromgif.xml
diff -u phpdoc/en/reference/image/functions/imagecreatefromgif.xml:1.9 
phpdoc/en/reference/image/functions/imagecreatefromgif.xml:1.10
--- phpdoc/en/reference/image/functions/imagecreatefromgif.xml:1.9  Thu Jan 15 
07:42:37 2004
+++ phpdoc/en/reference/image/functions/imagecreatefromgif.xml  Thu Sep  9 04:30:09 
2004
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.9 $ --
+!-- $Revision: 1.10 $ --
 !-- splitted from ./en/functions/image.xml, last change in rev 1.2 --
   refentry id=function.imagecreatefromgif
refnamediv
@@ -48,9 +48,9 @@
  /example
  note
   para
-   Since all GIF support was removed from the GD library in
-   version 1.6, this function is not available if you are using
-   that version of the GD library.
+   GIF support was removed from the GD library in Version 1.6,
+   and added back in Version 2.0.28. This function is not
+   available if you are using these versions of the GD library.
   /para
  /note
 /para


[PHP-DOC] cvs: phpdoc /en/reference/datetime/functions strftime.xml

2004-09-09 Thread Aidan Lister
aidan   Thu Sep  9 04:34:06 2004 EDT

  Modified files:  
/phpdoc/en/reference/datetime/functions strftime.xml 
  Log:
  Added z
  
http://cvs.php.net/diff.php/phpdoc/en/reference/datetime/functions/strftime.xml?r1=1.13r2=1.14ty=u
Index: phpdoc/en/reference/datetime/functions/strftime.xml
diff -u phpdoc/en/reference/datetime/functions/strftime.xml:1.13 
phpdoc/en/reference/datetime/functions/strftime.xml:1.14
--- phpdoc/en/reference/datetime/functions/strftime.xml:1.13Sat Dec 20 23:21:43 
2003
+++ phpdoc/en/reference/datetime/functions/strftime.xml Thu Sep  9 04:34:05 2004
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.13 $ --
+!-- $Revision: 1.14 $ --
 !-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 --
   refentry id=function.strftime
refnamediv
@@ -224,7 +224,7 @@
   /listitem
   listitem
simpara
-%Z - time zone or name or abbreviation
+%Z or %z - time zone or name or abbreviation
/simpara
   /listitem
   listitem


[PHP-DOC] #30037 [NEW]: mysql_fetch_array and cursor repositioning

2004-09-09 Thread cristina dot attori at fsw dot it
From: cristina dot attori at fsw dot it
Operating system: 
PHP version:  Irrelevant
PHP Bug Type: Documentation problem
Bug description:  mysql_fetch_array and cursor repositioning

Description:

On your page about mysql_fetch_array you say nothing
about the cursor repositioning. I think it could be useful documenting it,
adding a link to the mysql_data_seek page.

Important: I'm talking about it.php.net and I don't know if it's the
Italian pages that are slightly old. 

Thanks a lot for you site, it is really a source of help.


-- 
Edit bug report at http://bugs.php.net/?id=30037edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30037r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30037r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30037r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=30037r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=30037r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=30037r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=30037r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=30037r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30037r=support
Expected behavior:   http://bugs.php.net/fix.php?id=30037r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30037r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30037r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=30037r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30037r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=30037r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=30037r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30037r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30037r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30037r=mysqlcfg


Re: [PHP-DOC] cvs: phpdoc /en/reference/image/functions imagecreatefromgif.xml

2004-09-09 Thread Derick Rethans
On Thu, 9 Sep 2004, Aidan Lister wrote:

 -   Since all GIF support was removed from the GD library in
 -   version 1.6, this function is not available if you are using
 -   that version of the GD library.
 +   GIF support was removed from the GD library in Version 1.6,
 +   and added back in Version 2.0.28. This function is not
 +   available if you are using these versions of the GD library.

This function is not available between version 1.6 (include) and version
2.0.28
(exclusive).

/para
   /note
  /para


-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org


[PHP-DOC] #30035 [Com]: php.net/instanceof leads nowhere

2004-09-09 Thread ante dot dfg at moj dot net
 ID:  30035
 Comment by:  ante dot dfg at moj dot net
 Reported By: [EMAIL PROTECTED]
 Status:  Open
 Bug Type:Documentation problem
 PHP Version: 5.0.1
 New Comment:

everything fine hereusing Mozilla FireFox...
If you have applied SP2 to XP then there's your problem..

After I installed SP2 some pages were(and still are) not found by IE
but found by Mozilla FireFox...


Previous Comments:


[2004-09-09 07:38:11] [EMAIL PROTECTED]

Description:

Trying to search for instanceof by using php.net/instanceof doesn't
reveal a page for it; only with the next step, the google site-wide
search, related pages can be found. However, even the page where it is
documented ( http://php.net/manual/en/language.operators.type.php ) is
not found.






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


Re: [PHP-DOC] cvs: phpdoc /en/reference/image/functions imagecreatefromgif.xml

2004-09-09 Thread Aidan Lister
It still makes sense the way I said it, I think.
I'll reword it, though.
- Original Message - 
From: Derick Rethans [EMAIL PROTECTED]
To: Aidan Lister [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, September 09, 2004 6:38 PM
Subject: Re: [PHP-DOC] cvs: phpdoc /en/reference/image/functions 
imagecreatefromgif.xml


On Thu, 9 Sep 2004, Aidan Lister wrote:
-   Since all GIF support was removed from the GD library in
-   version 1.6, this function is not available if you are using
-   that version of the GD library.
+   GIF support was removed from the GD library in Version 1.6,
+   and added back in Version 2.0.28. This function is not
+   available if you are using these versions of the GD library.
This function is not available between version 1.6 (include) and version
2.0.28
(exclusive).
   /para
  /note
 /para
--
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org 


[PHP-DOC] cvs: phpdoc /en/reference/image/functions imagecreatefromgif.xml

2004-09-09 Thread Aidan Lister
aidan   Thu Sep  9 06:00:18 2004 EDT

  Modified files:  
/phpdoc/en/reference/image/functionsimagecreatefromgif.xml 
  Log:
  Reworded
  
http://cvs.php.net/diff.php/phpdoc/en/reference/image/functions/imagecreatefromgif.xml?r1=1.10r2=1.11ty=u
Index: phpdoc/en/reference/image/functions/imagecreatefromgif.xml
diff -u phpdoc/en/reference/image/functions/imagecreatefromgif.xml:1.10 
phpdoc/en/reference/image/functions/imagecreatefromgif.xml:1.11
--- phpdoc/en/reference/image/functions/imagecreatefromgif.xml:1.10 Thu Sep  9 
04:30:09 2004
+++ phpdoc/en/reference/image/functions/imagecreatefromgif.xml  Thu Sep  9 06:00:17 
2004
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.10 $ --
+!-- $Revision: 1.11 $ --
 !-- splitted from ./en/functions/image.xml, last change in rev 1.2 --
   refentry id=function.imagecreatefromgif
refnamediv
@@ -50,7 +50,7 @@
   para
GIF support was removed from the GD library in Version 1.6,
and added back in Version 2.0.28. This function is not
-   available if you are using these versions of the GD library.
+   available between these versions.
   /para
  /note
 /para


[PHP-DOC] cvs: phpdoc /en/appendices wrappers.xml

2004-09-09 Thread Nuno Lopes
nlopess Thu Sep  9 06:21:05 2004 EDT

  Modified files:  
/phpdoc/en/appendices   wrappers.xml 
  Log:
  php 5.1 stuff was removed from cvs..
  
http://cvs.php.net/diff.php/phpdoc/en/appendices/wrappers.xml?r1=1.44r2=1.45ty=u
Index: phpdoc/en/appendices/wrappers.xml
diff -u phpdoc/en/appendices/wrappers.xml:1.44 phpdoc/en/appendices/wrappers.xml:1.45
--- phpdoc/en/appendices/wrappers.xml:1.44  Wed Sep  8 13:18:28 2004
+++ phpdoc/en/appendices/wrappers.xml   Thu Sep  9 06:21:00 2004
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.44 $ --
+!-- $Revision: 1.45 $ --
 appendix id=wrappers
  titleList of Supported Protocols/Wrappers/title
  para
@@ -155,15 +155,6 @@
Since PHP 4.3.0, the headers are available using
functionstream_get_meta_data/function.
   /simpara
-  note
-   titleTransfer-Encoding: chunked/title
-   simpara
-As of PHP 5.1.0, if the remote server sends 
-literalTransfer-Encoding: chunked/literal in the response
-headers, PHP will automatically apply a chunked decode filter
-to the content returned.
-   /simpara
-  /note
   simpara
HTTP connections are read-only; you cannot write data or copy
files to an HTTP resource.
@@ -247,13 +238,6 @@
 any other HTTP method supported by the remote server.
/entry
entryconstantGET/constant/entry
-  /row
-  row
-   entryliteralprotocol_version/literal PHP gt;= 5.1.0/entry
-   entryHTTP protocol version (typically literal1.0/literal
-or literal1.1/literal to send with the request line.
-   /entry
-   entryliteral1.0/literal/entry
   /row
   row
entryliteralheader/literal/entry


[PHP-DOC] cvs: phpdoc / manual.xml.in

2004-09-09 Thread Aidan Lister
aidan   Thu Sep  9 06:40:41 2004 EDT

  Modified files:  
/phpdoc manual.xml.in 
  Log:
  magicquotes section is done
  
http://cvs.php.net/diff.php/phpdoc/manual.xml.in?r1=1.193r2=1.194ty=u
Index: phpdoc/manual.xml.in
diff -u phpdoc/manual.xml.in:1.193 phpdoc/manual.xml.in:1.194
--- phpdoc/manual.xml.in:1.193  Tue Sep  7 10:40:16 2004
+++ phpdoc/manual.xml.inThu Sep  9 06:40:36 2004
@@ -2,7 +2,7 @@
 !DOCTYPE book PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN
   @srcdir@/dtds/dbxml-4.1.2/docbookx.dtd [
 
-!-- $Revision: 1.193 $ --
+!-- $Revision: 1.194 $ --
 
 !-- Add translated specific definitions and snippets --
 !ENTITY % language-defs SYSTEM @srcdir@/@LANGDIR@/language-defs.ent
@@ -92,11 +92,7 @@
   security.errors;
   security.globals;
   security.variables;
-
-  !-- Not publicly visible until finished
   security.magicquotes;
-  --
-
   security.hiding;
   security.current;
  /part


[PHP-DOC] register globals

2004-09-09 Thread Aidan Lister
http://nopaste.php.cd/28881

How's that for enabling/disabling at runtime. Anything I didn't think of?

I want to add this under security.registerglobals for enable/disable at 
runtime 


Re: [PHP-DOC] register globals

2004-09-09 Thread messju mohr
On Thu, Sep 09, 2004 at 08:59:55PM +1000, Aidan Lister wrote:
 http://nopaste.php.cd/28881
 
 How's that for enabling/disabling at runtime. Anything I didn't think of?
 
 I want to add this under security.registerglobals for enable/disable at 
 runtime 

the unset() in the second example wouldn't work. you are unsetting the
loop variable, not the global variable it corresponds to.

fix: http://nopaste.php.cd/28889

greetings
messju


Re: [PHP-DOC] register globals

2004-09-09 Thread messju mohr
On Thu, Sep 09, 2004 at 01:30:20PM +0200, messju mohr wrote:
 On Thu, Sep 09, 2004 at 08:59:55PM +1000, Aidan Lister wrote:
  http://nopaste.php.cd/28881
  
  How's that for enabling/disabling at runtime. Anything I didn't think of?
  
  I want to add this under security.registerglobals for enable/disable at 
  runtime 
 
 the unset() in the second example wouldn't work. you are unsetting the
 loop variable, not the global variable it corresponds to.
 
 fix: http://nopaste.php.cd/28889

i forgot to mention: the idea is great! :)
 
 greetings
 messju


[PHP-DOC] cvs: phpdoc /en/security database.xml

2004-09-09 Thread Aidan Lister
aidan   Thu Sep  9 08:49:36 2004 EDT

  Modified files:  
/phpdoc/en/security database.xml 
  Log:
  Used non-deprecated functions, thanks nocturnal
  
http://cvs.php.net/diff.php/phpdoc/en/security/database.xml?r1=1.6r2=1.7ty=u
Index: phpdoc/en/security/database.xml
diff -u phpdoc/en/security/database.xml:1.6 phpdoc/en/security/database.xml:1.7
--- phpdoc/en/security/database.xml:1.6 Thu Aug 12 21:00:48 2004
+++ phpdoc/en/security/database.xml Thu Sep  9 08:49:33 2004
@@ -1,5 +1,5 @@
 ?xml version=1.0 encoding=iso-8859-1?
-!-- $Revision: 1.6 $ --
+!-- $Revision: 1.7 $ --
 !-- splitted from ./index.xml, last change in rev 1.66 --
   chapter id=security.database
titleDatabase Security/title
@@ -122,18 +122,17 @@
 // storing password hash
 $query  = sprintf(INSERT INTO users(name,pwd) VALUES('%s','%s');,
 addslashes($username), md5($password));
-$result = pg_exec($connection, $query);
+$result = pg_query($connection, $query);
 
 // querying if user submitted the right password
 $query = sprintf(SELECT 1 FROM users WHERE name='%s' AND pwd='%s';,
 addslashes($username), md5($password));
-$result = pg_exec($connection, $query);
+$result = pg_query($connection, $query);
 
-if (pg_numrows($result)  0) {
-echo Welcome, $username!;
-}
-else {
-echo Authentication failed for $username.;
+if (pg_num_rows($result)  0) {
+echo 'Welcome, $username!';
+} else {
+echo 'Authentication failed for $username.';
 }
 
 ?
@@ -175,7 +174,7 @@
 $offset = argv[0]; // beware, no input validation!
 $query  = SELECT id, name FROM products ORDER BY name LIMIT 20 OFFSET $offset;;
 // with PostgreSQL 
-$result = pg_exec($conn, $query);
+$result = pg_query($conn, $query);
 // with MySQL
 $result = mysql_query($query);
 


Re: [PHP-DOC] weirdness in funcsummary.txt

2004-09-09 Thread Gabor Hojtsy
Hi,
GH The funcsummary.txt file contains quite a few weird stuff, like this.
GH Seems like someone misused the comment area for prototypes, or the 
GH parser in phpdoc is dumb?

Parser in phpdoc is a shell + awk script. I've posted php script which
was meant to replace them for generating funclist.txt  I can resend it
if needed. http://www.manucorp.com/archives/phpdoc/200408/msg00924.php
Which sources did you use for generating funclist.txt, so I can test
the script and make corrections if needed?
I have used the latest php-src CVS HEAD to generate the funclist.txt (as 
it was always done). Your script looks promising by the way, the example 
outputs of the sh/awk script vs. the PHP implementation seems to be 
fine. Since we always prefer PHP based solutions against sh/awk 
solutions, it would be nice to see this script in phpdoc CVS. Please do 
commit it.

(And use the phpdoc list and not the php-doc-chm list please for phpdoc 
related stuff :)

Goba


Re: [PHP-DOC] register globals

2004-09-09 Thread Curt Zirzow
* Thus wrote Aidan Lister:
 http://nopaste.php.cd/28881
 
 How's that for enabling/disabling at runtime. Anything I didn't think of?

The importing can be easier done with:

  import_request_variables(ini_get('variables_order'));
  if (isset($_SESSION) ) {
extract($_SESSION, EXTR_SKIP);
  }

Also note that the session behaviour is completely different as
well. session_register() and co. wont behave as if register_globals
was on.


Curt
-- 
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about.  No, sir.  Our model is the trapezoid!


Re: [PHP-DOC] register globals

2004-09-09 Thread Friedhelm Betz
On Thursday 09 September 2004 12:59, Aidan Lister wrote:
 http://nopaste.php.cd/28881

 How's that for enabling/disabling at runtime. Anything I didn't think of?

 I want to add this under security.registerglobals for enable/disable at
 runtime

I don't like the idea at all, to have such information in the manual :-(

Friredhelm

-- 
http://www.jungle-world.com/


Re: [PHP-DOC] documenting constants

2004-09-09 Thread Gabor Hojtsy
Two main topics come to mind here:
- Layout of constant information
As far as I see it, they're all ready for descriptions but are rarely
added as it means a lot of extra work looking them all up, and putting
that information into laymen's terms (or coming up with a description
that isn't simply the constant name written out).  If these constant lists 
should be in a table, or the current variablelist, I don't know.  The
mysqli table uses a two column table, the ref.info table three, and the
errorfunc table has four; and most all other extensions use a variablelist
with an empty description simpara with the idea of later adding the
description.  Either layout works for me, they each have their pros and
cons.
If we start adding descriptions for constants, a table might easily get 
out of control, having constant names with a lot of useless vertical 
space in cells, while the corresponding description stretches the table 
cell. Or is this already solved? :) [I am reading through old but kept 
issues.]

Goba


Re: [PHP-DOC] fopen com1:

2004-09-09 Thread Gabor Hojtsy
Could you please open a documentation bug report, so we will not forget 
about this?

Thanks,
Gabor Hojtsy
Steve Rapaport írta:
Hello all!
Greatest respect for PHP, it just keeps performing where other languages 
let me down.

Recently searched for a way to communicate on the serial port through 
PHP and found
the example below  from the fopen() manual page.

|This is great stuff, obviously.   But the com1: option to fopen does not
appear anywhere in the documentation.  Also, I'm wondering how Andrew 
set the
mode on the serial port as he mentions in the comment!

Any help or just a manual addition, much appreciated...
Steve|
*andrewra at NOSPAM dot webmail dot co dot za*
12-Jul-2004 03:32
|A simple little script to send SMS messages through a GSM phone 
connected to a serial communications port (win32). Tested on a Nokia 6310i:

?php
$number=+123456789;
$message=Hello World;
$port=com1:;
if ($fh=fopen(com1:,w+)) {
  /* 'mode com1: BAUD=9600 PARITY=N data=8 stop=1 xon=off'; */
  fputs($fh,\rATZ\r);
  sleep(1);
  fputs($fh,AT+CMGF=1\r);
  sleep(1);
  fputs($fh,AT+CMGS=\+{$number}\\r);
  sleep(1);
  fputs($fh,{$message}\x1A\r);
  fclose($fh);
} else {
  echo Failed to open port.;
}
?
|
--
_
* SEAMLESS DISTRIBUTION   ***www.seamless.se* 
mailto:[EMAIL PROTECTED]*
*  - The electronic solution  *

**
**
*Steve Rapaport -- Key Account Manager
*Dalagatan 100, 8 tr, 113 43 Stockholm
Phone: +46 (0)8 564 878 00, Fax: +46 (0)8 564 878 23
Direct: +46 (0)8 564 878 29, Mobile: +46 70 643 9944
E-mail: [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]*

* mailto:[EMAIL PROTECTED]** 
mailto:[EMAIL PROTECTED]



Re: [PHP-DOC] How to document Class Properties

2004-09-09 Thread Gabor Hojtsy
Hi Christian,
The DOM extension has a lot of important class properties (like 
nodeValue, nodeType for getting values, but also similar ones for 
setting values).

Are there any guidelines for how to document them? They are equally 
important to methods, therefore should they get their own page as well? 
(I'd say so)

Are there any other extensions, which document class properties?
Have you been able to get the information you requested?
Goba


Re: [PHP-DOC] register globals

2004-09-09 Thread messju mohr
On Thu, Sep 09, 2004 at 06:19:41PM +0200, Friedhelm Betz wrote:
 On Thursday 09 September 2004 12:59, Aidan Lister wrote:
  http://nopaste.php.cd/28881
 
  How's that for enabling/disabling at runtime. Anything I didn't think of?
 
  I want to add this under security.registerglobals for enable/disable at
  runtime
 
 I don't like the idea at all, to have such information in the manual :-(
 
 Friredhelm

could you elaborate?


[PHP-DOC] cvs: phpdoc /RFC install_PECL.txt

2004-09-09 Thread Gabor Hojtsy
gobaThu Sep  9 14:22:29 2004 EDT

  Removed files:   
/phpdoc/RFC install_PECL.txt 
  Log:
  this was integrated to the XML sources by Philip
  


[PHP-DOC] re: pecl-less docbuilds (was: a different subject :)

2004-09-09 Thread Gabor Hojtsy
In a side note, I remember a discussion about two kinds of manual 
builds. One including PECL extensions docs and one without them.
Was I dreaming or is this really on the TODO list ? (if so, I already 
started cooking a patch that adds a --without-pecldoc to ./configure
and hacks manual.xml on the fly just before starting the build.)
It is a difficult question. We have bundled PECL extensions, and so they 
need to be in the PECL-less manual. Also I doubt there will be a lot of 
people using the PECL-less version, if we do our *navigation* better. 
All that is matter is to let the user get to the information quickly. We 
already have small signs on functions only supported in PHP 5. PECL 
stuff could be similarly marked, so when popping up in search results 
and in overview pages, it is all clear that it is not available by default.

Speaking about PHP users, most of them do use PHP on a shared host, 
where they have no control of the setup. They don't know and they don't 
care where a certain extension comes from. They have a mixed set of 
available-by-default and sysadmin-installed extensions, wheverer they 
came from. Since most probably all of these shared hosts have some kind 
of extension installed from PECL, the extended manual would be desired 
by a lot more users anyway.

Goba


Re: [PHP-DOC] XML Syntax question - optional args

2004-09-09 Thread Gabor Hojtsy
http://livedocs.homelinux.com/en/function.array-uintersect-uassoc.html
The current synopsis is:
array array_uintersect_uassoc(array $array1, array $array2 [, array $ ...,
callback $data_compare_func, callback $key_compare_func])
This is wrong, but I don't think livedocs/dsssl can cope with the middle
params being optional.
It should be:
array array_uintersect_uassoc(array $array1, array $array2 [, array $ ...,
callback $data_compare_func], callback $key_compare_func)
PHP is not supposed to have these kind of optional parameters.
Goba


Re: [PHP-DOC] RFC/xml_validation

2004-09-09 Thread Gabor Hojtsy
Hi,
I've tried to make validation check on my WIN system without
cygwin, jade and nsgmls and found some strange things about PHPDOC
build system. I'll be glad if somebody could read this and answer
my questions. =)
Well, I am trying to decipher what you try to tell us, but sometimes it 
is quite hard...

xmllint needs to be run several times.
(A) The first run should be used to detect wrong entities, without trailing ;
This errors should be fixed on the fly with a php script.
(B) The second run should be used to detect valid missing entities.
(c) The third run should be used to detect valid missing ids.
Multiple runs of xmllint seems to be necessary. As long as wrong entities
(without trailing ;) exists, the error output is not usable to create valid
missing entities. Also is seems there is no way to convince convince xmllint
to report errors for missing entities and missing IDREFS in the same run.
1. Is the problem with missing ; still in place?
Xmllint does the job pretty well, but is it really necessary to
include additional PHP layer for processing xmllint messages? Every
editor's highlightning engine can point out missing ; in xml entity,
so I doubt there are many such errors.
Not everybody is using highlighting editors. Also saying that everyone 
will do just fine is not a good point. We have seen recently that some 
very experienced doc people committed code, which made 'make test' 
shout. The thing that it is possible does not mean it will work out. The 
missing entity and id handling is in place to let the manual build / 
display with livedocs even if there are some small errors. This is not 
to stop the automatic manual generation from updates, especially in 
these times manual updates are only done monthly or so...

Even if we switch to using make test_xml in place of make test, 
there is a chance, that people will not run it. So regardless of the 
fact that it would find the ;-less entities perfectly, it does not help 
in itself.

(B) The second run should be used to detect valid missing entities.
(c) The third run should be used to detect valid missing ids.
2. What is valid missing entity?
3. What is valid missing id?
The (A) point was about finding entities without ';' ending. These 
entitites invalidate the XML document. After the XML document is fixed, 
there only remain valid stuff, and so the valid word in these names. 
They are a bit misleading, sure :)

As I said before, I don't have nsgmls, so my missing-entities.ent
is empty. But validation process goes just fine with
cmd xmllint.exe --noent --noout --valid manual.xml
It might be close to perfect in the English tree, but remember we have a 
lot of translations, some of them having quite inexperienced team members.

except for one thing with Zend API:
element link: validity error : IDREF attribute linkend references an
unknown ID zend
But it can be fixed by replacing link linkend=zend with zend;
entity, which contents will depend on if ZENDAPI is available.
i.e.
 if ZENDAPI
  !ENTITY zend 'link linkend=zendZendAPI/link';
 else
  !ENTITY zend 'ulink
  url=http://www.zend.com/zend/api.php;ZendAPI/ulink';
 endif
Is there only one place linking to the Zend part?
To my point of view there should not be any missing valid entries.
There should not be, but there could be. Like I might add a link with 
url.google;, but I forget to add this to the global entity file. Now I 
will not broke the build with this, but only that single link. If we 
remove the automatic missing entity/id creation, it becomes much easier 
(again) to break the build. This process is used to prevent the readers 
from suffering from errors made by authors/translators.

More probably, that these missing valid will transform into
interfaces for linking external documentation, so php hacks aren't
good.
No these are not always things linking to external docs. Most of the 
time, these are mispelled entity/id names, entity references, for which 
the actual added entities are forgotten, or existing documentation 
becoming broken due to id/entity name changes elsewhere.

Goba


Re: [PHP-DOC] How to document Class Properties

2004-09-09 Thread Christian Stocker

On 9.9.2004 20:21 Uhr, Gabor Hojtsy wrote:
Hi Christian,
The DOM extension has a lot of important class properties (like 
nodeValue, nodeType for getting values, but also similar ones for 
setting values).

Are there any guidelines for how to document them? They are equally 
important to methods, therefore should they get their own page as 
well? (I'd say so)

Are there any other extensions, which document class properties?

Have you been able to get the information you requested?
Nope
I posted that via NNTP and was under the impression, that it never got 
posted and then I forgot about it ;)

But nevertheless I'd be interested in an answer
chregu
Goba
--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60  | fax +41 1 240 56 71
http://www.bitflux.ch  |  [EMAIL PROTECTED]  |  gnupg-keyid 0x5CE1DECB


[PHP-DOC] Re: pecl-less docbuilds

2004-09-09 Thread Mehdi Achour
Agreed, let's make our navigation better :)
If later I want to hide the PECL extensions from *my* livedocs, I'll 
tweak the CSS or whatever ;)

didou
Gabor Hojtsy wrote:
In a side note, I remember a discussion about two kinds of manual 
builds. One including PECL extensions docs and one without them.
Was I dreaming or is this really on the TODO list ? (if so, I already 
started cooking a patch that adds a --without-pecldoc to ./configure
and hacks manual.xml on the fly just before starting the build.)

It is a difficult question. We have bundled PECL extensions, and so 
they need to be in the PECL-less manual. Also I doubt there will be a 
lot of people using the PECL-less version, if we do our *navigation* 
better. All that is matter is to let the user get to the information 
quickly. We already have small signs on functions only supported in 
PHP 5. PECL stuff could be similarly marked, so when popping up in 
search results and in overview pages, it is all clear that it is not 
available by default.

Speaking about PHP users, most of them do use PHP on a shared host, 
where they have no control of the setup. They don't know and they 
don't care where a certain extension comes from. They have a mixed set 
of available-by-default and sysadmin-installed extensions, wheverer 
they came from. Since most probably all of these shared hosts have 
some kind of extension installed from PECL, the extended manual would 
be desired by a lot more users anyway.

Goba


Re: [PHP-DOC] register globals

2004-09-09 Thread Friedhelm Betz
On Thursday 09 September 2004 20:20, messju mohr wrote:
 On Thu, Sep 09, 2004 at 06:19:41PM +0200, Friedhelm Betz wrote:
  On Thursday 09 September 2004 12:59, Aidan Lister wrote:
   http://nopaste.php.cd/28881
  
   How's that for enabling/disabling at runtime. Anything I didn't think
   of?
  
   I want to add this under security.registerglobals for enable/disable at
   runtime
 
  I don't like the idea at all, to have such information in the manual :-(
 
  Friredhelm

 could you elaborate?

It's a nice kind of hack  and I don't think we should provide hacks even if 
they are nice. Not in security, please. imho.

Put it in the FAQ.

To turn it the other way round:
Why do you think this should be in the security chapter of the manual?

Just my 2c ;-)

Friedhelm

-- 
http://www.jungle-world.com/


Re: [PHP-DOC] register globals

2004-09-09 Thread Philip Olson

I want to add this under security.registerglobals for enable/disable at
runtime
  
   I don't like the idea at all, to have such information in the manual :-(
  
   Friredhelm
 
  could you elaborate?
 
 It's a nice kind of hack  and I don't think we should provide hacks even if 
 they are nice. Not in security, please. imho.
 
 Put it in the FAQ.
 
 To turn it the other way round:
 Why do you think this should be in the security chapter of the manual?

So once we come up with a working solution for doing this, it will be
written as a FAQ and security.registerglobals will link to this FAQ.
Sounds like a good idea to me.

Why this information should be there is because it's where people go to
read about register_globals, and where user comments keep on being added
for this topic. No more!

Regards,
Philip


[PHP-DOC] #29029 [Opn]: Object to integer typecast is incorrect

2004-09-09 Thread curt
 ID:   29029
 Updated by:   [EMAIL PROTECTED]
 Reported By:  tomas_matousek at hotmail dot com
 Status:   Open
-Bug Type: Zend Engine 2 problem
+Bug Type: Documentation problem
 Operating System: WinXP
 PHP Version:  5.0.0RC3
 New Comment:

This behaviour is expected, moving over as a documentation problem.

Casting Objects:
  int  - not able to cast
  dobule   - notice thrown, returns 1.0
  null - returns null
  bool - returns 1 
  string   - user __toString() if applicable or 'Object'

ze1_compatibility_mode
casting object
 int/float/bool - 1 or 0 signifying it has properties



Previous Comments:


[2004-07-14 15:45:56] php at hristov dot com

php -r '$a= (float) new stdClass(); var_dump($a);'

gives float(1)



[2004-07-06 14:59:38] tomas_matousek at hotmail dot com

Description:

No description needed.

Reproduce code:
---
var_dump((int) new stdClass());

Expected result:

0

Actual result:
--
object(stdClass)#2 (0) {
}







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