[PHP-DOC] Bug #15213 Updated: Problem in the French version of documentation about the function mysql_result

2002-01-24 Thread derick

ID: 15213
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Assigned
Bug Type: Documentation problem
Operating System: NA
PHP Version: 4.1.1
Old Assigned To: 
Assigned To: dams
New Comment:

Assigning to our French/Canadien friend Damien


Previous Comments:


[2002-01-24 17:21:27] [EMAIL PROTECTED]

English DOC :
mysql_result() returns the contents of one cell from a MySQL result
set. The field argument can be the field's offset, or the field's name,
or the field's table dot field name (tablename.fieldname).

French DOC :
mysql_result() retourne le contenu d'un champs dans le résultat MySQL
result_identifier. L'argument row peut-être un offset de champs, ou le
nom d'un champs, ou le nom de la table + point + le nom du champs
("table.champs"). 

In the second sentence "The field argument..." was translated in
"L'argument row..." instead of "L'argument field..."

Thats ALL.





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




[PHP-DOC] Bug #13279 Updated: parse_ini_file causes PHP to exit if ini file syntax is malformed

2002-01-24 Thread derick

ID: 13279
Updated by: derick
Reported By: [EMAIL PROTECTED]
Status: Open
Old Bug Type: PHP options/info functions
Bug Type: Documentation problem
Operating System: Win2k/CGI
PHP Version: 4.0.6
New Comment:

It's not a bug anyways... making it a Documentation problem.


Previous Comments:


[2002-01-24 07:56:19] [EMAIL PROTECTED]

doesn't seem to be os depended, got the same behaviour under linux
2.4.3, php 4.0.6
malformed means for example

[foo]
bar = buz
boz




[2001-09-13 03:42:51] [EMAIL PROTECTED]

parse_ini_file() causes PHP to exit if ini file syntax is malformed.
This can be reproduced by parsing a ini file with the following
content:

; Start broken ini file
a
; End broken ini file

This is not quite a bug - more an expression of the belief that
functions should exit gracefully when possible. :)





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




[PHP-DOC] Bug #15099 Updated: calendar functions introduction

2002-01-24 Thread georg

ID: 15099
Updated by: georg
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Documentation problem
Operating System: not relevant
PHP Version: 4.1.1
Assigned To: georg
New Comment:

fixed in cvs



Previous Comments:


[2002-01-18 08:53:19] [EMAIL PROTECTED]

Hi,

>From the manual
"The calendar functions are only available if you have compiled the
calendar extension, found in either the "dl" or "ext" subdirectories of
your PHP source code. Please see the README file before using it."

There is no README in "dl" or "ext" directory in the current source of
4.1.1. Nor in current cvs of /php4 /php3 
So I assume this README is no longer available? 

Thanks 

Friedhelm Betz





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




[PHP-DOC] cvs: phpdoc /en/functions calendar.xml

2002-01-24 Thread Georg Richter

georg   Fri Jan 25 02:14:04 2002 EDT

  Modified files:  
/phpdoc/en/functionscalendar.xml 
  Log:
  
  fixed bug 15099 - installation instructions
  
  
Index: phpdoc/en/functions/calendar.xml
diff -u phpdoc/en/functions/calendar.xml:1.21 phpdoc/en/functions/calendar.xml:1.22
--- phpdoc/en/functions/calendar.xml:1.21   Mon Jan 14 10:47:58 2002
+++ phpdoc/en/functions/calendar.xmlFri Jan 25 02:14:04 2002
@@ -1,29 +1,32 @@
 
-
+
  
   Calendar functions
   Calendar
-
   
-   
-The calendar functions are only available if you have compiled
-the calendar extension, found in either the "dl" or "ext"
-subdirectories of your PHP source code.
-Please see the README file before using it.
-   
-   
-The calendar extension presents a series of functions to simplify
-converting between different calendar formats.  The intermediary
-or standard it is based on is the Julian Day Count.  The Julian
-Day Count is a count of days starting way earlier than any date
-most people would need to track (somewhere around 4000bc).  To
-convert between calendar systems, you must first convert to Julian
-Day Count, then to the calendar system of your choice.  Julian Day
-Count is very different from the Julian Calendar!  For more
-information on calendar systems visit &url.calendar;.  Excerpts from this
-page are included in these instructions, and are in quotes.
-   
+   
+Introduction
+
+ The calendar extension presents a series of functions to simplify
+ converting between different calendar formats.  The intermediary
+ or standard it is based on is the Julian Day Count.  The Julian
+ Day Count is a count of days starting way earlier than any date
+ most people would need to track (somewhere around 4000bc).  To
+ convert between calendar systems, you must first convert to Julian
+ Day Count, then to the calendar system of your choice.  Julian Day
+ Count is very different from the Julian Calendar!  For more
+ information on calendar systems visit &url.calendar;.  Excerpts from this
+ page are included in these instructions, and are in quotes.
+
+   
+   
+Installation
+
+ To get these functions to work, you have to compile PHP with
+ --enable-calendar.
+
+   
   
 
   





[PHP-DOC] Bug #15099 Updated: calendar functions introduction

2002-01-24 Thread georg

ID: 15099
Updated by: georg
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Documentation problem
Operating System: not relevant
PHP Version: 4.1.1
Old Assigned To: 
Assigned To: georg


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




[PHP-DOC] cvs: phpdoc /he Translators

2002-01-24 Thread shlomi loubaton

shlomi  Thu Jan 24 19:07:05 2002 EDT

  Modified files:  
/phpdoc/he  Translators 
  Log:
  added another translator + update file status
  
Index: phpdoc/he/Translators
diff -u phpdoc/he/Translators:1.10 phpdoc/he/Translators:1.11
--- phpdoc/he/Translators:1.10  Thu Jan 24 14:12:23 2002
+++ phpdoc/he/Translators   Thu Jan 24 19:07:04 2002
@@ -9,6 +9,7 @@
 yuval  Yuval Ofir  [EMAIL PROTECTED]
 yair   Yair[EMAIL PROTECTED]
 idoIdo Diamant [EMAIL PROTECTED]
+-  Gal Talmor  [EMAIL PROTECTED]
 ---
 
 
@@ -191,7 +192,7 @@
 build.xml
 com.xml
 databases.xml
-general.xml
+general.xmlgal talmor  done 1.1
 html.xml
 installation.xml
 languages.xml





[PHP-DOC] cvs: phpdoc /he/faq general.xml

2002-01-24 Thread shlomi loubaton

shlomi  Thu Jan 24 19:00:58 2002 EDT

  Added files: 
/phpdoc/he/faq  general.xml 
  Log:
  initial translation by Gal Talmor
  

Index: phpdoc/he/faq/general.xml
+++ phpdoc/he/faq/general.xml



  îéãò ëììé
  îéãò ëììé

  
   îãåø æä ëåìì àú äùàìåú äëììéåú áéåúø òì PHP:
   îä äéà åîä äéà òåùä.
  

  
   

 îä æä PHP?


 
  îúåê äîáåà ìîãøéê:
 
 
  PHP äéà ùôú úéëðåú îùåáöú áùôú HTML. øåá öåøú äúçáéø
  ùìä îåùàìú îùôåú C, Java å-Perl áúåñôú ëîä îàôééðéí éçåãééí îùìä.
  îèøú äùôä äéà ìàôùø ìîôúçé àúøéí áàéðèøðè ìëúåá òîåãé àéðèøðè
  ãéðîééí áîäéøåú.
 
 
  ä÷ãîä ðçîãä ì-PHP îàú Stig Sæther Bakken ðéúï ìîöåà 
  ëàï áàúø äàéðèøðè 
  ùì Zend.  ëîå-ëï, øåá 
  çåîø äãéåï á-PHP ðéúï áçéðí.
 

   

   

 îä PHP îñîìú?


 
 PHP îñîìú PHP: Hypertext Preprocessor. 
 æä îáìáì äøáä àðùéí îùåí ùäîéìä äøàùåðä ùì äðåèøé÷åï (øàùé úéáåú) 
 äéà äðåèøé÷åï òöîå. öåøä æå ùì ðåèøé÷åï ð÷øàú ðåèøé÷åï ø÷åøñéáé. 
 äñ÷øðéí éëåìéí ìá÷ø á
 îéìåï äî÷ååï ìîçùáéí
 ìîéãò ðåñó òì ðåèøé÷åðéí ø÷åøñéáééí. 
 

   

   

 îä ä÷ùø áéï äâéøñàåú?


 
  PHP/FI 2.0 äéà âéøñä ÷åãîú ùìà ðúîëú ëéåí ùì PHP. PHP 3
  äéà éåøù ùì PHP/FI 2.0 åäéà ìà îîù éãéãåúéú. PHP 4 äéà äãåø
  äàçøåï ùì PHP, ùîùúîùú áîðåò ùì
  Zend.
 

   

   

 äàí ðéúï ìäøéõ ëîä âéøñàåú ùì PHP áòú åáòåðä àçú?


 
   ëï, áãå÷ àú ÷åáõ INSTALL ùðîöà áúåê 
   äôöú äî÷åø ùì PHP 4.  áðåñó, ÷øà àú ä 
   ðñôç.
 

   
  
   

 îä ääáãìéí áéï PHP 3 å-PHP 4?


 
  éùðí ëîä îàîøéí
  ùëúåáéí áðåùà îàú îàú äîçáøéí ùì PHP 4. äðä øùéîä ùì ëîä 
  îäîàôééðéí äçãùéí äçùåáéí éåúø:
  
   
Extended API module
   
   
Generalized build process under UNIX
   
   
Generic web server interface that also supports
multi-threaded web servers
   
   
Improved syntax highlighter
   

Native HTTP session support
   
   
Output buffering support
   
   
More powerful configuration system
   
   
Reference counting
   
  
  àðà ÷øà àú äñ÷éøä - îä çãù á-
  PHP 4 ìäñáø îôåøè éåúø ùì äîàôééðéí äàìå åðåñôéí. 
  àí äðê îòãëï î-PHP 3 ì-PHP 4, ÷øà âí àú ä 
  ðñôç äî÷åùø.
 

   

   

 
  îöàúé áàâ! ìîé òìé ìôðåú?
 


 
  ôðä ìáñéñ äðúåðéí ùì äáàâéí ùì PHP ååãà ùäáàâ òåã ìà éãåò.  
  àí àéðê øåàä àú äáàâ ááñéñ äðúåðéí, äùúîù áèåôñ äãéååç ëãé 
  ìãååç òì äáàâ.  çùåá ìäùúîù ááñéñ äðúåðéí áî÷åí ôùåè ìùìåç 
  ãåàø ìàçú îøùéîåú äãåàø îùåí ùäáàâ é÷áì îñôø îò÷á îå÷öä
  ùòì-éãéå úäéä ìê àôùøåú ìáãå÷ ùåá îàåçø éåúø àú îöá äáàâ.  
  áñéñ äðúåðéí ìáàâéí ðîöà á 
  &faqurl.php.bugs;.
 

   
  
 







[PHP-DOC] Bug #15213: Problem in the French version of documentation about the function mysql_result

2002-01-24 Thread fred

From: [EMAIL PROTECTED]
Operating system: NA
PHP version:  4.1.1
PHP Bug Type: Documentation problem
Bug description:  Problem in the French version of documentation about the function 
mysql_result

English DOC :
mysql_result() returns the contents of one cell from a MySQL result set.
The field argument can be the field's offset, or the field's name, or the
field's table dot field name (tablename.fieldname).

French DOC :
mysql_result() retourne le contenu d'un champs dans le résultat MySQL
result_identifier. L'argument row peut-être un offset de champs, ou le nom
d'un champs, ou le nom de la table + point + le nom du champs
("table.champs"). 

In the second sentence "The field argument..." was translated in
"L'argument row..." instead of "L'argument field..."

Thats ALL.
-- 
Edit bug report at: http://bugs.php.net/?id=15213&edit=1




[PHP-DOC] cvs: phpdoc /he Translators

2002-01-24 Thread shlomi loubaton

shlomi  Thu Jan 24 14:12:23 2002 EDT

  Modified files:  
/phpdoc/he  Translators 
  Log:
  updated files status
  
Index: phpdoc/he/Translators
diff -u phpdoc/he/Translators:1.9 phpdoc/he/Translators:1.10
--- phpdoc/he/Translators:1.9   Tue Jan 22 16:47:48 2002
+++ phpdoc/he/Translators   Thu Jan 24 14:12:23 2002
@@ -6,7 +6,7 @@
 shlomi Shlomi Loubaton [EMAIL PROTECTED]
 -- Lior Hamer  [EMAIL PROTECTED]
 raful  Itai Nathaniel  [EMAIL PROTECTED]
-yuval  Yuval Ofir  [EMAIL PROTECTED]
+yuval  Yuval Ofir  [EMAIL PROTECTED]
 yair   Yair[EMAIL PROTECTED]
 idoIdo Diamant [EMAIL PROTECTED]
 ---
@@ -20,12 +20,12 @@
 
 File list:
 = File === Translators === Status =
-bookinfo.xml   shlomi  done 1.1
+bookinfo.xml   shlomi  done 1.2
 language-defs.ent  shlomi  done 1.1
 language-snippets.ent  shlomi  done 1.1
-preface.xmlshlomi  done 1.1
+preface.xmlshlomi  done 1.3
 - language: ---
-basic-syntax.xml   shlomi  done 1.1
+basic-syntax.xml   shlomi  done 1.2
 constants.xml  liorstarted
 control-structures.xml shlomi  started
 expressions.xml
@@ -43,11 +43,11 @@
 http-auth.xml
 images.xml raful   done 1.1
 persistent-connections.xml
-remote-files.xml
+remote-files.xml   shlomi  done 1.1
 safe-mode.xml
 - chapters: ---
 config.xml
-intro.xml  shlomi  started 1.1
+intro.xml  shlomi  started 1.2
 security.xml
 install.xml
 install.apache.xml |PLEASE DO NOT TRANSLATE ANY OF THESE FILES





[PHP-DOC] cvs: phpdoc /he/features remote-files.xml

2002-01-24 Thread shlomi loubaton

shlomi  Thu Jan 24 14:07:17 2002 EDT

  Added files: 
/phpdoc/he/features remote-files.xml 
  Log:
  initial translation
  

Index: phpdoc/he/features/remote-files.xml
+++ phpdoc/he/features/remote-files.xml


 
  ùéîåù á÷áöéí îøåç÷éí

  
   àí àôùøåú ä"URL fopen wrapper" ôòéìä
   (äéà ôòéìä ëáøéøú îçãì àìà àí öééðú îôåøùåú àú ãâì ä
   --disable-url-fopen-wrapper ìñ÷øéôè ä- configure (òã âøñä 4.0.3)
   àå ù÷áòú àú ôøîèø ä-allow_url_fopen ì-off á÷åáõ php.ini
   (áâøñàåú çãùåú éåúø)), 
   ðéúï ìäùúîù á÷éùåøé HTTP å-FTP ëôøîèø ìøåá äôåð÷öéåú ùî÷áìåú ùí ÷åáõ
   ëôøîèø, ëåìì äô÷åãåú require
   å- include.
  
  
   

 ìà ðéúï ìäùúîù á÷áöéí îøåç÷éí áô÷åãåú require
 å- include úçú îòøëú åéðãåñ.

   
  
  
   ìãåâîä, ðéúï ìäùúîù áúëåðä æå òì-îðú ì÷øåà ÷åáõ îùøú web îøåç÷,
   ìòáã àú úåëðå, ìçôù àú äîéãò äîáå÷ù åìáñåó, ìäùúîù áîéãò æä ìàëñåï
   ááñéñ äðúåðéí àå ôùåè ìäöéâå áöåøä ùúúàéí ìùàø òéöåá äàúø.
  
  
   
éáåà äëåúøú ùì òîåã îøåç÷



   
  
  
   ðéúï âí ìëúåá ì÷áöéí á-FTP ëì òåã äçéáåø ðòùä úåê ùéîåù áùí åñéñîú
   îùúîù áòìé äøùàåú îúàéîåú åáúðàé ùä÷åáõ ìà ÷ééí.
   ëãé ìäúçáø ì FTP áúåø îùúîù ùåðä î-'anonymous', éù ìôøè àú ùí
   äîùúîù (åéúëï ùéãøù âí ôéøåè äñéñîä) á÷éùåø, ëîå ìîùì 
   'ftp://user:[EMAIL PROTECTED]/path/to/file'.
   (ðéúï ìäùúîù áàåúå úçáéø ëàùø áøöåððå ìäúçáø ì÷áöéí ãøê HTTP ëàùø
   ðãøùú àåèðèé÷öéä áñéñéú Basic authentication ).
  
  
   
ëúéáú îéãò ìùøú îøåç÷

  

   
  
  
   

 éúëï ùäãåâîä äæå ðøàéú ëîå éöéøú ÷åáõ log áùøú îøåç÷ àê ëîå ùöåééï
 ÷åãí ìëï, äëúéáä éëåìä ìäúáöò ø÷ àí ä÷åáõ ùàìéå ëåúáéí ìà ÷ééí.
 ëãé ìáöò ôòåìä ãåîä, òééðå á-syslog.
 
   
  

 







Re: [PHP-DOC] PHP manual in an XML format?

2002-01-24 Thread Hartmut Holzgraefe

Egon Schmid wrote:

>>we are talking about eventualy splitting it even more
>>as some of the files are getting big enough so that
>>you get lost when trying to edit them or when you
>>attempt to track the changelog for these,


> Please don´t make such megapatches. If you split the languages into
> different repositories, do it in single steps.

i'm afraid you are mixing up things here
we currently have three different 'split' topics

1) the "installation/configuration" split
2) the "cvs/one repository per language" split
3) the "function level/translation granularity" split

we've already done part of 1), although it is not perfect yet
but no big patches will result from the work left to do

2) will require some preparation on the server side,
but for the clients it will be rather easy

if you are lazy you can just update your cvs after the split
is done and all translations will be gone, if you need one
or more of them you can do a fresh checkout of these from
within the phpdoc dir

if you do not want to waste time and bandwidth you can apply
a small shell script that will rewrite the Repository files
in all the translations CVS subdirs to reflect the changed
file positions on the server
if we just create new repositories on the server and move
the CVS *.xml,v files to these new directories we will have
exactly the same version numbers, file contents and history
entries as before, so that a cvs update done immediately
after the switch and after the rewriting shell script has
been properly applied will not transfer any data at all
as the same changes have been applied on client and server
side
we can even provide a tar.gz or zip file containing the
new Repository files for those platforms where no shell
exists or for those who do not trust it

3) will cause a lot of changes to the repository. if i get my
current plan to work it will even completely get rid of the
'functions' subdir and will replace it with a 'reference'
subdir that will itself contain one subdir per extension/reference
chapter.
but this is all still experimental, i'll publish a conversion
script as soon as i get the complete split conversion working
without human intervention so that we have some fakts to
discuss about before i even think about how the final solution
might look like
it might even be that someone comes up with a clever solution
to solve the problem on the xml level and not on the file level

anyhow, no patch will be done in this direction until it is
very clear that the concept really works and is scalable

but *if* a change requires a patch, no matter if it is a big
or small one, it should be done in *one* step and not in a
series of smaller ones just to save the bandwidth as it is
rather hard to split a change into several pieces


-- 
Hartmut Holzgraefe  [EMAIL PROTECTED]  http://www.six.de  +49-711-99091-77






Re: [PHP-DOC] PHP manual in an XML format?

2002-01-24 Thread Egon Schmid

From: "Hartmut Holzgraefe" <[EMAIL PROTECTED]>

> > I wonder where you can find the PHP manual in one single XML
file?
> >
> > Anyone who wants to enlight me on this one? =)
>
> we are talking about eventualy splitting it even more
> as some of the files are getting big enough so that
> you get lost when trying to edit them or when you
> attempt to track the changelog for these,
> and you want all the 5+MB in a single file?
>
> why?

Please don´t make such megapatches. If you split the languages into
different repositories, do it in single steps.

-Egon




[PHP-DOC] Bug #15166 Updated: preg_replace issue when \\1 is followed by 1

2002-01-24 Thread derick

ID: 15166
Updated by: derick
Old Summary: preg_replace issue when \\1 is followed by 1
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Documentation problem
Operating System: WINDOWS 2000
PHP Version: 4.1.1
New Comment:

'{$1}' or "{\$1}"


Previous Comments:


[2002-01-24 11:27:17] [EMAIL PROTECTED]

I tried the syntax {$1} with PHP 4.1.1 as below:
1/
$test=preg_replace("/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i","{$1}$servname:$servport",$test);


It gives me the following error:
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
C:\inetpub\wwwroot\bug2.php on line 33

2/ Escaping the first brace:
$test=preg_replace("/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i","\{$1}$servname:$servport",$test);


The result is the following one:
test2 RESULT  :{http://}10.0.9.91:81/Gui/dtd/deployment/dbmap.dtd";>
It is escaping properly the 1 contained in $servername but keep the
braces.

3/ The only way I found to escape $servername is by using the value 99
as follow:
$test=preg_replace("/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i","\\1\\99$servname:$servport",$test);

991 is not taken because of the limitation to 99 different strings. I
just need to make sure I am not using 99 different parentheses which is
pretty huge.




[2002-01-22 17:26:53] [EMAIL PROTECTED]

You'd either need to escape the number after your reference, ie: \\1\1
or if you're using PHP 4.0.4 or later, you can use {$1} in the
replacement portion of preg_replace (see documentation).



[2002-01-22 15:00:59] [EMAIL PROTECTED]

What do you think about the following suggestions:

A/ Counting how many string are enclosed by parentheses.
preg_replace("/(..)test()/","\\110.0.0.173",$test);
=> expecting 2 strings enclosed
Then parse the value following \\ and keep only the one lower than the
max expected.
Expecting 2:
\\1 OK
\\11 TOO high, keep \\1

I do not know what the impact might be in term of performance.
=> Implementing a way to escape might be faster.

B/ Using a different notation to escape the string following \\1 (brace
for example)
preg_replace("/(..)test()/","\\{1}10.0.0.173",$test);

Thanks for your prompt answer, that was quick :-)



[2002-01-22 14:44:12] [EMAIL PROTECTED]

\\11 matches the 11th string enclosed by parenthesis.
Can't find anything about escaping it. Reclassified as a documentation
problem.



[2002-01-22 11:47:39] [EMAIL PROTECTED]

1/DETAIL:
When I am using preg_replace with \\1 to keep the first iteration
retrieved, if \\1 is followed by a string starting by 1, this is
removing the 1 of the string and losing the content of \\1.

Here is a script to show 4 test cases. The test2 and test4 failed
because of this issue. 

The test3 is the solution i found to avoid this issue by inserting any
character different from 1 just after \\1.

Thanks in advance for your help.
Pierre

http://localhost/Gui/dtd/deployment/dbmap.dtd";>';
$servname='10.0.9.91';
$servport='81';

// TITLE
print "\n";
print("BUG with preg_replace and 1 followed by a variable starting by
1\n");
print(" WINDOWS 2000 platform, PHP version 4.1.1\n");
print("ORIGINAL VALUE:".$value."\n");
print "\n";

// TEST 1 with servname='localhost';
$testservname='localhost';
$test=$value;
$expected='';
$test=preg_replace("/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i","\\1$testservname:$servport",$test);

$status ='OK';
if ($test != $expected) $status='WRONG';

print "\n";
print_r("test1 SERVER NAME:$testservnameSERVER PORT:$servport\n");
print_r("test1 OPERATION:
\$test=preg_replace(\"/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i\",\"1\$testservname:\$servport\",\$test);"."\n");

print_r("test1 RESULT  :".$test."\n");
print_r("test1 EXPECTED:".$expected."\n");
print "\n";
print("test1 STATUS  :".$status."\n");

//TEST 2 with servname = '10.0.9.91';
$test=$value;
$testservname=$servname;
$expected='';
$test=preg_replace("/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i","\\1$servname:$servport",$test);

$status ='OK';
if ($test != $expected) $status='WRONG';

print "\n";
print_r("test2 SERVER NAME:$testservnameSERVER PORT:$servport\n");
print_r("test2 OPERATION:
\$test=preg_replace(\"/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i\",\"1\$testservname:\$servport\",\$test);"."\n");

print_r("test2 RESULT  :".$test."\n");
print_r("test2 EXPECTED:".$expected."\n");
print"\n";
print("test2 STATUS  :".$status."\n");


// TEST3
$test=$value;
$testservname=$servname;
$expected='';
$test=preg_replace("/(<\!DOCTYPE\s+map\s+SYSTEM\s+\")http:\/\/[

[PHP-DOC] Bug #15166 Updated: preg_replace issue when \\1 is followed by 1

2002-01-24 Thread ppechoux

ID: 15166
User updated by: [EMAIL PROTECTED]
Old Summary: preg_replace issue when \\1 is followed by 1
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Documentation problem
Operating System: WINDOWS 2000
PHP Version: 4.1.1
New Comment:

I tried the syntax {$1} with PHP 4.1.1 as below:
1/
$test=preg_replace("/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i","{$1}$servname:$servport",$test);


It gives me the following error:
Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
C:\inetpub\wwwroot\bug2.php on line 33

2/ Escaping the first brace:
$test=preg_replace("/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i","\{$1}$servname:$servport",$test);


The result is the following one:
test2 RESULT  :{http://}10.0.9.91:81/Gui/dtd/deployment/dbmap.dtd";>
It is escaping properly the 1 contained in $servername but keep the
braces.

3/ The only way I found to escape $servername is by using the value 99
as follow:
$test=preg_replace("/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i","\\1\\99$servname:$servport",$test);

991 is not taken because of the limitation to 99 different strings. I
just need to make sure I am not using 99 different parentheses which is
pretty huge.



Previous Comments:


[2002-01-22 17:26:53] [EMAIL PROTECTED]

You'd either need to escape the number after your reference, ie: \\1\1
or if you're using PHP 4.0.4 or later, you can use {$1} in the
replacement portion of preg_replace (see documentation).



[2002-01-22 15:00:59] [EMAIL PROTECTED]

What do you think about the following suggestions:

A/ Counting how many string are enclosed by parentheses.
preg_replace("/(..)test()/","\\110.0.0.173",$test);
=> expecting 2 strings enclosed
Then parse the value following \\ and keep only the one lower than the
max expected.
Expecting 2:
\\1 OK
\\11 TOO high, keep \\1

I do not know what the impact might be in term of performance.
=> Implementing a way to escape might be faster.

B/ Using a different notation to escape the string following \\1 (brace
for example)
preg_replace("/(..)test()/","\\{1}10.0.0.173",$test);

Thanks for your prompt answer, that was quick :-)



[2002-01-22 14:44:12] [EMAIL PROTECTED]

\\11 matches the 11th string enclosed by parenthesis.
Can't find anything about escaping it. Reclassified as a documentation
problem.



[2002-01-22 11:47:39] [EMAIL PROTECTED]

1/DETAIL:
When I am using preg_replace with \\1 to keep the first iteration
retrieved, if \\1 is followed by a string starting by 1, this is
removing the 1 of the string and losing the content of \\1.

Here is a script to show 4 test cases. The test2 and test4 failed
because of this issue. 

The test3 is the solution i found to avoid this issue by inserting any
character different from 1 just after \\1.

Thanks in advance for your help.
Pierre

http://localhost/Gui/dtd/deployment/dbmap.dtd";>';
$servname='10.0.9.91';
$servport='81';

// TITLE
print "\n";
print("BUG with preg_replace and 1 followed by a variable starting by
1\n");
print(" WINDOWS 2000 platform, PHP version 4.1.1\n");
print("ORIGINAL VALUE:".$value."\n");
print "\n";

// TEST 1 with servname='localhost';
$testservname='localhost';
$test=$value;
$expected='';
$test=preg_replace("/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i","\\1$testservname:$servport",$test);

$status ='OK';
if ($test != $expected) $status='WRONG';

print "\n";
print_r("test1 SERVER NAME:$testservnameSERVER PORT:$servport\n");
print_r("test1 OPERATION:
\$test=preg_replace(\"/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i\",\"1\$testservname:\$servport\",\$test);"."\n");

print_r("test1 RESULT  :".$test."\n");
print_r("test1 EXPECTED:".$expected."\n");
print "\n";
print("test1 STATUS  :".$status."\n");

//TEST 2 with servname = '10.0.9.91';
$test=$value;
$testservname=$servname;
$expected='';
$test=preg_replace("/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i","\\1$servname:$servport",$test);

$status ='OK';
if ($test != $expected) $status='WRONG';

print "\n";
print_r("test2 SERVER NAME:$testservnameSERVER PORT:$servport\n");
print_r("test2 OPERATION:
\$test=preg_replace(\"/(<\!DOCTYPE\s+map\s+SYSTEM\s+\"http:\/\/)[^\/]+/i\",\"1\$testservname:\$servport\",\$test);"."\n");

print_r("test2 RESULT  :".$test."\n");
print_r("test2 EXPECTED:".$expected."\n");
print"\n";
print("test2 STATUS  :".$status."\n");


// TEST3
$test=$value;
$testservname=$servname;
$expected='';
$test=preg_replace("/(<\!DOCTYPE\s+map\s+SYSTEM\s+\")http:\/\/[^\/]+/i","\\1http://$servname:$servport",$test);

$status ='OK';
if ($test != $expected) $status='WRONG';

print "

Re: [PHP-DOC] PHP manual in an XML format?

2002-01-24 Thread Hartmut Holzgraefe

Fredrik wrote:

> I wonder where you can find the PHP manual in one single XML file?
> 
> Anyone who wants to enlight me on this one? =)

we are talking about eventualy splitting it even more
as some of the files are getting big enough so that
you get lost when trying to edit them or when you
attempt to track the changelog for these,
and you want all the 5+MB in a single file?

why?

besides that you can always use a simple copying stylesheet with
xslt, that should give you a single file although i do not know
how to control which entites to resolve and which to copy verbatim

so if you need a single file as your processing tools can't handle
includes via SYSTEM entities then this is the way to go, although
i'd suggest to switch to other tools as anything that doesn't
support includes will most likely also have other weaknesses

but if you want to edit the xml then you should definetly work on
the files 'as is' as their is no way to merge back your changes
as soon as you've merged the files into a single one

-- 
Hartmut Holzgraefe  [EMAIL PROTECTED]  http://www.six.de  +49-711-99091-77






[PHP-DOC] cvs: phpdoc /it/functions network.xml

2002-01-24 Thread Simone Cortesi

cortesi Thu Jan 24 10:36:13 2002 EDT

  Modified files:  
/phpdoc/it/functionsnetwork.xml 
  Log:
  committing not yet finished translation
  translator has given up the work
  I will take care of the remaining translation
  next week due to DocBook changes planned for the WE
  
  

Index: phpdoc/it/functions/network.xml
diff -u /dev/null phpdoc/it/functions/network.xml:1.10
--- /dev/null   Thu Jan 24 10:36:13 2002
+++ phpdoc/it/functions/network.xml Thu Jan 24 10:36:12 2002
@@ -0,0 +1,1033 @@
+
+
+
+ 
+  Funzioni di rete
+  Rete
+
+  
+   
+checkdnsrr
+
+ Controlla i record DNS relativi ad un host Internet o
+ indirizzo IP 
+
+   
+   
+Descrizione
+
+ 
+  int checkdnsrr
+  string host
+  string 
+   type
+  
+ 
+
+
+ Cerca i record DNS del tipo type
+ corrispondenti a host. Restituisce vero se
+ dei records sono trovati; falso se nessun record viene trovato
+ o in caso di errore.
+
+
+ type può essere uno dei seguenti: A, MX, 
+ NS, SOA, PTR, CNAME, oppure ANY.  Il default è MX.
+
+
+ Host può essere sia l'indirizzo IP in
+ notazione decimale o il nome dell'host.
+
+¬e.no-windows;
+
+ Vedere anche getmxrr,
+ gethostbyaddr,
+ gethostbyname,
+ gethostbynamel e la man page 
+ named(8).
+
+   
+  
+
+  
+   
+closelog
+Chiude la connessione al logger di sistema 
+   
+   
+Descrizione
+
+ 
+  int closelog
+  
+ 
+
+
+ closelog chiude il descrittore usato
+ per scrivere al logger di sistema.  L'uso di
+ closelog è facoltativo.
+
+
+ Vedere anche define_syslog_variables,
+ syslog e
+ openlog.
+
+   
+  
+
+  
+   
+debugger_off
+Disattiva il debugger interno PHP
+   
+   
+Descrizione
+
+ 
+  int debugger_off
+  
+ 
+
+
+ Disattiva il debugger interno PHP.  Il debugger è ancora in fase di
+ sviluppo.
+
+   
+  
+
+  
+   
+debugger_on
+Attiva il debugger interno PHP
+   
+   
+Descrizione
+
+ 
+  int debugger_on
+  string address
+ 
+
+
+ Attiva il debugger interno PHP, connecting it to
+ address.  The debugger is still under
+ development.
+
+   
+  
+
+  
+   
+define_syslog_variables
+Initializes all syslog related constants
+   
+   
+Descrizione
+
+ 
+  void define_syslog_variables
+  
+ 
+
+
+ Initializes all constants used in the syslog functions.
+
+
+ Vedere anche openlog,
+ syslog and
+ closelog.
+
+   
+  
+
+
+  
+   
+fsockopen
+
+ Open Internet or Unix domain socket connection
+ 
+   
+   
+Descrizione
+
+ 
+  int fsockopen
+  
+string udp://hostname
+  
+  int port
+  int 
+   errno
+  
+  string 
+   errstr
+  
+  float
+   timeout
+  
+ 
+
+
+ Initiates a stream connection in the Internet (AF_INET, using TCP
+ or UDP) or Unix (AF_UNIX) domain. For the Internet domain, it
+ will open a TCP socket connection to
+ hostname on port
+ port.  hostname may
+ in this case be either a fully qualified domain name or an IP
+ address. For UDP connections, you need to explicitly specify the
+ protocol: udp://hostname.  For the Unix
+ domain, hostname will be used as the path
+ to the socket, port must be set to 0 in
+ this case.  The optional timeout can be
+ used to set a timeout in seconds for the connect system call.
+
+
+ fsockopen returns a file pointer which may
+ be used together with the other file functions (such as
+ fgets, fgetss,
+ fputs, fclose, and
+ feof).
+
+
+ If the call fails, it will return &false; and if the optional
+ errno and errstr
+ arguments are present they will be set to indicate the actual
+ system level error that occurred on the system-level
+ connect() call. If the returned errno is 0 and
+ the function returned &false;, it is an indication that the error
+ occurred before the connect() call. This is
+ most likely due to a problem initializing the socket. Note that
+ the errno and
+ errstr arguments must be passed by
+ reference.
+
+
+ Depending on the environment, the Unix domain or the optional
+ connect timeout may not be available.
+
+
+ The socket will by default be opened in blocking mode.  You can
+ switch it to non-blocking mode by using
+ socket_set_blocking.
+ 
+  fsockopen Example
+  
+$fp = fsockopen ("www.php.net", 80, $errno, $errstr, 30);
+if (!$fp) {
+echo "$errstr ($errno)
\n"; +} else { +fputs ($fp, "GET / HTTP/1.0\r\n\r\n"); +while (!feof($fp)) { +echo fgets ($fp,128); +} +fclose ($fp); +} + + + The example bel

[PHP-DOC] Bug #10862 Updated: Filenames too long in downloadable manual

2002-01-24 Thread markonen

ID: 10862
Updated by: markonen
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: Documentation problem
Operating System: MacOS 9.1
PHP Version: 4.0.5
New Comment:

No objections received, so I'm closing.


Previous Comments:


[2002-01-20 18:18:31] [EMAIL PROTECTED]

I don't think this is worth really worth fixing.

Mac OS X supports long file names, and I'd expect current 
PHP users to upgrade. If you're keeping current with PHP, 
why not your OS?

The easiest workaround for Mac OS 9.1 is to create an 
Internet Explorer "Web Archive" from the online manual by 
going to File -> Save As. The Web Archive keeps the whole 
help file hierachy in a single file and allows for easy and 
fast offline browsing.



[2001-10-02 04:31:41] [EMAIL PROTECTED]

Reopened.



[2001-08-07 13:36:06] [EMAIL PROTECTED]

Could you provide a list of DSSSL or XSL stylesheets tailored for Macs?
These would be neede to generate appropriately named files for that OS
from the original DocBook XML source of the manual.

Without such stylesheets, I would recommend using the one-file big HTML
version (or the PDF version if available) of the manual.



[2001-05-14 18:41:54] [EMAIL PROTECTED]

The downloadable manual with multiple files contains many files that
are greater than 32 characters which means it is unusable for Mac
users. It would be helpful if the names were shortened appropriately- I
know I'm not the only Mac user of PHP out there.

Additionally, this bug report form should redisplay the form with all
the fields filled in when there is an error. I forgot to fill out my
email address and when I clicked back after I saw the error, all my
filled out fields were gone.






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




[PHP-DOC] PHP manual in an XML format?

2002-01-24 Thread Fredrik



Hey there! 
 
I wonder where you can find the PHP manual in one 
single XML file?
Anyone who wants to enlight me on this one? 
=)
 
Regards 
Fredrik Johansson


Re: [PHP-DOC] Re: XSLT manual build with gnome libxslt / xsltproc

2002-01-24 Thread Sebastian Bergmann

Hartmut Holzgraefe wrote:
> but the FO now generated is still not processed by FOP:

  Yes, this is a bug inthe current fop. You need to transform the xsl-fo
  file with the fop-patch xsl stylesheet from the DocBook XSL distro.

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

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



[PHP-DOC] cvs: phpdoc /en/functions pgsql.xml

2002-01-24 Thread Yasuo Ohgaki

yohgaki Thu Jan 24 05:02:52 2002 EDT

  Modified files:  
/phpdoc/en/functionspgsql.xml 
  Log:
  Fixed description. connection string is recommended parameter for pg_connect/
  pg_pconnect. To make a new connection, using a slightly different connection
  string is enough with connection string.
  
  
Index: phpdoc/en/functions/pgsql.xml
diff -u phpdoc/en/functions/pgsql.xml:1.66 phpdoc/en/functions/pgsql.xml:1.67
--- phpdoc/en/functions/pgsql.xml:1.66  Sun Jan 20 04:03:41 2002
+++ phpdoc/en/functions/pgsql.xml   Thu Jan 24 05:02:51 2002
@@ -1,5 +1,5 @@
 
-
+
  
   PostgreSQL functions
   PostgreSQL
@@ -336,7 +336,7 @@
  new connection will be established, but instead, the connection
  resource of the already opened connection will be returned. You
  can have multiple connections to the same database if you use
- different connection parameters. (i.e. Use different username)
+ different connection string.
 
 
  Syntax supports multiple parameters:
@@ -1530,7 +1530,7 @@
  password.
 
  
- Using pg_connect
+ Using pg_pconnect
  
 

Re: [PHP-DOC] Re: XSLT manual build with gnome libxslt / xsltproc

2002-01-24 Thread Hartmut Holzgraefe

Sebastian Bergmann wrote:

> Hartmut Holzgraefe wrote:
> 
>>docbook-xsl-stylesheets-1.42 (SuSE rpm)
>>
> 
>   Aren't they quite old? 1.48 is the current version.

yes, indeed, 1.48 solved the problem with xsltproc
and a problem with duplicate ids when generating FO
(and just in case i didn't mention it before:
  the gnome xslt stuff is about twice as fast as jade on
  the mulitpage manual and almost as fast as saxon on
  the bightml)

but the FO now generated is still not processed by FOP:

   > fop.sh manual.fo -pdf manual.pdf
   FOP 0.20.1
   using SAX parser org.apache.xerces.parsers.SAXParser
   building formatting object tree
   setting up fonts
   WARNING: property 'master-reference' ignored
   WARNING: property 'master-reference' ignored
   WARNING: property 'master-reference' ignored
   WARNING: property 'master-reference' ignored
   WARNING: property 'master-reference' ignored
   WARNING: property 'master-reference' ignored
   WARNING: property 'master-reference' ignored
   WARNING: property 'master-reference' ignored
   WARNING: property 'master-reference' ignored
   WARNING: property 'master-reference' ignored
   WARNING: property 'master-reference' ignored
   ERROR: 'master-name' for 'fo:page-sequence'
 matches no 'simple-page-master' or 'page-sequence-master'

same messages for

   > fop.sh -xml manual.xml -xsl xsl/print.xsl -pdf manual.xml




-- 
Hartmut Holzgraefe  [EMAIL PROTECTED]  http://www.six.de  +49-711-99091-77