[PHP-DOC] cvs: phpdoc /en/install/windows iis.xml
philip Tue Mar 29 04:03:57 2005 EDT Modified files: /phpdoc/en/install/windows iis.xml Log: Streamline the install instructions, a little restructure, and added more information including some specific to Win2003. This officially closes bug #23907 http://cvs.php.net/diff.php/phpdoc/en/install/windows/iis.xml?r1=1.12r2=1.13ty=u Index: phpdoc/en/install/windows/iis.xml diff -u phpdoc/en/install/windows/iis.xml:1.12 phpdoc/en/install/windows/iis.xml:1.13 --- phpdoc/en/install/windows/iis.xml:1.12 Tue Mar 29 02:04:03 2005 +++ phpdoc/en/install/windows/iis.xml Tue Mar 29 04:03:51 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.12 $ -- +!-- $Revision: 1.13 $ -- sect1 id=install.windows.iis titleMicrosoft IIS / PWS/title para @@ -72,6 +72,16 @@ ulink url=url.php.downloads;Download PHP files here/ulink. /simpara /listitem +listitem + simpara + When defining the executable, the 'check that file exists' box may also + be checked. For a small performance penalty, the IIS (or PWS) will check + that the script file exists and sort out authentication before firing up + PHP. This means that the web server will provide sensible 404 style + error messages instead of CGI errors complaining that PHP did not output + any data. + /simpara +/listitem /itemizedlist /para /sect2 @@ -94,36 +104,23 @@ itemizedlist listitem simpara - Under 'Home Directory', 'Virtual Directory', or - 'Directory', click on the 'Configuration' button, - and then enter the App Mappings tab. + Under 'Home Directory', 'Virtual Directory', or 'Directory', do the + following: /simpara /listitem listitem simpara - Click Add, and in the Executable box, type: - literalC:\php\php.exe/literal for PHP 4 or - literalC:\php\php-cgi.exe/literal for PHP 5 (assuming - that you have unziped PHP in filenamec:\php\/filename). - /simpara + Change the Execute Permissions to 'Scripts only' + /simpara /listitem listitem simpara - In the Extension box, type the file name extension you want - associated with PHP scripts. Leave 'Method exclusions' - blank, and check the 'Script engine' checkbox. You may also - like to check the 'check that file exists' box - for a small - performance penalty, IIS (or PWS) will check that the script - file exists and sort out authentication before firing up PHP. - This means that you will get sensible 404 style error messages - instead of CGI errors complaining that PHP did not output any data. - /simpara - simpara - You must start over from the previous step for each - extension you want associated with PHP scripts. - literal.php/literal and literal.phtml/literal - are common, although literal.php3/literal may be - required for legacy applications. + Click on the 'Configuration' button, and choose the Application Mappings + tab. Click Add and set the Executable path to the appropriate CGI file. + An example PHP 5 value is: filenameC:\php\php-cgi.exe/filename + Supply literal.php/literal as the extension. Leave 'Method + exclusions' blank, and check the 'Script engine' checkbox. Now, click + OK a few times. /simpara /listitem listitem @@ -136,7 +133,6 @@ /listitem /itemizedlist /para - para To use the ISAPI module, do the following: itemizedlist @@ -151,12 +147,23 @@ /listitem listitem simpara - Under 'Home Directory', click on the 'Configuration' button. - Add a new entry to the Application Mappings. Use the path - to the filenamephp4isapi.dll/filename / - filenamephp5isapi.dll/filename as the Executable, supply - literal.php/literal as the extension, leave 'Method exclusions' - blank, and check the 'Script engine' checkbox. + Under 'Home Directory', 'Virtual Directory', or 'Directory', do the + following: + /simpara +/listitem +listitem + simpara + Change the Execute Permissions to 'Scripts only' + /simpara +/listitem +listitem + simpara + Click on the 'Configuration' button, and choose the Application Mappings + tab. Click Add and set the Executable path to the appropriate ISAPI DLL. + An example PHP 5 value is: filenameC:\php\php5isapi.dll/filename + Supply literal.php/literal as the extension. Leave 'Method + exclusions' blank, and check the 'Script engine' checkbox. Now, click + OK a few times. /simpara /listitem listitem @@ -172,6 +179,27 @@ /itemizedlist /para para + With IIS 6 (2003 Server), open up the IIS Manager, go to Web Service + Extensions, choose Add a new Web service extension, enter in a name such + as PHP, choose the Add button and for the value
[PHP-DOC] #23907 [Ctl-Csd]: Need additional installation step for IIS 6.0 / Windows Server 2003
ID: 23907 Updated by: [EMAIL PROTECTED] Reported By: bryn at mrpath dot com -Status: Critical +Status: Closed Bug Type: Documentation problem Operating System: Windows Server 2003 PHP Version: 4.3.2 New Comment: The documentation has been updated and will show up when the manual is next built. Thanks for the report :) For good measure, here's the diff: http://cvs.php.net/diff.php/phpdoc/en/install/windows/iis.xml?r1=1.10r2=1.13 Previous Comments: [2005-01-18 04:09:51] [EMAIL PROTECTED] When this bug report is dealt with (and closed!), also solve the following bug reports: #29275 and #21833 [2004-12-17 01:46:47] unknown at simplemachines dot org I can confirm that: - this affects Windows Server 2003 and IIS 6 only. - this is needed for both CGI or ISAPI mode. - this is currently not in the documentation. A tutorial I wrote earlier this year covers many of the major steps involved, although it hasn't been updated for PHP 5 yet (it was written while PHP 5 was still in beta.) The relevant section of said tutorial can be found here: http://unknown.network32.net/tutorial.basic-server#configure.php.iis The Macromedia tutorial linked to in one of the previous comments does *not* describe the necessary information either. However, some comments to the documentation page do. Any other problems are not related to this bug; notably, the whole CGI issue *is* properly documented already (although ISAPI is more efficient...) Thanks, -[Unknown] [2004-09-01 17:53:38] joel at preacherboy dot net I couldn't for the life of me get IIS 5.1 and PHP 5 in CGI mode to work. I ignored all previous PHP 4 related instructions as I figured them to be irrelevant. After reading Philip's comments about the Macromedia tutorial, I finally decided using their method for CGI mode just might work. All it took to get IIS 5.1 and PHP 5 to work in CGI mode was the following lines, never referenced in the official documentation as what you *must* do: cgi.force_redirect = 0 // Default must be 1 when commented out. cgi.redirect_status_env = ENV_VAR_NAME Now that I'm not running in ISAPI mode, all of my scripts aren't open handles of dllhost.exe. dllhost.exe is no longer crashing every time the system is restarted. Yay! [2004-08-22 20:55:33] [EMAIL PROTECTED] The IIS docs need help, someone who uses IIS should really update these docs. Marking as critical. The PHP installer should also look into being updated for this (although IMHO nobody should use the PHP installer!) [2004-08-21 05:52:48] yo at momma dot org This need to go on the install.txt file. BIG TIME. Searching google for HTTP Error 404 - File or directory not found. PHP IIS 2003 and this article came up 7th. Does not bode well for noobs (A turn off, as in why bother) as well as experienced developers (A serious irritant, as in Oh great, another speed bump and another hour or 2 of my time). 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/23907 -- Edit this bug report at http://bugs.php.net/?id=23907edit=1
[PHP-DOC] #29275 [Opn-Csd]: IIS 5.1 needs special attention in the IIS docs
ID: 29275 Updated by: [EMAIL PROTECTED] Reported By: steve at ootac dot com -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: windows PHP Version: 5.0.0 New Comment: The documentation has been updated and will show up when the manual is next built. Thanks for the report :) Previous Comments: [2004-09-01 17:55:06] joel at preacherboy dot net Thanks for providing a link to that bug. It was exactly what I needed to get IIS 5.1 and PHP 5 to work in CGI mode. [2004-09-01 00:44:21] [EMAIL PROTECTED] The IIS Documentation is outdated/wrong/bad, this is known, but this is already in a bug report here: http://bugs.php.net/bug.php?id=23907 As far as php5isapi.dll, that's now in the the docs. Regarding that IIS 5.1 bug, that will be integrated when the IIS docs are updated (and the user notes are integrated) so will leave this bug open until that happens. [2004-09-01 00:04:26] joel at preacherboy dot net I've been able to get php5isapi.dll to work on IIS 5.1 following the official instructions. If you want I can go log the process on another development system I've been meaning to configure. I had to use ISAPI by choice. I'd much rather use php-cgi.exe, but I could never get it to work using the official instructions. Instead I have ISAPI leaving open handles on every file used until I kill dllhost.exe or restart the system (resulting in a crash of dllhost.exe). [2004-07-21 13:09:05] steve at ootac dot com The Add mapping dialogue puts the path in quotes; remove the quotes and the OK button is enabled. still cannot get it to work even after following all the FAQ advice! [2004-07-20 11:36:06] steve at ootac dot com Description: I have found a bug on page install.iis.html [chm date: 2003-09-06]... Installation/servers-IIS/PWS/WINDOWS NT/2000/XP and IIS 4 or newer IIS 5.1 on Win XP Help file says: To use the ISAPI module, do the following: Under 'Home Directory', click on the 'Configuration' button. Add a new entry to the Application Mappings. Use the path to the php4isapi.dll as the Executable, supply .php as the extension, leave Method exclusions blank, and check the Script engine checkbox. 1. File needs to be php5isapi.dll 2. Doing as above (using php5isapi.dll) will not enable the OK button in the dialogue. -- Edit this bug report at http://bugs.php.net/?id=29275edit=1
[PHP-DOC] #31775 [Com]: Undefined behavior when uploaded file post_max_size
ID: 31775 Comment by: markusg at cants dot no dot spam dot de Reported By: rudolf at softwares dot ch Status: Open Bug Type: Documentation problem Operating System: Windows XP Pro PHP Version: 4.3.9 New Comment: PHP also completely truncates the POST request, so you can't even tell there was one. Perhaps it would be more useful to process the incoming data up to the point where the post_max_size limit is reached, and then set a flag the programmer can check for. Previous Comments: [2005-01-31 11:40:53] rudolf at softwares dot ch OK, but the documentation does not explain how this fairly common condition (an uploaded file post_max_size) can be trapped. [2005-01-31 11:27:55] [EMAIL PROTECTED] The behavior is correct as POST data is received before the request is run, but upload_max_filesize is checked later. [2005-01-31 11:23:53] rudolf at softwares dot ch Description: I'm not sure if this is a documentation omission and/or a PHP bug: I want to limit the size of files that can be uploaded to 8MB. I have set upload_max_filesize to 8MB and post_max_size to 10MB. memory_limit is not enabled. When I upload a 9MB file, then $_FILES['myfile']['error'] is 1, as documented. When I upload a 14MB file, PHP writes nothing to stdout and writes the following to syslog: PHP Warning: POST Content-Length of 14171720 bytes exceeds the limit of 10485760 bytes in Unknown on line 0 The documentation doesn't say how PHP reacts when it uploads a file larger than post_max_size, but I would assume that it should not give up, which is the behavior I'm experiencing. Reproduce code: --- html body ?php if ( $_POST['but_submit'] ) { printf(Got the submit!! error (%d) size (%d), $_FILES['the_file']['error'], $_FILES['the_file']['size']); } ? form method=post action=fileupload.php enctype=multipart/form-data table class=form border=0 cellpadding=0 cellspacing=0 tr tdFile/td td input type=file name=the_file / /td /tr tr td colspan=2 input type=submit name=but_submit value=Submit / /td /tr /table /form /body /html Expected result: Unknown, since the documentation doesn't describe how PHP responds when the size of the uploaded file is greater than post_max_size. Actual result: -- A PHP warning written to syslog, and nothing written to stdout. See description above. -- Edit this bug report at http://bugs.php.net/?id=31775edit=1
[PHP-DOC] generating install.txt
Hello! It would be nice if someone documented how to create install.txt for php-src. Or for now, simply generate it so it can be part of the upcoming 5.0.4 release. Regards, Philip
Re: [PHP-DOC] generating install.txt
Hi, It would be nice if someone documented how to create install.txt for php-src. Or for now, simply generate it so it can be part of the upcoming 5.0.4 release. make install.txt should work in phpdoc :) Goba
Re: [PHP-DOC] cvs: peardoc / manual.xml.in /en/pecl apd.xml bcompiler.xml soap.xml
Martin Jansen wrote: mj Tue Mar 29 06:53:08 2005 EDT Removed files: /peardoc/en/pecl apd.xml bcompiler.xml soap.xml Modified files: /peardoc manual.xml.in Log: * The documentation for APD, bcompiler and apd have been merged into the PHP manual some time ago. The rest of those pecl extension will be merged soon into the PHP Manual. As soon, when I have some spare time to do so;-) Friedhelm
[PHP-DOC] #32489 [NEW]: German translation error at stristr()
From: m dot ernst at connect-wa dot de Operating system: Irrelevant PHP version: 4.3.10 PHP Bug Type: Documentation problem Bug description: German translation error at stristr() Description: There is a translation error in the documentation/function list of stristr(). The english text reads Returns all of haystack from the first occurrence of needle to the end. needle and haystack are examined in a case-insensitive manner. The german text reads Findet alle Vorkommen von needle innerhalb von haystack vom Anfang bis zum Ende (ohne Rücksicht auf die Schreibweise beider Parameter). The german text should read Gibt den String haystack ab dem ersten Vorkommen von needle bis zum Ende zurück. needle wird in haystack ohne Rücksicht auf die Schreibweise (Groß- und Kleinschreibung) gesucht. -- Edit bug report at http://bugs.php.net/?id=32489edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32489r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32489r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32489r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=32489r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=32489r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32489r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32489r=needscript Try newer version: http://bugs.php.net/fix.php?id=32489r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32489r=support Expected behavior: http://bugs.php.net/fix.php?id=32489r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32489r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32489r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=32489r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32489r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=32489r=dst IIS Stability: http://bugs.php.net/fix.php?id=32489r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32489r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32489r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32489r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32489r=mysqlcfg
Re: [PHP-DOC] generating install.txt
Hello! It would be nice if someone documented how to create install.txt for php-src. Or for now, simply generate it so it can be part of the upcoming 5.0.4 release. Regards, Philip Something like this should work: cd /cvs/phpdoc make install-unix.txt mv install-unix.txt ../php-src/INSTALL make install-win.txt mv install-win.txt ../php-src/win32/install.txt maybe you should also read the note in the install-win.xml file (before generating..): !-- you should remove the install.windows.building; entity from the en/install/windows/index.xml file to build this file -- this is to avoid including the instructions to build php from source on windows, which will only confuse the normal windows user (IMHO) Nuno P.S.: if needed, I can generate them. P.S. 2: BTW, Derick did you forgot to update the xchm file in the rsync machine? :)
[PHP-DOC] cvs: phpdoc / install-unix.xml install-win.xml
philip Tue Mar 29 15:01:47 2005 EDT Modified files: /phpdoc install-unix.xml install-win.xml Log: Add preface so people know these were generated from the HTML version of the manual; and link to the online version. http://cvs.php.net/diff.php/phpdoc/install-unix.xml?r1=1.2r2=1.3ty=u Index: phpdoc/install-unix.xml diff -u phpdoc/install-unix.xml:1.2 phpdoc/install-unix.xml:1.3 --- phpdoc/install-unix.xml:1.2 Wed Sep 29 12:32:26 2004 +++ phpdoc/install-unix.xml Tue Mar 29 15:01:47 2005 @@ -23,6 +23,14 @@ book id=install lang=en titleInstalling PHP/title + preface + titlePreface/title + para + These installation instructions were generated from the HTML version of + the PHP Manual so formatting and linking have been altered. See the + online and updated version at: http://php.net/install.unix + /para + /preface install.intro; install.unix.index; install.macos.index; http://cvs.php.net/diff.php/phpdoc/install-win.xml?r1=1.2r2=1.3ty=u Index: phpdoc/install-win.xml diff -u phpdoc/install-win.xml:1.2 phpdoc/install-win.xml:1.3 --- phpdoc/install-win.xml:1.2 Wed Sep 29 12:32:26 2004 +++ phpdoc/install-win.xml Tue Mar 29 15:01:47 2005 @@ -28,6 +28,14 @@ book id=install lang=en titleInstalling PHP/title + preface + titlePreface/title + para + These installation instructions were generated from the HTML version of + the PHP Manual so formatting and linking have been altered. See the + online and updated version at: http://php.net/install.windows + /para + /preface install.intro; install.windows.index; install.pecl;
Re: [PHP-DOC] generating install.txt
It would be nice if someone documented how to create install.txt for php-src. Or for now, simply generate it so it can be part of the upcoming 5.0.4 release. Something like this should work: cd /cvs/phpdoc make install-unix.txt mv install-unix.txt ../php-src/INSTALL make install-win.txt mv install-win.txt ../php-src/win32/install.txt Nice, this works :) maybe you should also read the note in the install-win.xml file (before generating..): !-- you should remove the install.windows.building; entity from the en/install/windows/index.xml file to build this file -- this is to avoid including the instructions to build php from source on windows, which will only confuse the normal windows user (IMHO) Good idea. P.S.: if needed, I can generate them. I generated them and the diffs are enormous because the current files use \r\n while mine uses \n. I think \n should be used... Regards, Philip
Re: [PHP-DOC] generating install.txt
cd /cvs/phpdoc make install-unix.txt mv install-unix.txt ../php-src/INSTALL make install-win.txt mv install-win.txt ../php-src/win32/install.txt Nice, this works :) :) Well, Nuno, who made this work the first time obviously knows better. P.S.: if needed, I can generate them. I generated them and the diffs are enormous because the current files use \r\n while mine uses \n. I think \n should be used... \n is a big nono on windows, since Notepad cannot handle it. Goba
Re: [PHP-DOC] generating install.txt
I generated them and the diffs are enormous because the current files use \r\n while mine uses \n. I think \n should be used... \n is a big nono on windows, since Notepad cannot handle it. The install-unix.txt also uses \n so what do you think should be done? Use \r\n for both files or just for the Windows one? Regards, Philip
Re: [PHP-DOC] generating install.txt
I generated them and the diffs are enormous because the current files use \r\n while mine uses \n. I think \n should be used... \n is a big nono on windows, since Notepad cannot handle it. The install-unix.txt also uses \n so what do you think should be done? Use \r\n for both files or just for the Windows one? Be platform friendly: \n in the Unix file and \r\n in the windows one. Goba
Re: [PHP-DOC] generating install.txt
I generated them and the diffs are enormous because the current files use \r\n while mine uses \n. I think \n should be used... \n is a big nono on windows, since Notepad cannot handle it. The install-unix.txt also uses \n so what do you think should be done? Use \r\n for both files or just for the Windows one? Be platform friendly: \n in the Unix file and \r\n in the windows one. I was wrong, currently \n is used with install-win.txt and I meant to say \r\n is used with install-unix.txt above so each are currently the opposite of what they should be :) And Unix has Mac instructions but we won't go there... :) Anyway, this will be fixed. Regards, Philip
Re: [PHP-DOC] generating install.txt
I was wrong, currently \n is used with install-win.txt and I meant to say \r\n is used with install-unix.txt above so each are currently the opposite of what they should be :) And Unix has Mac instructions but we won't go there... :) Anyway, this will be fixed. Right, so, to be clear: Unix: \n Windows: \r\n Mac (because it's contained in the unix file): \n S
[PHP-DOC] cvs: phpdoc /en/install ini.xml /en/install/unix apache2.xml
philip Tue Mar 29 16:29:18 2005 EDT Modified files: /phpdoc/en/install ini.xml /phpdoc/en/install/unix apache2.xml Log: More descriptive links (as to generate a more friendly install-*.txt file) http://cvs.php.net/diff.php/phpdoc/en/install/ini.xml?r1=1.5r2=1.6ty=u Index: phpdoc/en/install/ini.xml diff -u phpdoc/en/install/ini.xml:1.5 phpdoc/en/install/ini.xml:1.6 --- phpdoc/en/install/ini.xml:1.5 Mon Mar 21 06:28:06 2005 +++ phpdoc/en/install/ini.xml Tue Mar 29 16:29:18 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.5 $ -- +!-- $Revision: 1.6 $ -- chapter id=configuration titleRuntime Configuration/title @@ -87,8 +87,8 @@ to change the PHP configuration from within the Apache configuration files. For a listing of which directives are constantPHP_INI_ALL/constant, constantPHP_INI_PERDIR/constant, - or constantPHP_INI_SYSTEM/constant, have a look at - xref linkend=ini/. + or constantPHP_INI_SYSTEM/constant, have a look at the + link linkend=ini.listList of php.ini directives/link appendix. /para note http://cvs.php.net/diff.php/phpdoc/en/install/unix/apache2.xml?r1=1.4r2=1.5ty=u Index: phpdoc/en/install/unix/apache2.xml diff -u phpdoc/en/install/unix/apache2.xml:1.4 phpdoc/en/install/unix/apache2.xml:1.5 --- phpdoc/en/install/unix/apache2.xml:1.4 Sun Sep 19 17:16:26 2004 +++ phpdoc/en/install/unix/apache2.xml Tue Mar 29 16:29:18 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.4 $ -- +!-- $Revision: 1.5 $ -- sect1 id=install.unix.apache2 titleApache 2.0 on Unix systems/title para @@ -134,8 +134,9 @@ /para note para - If you want to use content negotiation, read - link linkend=faq.installation.apache.multiviewsrelated FAQ/link. + If you want to use content negotiation, read the + link linkend=faq.installation.apache.multiviewsApache MultiViews + FAQ/link. /para /note note
[PHP-DOC] cvs: phpdoc /en language-snippets.ent
philip Tue Mar 29 16:55:09 2005 EDT Modified files: /phpdoc/en language-snippets.ent Log: More descriptive link title. http://cvs.php.net/diff.php/phpdoc/en/language-snippets.ent?r1=1.137r2=1.138ty=u Index: phpdoc/en/language-snippets.ent diff -u phpdoc/en/language-snippets.ent:1.137 phpdoc/en/language-snippets.ent:1.138 --- phpdoc/en/language-snippets.ent:1.137 Mon Feb 21 15:59:53 2005 +++ phpdoc/en/language-snippets.ent Tue Mar 29 16:55:07 2005 @@ -1,4 +1,4 @@ -!-- $Revision: 1.137 $ -- +!-- $Revision: 1.138 $ -- !-- Keep 'em sorted -- @@ -468,8 +468,8 @@ !-- Snippets for the installation section -- !ENTITY warn.apache2.compat 'warningparaWe do not recommend using a threaded MPM in production with Apache2. Use the prefork MPM instead, or use Apache1. For information -on why, read the following -link linkend=faq.installation.apache2FAQ entry/link/para/warning' +on why, read the related FAQ entry on using +link linkend=faq.installation.apache2Apache2 with a threaded MPM/link/para/warning' !ENTITY note.apache.slashes 'notesimparaRemember that when adding path values in the Apache configuration files on Windows, all backslashes
[PHP-DOC] printer_open() documentation error
Hi I'm not sure if this is a documentation error or a bug in php_printer.dll but here goes... printer_open() is returning NULL upon failure, not FALSE i.e. the following code doesn't work: ?php $printer = greg-mac\\LaserJet_5; if(($conn_printer = printer_open($printer)) === FALSE) die(Could not connect to $printer\r\n); var_dump($conn_printer); printer_close($conn_printer); ? This does: ?php $printer = greg-mac\\LaserJet_5; if(($conn_printer = printer_open($printer)) === NULL) die(Could not connect to $printer\r\n); var_dump($conn_printer); printer_close($conn_printer); ? Version info: PHP 4.3.10 (cli) (built: Dec 14 2004 17:48:04) php_printer.dll 29-Mar-2005 16:2840k Best regards, Greg Jackson Web Administrator Active Components (NZ) Ltd PO Box 100-544, Auckland New Zealand DDI: +64-9-443 9519 Sales: +64-9-443 9500 Fax: +64-9-443 9502 http://www.activecomponents.com/
[PHP-DOC] [PATCH] Install Documentation for Unix/Windows
Hello! Both win32/install.txt and INSTALL need an update before the next PHP release so here's a patch for these two files: http://boogle.com/tmp/patch_phpsrc_install.txt It's an enormous patch because the line endings were incorrect for these files but have been fixed (install.txt = \r\n and INSTALL = \n). If you're curious on what content actually changed, see: http://boogle.com/tmp/patch_phpsrc_install_changed.txt There have been some important changes to these docs so please apply this patch ASAP. Regards, Philip
Re: [PHP-DOC] printer_open() documentation error
Hello! I don't really have an answer except that according to the source here: http://lxr.php.net/source/pecl/printer/printer.c#256 It can return false but also has a chance to return nothing which doesn't seem like a good idea. That is, if the following condition fails nothing happens: if (DocumentProperties(NULL, resource-handle, resource-name, resource-pi2-pDevMode, NULL, DM_OUT_BUFFER) == IDOK) { I have no idea what this means but I consider this a PHP bug, not a documentation bug. I suggest you open up a bug report for this extension. I'm not sure how to report it though considering this extension is PECL yet cannot be found at pecl.php.net so I guess that's a bug too :) Once fixed, we'll document the change (I added a user comment for now). Quick fix: Just know that it may return NULL or FALSE so using a strict type check may not be the best route here. Regards, Philip On Wed, 30 Mar 2005, Greg Jackson wrote: Hi I'm not sure if this is a documentation error or a bug in php_printer.dll but here goes... printer_open() is returning NULL upon failure, not FALSE i.e. the following code doesn't work: ?php $printer = greg-mac\\LaserJet_5; if(($conn_printer = printer_open($printer)) === FALSE) die(Could not connect to $printer\r\n); var_dump($conn_printer); printer_close($conn_printer); ? This does: ?php $printer = greg-mac\\LaserJet_5; if(($conn_printer = printer_open($printer)) === NULL) die(Could not connect to $printer\r\n); var_dump($conn_printer); printer_close($conn_printer); ? Version info: PHP 4.3.10 (cli) (built: Dec 14 2004 17:48:04) php_printer.dll 29-Mar-2005 16:2840k Best regards, Greg Jackson Web Administrator Active Components (NZ) Ltd PO Box 100-544, Auckland New Zealand DDI: +64-9-443 9519 Sales: +64-9-443 9500 Fax: +64-9-443 9502 http://www.activecomponents.com/
[PHP-DOC] #32492 [NEW]: [DOC] French : preg_quote
From: jsgoupil at lookstrike dot com Operating system: PHP version: 5CVS-2005-03-30 (dev) PHP Bug Type: Documentation problem Bug description: [DOC] French : preg_quote Description: fr/reference/pcre/function/preg-quote.xml $ Revision: 1.13 $ Les caractères échappés, il ne devrait y avoir qu'un seul \ et il y en a 2. Un . devrait être ajouté à la chaine Cette fonction gère les chaînes binaires Voici les diff -u http://jsgoupil.homelinux.com/phpdoc/diff20050329_1.txt http://jsgoupil.homelinux.com/phpdoc/diff20050329_2.txt Je sais que c'est peut-etre un peu poussé de modifier les snippets pour un point seulement... J'ai aussi remarqué que preg-quote.xml n'était simplement pas à jour à la version anglaise. Question : comment mettre à jour livedocs lors de modification de snippets ? je dois recompiler ? Jean-Sébastien Goupil -- Edit bug report at http://bugs.php.net/?id=32492edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32492r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32492r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32492r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=32492r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=32492r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32492r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32492r=needscript Try newer version: http://bugs.php.net/fix.php?id=32492r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32492r=support Expected behavior: http://bugs.php.net/fix.php?id=32492r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32492r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32492r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=32492r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32492r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=32492r=dst IIS Stability: http://bugs.php.net/fix.php?id=32492r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32492r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32492r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32492r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32492r=mysqlcfg
RE: [PHP-DOC] printer_open() documentation error
Thanks Philip for the quick response! You're right, since my original post I found that it will return NULL or FALSE under different conditions. If the printer doesn't exist I get FALSE. I'm getting NULL for a valid printer that is for some reason refusing the connection. So I guess it is a bug, but maybe a useful one :) Regards, Greg -Original Message- Hello! I don't really have an answer except that according to the source here: http://lxr.php.net/source/pecl/printer/printer.c#256 It can return false but also has a chance to return nothing which doesn't seem like a good idea. That is, if the following condition fails nothing happens: if (DocumentProperties(NULL, resource-handle, resource-name, resource-pi2-pDevMode, NULL, DM_OUT_BUFFER) == IDOK) { I have no idea what this means but I consider this a PHP bug, not a documentation bug. I suggest you open up a bug report for this extension. I'm not sure how to report it though considering this extension is PECL yet cannot be found at pecl.php.net so I guess that's a bug too :) Once fixed, we'll document the change (I added a user comment for now). Quick fix: Just know that it may return NULL or FALSE so using a strict type check may not be the best route here. Regards, Philip On Wed, 30 Mar 2005, Greg Jackson wrote: Hi I'm not sure if this is a documentation error or a bug in php_printer.dll but here goes... printer_open() is returning NULL upon failure, not FALSE i.e. the following code doesn't work: ?php $printer = greg-mac\\LaserJet_5; if(($conn_printer = printer_open($printer)) === FALSE) die(Could not connect to $printer\r\n); var_dump($conn_printer); printer_close($conn_printer); ? This does: ?php $printer = greg-mac\\LaserJet_5; if(($conn_printer = printer_open($printer)) === NULL) die(Could not connect to $printer\r\n); var_dump($conn_printer); printer_close($conn_printer); ? Version info: PHP 4.3.10 (cli) (built: Dec 14 2004 17:48:04) php_printer.dll 29-Mar-2005 16:2840k Best regards, Greg Jackson Web Administrator Active Components (NZ) Ltd PO Box 100-544, Auckland New Zealand DDI: +64-9-443 9519 Sales: +64-9-443 9500 Fax: +64-9-443 9502 http://www.activecomponents.com/
[PHP-DOC] #32492 [Opn]: [DOC] French : preg_quote
ID: 32492 User updated by: jsgoupil at lookstrike dot com Reported By: jsgoupil at lookstrike dot com Status: Open Bug Type:Documentation problem PHP Version: 5CVS-2005-03-30 (dev) New Comment: J'ai vu aussi dans les snippets une autre petite erreur... Voyez la fonction functionclearstatcache/function plus de détails. par Voyez la fonction functionclearstatcache/function pour plus de détails. ou sinon il fallait mettre plus en détail, mais il y a un s à détail... Ca ma juste sauté aux yeux puisque c'était sous bin-safe... Previous Comments: [2005-03-30 01:05:29] jsgoupil at lookstrike dot com Description: fr/reference/pcre/function/preg-quote.xml $ Revision: 1.13 $ Les caractères échappés, il ne devrait y avoir qu'un seul \ et il y en a 2. Un . devrait être ajouté à la chaine Cette fonction gère les chaînes binaires Voici les diff -u http://jsgoupil.homelinux.com/phpdoc/diff20050329_1.txt http://jsgoupil.homelinux.com/phpdoc/diff20050329_2.txt Je sais que c'est peut-etre un peu poussé de modifier les snippets pour un point seulement... J'ai aussi remarqué que preg-quote.xml n'était simplement pas à jour à la version anglaise. Question : comment mettre à jour livedocs lors de modification de snippets ? je dois recompiler ? Jean-Sébastien Goupil -- Edit this bug report at http://bugs.php.net/?id=32492edit=1
[PHP-DOC] cvs: phpdoc /en/reference/mysql/functions mysql-real-escape-string.xml
philip Tue Mar 29 21:07:57 2005 EDT Modified files: /phpdoc/en/reference/mysql/functionsmysql-real-escape-string.xml Log: A MySQL connection is required before using mysql_real_escape_string(). http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml?r1=1.20r2=1.21ty=u Index: phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml diff -u phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml:1.20 phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml:1.21 --- phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xml:1.20 Wed Sep 29 12:26:30 2004 +++ phpdoc/en/reference/mysql/functions/mysql-real-escape-string.xmlTue Mar 29 21:07:56 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.20 $ -- +!-- $Revision: 1.21 $ -- !-- splitted from ./en/functions/mysql.xml, last change in rev 1.100 -- refentry id=function.mysql-real-escape-string refnamediv @@ -35,6 +35,15 @@ functionmysql_query/function. If binary data is to be inserted, this function must be used. /para +note + para + A MySQL connection is required before using + functionmysql_real_escape_string/function otherwise an error of + level literalE_WARNING/literal is generated, and false; is + returned. If parameterlink_identifier/parameter isn't defined, the + last MySQL connection is used. + /para +/note para functionmysql_real_escape_string/function calls MySQL's library function mysql_escape_string, which prepends backslashes to the following characters:
[PHP-DOC] cvs: phpdoc /en language-snippets.ent
philip Tue Mar 29 23:45:35 2005 EDT Modified files: /phpdoc/en language-snippets.ent Log: Added mysql.linkid.description for the new doc style linkid parameter listing. It's used in just about every MySQL function man page. http://cvs.php.net/diff.php/phpdoc/en/language-snippets.ent?r1=1.138r2=1.139ty=u Index: phpdoc/en/language-snippets.ent diff -u phpdoc/en/language-snippets.ent:1.138 phpdoc/en/language-snippets.ent:1.139 --- phpdoc/en/language-snippets.ent:1.138 Tue Mar 29 16:55:07 2005 +++ phpdoc/en/language-snippets.ent Tue Mar 29 23:45:34 2005 @@ -1,4 +1,4 @@ -!-- $Revision: 1.138 $ -- +!-- $Revision: 1.139 $ -- !-- Keep 'em sorted -- @@ -418,6 +418,11 @@ !ENTITY database.fetch-null 'notesimparaThis function sets NULL fields to PHP null; value./simpara/note' +!-- MySQL Notes -- +!ENTITY mysql.linkid.description 'paraThe MySQL connection. If the link +identifier is not specified, the last link opened by +functionmysql_connect/function is assumed./para' + !-- Sybase Notes -- !ENTITY sybase.ct.only 'notesimparaThis function is only available using the CT library interface to Sybase, and not the DB library./simpara/note'
[PHP-DOC] New docs style
What is this new documentation style I keep hearing about and where are templates/docs on how to implement it? Thanks, Chris
[PHP-DOC] cvs: phpdoc /en/reference/mysql/functions mysql-affected-rows.xml mysql-change-user.xml mysql-client-encoding.xml mysql-close.xml mysql-create-db.xml mysql-data-seek.xml
philip Wed Mar 30 00:05:09 2005 EDT Modified files: /phpdoc/en/reference/mysql/functionsmysql-affected-rows.xml mysql-change-user.xml mysql-client-encoding.xml mysql-close.xml mysql-create-db.xml mysql-data-seek.xml Log: Moved to new doc style; and other misc. changes including use of new entities. http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml?r1=1.19r2=1.20ty=u Index: phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml diff -u phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml:1.19 phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml:1.20 --- phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml:1.19Tue Mar 29 23:07:29 2005 +++ phpdoc/en/reference/mysql/functions/mysql-affected-rows.xml Wed Mar 30 00:05:08 2005 @@ -1,65 +1,70 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.19 $ -- -!-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -- +!-- $Revision: 1.20 $ -- refentry id=function.mysql-affected-rows refnamediv refnamemysql_affected_rows/refname - refpurposeGet number of affected rows in previous MySQL - operation/refpurpose + refpurposeGet number of affected rows in previous MySQL operation/refpurpose /refnamediv - refsect1 - titleDescription/title - methodsynopsis -typeint/typemethodnamemysql_affected_rows/methodname -methodparam choice=opttyperesource/typeparameter - link_identifier - /parameter/methodparam - /methodsynopsis - para - functionmysql_affected_rows/function returns the number - of rows affected by the last INSERT, UPDATE or DELETE query - associated with parameterlink_identifier/parameter. If the - link identifier isn't specified, the last link opened by - functionmysql_connect/function is assumed. + + refsect1 role=description + reftitle.description; + methodsynopsis + typeint/typemethodnamemysql_affected_rows/methodname + methodparam choice=opttyperesource/typeparameterlink_identifier/parameter/methodparam + /methodsynopsis + para + Get the number of affected rows by the last INSERT, UPDATE or DELETE query + associated with parameterlink_identifier/parameter. + /para + /refsect1 + + refsect1 role=parameters + reftitle.parameters; + para + variablelist +varlistentry + termparameterlink_identifier/parameter/term + listitem + mysql.linkid.description; + /listitem +/varlistentry + /variablelist + /para + /refsect1 + + refsect1 role=returnvalues + reftitle.returnvalues; + para + Returns the number of affected rows on success, and -1 if the last query + failed. /para - note - para -If you are using transactions, you need to call -functionmysql_affected_rows/function after your INSERT, -UPDATE, or DELETE query, not after the commit. - /para - /note para If the last query was a DELETE query with no WHERE clause, all of the records will have been deleted from the table but this function will return zero with MySQL versions prior to 4.1.2. /para - note - para -When using UPDATE, MySQL will not update columns where the new -value is the same as the old value. This creates the possibility -that functionmysql_affected_rows/function may not actually -equal the number of rows matched, only the number of rows that -were literally affected by the query. - /para - para -The REPLACE statement first deletes the record with the same primary key and -then inserts the new record. This function returns the number of deleted -records plus the number of inserted records. - /para - /note para - To retrieve the number of rows returned by a SELECT, it is possible to - use also functionmysql_num_rows/function. + When using UPDATE, MySQL will not update columns where the new value is the + same as the old value. This creates the possibility that + functionmysql_affected_rows/function may not actually equal the number + of rows matched, only the number of rows that were literally affected by + the query. /para para - If the last query failed, this function will return -1. + The REPLACE statement first deletes the record with the same primary key + and then inserts the new record. This function returns the number of + deleted records plus the number of inserted records. + /para + /refsect1 + + refsect1 role=examples + reftitle.examples; + para example -titleDelete-Query/title +titlefunctionmysql_affected_rows/function example/title programlisting role=php ![CDATA[ ?php -/* connect to database */ $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) {
Re: [PHP-DOC] New docs style
What is this new documentation style I keep hearing about and where are templates/docs on how to implement it? The HOWTO was updated long ago but the online version hasn't been updated. So instead read the official unofficial phpdoc wiki: http://wiki.phpdoc.info/DocSkel Regards, Philip
[PHP-DOC] cvs: phpdoc /en/reference/mysql/functions mysql-db-name.xml mysql-db-query.xml mysql-drop-db.xml mysql-errno.xml mysql-error.xml mysql-fetch-array.xml mysql-fetch-assoc.xml mysql-fetch-field.xml mysql-fetch-lengths.xml mysql-fetch-object.xml mysql-fetch-row.xml mysql-field-flags.xml mysql-field-len.xml mysql-field-name.xml mysql-field-seek.xml mysql-field-table.xml mysql-field-type.xml mysql-free-result.xml mysql-get-client-info.xml mysql-get-host-info.xml mysql-get-proto-info.xml mysql-get-server-info.xml mysql-info.xml mysql-insert-id.xml mysql-list-dbs.xml mysql-list-fields.xml mysql-list-processes.xml mysql-list-tables.xml mysql-num-fields.xml mysql-num-rows.xml mysql-pconnect.xml mysql-ping.xml mysql-result.xml mysql-select-db.xml mysql-tablename.xml mysql-unbuffered-query.xml
philip Wed Mar 30 01:27:14 2005 EDT Modified files: /phpdoc/en/reference/mysql/functionsmysql-db-name.xml mysql-db-query.xml mysql-drop-db.xml mysql-errno.xml mysql-error.xml mysql-fetch-array.xml mysql-fetch-assoc.xml mysql-fetch-field.xml mysql-fetch-lengths.xml mysql-fetch-object.xml mysql-fetch-row.xml mysql-field-flags.xml mysql-field-len.xml mysql-field-name.xml mysql-field-seek.xml mysql-field-table.xml mysql-field-type.xml mysql-free-result.xml mysql-get-client-info.xml mysql-get-host-info.xml mysql-get-proto-info.xml mysql-get-server-info.xml mysql-info.xml mysql-insert-id.xml mysql-list-dbs.xml mysql-list-fields.xml mysql-list-processes.xml mysql-list-tables.xml mysql-num-fields.xml mysql-num-rows.xml mysql-pconnect.xml mysql-ping.xml mysql-result.xml mysql-select-db.xml mysql-tablename.xml mysql-unbuffered-query.xml Log: WS. The methodsynopsis needed to be moved left one additional space. http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-db-name.xml?r1=1.6r2=1.7ty=u Index: phpdoc/en/reference/mysql/functions/mysql-db-name.xml diff -u phpdoc/en/reference/mysql/functions/mysql-db-name.xml:1.6 phpdoc/en/reference/mysql/functions/mysql-db-name.xml:1.7 --- phpdoc/en/reference/mysql/functions/mysql-db-name.xml:1.6 Tue Mar 29 23:07:29 2005 +++ phpdoc/en/reference/mysql/functions/mysql-db-name.xml Wed Mar 30 01:27:13 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.6 $ -- +!-- $Revision: 1.7 $ -- !-- splitted from ./en/functions/mysql.xml, last change in rev 1.23 -- refentry id=function.mysql-db-name refnamediv @@ -8,14 +8,12 @@ /refnamediv refsect1 titleDescription/title - methodsynopsis -typestring/typemethodnamemysql_db_name/methodname - methodparamtyperesource/typeparameterresult/parameter/methodparam -methodparamtypeint/typeparameterrow/parameter/methodparam -methodparam choice=opttypemixed/typeparameter - field - /parameter/methodparam - /methodsynopsis + methodsynopsis + typestring/typemethodnamemysql_db_name/methodname + methodparamtyperesource/typeparameterresult/parameter/methodparam + methodparamtypeint/typeparameterrow/parameter/methodparam + methodparam choice=opttypemixed/typeparameterfield/parameter/methodparam + /methodsynopsis para functionmysql_db_name/function takes as its first parameter the result pointer from a call to http://cvs.php.net/diff.php/phpdoc/en/reference/mysql/functions/mysql-db-query.xml?r1=1.7r2=1.8ty=u Index: phpdoc/en/reference/mysql/functions/mysql-db-query.xml diff -u phpdoc/en/reference/mysql/functions/mysql-db-query.xml:1.7 phpdoc/en/reference/mysql/functions/mysql-db-query.xml:1.8 --- phpdoc/en/reference/mysql/functions/mysql-db-query.xml:1.7 Tue Mar 29 23:07:29 2005 +++ phpdoc/en/reference/mysql/functions/mysql-db-query.xml Wed Mar 30 01:27:13 2005 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.7 $ -- +!-- $Revision: 1.8 $ -- !-- splitted from ./en/functions/mysql.xml, last change in rev 1.2 -- refentry id=function.mysql-db-query refnamediv @@ -8,14 +8,12 @@ /refnamediv refsect1 titleDescription/title - methodsynopsis -