[PHP-DOC] DocBook DTD upgrade

2001-10-21 Thread Hojtsy Gabor

Hi!

Is anybody against upgrading the current DTD to the actual 4.1.2?
I would happyly do the updates the weekend if nobody complains
(sure I would test the whole module before, so it is working with
the new DTD set).

Goba




Re: [PHP-DOC] DocBook DTD upgrade

2001-10-21 Thread Jouni Ahto



On Sun, 21 Oct 2001, Hojtsy Gabor wrote:

 Is anybody against upgrading the current DTD to the actual 4.1.2?
 I would happyly do the updates the weekend if nobody complains
 (sure I would test the whole module before, so it is working with
 the new DTD set).

Please don't do it yet... because our docs do *not* conform to it. There's
going to be a *lot* of errors. (But then, I can always make a
customization... :)

-- Jouni





Re: [PHP-DOC] DocBook DTD upgrade

2001-10-21 Thread Hojtsy Gabor

  Is anybody against upgrading the current DTD to the actual 4.1.2?
  I would happyly do the updates the weekend if nobody complains
  (sure I would test the whole module before, so it is working with
  the new DTD set).

 Please don't do it yet... because our docs do *not* conform to it. There's
 going to be a *lot* of errors. (But then, I can always make a
 customization... :)

I'm just trying it out, and there are a LOT of error, yes. :(((
The first 200 errors, are all about missing replaceable tags.
We use other tags (eg. link), where the DTD nearly only accepts
replaceable now...

Goba




Re: [PHP-DOC] DocBook DTD upgrade

2001-10-21 Thread Hojtsy Gabor

   I'm just trying it out, and there are a LOT of error, yes. :(((
   The first 200 errors, are all about missing replaceable tags.
   We use other tags (eg. link), where the DTD nearly only accepts
   replaceable now...
  
  It seems most of the errors are generated because the changes
  in optional tag's content model. At least the 99% of the first
  200 errors, are about this...
 
 I know. After weeding out all the noise and optionals from an error.log I
 generated, there remained only 20 other errors.

Does that mean this upgrade will be not as hard
as it seems first? I hope so :)

Goba




Re: [PHP-DOC] DocBook DTD upgrade

2001-10-21 Thread Egon Schmid

From: Hojtsy Gabor [EMAIL PROTECTED]

I'm just trying it out, and there are a LOT of error, yes.
:(((
The first 200 errors, are all about missing replaceable
tags.
We use other tags (eg. link), where the DTD nearly only
accepts
replaceable now...
  
   It seems most of the errors are generated because the changes
   in optional tag's content model. At least the 99% of the
first
   200 errors, are about this...
 
  I know. After weeding out all the noise and optionals from an
error.log I
  generated, there remained only 20 other errors.

 Does that mean this upgrade will be not as hard
 as it seems first? I hope so :)

So I guess it is the void / syntax. You can test this with emacs
with C+c C+v.

-Egon

Jouni: can you send me the remaining 20 errors?




Re: [PHP-DOC] RFC

2001-10-21 Thread Jouni Ahto



On Sat, 20 Oct 2001, Jirka Kosek wrote:

 If you want to customize DTD it is always better to create customization
 layer than to directly edit existing DTD. With this approach it is much
 more easy to upgrade to new version DocBook which is used as a base for
 your DTD. The customization DTD might look like:
 
 !-- PHPBook DTD 1.0 (based on DocBook 4.1.2) --
 !ENTITY % docbook PUBLIC '-//OASIS//DTD DocBook XML V4.1.2//EN' 
   '/path/to/local/copy/of/docbookx.dtd'
 %docbook;
 !ELEMENT funcprototype %ho; (funcdef, (void | varargs | (optional |
 paramdef)+))
 !ELEMENT optional %hh; (paramdef+ | %cptr.char.mix;)*
 !ELEMENT parameter %hh; (optional | %smallcptr.char.mix;)*
 
 In PHPBook documents you then would use this DTD instead of standard
 DocBook DTD. 

Thanks. I never understood that it's so easy...

 I think that change to DocBook DTD which you propose would be useful in
 general. I suggest you to post this request as RFE for DocBook DTD at
 the sourceforge pages. DocBook Technical Commitee has meatings each
 month, so they should discuss it quite early. 

Done.

-- Jouni




[PHP-DOC] cvs: phpdoc /howto howto.ent howto.html.tar.gz howto.xml

2001-10-21 Thread Hojtsy Gabor

gobaSun Oct 21 08:26:52 2001 EDT

  Modified files:  
/phpdoc/howto   howto.ent howto.html.tar.gz howto.xml 
  Log:
  Many typo fixes, and corrections. Major ones:
  
   - removing global.ent dependencies, now
 howto is free from any changes in global.ent
  
   - adding README.xsl to tools and generating sections
   
   - adding more information for Windows users
  
   - adding DocBook DTD version notes
  
   - adding CVS add and remove documentation
  
  
  

Index: phpdoc/howto/howto.ent
diff -u phpdoc/howto/howto.ent:1.6 phpdoc/howto/howto.ent:1.7
--- phpdoc/howto/howto.ent:1.6  Sun Sep 30 08:49:38 2001
+++ phpdoc/howto/howto.ent  Sun Oct 21 08:26:51 2001
@@ -13,6 +13,9 @@
 
 !-- General PHP.net links --
 !ENTITY url.php  http://www.php.net/;
+!ENTITY url.php.cvs  http://cvs.php.net;
+!ENTITY url.php.cvsaccount   http://www.php.net/cvs-php.php;
+!ENTITY url.php.anoncvs  http://www.php.net/anoncvs.php;
 !ENTITY url.php.docs http://www.php.net/docs.php;
 !ENTITY url.php.docdownload  http://www.php.net/download-docs.php;
 !ENTITY url.php.manual   http://www.php.net/manual/;
@@ -44,12 +47,16 @@
 !ENTITY url.cvs-winhttp://ftp.cvshome.org/win32/;
 !ENTITY url.cvstut1http://www.arc.unm.edu/~rsahu/cvs.html;
 !ENTITY url.cvstut2
http://cellworks.washington.edu/pub/docs/cvs/tutorial/cvs_tutorial_1.html; 
-!ENTITY url.cvs.phphttp://cvs.php.net;
-!ENTITY url.cvsaccount.php http://www.php.net/cvs-php.php;
 
-!--
-http://www.php.net/anoncvs.php
---
+!-- XSL tools and utils links --
+!ENTITY url.xsl.xt http://www.jclark.com/xml/xt.html;
+!ENTITY url.xsl.saxon  http://saxon.sourceforge.net/;
+!ENTITY url.xsl.xalan  http://xml.apache.org/xalan-j/;
+!ENTITY url.xsl.style  http://www.nwalsh.com/docbook/xsl/index.html;
+!ENTITY url.xsl.passivetex http://users.ox.ac.uk/~rathz/passivetex/;
+!ENTITY url.xsl.fophttp://xml.apache.org/fop/;
+!ENTITY url.xsl.xephttp://www.renderx.com/;
+!ENTITY url.sunjavahttp://java.sun.com/;
 
 !-- For Misc section --
 !ENTITY url.zend.phpfunc http://www.zend.com/phpfunc/;
Index: phpdoc/howto/howto.html.tar.gz
Index: phpdoc/howto/howto.xml
diff -u phpdoc/howto/howto.xml:1.12 phpdoc/howto/howto.xml:1.13
--- phpdoc/howto/howto.xml:1.12 Sun Oct 21 06:05:10 2001
+++ phpdoc/howto/howto.xml  Sun Oct 21 08:26:52 2001
@@ -1,17 +1,15 @@
 ?xml version='1.0' encoding='ISO-8859-1' ?
 !DOCTYPE article PUBLIC -//Norman Walsh//DTD DocBk XML V3.1.7//EN 
../dbxml/docbookx.dtd [
 
-!ENTITY % phpdoc-howto.entities SYSTEM ./howto.ent
-!ENTITY % global.entities SYSTEM ../global.ent
+ !-- We have our own entities, not dependant on phpdoc global.ent --
+ !ENTITY % phpdoc-howto.entities SYSTEM ./howto.ent
+ %phpdoc-howto.entities;
 
-%phpdoc-howto.entities;
-%global.entities;
 ]
 
 !-- TODO
 
   Files to incorporate:
-README.xsl
 README.translations
 make_chm.README
 
@@ -211,7 +209,7 @@
The PHP documentation is written in XML using the link
linkend=docbookDocBook DTD/link. If you would like
to contribute to the PHP documentation work, you need
-   to at least now the very basics of XML and DocBook.
+   to at least know the very basics of XML and DocBook.
   /para
 
   para
@@ -241,7 +239,7 @@
 !-- New Section: Tools Setup - - - - - - - - - - - - - - - - - - - --
   
  sect1 id=tools-setup
-  titleTools and setup instructions/title
+  titleTools and Setup Instructions/title

   para
What tools you need depends on the operating system you use.
@@ -312,9 +310,8 @@
 
para
 You will also need ulink url=url.autoconf;autoconf/ulink to
-build the emphasisphpdoc/emphasis GNU configure script. Many
-distributions come with autoconf already installed. The latest
-copy can be found at:
+build the phpdoc GNU configure script. Many distributions come
+with autoconf already installed. The latest copy can be found at:
 itemizedlist
  listitem
   simparaulink url=url.autoconf.ftp;url.autoconf.ftp;/ulink/simpara
@@ -334,10 +331,10 @@
 /para
 
 para
- These tools are all seperate packages and can be downloaded and
+ These tools are all separate packages and can be downloaded and
  installed directly from the author's websites if you choose to do
  so. You do not have to use these source RPMs, but installing from
- the author's seperate packages is out of the scope of this HOWTO.
+ the author's separate packages is out of the scope of this HOWTO.
 /para
 
 para
@@ -375,8 +372,20 @@
 
 para
  These packages are updated from time to time. Please make sure
- you download the latest version available from the above sites.
+ you download the latest version available from the above sites
+ (the actual file names may change, so if you find newer files
+ than mentioned above, please report, and we can update this list).
 /para
+
+note
+ 

[PHP-DOC] cvs: phpdoc / README.xsl

2001-10-21 Thread Hojtsy Gabor

gobaSun Oct 21 08:27:34 2001 EDT

  Removed files:   
/phpdoc README.xsl 
  Log:
  No need for this file, all the things are in the HOWTO now
  
  





[PHP-DOC] cvs: phpdoc /howto howto-template.sgml

2001-10-21 Thread Hojtsy Gabor

gobaSun Oct 21 10:13:29 2001 EDT

  Removed files:   
/phpdoc/howto   howto-template.sgml 
  Log:
  This file is needed no more
  
  





[PHP-DOC] Bug #13777: Specifying alternate directory for php.ini with PHPRC env. var missing

2001-10-21 Thread mfischer

From: [EMAIL PROTECTED]
Operating system: 
PHP version:  4.0CVS-2001-10-21
PHP Bug Type: Documentation problem
Bug description:  Specifying alternate directory for php.ini with PHPRC env. var 
missing

I couldn't find any reference in the whole php manual that you can specify
an alternate directory containing the PHP.INI file with the PHPRC
environment variable (see php_init_config in main/php_ini.c).

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




[PHP-DOC] Bug #13778: Layout defect...

2001-10-21 Thread bate

From: [EMAIL PROTECTED]
Operating system: 
PHP version:  4.0.6
PHP Bug Type: Documentation problem
Bug description:  Layout defect...

http://www.php.net/manual/de/function.crypt.php
Check this and see self. :)
-- 
Edit bug report at: http://bugs.php.net/?id=13778edit=1




[PHP-DOC] Bug #13778 Updated: Layout defect...

2001-10-21 Thread eschmid

ID: 13778
Updated by: eschmid
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Documentation problem
Operating System: 
PHP Version: 4.0.6
New Comment:

There is no layout defect.

Previous Comments:


[2001-10-21 09:57:32] [EMAIL PROTECTED]

http://www.php.net/manual/de/function.crypt.php
Check this and see self. :)





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




[PHP-DOC] Bug #13778 Updated: Layout defect...

2001-10-21 Thread bate

ID: 13778
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Documentation problem
Operating System: 
PHP Version: 4.0.6
New Comment:

Btw. i can fix this. I have CVS access. But i will first ask here for approval. :)

Previous Comments:


[2001-10-21 10:41:57] [EMAIL PROTECTED]

There is one.
There is no linebreak. Some lines goes long to the right side.





[2001-10-21 10:34:52] [EMAIL PROTECTED]

There is no layout defect.



[2001-10-21 09:57:32] [EMAIL PROTECTED]

http://www.php.net/manual/de/function.crypt.php
Check this and see self. :)





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




[PHP-DOC] Bug #13778 Updated: Layout defect...

2001-10-21 Thread jmoore

ID: 13778
Updated by: jmoore
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Documentation problem
Operating System: 
PHP Version: 4.0.6
New Comment:

I cant see what change to layout.inc.php/shared-manual.inc.php caused this to happen. 
Perhaps Colin could have a look, seems to me the tables arnt quite correct.

- James

Previous Comments:


[2001-10-21 10:44:39] [EMAIL PROTECTED]

Btw. i can fix this. I have CVS access. But i will first ask here for approval. :)



[2001-10-21 10:41:57] [EMAIL PROTECTED]

There is one.
There is no linebreak. Some lines goes long to the right side.





[2001-10-21 10:34:52] [EMAIL PROTECTED]

There is no layout defect.



[2001-10-21 09:57:32] [EMAIL PROTECTED]

http://www.php.net/manual/de/function.crypt.php
Check this and see self. :)





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




[PHP-DOC] Bug #13778 Updated: Layout defect...

2001-10-21 Thread jmoore

ID: 13778
Updated by: jmoore
Reported By: [EMAIL PROTECTED]
Old Status: Closed
Status: Open
Bug Type: Documentation problem
Operating System: 
PHP Version: 4.0.6
New Comment:

This is still an issue.

- James

Previous Comments:


[2001-10-21 11:01:53] [EMAIL PROTECTED]

I cant see what change to layout.inc.php/shared-manual.inc.php caused this to happen. 
Perhaps Colin could have a look, seems to me the tables arnt quite correct.

- James



[2001-10-21 10:44:39] [EMAIL PROTECTED]

Btw. i can fix this. I have CVS access. But i will first ask here for approval. :)



[2001-10-21 10:41:57] [EMAIL PROTECTED]

There is one.
There is no linebreak. Some lines goes long to the right side.





[2001-10-21 10:34:52] [EMAIL PROTECTED]

There is no layout defect.



[2001-10-21 09:57:32] [EMAIL PROTECTED]

http://www.php.net/manual/de/function.crypt.php
Check this and see self. :)





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




[PHP-DOC] Bug #13778 Updated: Layout defect...

2001-10-21 Thread eschmid

ID: 13778
Updated by: eschmid
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Documentation problem
Operating System: 
PHP Version: 4.0.6
New Comment:

There is no layout defect.

Previous Comments:


[2001-10-21 11:02:07] [EMAIL PROTECTED]

This is still an issue.

- James



[2001-10-21 11:01:53] [EMAIL PROTECTED]

I cant see what change to layout.inc.php/shared-manual.inc.php caused this to happen. 
Perhaps Colin could have a look, seems to me the tables arnt quite correct.

- James



[2001-10-21 10:44:39] [EMAIL PROTECTED]

Btw. i can fix this. I have CVS access. But i will first ask here for approval. :)



[2001-10-21 10:41:57] [EMAIL PROTECTED]

There is one.
There is no linebreak. Some lines goes long to the right side.





[2001-10-21 10:34:52] [EMAIL PROTECTED]

There is no layout defect.



The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=13778


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




[PHP-DOC] Bug #13778 Updated: Layout defect...

2001-10-21 Thread goba

ID: 13778
Updated by: goba
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Documentation problem
Operating System: 
PHP Version: 4.0.6
New Comment:

If you view it with Internet Explorer on Windows, you
need to scroll at least 300% of the screen width
to see the right side of the table of user notes. This seems to be abnormal...

Goba

Previous Comments:


[2001-10-21 11:12:25] [EMAIL PROTECTED]

There is no layout defect.



[2001-10-21 11:02:07] [EMAIL PROTECTED]

This is still an issue.

- James



[2001-10-21 11:01:53] [EMAIL PROTECTED]

I cant see what change to layout.inc.php/shared-manual.inc.php caused this to happen. 
Perhaps Colin could have a look, seems to me the tables arnt quite correct.

- James



[2001-10-21 10:44:39] [EMAIL PROTECTED]

Btw. i can fix this. I have CVS access. But i will first ask here for approval. :)



[2001-10-21 10:41:57] [EMAIL PROTECTED]

There is one.
There is no linebreak. Some lines goes long to the right side.





The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/?id=13778


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




[PHP-DOC] Re: [PHP-DEV] Bug #13778 Updated: Layout defect...

2001-10-21 Thread Markus Fischer

This could be easily fixed with using wordwrap(), no?

- Markus

On Sun, Oct 21, 2001 at 03:22:39PM -, [EMAIL PROTECTED] wrote : 
 ID: 13778
 Updated by: eschmid
 Reported By: [EMAIL PROTECTED]
 Status: Closed
 Bug Type: Documentation problem
 Operating System: 
 PHP Version: 4.0.6
 New Comment:
 
 I cannot see any documentation problems. This is caused by the annotations.
 
 The bug system itself have real errors. 
 
 -Egon
 
 Previous Comments:
 
 
 [2001-10-21 11:20:35] [EMAIL PROTECTED]
 
 If you view it with Internet Explorer on Windows, you
 need to scroll at least 300% of the screen width
 to see the right side of the table of user notes. This seems to be abnormal...
 
 Goba
 
 
 
 [2001-10-21 11:12:25] [EMAIL PROTECTED]
 
 There is no layout defect.
 
 
 
 [2001-10-21 11:02:07] [EMAIL PROTECTED]
 
 This is still an issue.
 
 - James
 
 
 
 [2001-10-21 11:01:53] [EMAIL PROTECTED]
 
 I cant see what change to layout.inc.php/shared-manual.inc.php caused this to 
happen. Perhaps Colin could have a look, seems to me the tables arnt quite correct.
 
 - James
 
 
 
 [2001-10-21 10:44:39] [EMAIL PROTECTED]
 
 Btw. i can fix this. I have CVS access. But i will first ask here for approval. :)
 
 
 
 The remainder of the comments for this report are too long. To view
 the rest of the comments, please view the bug report online at
 http://bugs.php.net/?id=13778
 
 
 Edit this bug report at http://bugs.php.net/?id=13778edit=1
 
 
 -- 
 PHP Development Mailing List http://www.php.net/
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Markus Fischer,  http://guru.josefine.at/~mfischer/
EMail: [EMAIL PROTECTED]
PGP Public  Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
PGP Fingerprint: D3B0 DD4F E12B F911 3CE1  C2B5 D674 B445 C227 2BD0
  -All your scripts are belong to Zend-



[PHP-DOC] install.dsl

2001-10-21 Thread Sawomir Pucia

Shouldn't install.dsl be added to .cvsignore?
I don't add it by myself in case I'm wrong :-)

slawek-





[PHP-DOC] cvs: phpdoc / TODO

2001-10-21 Thread Slawomir Pucia

slawek  Sun Oct 21 14:22:29 2001 EDT

  Modified files:  
/phpdoc TODO 
  Log:
  removed notes about safe-mode as it's quite documented now (bug #12011
  closed)
  
  
Index: phpdoc/TODO
diff -u phpdoc/TODO:1.6 phpdoc/TODO:1.7
--- phpdoc/TODO:1.6 Wed Jul 11 14:16:04 2001
+++ phpdoc/TODO Sun Oct 21 14:22:29 2001
@@ -10,7 +10,6 @@
 
 
 BIG JOBS:
-  - Document safe-mode (see http://bugs.php.net/?id=12011)
   - oci8: tfromm (?), [EMAIL PROTECTED]
   - sockets: 'available ;)'
 
@@ -32,8 +31,6 @@
   - Add example to the tip.ob-capture; tip (preferable a link to
 a example)
   - Bug the dev's to rename functions like hw_getobjectbyquerycollobj 
-  - Add section on safemode (what is it for, which funcs disabled,
-why use it, etc.)
   - Document somewhere that you can also use php in shell-scripts?
   - print_r will NOT continue forever anymore on recursive arr's.
   - var_dump also not, but vardump simply quits at a too-high





[PHP-DOC] Bug #13781 Updated: error in the french documentation at getprotobynumber()

2001-10-21 Thread jimw

ID: 13781
Updated by: jimw
Reported By: [EMAIL PROTECTED]
Status: Open
Old Bug Type: Website problem
Bug Type: Documentation problem
Operating System: 
PHP Version: 4.0.6
New Comment:

reclassifying.

Previous Comments:


[2001-10-21 14:09:38] [EMAIL PROTECTED]

Hi,

There is an mistake in the online French documentation at the page : 



http://fr.php.net/manual/fr/function.getprotobynumber.php



It is written :

getprotobynumber() retourne le numéro de protocole associé avec le nom de protocole 
name, comme dans /etc/protocols. 

But it is false... this is the definition of getprotobyname(), in reallity it's that :

getprotobynumber() retourne le nom de protocole associé avec le numéro de protocole 
number, comme dans /etc/protocols.

Bye... and thank you very much... for this excellent documentation...

Christian Wiederseiner
mandraNET 
http://www.mandranet.com





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




[PHP-DOC] cvs: phpdoc /howto generating.xml

2001-10-21 Thread Slawomir Pucia

slawek  Sun Oct 21 17:17:58 2001 EDT

  Modified files:  
/phpdoc/howto   generating.xml 
  Log:
  fixed typo
  
  
Index: phpdoc/howto/generating.xml
diff -u phpdoc/howto/generating.xml:1.1 phpdoc/howto/generating.xml:1.2
--- phpdoc/howto/generating.xml:1.1 Sun Oct 21 10:17:00 2001
+++ phpdoc/howto/generating.xml Sun Oct 21 17:17:57 2001
@@ -190,7 +190,7 @@
Currently using XSL stylesheets to generate output
of XML files is not as well supported as using DSSSL
style sheets. This is because XSL stylesheets are not
-   as customized as DSSL ones, and XSL tools are not as
+   as customized as DSSSL ones, and XSL tools are not as
widely used, and standardized.
   /para
   





[PHP-DOC] cvs: phpdoc /en/language expressions.xml

2001-10-21 Thread Leszek Krupinski

leszek  Sun Oct 21 17:25:46 2001 EDT

  Modified files:  
/phpdoc/en/language expressions.xml 
  Log:
  Typo
  
Index: phpdoc/en/language/expressions.xml
diff -u phpdoc/en/language/expressions.xml:1.14 phpdoc/en/language/expressions.xml:1.15
--- phpdoc/en/language/expressions.xml:1.14 Fri Sep 21 18:47:48 2001
+++ phpdoc/en/language/expressions.xml  Sun Oct 21 17:25:46 2001
@@ -1,5 +1,5 @@
 ?xml encoding=iso-8859-1?
-!-- $Revision: 1.14 $ --
+!-- $Revision: 1.15 $ --
  chapter id=language.expressions
titleExpressions/title
 
@@ -186,7 +186,7 @@
 
 The constants true; and false; (case-insensitive) are the two 
 possible boolean values. When necessary, an expression is 
-autmatically converted to boolean. See the 
+automatically converted to boolean. See the 
 link linkend=language.types.typecastingsection about
 type-casting/link for details about how.
/simpara





[PHP-DOC] Bug #13165 Updated: Definate problem with classes and included files

2001-10-21 Thread sniper

ID: 13165
Updated by: sniper
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Analyzed
Old Bug Type: Class/Object related
Bug Type: Documentation problem
Operating System: RedHat 7.1
PHP Version: 4.0.6
New Comment:

This is not a bug. Classes must be defined in order.
They can be in different order if they are in same file 
though. (Zeev can explain this better :)

Reclassified as documentation problem as this isn't 
explained anywhere.

--Jani


Previous Comments:


[2001-09-11 01:18:21] [EMAIL PROTECTED]

Just wondering if there has been any progress on this report?  Thanks.



[2001-09-06 02:11:38] [EMAIL PROTECTED]

There is *definately* a problem in PHP 4.0.6 with classes, inheritance, and 
included/required files.  Here is an example:

// ==
// test.php:

?php

 include(children.php);

?

// ==

// ==
// children.php

?php

 include_once(parent.php);

 class Child2 extends Child1
 {

 }

 class Child1 extends Parent
 {

 }

?

// ==

// ==
// parent.php

?php

 class Parent
 {

 }

?

// ==

You can try this out for yourself and see what I mean.  If you bring up test.php in 
your browser, you should receive this error:

Fatal error: Class child2: Cannot inherit from undefined class child1

Why does this happen, even though all files are being included correctly?  Well, I 
know one way of preventing the error, and that is by re-ordering the classes in 
children.php so that Child1() is listed first.  This removes the error, **however**, 
if the Parent() class is NOT in a separate file, and is actually part of the same file 
(i.e. children.php), the order of the class definitions does NOT matter.  Why is 
this?





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