[PHP-DOC] cvs: phpdoc /entities global.ent
philip Fri Feb 7 04:08:33 2003 EDT Modified files: /phpdoc/entitiesglobal.ent Log: Adding an asp translator to the faq Index: phpdoc/entities/global.ent diff -u phpdoc/entities/global.ent:1.78 phpdoc/entities/global.ent:1.79 --- phpdoc/entities/global.ent:1.78 Tue Feb 4 03:50:27 2003 +++ phpdoc/entities/global.ent Fri Feb 7 04:08:33 2003 @@ -1,6 +1,6 @@ !-- -*- SGML -*- - $Id: global.ent,v 1.78 2003/02/04 08:50:27 betz Exp $ + $Id: global.ent,v 1.79 2003/02/07 09:08:33 philip Exp $ Contains global macros for all the XML documents. @@ -20,6 +20,7 @@ !ENTITY url.asciitable http://www.asciitable.com; !ENTITY url.aspell http://aspell.sourceforge.net/; !ENTITY url.asp2php http://asp2php.naken.cc/; +!ENTITY url.asptranslator http://www.design215.com/toolbox/translator/; !ENTITY url.bcmath http://www.php.net/extra/number4.tar.gz; !ENTITY url.browscap.download http://www.garykeith.com/browsers/downloads.asp; !ENTITY url.bzip2 http://sources.redhat.com/bzip2/; -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/faq languages.xml
philip Fri Feb 7 04:16:18 2003 EDT Modified files: /phpdoc/en/faq languages.xml Log: Adding another asp translator to the faq. Index: phpdoc/en/faq/languages.xml diff -u phpdoc/en/faq/languages.xml:1.10 phpdoc/en/faq/languages.xml:1.11 --- phpdoc/en/faq/languages.xml:1.10Tue Feb 4 04:38:22 2003 +++ phpdoc/en/faq/languages.xml Fri Feb 7 04:16:18 2003 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.10 $ -- +!-- $Revision: 1.11 $ -- chapter id=faq.languages titlePHP and other languages/title titleabbrevPHP and other languages/titleabbrev @@ -47,8 +47,9 @@ /question answer para - Yes, ulink url=url.asp2php;asp2php/ulink is - the one most often referred to. + Yes, the server-side ulink url=url.asp2php;asp2php/ulink + is the one most often referred to as well as ulink + url=url.asptranslator;this client-side/ulink option. /para /answer /qandaentry -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] Someone that can help w/ our XSLT stylesheets
Gabor Hojtsy wrote: Well, logically yes, but it does not seem to work the right way... This now does work the same way as without the limiting parameter, without no change if I change the limiting parameter... I have done some investigations. It works on part and chapter level, but not on section level -- there is no ToC at all. You must also set following parameter if you want ToCs in sections: xsl:param name=generate.section.toc.level select=3/ This way ToCs will apear on all levels up to sect3. Dept on ToC will be always equal or less than: xsl:param name=toc.max.depth select=2/ I will submit this change to stanadard XSLT stylesheets today. You can grab fresh version from CVS or wait till next release. Jirka -- - Jirka Kosek e-mail: [EMAIL PROTECTED] http://www.kosek.cz -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] Someone that can help w/ our XSLT stylesheets
Well, logically yes, but it does not seem to work the right way... This now does work the same way as without the limiting parameter, without no change if I change the limiting parameter... I have done some investigations. It works on part and chapter level, but not on section level -- there is no ToC at all. You must also set following parameter if you want ToCs in sections: xsl:param name=generate.section.toc.level select=3/ This way ToCs will apear on all levels up to sect3. Dept on ToC will be always equal or less than: xsl:param name=toc.max.depth select=2/ Well, I actually cannot see why this change solves the problem of having the same infinity deep ToCs on all leveles (which I had produced with your last patch), but we may also have bugs in our own customizations, and have an old XSL distribution used (so our customizations are ensured to be compatible). I will submit this change to stanadard XSLT stylesheets today. You can grab fresh version from CVS or wait till next release. When is that next release is estimated? BTW thanks for your help :) Goba -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] xmllint
playing with xmllint from libxml2: xmllint --noent --valid --noout [--timing] manual.xml error 21 solves trailing ; problem for entities, which jade isn't capable of. Maybe this could go into make test, but needs a little bit more research;-) Despite the offical make test, for now its usefull to invoke this cmdline in addition to make test. What we need to go into if we would like to replace jade tools is to find a way of generating the missing-entities and missing-ids files. Missing entities and IDs are listed by nsgmls, and so nsgmls is used in the configure process to create the files for those. If we can find a way to do the same with xmllint, then there would be no problem with switching over to xmllint instead of nsgmls, which I would be very happy to see ;) A bit more testing and the results: The errors thrown by xmllint are a bit ehm weird;-), because of double entries in file-entities.ent and chapters.install; . But I might be wrong ;-) The errors shown by xmllint from chapters/install, run with-lang-de, are just misleading. A short cut from the output: manual.xml:4: validity error: ID installation already defined chapter id=installation ^ manual.xml:7: validity error: ID install.downloading already defined sect1 id=install.downloading ^ manual.xml:18: validity error: ID install.unix already defined sect1 id=install.unix ^ and so on. But later on xlstproc doesn't complain about these already defined entities. With lang=en the results are fine. A possible way to go: multiple runs of xmllint during the configure process and catching the output with a php-skript. (A) entities/missing-* must not exist during the first run of xmllint, because the results could not trusted (--noent does replace entities) (B) the first run of xmllint could be used to correct entities without the trailing ; on the fly and to create a valid entities/missing-entities.ent (c) the second run of xmllint could be used to create a valid entities/missing-ids.xml (B) and (C) seems to be mandatory, because I found no way to convince xmllint to report errors for missing entities and missing IDREFS in the same run. After all entities are valid, xmllint reports errors about ID(IDREFS. The quick (temporary) way could be: let existing php-scripts, based on nsgmls, do the job to create entities/missing-* files, no need to touch the scripts. invoke xmllint at the end of configure to catch entities without trailing ; and correct them with a php-script in the lang-dir, or write the output to a file for manual correction, maybe entities/wrong-entities? This might be not the ideal solution, but it ensures that all entities are valid, xlstproc will run, without complaining about missing trailling ; and a _very_ little step towards XSLT processing. If we want to produce the manual with xsltproc , we must find a general solution to treat the trailling ; problem ;-) Maybe my little playing with xmllint and the described results and possible solutions suggested could be a starting point. Or are there any options for xmllint/xsltproc like --noent to disable entity problems, and replace them with something, or disable ID problems, and simply disregard the ID references in transformation time? AFAIK no . Friedhelm p.s: testings done with libxml version 20502 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] xmllint
If we want to produce the manual with xsltproc , we must find a general solution to treat the trailling ; problem ;-) Maybe my little playing with xmllint and the described results and possible solutions suggested could be a starting point. Yep. Your suggestions seem doable, but unfortunately I cannot donate too much time to this in the short term. So can you please put this up as an RFC, so we won't forget about it ;) Thanks, Goba -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] Someone that can help w/ our XSLT stylesheets
Gabor Hojtsy wrote: Well, I actually cannot see why this change solves the problem of having the same infinity deep ToCs on all leveles (which I had produced with your last patch), but we may also have bugs in our own customizations, and have an old XSL distribution used (so our customizations are ensured to be compatible). Maybe, you are using too old XSL stylesheets. I will submit this change to stanadard XSLT stylesheets today. You can grab fresh version from CVS or wait till next release. When is that next release is estimated? Hardly to say. Norm is currently on vacation, and it depends on a number of new things added to stylesheets, but maybe before the end of February. If you don't want to wait, you can grab latest release, and just replace file html/autotoc.xsl with version from CVS and add following line to html/params.xsl xsl:param name=toc.max.depth select=8/ -- - Jirka Kosek e-mail: [EMAIL PROTECTED] http://www.kosek.cz -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/array/functions array-unique.xml
damsFri Feb 7 10:06:20 2003 EDT Modified files: /phpdoc/en/reference/array/functionsarray-unique.xml Log: Too much french there Index: phpdoc/en/reference/array/functions/array-unique.xml diff -u phpdoc/en/reference/array/functions/array-unique.xml:1.7 phpdoc/en/reference/array/functions/array-unique.xml:1.8 --- phpdoc/en/reference/array/functions/array-unique.xml:1.7Fri Feb 7 10:03:51 2003 +++ phpdoc/en/reference/array/functions/array-unique.xmlFri Feb 7 10:06:19 +2003 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.7 $ -- +!-- $Revision: 1.8 $ -- !-- splitted from ./en/functions/array.xml, last change in rev 1.2 -- refentry id=function.array-unique refnamediv @@ -47,7 +47,7 @@ ]] /programlisting para - Cela va afficher : + This will output: screen role=php ![CDATA[ Array @@ -58,7 +58,8 @@ ) ? ]] - /screen + /screen + /para /example /para para -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/array/functions array-unique.xml
damsFri Feb 7 10:07:20 2003 EDT Modified files: /phpdoc/en/reference/array/functionsarray-unique.xml Log: Balancing tags Index: phpdoc/en/reference/array/functions/array-unique.xml diff -u phpdoc/en/reference/array/functions/array-unique.xml:1.8 phpdoc/en/reference/array/functions/array-unique.xml:1.9 --- phpdoc/en/reference/array/functions/array-unique.xml:1.8Fri Feb 7 10:06:19 2003 +++ phpdoc/en/reference/array/functions/array-unique.xmlFri Feb 7 10:07:20 +2003 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.8 $ -- +!-- $Revision: 1.9 $ -- !-- splitted from ./en/functions/array.xml, last change in rev 1.2 -- refentry id=function.array-unique refnamediv @@ -84,7 +84,8 @@ } ? ]] - /screen + /screen + /para /example /para /refsect1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] xmllint
Friedhelm Betz wrote: and so on. But later on xlstproc doesn't complain about these already defined entities. xsltproc doesn't validate document, so duplicated IDs aren't detected -- - Jirka Kosek e-mail: [EMAIL PROTECTED] http://www.kosek.cz -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DOC] xmllint
Friedhelm Betz wrote: and so on. But later on xlstproc doesn't complain about these already defined entities. xsltproc doesn't validate document, so duplicated IDs aren't detected I am not really sure and don't have your experience, but: ?xml version='1.0' encoding='ISO-8859-1' ? !DOCTYPE sect1 PUBLIC -//OASIS//DTD DocBook XML V4.1.2//EN ./dtds/dbxml-4.1.2/docbookx.dtd sect1 id=some-id titleSome section/title para id=some-idThis is a link to link linkend=some-idsome-id/link./para /sect1 saved as test.xml and and invoking xsltproc throws errors: test.xml:7: validity error: ID some-id already defined para id=some-idThis is a link to ^ Warning: multiple IDs for constraint linkend: some-id. I thought this is some sort of validation? My question was not about duplicate IDs but duplicate entity definitions like !ENTITY reference.mhash.functions SYSTEM [...] !ENTITY reference.mhash.functions SYSTEM pointing to the same file '/opt/phpdoc/en/reference/mhash/functions.xml' I am wondering about, why this double definitions exists and whats the reason for. Because this double definitions, I assume, let xmllint throw repeating errors of the same cause. Friedhelm -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #22113 [NEW]: error in one of your documentation-examples
From: [EMAIL PROTECTED] Operating system: linux debian PHP version: 4.3.0 PHP Bug Type: Documentation problem Bug description: error in one of your documentation-examples in your documentation on page http://www.php.net/manual/en/functions.variable-functions.php there is a mistake with the latest example 13.4. it says: ?php class Foo { function Var() { $name = 'Bar'; $this-$name(); // This calls the Bar() method } function Bar() { echo This is Bar; } } $foo = new Foo(); $funcname = Var; $foo-$varname(); // This calls $foo-Var() ? The $foo-$varname(); will produce an undefined function error. It has to be $foo-funcname(); -- Edit bug report at http://bugs.php.net/?id=22113edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22113r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22113r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22113r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22113r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22113r=oldversion Not developer issue:http://bugs.php.net/fix.php?id=22113r=support Expected behavior: http://bugs.php.net/fix.php?id=22113r=notwrong Not enough info:http://bugs.php.net/fix.php?id=22113r=notenoughinfo Submitted twice:http://bugs.php.net/fix.php?id=22113r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22113r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22113r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22113r=dst IIS Stability: http://bugs.php.net/fix.php?id=22113r=isapi Install GNU Sed:http://bugs.php.net/fix.php?id=22113r=gnused -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #22113 [Opn]: error in one of your documentation-examples
ID: 22113 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Documentation problem Operating System: linux debian PHP Version: 4.3.0 New Comment: in your documentation on page http://www.php.net/manual/en/functions.variable-functions.php there is a mistake with the latest example 13.4. it says: ?php class Foo { function Var() { $name = 'Bar'; $this-$name(); // This calls the Bar() method } function Bar() { echo This is Bar; } } $foo = new Foo(); $funcname = Var; $foo-$varname(); // This calls $foo-Var() ? The $foo-$varname(); will produce an undefined function error. It has to be $foo-$funcname(); Previous Comments: [2003-02-07 13:32:01] [EMAIL PROTECTED] in your documentation on page http://www.php.net/manual/en/functions.variable-functions.php there is a mistake with the latest example 13.4. it says: ?php class Foo { function Var() { $name = 'Bar'; $this-$name(); // This calls the Bar() method } function Bar() { echo This is Bar; } } $foo = new Foo(); $funcname = Var; $foo-$varname(); // This calls $foo-Var() ? The $foo-$varname(); will produce an undefined function error. It has to be $foo-funcname(); -- Edit this bug report at http://bugs.php.net/?id=22113edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/language functions.xml
philip Fri Feb 7 15:19:13 2003 EDT Modified files: /phpdoc/en/language functions.xml Log: Fix a typo, this closes bug #22113 Index: phpdoc/en/language/functions.xml diff -u phpdoc/en/language/functions.xml:1.32 phpdoc/en/language/functions.xml:1.33 --- phpdoc/en/language/functions.xml:1.32 Tue Feb 4 21:05:16 2003 +++ phpdoc/en/language/functions.xmlFri Feb 7 15:19:13 2003 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.32 $ -- +!-- $Revision: 1.33 $ -- chapter id=functions titleFunctions/title @@ -469,7 +469,7 @@ $foo = new Foo(); $funcname = Var; -$foo-$varname(); // This calls $foo-Var() +$foo-$funcname(); // This calls $foo-Var() ? ]] -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #22113 [Opn-Csd]: error in one of your documentation-examples
ID: 22113 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: linux debian PHP Version: 4.3.0 New Comment: This has been fixed: http://cvs.php.net/cvs.php/phpdoc/en/language/functions.xml It will show up when the manual is next built, thank you for the report :) Previous Comments: [2003-02-07 13:33:13] [EMAIL PROTECTED] in your documentation on page http://www.php.net/manual/en/functions.variable-functions.php there is a mistake with the latest example 13.4. it says: ?php class Foo { function Var() { $name = 'Bar'; $this-$name(); // This calls the Bar() method } function Bar() { echo This is Bar; } } $foo = new Foo(); $funcname = Var; $foo-$varname(); // This calls $foo-Var() ? The $foo-$varname(); will produce an undefined function error. It has to be $foo-$funcname(); [2003-02-07 13:32:01] [EMAIL PROTECTED] in your documentation on page http://www.php.net/manual/en/functions.variable-functions.php there is a mistake with the latest example 13.4. it says: ?php class Foo { function Var() { $name = 'Bar'; $this-$name(); // This calls the Bar() method } function Bar() { echo This is Bar; } } $foo = new Foo(); $funcname = Var; $foo-$varname(); // This calls $foo-Var() ? The $foo-$varname(); will produce an undefined function error. It has to be $foo-funcname(); -- Edit this bug report at http://bugs.php.net/?id=22113edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/array/functions array-unique.xml
tom Fri Feb 7 17:57:56 2003 EDT Modified files: /phpdoc/en/reference/array/functionsarray-unique.xml Log: corr. php-tags Index: phpdoc/en/reference/array/functions/array-unique.xml diff -u phpdoc/en/reference/array/functions/array-unique.xml:1.9 phpdoc/en/reference/array/functions/array-unique.xml:1.10 --- phpdoc/en/reference/array/functions/array-unique.xml:1.9Fri Feb 7 10:07:20 2003 +++ phpdoc/en/reference/array/functions/array-unique.xmlFri Feb 7 17:57:56 +2003 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.9 $ -- +!-- $Revision: 1.10 $ -- !-- splitted from ./en/functions/array.xml, last change in rev 1.2 -- refentry id=function.array-unique refnamediv @@ -56,7 +56,6 @@ [0] = red [1] = blue ) -? ]] /screen /para @@ -82,7 +81,6 @@ [0] = int(4) [2] = string(1) 3 } -? ]] /screen /para -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/sybase/functions sybase-deadlock-retry-count.xml sybase-fetch-assoc.xml sybase-set-message-handler.xml sybase-unbuffered-query.xml
leonFri Feb 7 19:57:14 2003 EDT Added files: /phpdoc/en/reference/sybase/functions sybase-deadlock-retry-count.xml sybase-fetch-assoc.xml sybase-set-message-handler.xml sybase-unbuffered-query.xml Log: Adding descriptions for missing Sybase functions Index: phpdoc/en/reference/sybase/functions/sybase-deadlock-retry-count.xml +++ phpdoc/en/reference/sybase/functions/sybase-deadlock-retry-count.xml ?xml version=1.0 encoding=iso-8859-1? !-- $Revision: 1.1 $ -- refentry id=function.sybase-deadlock-retry-count refnamediv refnamesybase_deadlock_retry_count/refname refpurposeset the deadlock retry count/refpurpose /refnamediv refsect1 titleDescription/title methodsynopsis typevoid/typemethodnamesybase_deadlock_retry_count/methodname methodparamtypeint/typeparameterretry_count/parameter/methodparam /methodsynopsis para Using functionsybase_deadlock_retry_count/function, the number of retries can be defined in cases of deadlocks. By default, every deadlock is retried an infinite number of times or until the process is killed by Sybase, the executing script is killed (for instance, by functionset_time_limit/function) or the query succeeds. /para para table titleValues for retry_count/title tgroup cols=2 tbody row entry-1/entry entryRetry forever (default)/entry /row row entry0/entry entryDo not retry/entry /row row entryn/entry entryRetry n times/entry /row /tbody /tgroup /table /para note para This function is only available using the CT library interface to Sybase, and not the DB library. /para /note /refsect1 /refentry !-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:../../../../manual.ced sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -- Index: phpdoc/en/reference/sybase/functions/sybase-fetch-assoc.xml +++ phpdoc/en/reference/sybase/functions/sybase-fetch-assoc.xml ?xml version=1.0 encoding=iso-8859-1? !-- $Revision: 1.1 $ -- refentry id=function.sybase-fetch-assoc refnamediv refnamesybase_fetch_assoc/refname refpurposefetch row as associative array/refpurpose /refnamediv refsect1 titleDescription/title methodsynopsis typearray/typemethodnamesybase_fetch_assoc/methodname methodparamtyperesource/typeparameterresult/parameter/methodparam /methodsynopsis para Returns: An array that corresponds to the fetched row, or false; if there are no more rows. /para para functionsybase_fetch_assoc/function is a version of functionsybase_fetch_row/function that uses column names instead of integers for indices in the result array. Columns from different tables with the same names are returned as name, name1, name2, ..., nameN. /para para An important thing to note is that using functionsybase_fetch_assoc/function is NOT significantly slower than using functionsybase_fetch_row/function, while it provides a significant added value. /para para Also see functionsybase_fetch_array/function, functionsybase_fetch_object/function, and functionsybase_fetch_row/function. /para /refsect1 /refentry !-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:../../../../manual.ced sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -- Index: phpdoc/en/reference/sybase/functions/sybase-set-message-handler.xml +++ phpdoc/en/reference/sybase/functions/sybase-set-message-handler.xml ?xml version=1.0 encoding=iso-8859-1? !-- $Revision: 1.1 $ -- refentry id=function.sybase-set-message-handler refnamediv refnamesybase_set_message_handler/refname refpurposeset handler called when a server message is raised/refpurpose /refnamediv refsect1 titleDescription/title methodsynopsis typebool/typemethodnamesybase_set_message_handler/methodname methodparamtypecallback/typeparameterhandler/parameter/methodparam /methodsynopsis
[PHP-DOC] #21785 [Opn-Csd]: Sybase Functions Needing Documentation
ID: 21785 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type:Documentation problem PHP Version: 4.3.0 Assigned To: leon New Comment: This bug has been fixed in CVS. In case this was a PHP problem, snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. Previous Comments: [2003-01-20 18:27:45] [EMAIL PROTECTED] BTW, I'll take stab at adding this documentation in the next month or so. I need to get back up to speed on working on the manual since it's been so long. [2003-01-20 18:11:37] [EMAIL PROTECTED] Here are some functions needing documentation related to the SybaseCT extension. It looks like Timm Friebe added these back in August and he put up some documentation here: http://sitten-polizei.de/php/README.SYBASE.EN Here's a quick summary: void sybase_deadlock_retry_count(int retry_count) Sets deadlock retry count, same as the php.ini setting. array sybase_fetch_assoc(resource result) Fetch a row from result set indexed by column names only bool sybase_set_message_handler(mixed error_func) Set the error handler, to be called when a server message is raised. If error_func is NULL the handler will be deleted. int sybase_unbuffered_query(string query [, int link_id]) Send Sybase query and do not block. -- Edit this bug report at http://bugs.php.net/?id=21785edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] Re: preg_replace() docs need expliot warning
Just one more example. Even when using double quotes, it is possible to execute code: ?php $a = '___! ${`rm -rf /tmp/sess_*`} !___'; $b = preg_replace(/!(.*)!/e, print(\\\1\);, $a); ? Again, assume $a comes from a tainted source. -James On Mon, 3 Feb 2003, James E. Flemer wrote: A warning about preg_replace() command needs to be added to the docs page for this command. The preg_replace() command can use the /e modifier to have the replacement be eval()d by PHP, just like perl. There is a high potential for exploitable PHP code if a programmer uses the /e modifier and does not use quotes around the back references (backrefs). Without quotes, arbitrary commands may be executed by using the backtick operator. Other commands may be executed as well, but are more difficult, since addslashes() prevents the characters ['\\\0] from being used. An clear and explicit warning should be added to the doc page for preg_replace, indicating the backrefs must always be quoted. Single quotes are preferable, since double quotes allow variable expansion. See the messages below for examples of how this may be exploited. (Assume that $a comes from an untrusted source, i.e. a get/post/cookie/header variable.) -James -- Forwarded message -- Date: Mon, 3 Feb 2003 01:04:23 -0500 (EST) From: James E. Flemer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] preg_replace oddity [exploitable] I found a more evil example: ?php $a = ___! `rm -rf /tmp/sess_*` !___; $b = preg_replace(/!(.*)!/e, print(\\1);, $a); ? This happily executes rm -rf /tmp/sess_*. I will not give out more examples, but if one examines the code for addslashes() it is quite obvious what you can an cannot do here. Thus it is clearly a Bad Thing for someone to use preg_replace with the /e modifier and not use quotes around the \\n or $n backrefs. The docs should be updated to include a very noticeable warning about this hole. I am contemplating possible solutions for this problem... Also as a side note, it does not seem to be possible to use 'echo' as part of the expression, print must be used. (Yes I know why, just pointing it out.) -James On Thu, 30 Jan 2003, James E. Flemer wrote: Can someone explain what is going on here: --- foo.php --- ?php $a = ___! 52); echo(42 !___; $b = preg_replace(/!(.*)!/e, print(\\1);, $a); print(\n---\na: $a\nb: $b\n); ? --- end --- --- output --- 52 --- a: ___! 52); echo(42 !___ b: ___1___ --- end --- I understand that one is supposed to use single quotes around the \\1 in the above preg_replace. But what happens when they do not? Clearly the echo(42); is not executed, and it is not printed by print(). Even more interesting is if you put something like echo(\42 in $a, then you get a bunch of errors including: Fatal error - Failed evaluating code: print( 52); echo(\42 ); It seems like preg_replace() is doing some strange things, and might be something that could be exploitable if a remote user can supply the first argument, and the second argument does not enclose \\n options. -James -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] Re: preg_replace() docs need expliot warning
While I'm..*grossly* against the /e switch (or eval()s in general) at all (and its use with tainted sources even moreso), I realize my whinning and moaning isn't going to change the fact /e and eval() exist and are used. But here's a thought... How about a /E switch to preg_replace which would function like /e except that it temporarily enables safe_mode. Similarly eval() could be extended with a second parameter that does the same. I realize safe_mode is generally intended for sysadmins to protect themselves from malicious content authors, but why not use this functionality at the content level to protect from malicious clients? There *might* be a need to have an eval.* version of the safe_mode ini options to specify how much is (dis)allowed when in eval-safe_mode. I havn't thought through the implications of doing this, but it seems worth exploring. -Pollita Cross-Posting to php-dev James E. Flemer [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Just one more example. Even when using double quotes, it is possible to execute code: ?php $a = '___! ${`rm -rf /tmp/sess_*`} !___'; $b = preg_replace(/!(.*)!/e, print(\\\1\);, $a); ? Again, assume $a comes from a tainted source. -James On Mon, 3 Feb 2003, James E. Flemer wrote: A warning about preg_replace() command needs to be added to the docs page for this command. The preg_replace() command can use the /e modifier to have the replacement be eval()d by PHP, just like perl. There is a high potential for exploitable PHP code if a programmer uses the /e modifier and does not use quotes around the back references (backrefs). Without quotes, arbitrary commands may be executed by using the backtick operator. Other commands may be executed as well, but are more difficult, since addslashes() prevents the characters ['\\\0] from being used. An clear and explicit warning should be added to the doc page for preg_replace, indicating the backrefs must always be quoted. Single quotes are preferable, since double quotes allow variable expansion. See the messages below for examples of how this may be exploited. (Assume that $a comes from an untrusted source, i.e. a get/post/cookie/header variable.) -James -- Forwarded message -- Date: Mon, 3 Feb 2003 01:04:23 -0500 (EST) From: James E. Flemer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] preg_replace oddity [exploitable] I found a more evil example: ?php $a = ___! `rm -rf /tmp/sess_*` !___; $b = preg_replace(/!(.*)!/e, print(\\1);, $a); ? This happily executes rm -rf /tmp/sess_*. I will not give out more examples, but if one examines the code for addslashes() it is quite obvious what you can an cannot do here. Thus it is clearly a Bad Thing for someone to use preg_replace with the /e modifier and not use quotes around the \\n or $n backrefs. The docs should be updated to include a very noticeable warning about this hole. I am contemplating possible solutions for this problem... Also as a side note, it does not seem to be possible to use 'echo' as part of the expression, print must be used. (Yes I know why, just pointing it out.) -James On Thu, 30 Jan 2003, James E. Flemer wrote: Can someone explain what is going on here: --- foo.php --- ?php $a = ___! 52); echo(42 !___; $b = preg_replace(/!(.*)!/e, print(\\1);, $a); print(\n---\na: $a\nb: $b\n); ? --- end --- --- output --- 52 --- a: ___! 52); echo(42 !___ b: ___1___ --- end --- I understand that one is supposed to use single quotes around the \\1 in the above preg_replace. But what happens when they do not? Clearly the echo(42); is not executed, and it is not printed by print(). Even more interesting is if you put something like echo(\42 in $a, then you get a bunch of errors including: Fatal error - Failed evaluating code: print( 52); echo(\42 ); It seems like preg_replace() is doing some strange things, and might be something that could be exploitable if a remote user can supply the first argument, and the second argument does not enclose \\n options. -James -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #22115 [Com]: Lack of detail to the installation instructions!
ID: 22115 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Documentation problem Operating System: All PHP Version: 4.3.0 New Comment: Hi- What this guy says is right on - there is simply not enough explanation in the install section. I would like to add one comment, though: An especially glaring ommission is an explanation of what features are built into the base install of 4.3.0, and what options need to be added to 'configure'. The heading of the chapter says that it contains a complete list of configuration options, yet when I take a look at past comments from users, they are referencing configuration options not listed in the chapter!!?!? Among the ones of interest are the settings for enabling MySQL, PostgreSQL, and apache support. Are all these built in now? It's not made clear in the doc. Also, it would be great if there was more explanation of what the different options mean. The reason why this is so critical is that a wrong setting here can cause many hours of frustration and tweaking of PHP config files, messing with other installed programs (basically hosing your system) when it all could have been avoided by having the info upfront about which config flags to include... Previous Comments: [2003-02-07 15:17:13] [EMAIL PROTECTED] Basically, the installation file in the Apache section does not provide the level of detail that is really needed. Far too often I see emails where people can not get php to work. Why? Because they have simply followed this instruction: After you've set up the file layout properly, you're ready to finally configure Apache to load the PHP4 module. Just add the following lines to your httpd.conf: LoadModule php4_module c:/php/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php Followed liturally, the user then goes and plonks them all in one big group. Guess what happens then? If you said it mess's up, then you are correct! Basically, to help all the new users to php/php installation, I suggest the following change: (This is taken from an email I have sent out several times, so some gramatic change may be in order!) LoadModule php4_module C:\PHP\sapi\php4apache.dll This has to be in the same place as all the other LoadModule commands. If you look through your httpd.conf file for Apache, you will see a whole load of LoadModules with #'s in front of them. You need to place the above line at the end of that list. If you then scroll down a bit the next section should be 'AddModule'. In this section, you have to put the line AddModule mod_php4.c at the bottom of the list. Both commands are needed to properly load PHP. Once that is done, you will need to run a search for # AddType allows you to tweak mime.types without actually editing it, or to Below that line should be a series of AddType commands. Again, you need to put AddType application/x-httpd-php .php at the end of the list. AddType application/x-httpd-php-source .phps is an optional feature, I personnally do not use it as I do not want people to be able to view my source code. However it is up to you. If you do want to include it, put it in the same section as the previous command. -- Edit this bug report at http://bugs.php.net/?id=22115edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #19466 [Fbk-NoF]: Improve dll explication
ID: 19466 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: No Feedback Bug Type: Documentation problem Operating System: Windows 2000 PHP Version: 4.2.3 New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to Open. Thank you. Previous Comments: [2003-01-23 16:03:43] [EMAIL PROTECTED] How do you feel this should be written? Please submit a rewrite for these two paragraphs. [2002-09-18 03:53:23] [EMAIL PROTECTED] Hi, For Windows installations, the install.txt features an explication on which dll's should be copied where, depending on your installation. This paragraph from install.txt is highly confusing as it talks about 'dlls' but there are 4 groups. There is the php4ts.dll, the SAPI dll's the /dll/* dll's and the extension dll's. Don't use the dll's in one text which mixes them all. I would be nice if this text would be rephrased. There's also a contradiction in the same text warning/avoiding and later recommending using SAPI dll's. You need to ensure that the dlls which php uses can be found. The precise dlls involved depend on which web server you use and whether you want to run php as a cgi or as a server module. php4ts.dll is always used. If you are using a server module (e.g. isapi or apache) then you will need the relevent dll from the sapi folder. If you are using any php extension dlls then you will need those as well. To make sure that the dlls can be found, you can either copy them to the system directory (e.g. winnnt/system32 or windows/system) or you can make sure that they live in the same directory as the main php executable or dll your web server will use (e.g. php.exe, php4apache.dll). Geert -- Edit this bug report at http://bugs.php.net/?id=19466edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #20851 [Fbk-NoF]: windows and upload_tmp_dir
ID: 20851 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: No Feedback Bug Type: Documentation problem Operating System: Windows Millenium PHP Version: 4.2.3 New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to Open. Thank you. Previous Comments: [2003-01-26 11:21:12] [EMAIL PROTECTED] So your default tmp directory couldn't be written to or it didn't exist at all? [2003-01-26 11:06:16] [EMAIL PROTECTED] I read the changelog and for me appear that this is something like the bug 20725, that was fixed in PHP 4.3.0, since I try do it again in 4.3.0 and the PHP put the files on C:/windows/temp, but this don´t work on 4.2.3. Thanks. [2003-01-21 12:17:55] [EMAIL PROTECTED] According to the source there are defaults. Here are some comments found within hp_open_temporary_file.c: /* We can't count on the environment variables TEMP or TMP, * and so must make the Win32 API call to get the default * directory for temporary files. Note this call checks * the environment values TMP and TEMP (in order) first. */ That call is made to GetTempPath. Run msconfig.exe and tell us what the above environment variables are set to on your system. [2002-12-05 21:34:26] [EMAIL PROTECTED] In a mailing list the people tell they can´t make the example of file upload work, only who uses windows. So a begin work on this and discover why. If you don´t define upload_tmp_dir in php.ini, appears that php don´t know where to put, or it puts the file but don´t know where so $_FILES['userfile']['name'] return the correct value, but $_FILES['userfile']['tmp_name'] comes empty and you can´t move the file. Note that I don´t have anything in TMPDIR too. The people on windows must set the upload_tmp_dir in php.ini, without this can´t upload a file. -- Edit this bug report at http://bugs.php.net/?id=20851edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php