[PHP-DOC] #21702 [Opn]: nested foreach on same array using reference fails
ID: 21702 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open -Bug Type: Scripting Engine problem +Bug Type: Documentation problem -Operating System: Linux (but probably any) +Operating System: Any -PHP Version: 4.2.2 +PHP Version: Any New Comment: Actually this is a dupe of bug #14607, but this PR is much more concise than that, so I'm going to keep 14607 bogus and make this alive. Since foreach() uses internal array pointer and references are designed to share one such pointer, the deeper loop gets confused and your script never gives the expected result. Virtually the script can be rewritten as... ?php $a = array(1, 2); for ($ptr = 0; $ptr count($a); $ptr++) { $b = $a[$ptr]; echo outer: $b br /\n; for ($ptr = 0; $ptr count($a); $ptr++) { $c = $a[$ptr]; echo inner: $c br /\n; } } ? Marking this as a documentation problem. Previous Comments: [2003-01-16 20:05:14] [EMAIL PROTECTED] Try this: ?php $a = array(1, 2); $ref = $a; foreach ($ref as $b) { echo outer: $bbr\n; foreach ($a as $c) echo -- inner: $cbr\n; } ? The output is: outer: 1 -- inner: 1 -- inner: 2 (i.e., the processing stops after the first iteration of the outer foreach). If I understand the docs well, the output should be: outer: 1 -- inner: 1 -- inner: 2 outer: 2 -- inner: 1 -- inner: 2 When you remove the ampersand from the assignment to $ref, it works as expected. The documentation is a bit unclear on this. It says Also note that foreach operates on a copy of the specified array, not the array itself, therefore the array pointer is not modified as with the each() construct..., which leads me to believe that the sample code should work. But then it goes on to say: However, the internal pointer of the original array *is* advanced with the processing of the array., which seems to contradict the first quotation??? This is probably a dupe of bug #14607, but that one is closed as bogus and I can't reopen it. Also see bug #5052, which is similar but not quite, and it's closed. -- Edit this bug report at http://bugs.php.net/?id=21702edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #21680 [WFx-Opn]: heredoc breaks with mac text format
ID: 21680 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Wont fix +Status: Open -Bug Type: Strings related +Bug Type: Documentation problem Operating System: FreeBSD 4 PHP Version: 4.3.0 -Assigned To: +Assigned To: philip New Comment: This needs to be documented sometime, assigning to self. Previous Comments: [2003-01-17 02:05:30] [EMAIL PROTECTED] Cool with me, I was just taken by suprise, by this behavior. [2003-01-16 15:02:22] [EMAIL PROTECTED] The 1st character before 'EOD;' must be a newline as defined by your operating system. Meaning that it can only be \r if you are using a MAC or an OS where \r is EOL. [2003-01-16 02:49:28] [EMAIL PROTECTED] It appears that the heredoc string type breaks if the script is in mac text format. This has been noticed before http://www.zend.com/lists/php-dev/200110/msg00815.html, but i havn't been able to find a bugreport? Im working in Windows with UltraEdit, and the following code breaks, when I use UltrEdit to convert from dos format to mac format: ?php echo EOD foo EOD; ? This error is produced: Parse error: parse error, unexpected $ in /usr/home/nej/public_html/heredoc.php on line 5 -- Edit this bug report at http://bugs.php.net/?id=21680edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #21702 [Opn]: nested foreach on same array using reference fails
ID: 21702 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Documentation problem Operating System: Any PHP Version: Any New Comment: Sorry, I meant the outer loop gets confused; not the deeper loop. Previous Comments: [2003-01-17 02:23:31] [EMAIL PROTECTED] Actually this is a dupe of bug #14607, but this PR is much more concise than that, so I'm going to keep 14607 bogus and make this alive. Since foreach() uses internal array pointer and references are designed to share one such pointer, the deeper loop gets confused and your script never gives the expected result. Virtually the script can be rewritten as... ?php $a = array(1, 2); for ($ptr = 0; $ptr count($a); $ptr++) { $b = $a[$ptr]; echo outer: $b br /\n; for ($ptr = 0; $ptr count($a); $ptr++) { $c = $a[$ptr]; echo inner: $c br /\n; } } ? Marking this as a documentation problem. [2003-01-16 20:05:14] [EMAIL PROTECTED] Try this: ?php $a = array(1, 2); $ref = $a; foreach ($ref as $b) { echo outer: $bbr\n; foreach ($a as $c) echo -- inner: $cbr\n; } ? The output is: outer: 1 -- inner: 1 -- inner: 2 (i.e., the processing stops after the first iteration of the outer foreach). If I understand the docs well, the output should be: outer: 1 -- inner: 1 -- inner: 2 outer: 2 -- inner: 1 -- inner: 2 When you remove the ampersand from the assignment to $ref, it works as expected. The documentation is a bit unclear on this. It says Also note that foreach operates on a copy of the specified array, not the array itself, therefore the array pointer is not modified as with the each() construct..., which leads me to believe that the sample code should work. But then it goes on to say: However, the internal pointer of the original array *is* advanced with the processing of the array., which seems to contradict the first quotation??? This is probably a dupe of bug #14607, but that one is closed as bogus and I can't reopen it. Also see bug #5052, which is similar but not quite, and it's closed. -- Edit this bug report at http://bugs.php.net/?id=21702edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #15461 [Opn-Csd]: configure fails for extension samples
ID: 15461 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: RedHat 6.2 and FreeBSD PHP Version: 4.1.1 New Comment: Closing for reasons already mentioned. Previous Comments: [2002-12-13 11:25:05] [EMAIL PROTECTED] Where did you find that link? I don't see it in the manual. The doc team never touches these docs anyway and it's widely known (by php-dev) that the ZendAPI docs are (or were) out-of-date. They've been updated since this but am leaving open for now. See: http://www.php.net/manual/en/zend.php These docs live in the ZendAPI module in php cvs now, not at Zend.com anymore. See also the various README's in the php4 source, such as: http://cvs.php.net/co.php/php4/README.SELF-CONTAINED-EXTENSIONS [2002-06-18 06:17:46] [EMAIL PROTECTED] Zend documentaton is outdated. [2002-02-09 01:04:59] [EMAIL PROTECTED] I've downloaded the Zend API code samples from http://www.zend.com/apidoc/examples.tar.gz. Untarred them and placed the first_module/ directory in ext/. Then I delete the existing ./configure and run ./buildconf. ./buildconf runs fine and --enable-first_module shows up in ./configure --help. I then run ./configure --enable-first_module which starts ok. But in a 4.1.1 source tree it dies with: Configuring extensions checking if the location of ZLIB install directory is defined... no checking whether to include ZLIB support... no : command not found checking BOOK: whether to enable the array experiments... no : command not found : command not found ./configure: ./configure: line 65325: syntax error: unexpected end of file and in a 4.0.6 source tree: checking whether to enable the bundled filePro support... no : command not found checking BOOK: whether to enable the first module... yes : command not found : command not found ./configure: ./configure: line 56828: syntax error: unexpected end of file The previous is run on a Redhat 6.2 box, where php-4.0.6 runs fine normally. I've tried the above on FreeBSD 4.1.1-STABLE box and 4.1.1 source, however ./configure --enable-first_module dies with: Configuring extensions checking if the location of ZLIB install directory is defined... no checking whether to include ZLIB support... no : not found checking BOOK: whether to enable the array experiments... no : not found : not found ./configure: 65312: Syntax error: end of file unexpected (expecting then) Am I missing something or is this a bug? Thank you, Hans -- Edit this bug report at http://bugs.php.net/?id=15461edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #21388 [Fbk-Opn]: [chm] bug on streams.php-stream-open-wrapper-ex.html
ID: 21388 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: Documentation problem Operating System: windows PHP Version: 4.3.0 New Comment: I guess the streams docs are still on Wez's TODO? :) Previous Comments: [2003-01-03 07:24:58] [EMAIL PROTECTED] ignore my last message... it's a mistake! [2003-01-03 07:23:38] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to Open. Thank you for helping us make PHP better. [2003-01-03 07:15:28] [EMAIL PROTECTED] Manual description: php_stream_open_wrapper_ex() is exactly like php_stream_open_wrapper(), but allows you to specify a php_stream_context object using context. To find out more about stream contexts, see XXX Ok, now I see that XXX is a number in manual's Function Reference. It looks pretty wired for me for a first time. Any other Roman number is ok, but XXX looks like thing that should be filled in later . Thing for discussion : Shouldn't it be a link to the XXX part of manual ? Or instead of see XXX - see XXX part of Function Reference ? BTW. PHP manual is a great job :) [2003-01-03 06:57:30] [EMAIL PROTECTED] I am afraid I cannot see the point. What is the bug? [2003-01-03 06:15:22] [EMAIL PROTECTED] I have found a bug on page streams.php-stream-open-wrapper-ex.html which is : To find out more about stream contexts, see XXX [chm date: 2002-12-27]... -- Edit this bug report at http://bugs.php.net/?id=21388edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/image/functions gd-info.xml
pollita Fri Jan 17 23:46:43 2003 EDT Added files: /phpdoc/en/reference/image/functionsgd-info.xml Log: New Function. Index: phpdoc/en/reference/image/functions/gd-info.xml +++ phpdoc/en/reference/image/functions/gd-info.xml ?xml version=1.0 encoding=iso-8859-1? !-- $Revision: 1.1 $ -- refentry id='function.gd-info' refnamediv refnamegd_info/refname refpurposeRetrieve information about the currently installed GD support/refpurpose /refnamediv refsect1 titleDescription/title methodsynopsis typearray/typemethodnamegd_info/methodname void/ /methodsynopsis simpara Returns an literalassociative array/literal describing the version and capabilities of the installed GD library. /simpara para table titleElements of array returned by functiongd_info/function/title tgroup cols=2 thead row entryAttribute/entry entryMeaning/entry /row /thead tbody row entryGD Version/entry entryliteralString/literal value describing the installed literallibgd/literal version./entry /row row entryFreetype Support/entry entryliteralboolean/literal value. literaltrue/literal if Freetype Support is installed./entry /row row entryFreetype Linkage/entry entryliteralString/literal value describing the way in which Freetype was linked. Expected values are: 'with freetype', 'with TTF library', and 'with unknown library'. This element will only be defined if literalFreetype Support/literal evaluated to literaltrue/literal./entry /row row entryT1Lib Support/entry entryliteralboolean/literal value. literaltrue/literal if literalT1Lib/literal support is included./entry /row row entryGIF Read Support/entry entryliteralboolean/literal value. literaltrue/literal if support for emphasisreading/emphasis literalGIF/literal images is included./entry /row row entryGIF Create Support/entry entryliteralboolean/literal value. literaltrue/literal if support for emphasiscreating/emphasis literalGIF/literal images is included./entry /row row entryJPG Support/entry entryliteralboolean/literal value. literaltrue/literal if literalJPG/literal support is included./entry /row row entryPNG Support/entry entryliteralboolean/literal value. literaltrue/literal if literalPNG/literal support is included./entry /row row entryWBMP Support/entry entryliteralboolean/literal value. literaltrue/literal if literalWBMP/literal support is included./entry /row row entryXBM Support/entry entryliteralboolean/literal value. literaltrue/literal if literalXBM/literal support is included./entry /row /tbody /tgroup /table /para para example titleUsing functiongd_info/function/title programlisting role=php ![CDATA[ ?php var_dump(gd_info()); /* Typical Output == array(9) { [GD Version]= string(24) bundled (2.0 compatible) [FreeType Support]= bool(false) [T1Lib Support]= bool(false) [GIF Read Support]= bool(true) [GIF Create Support]= bool(false) [JPG Support]= bool(false) [PNG Support]= bool(true) [WBMP Support]= bool(true) [XBM Support]= bool(false) } */ ? ]] /programlisting /example /para simpara See also: functionimagepng/function, functionimagejpeg/function, functionimagegif/function, functionimagewbmp/function, and functionimagetypes/function. /simpara /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 -- -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/chapters install.windows.xml
philip Sat Jan 18 00:00:07 2003 EDT Modified files: /phpdoc/en/chapters install.windows.xml Log: Added information based off bug #17002 which closes this bug. Basically some dlls require PATH modification, used oracle as an example. Index: phpdoc/en/chapters/install.windows.xml diff -u phpdoc/en/chapters/install.windows.xml:1.20 phpdoc/en/chapters/install.windows.xml:1.21 --- phpdoc/en/chapters/install.windows.xml:1.20 Fri Nov 22 13:01:12 2002 +++ phpdoc/en/chapters/install.windows.xml Sat Jan 18 00:00:06 2003 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.20 $ -- +!-- $Revision: 1.21 $ -- sect1 id=install.windows titleInstallation on Windows systems/title para @@ -190,6 +190,11 @@ The PHP binary, the SAPI modules, and some extensions rely on external DLLs for execution. Make sure that these DLLs in the distribution exist in a directory that is in the Windows PATH. +For example, if you enable literalphp_oci8.dll/literal in +php.ini; then you'll want to make sure the Oracle home directory +can be seen in PATH so PHP can find literaloci.dll/literal. + /para + para The best bet to do it is to copy the files below into your system directory, which is typically: simplelist -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #17002 [Opn-Csd]: Unable to load php_oci8.dll ONLY in command line mode
ID: 17002 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Win98 PHP Version: 4.2.0 New Comment: This has now been documented, see: http://cvs.php.net/cvs.php/phpdoc/en/chapters/install.windows.xml Thanks for the report :) Previous Comments: [2002-05-05 12:09:28] [EMAIL PROTECTED] Hm... it seems to me a good idea to note somewhere in the manual that PHP (or Windows) searches for DLL's in %PATH% and %SYSTEM%. Reopening as a documentation problem. [2002-05-05 12:04:48] [EMAIL PROTECTED] Of course, it is NOT a bug of php. [2002-05-05 12:01:11] [EMAIL PROTECTED] After failed many times, I happened to find the cause. I think it maybe helpful for many people who reported or asked the same question that I have seen on www.php.net . It is the PATH has not been correctly set. When loading php_oci8.dll, this DLL file search for the other DLL file oci.dll in current directory, PATH environment and %SYSTEM%(on Windows). If oci.dll can not be found, the OS will tell you Unable to load dynamic library : php_oci8.dll. If you installed Oracle RDBMS on your system, then the file oci.dll is in Oralce Home directory. So you must include Oracle Home Directory in PATH environment, on my computer it is D:\Oracle\ora81\Bin. Perhaps, the same problem on different platform can be solved in same way, try it. I am lucky to find the cause in almost ten days, I hope people will not be worried about this problem any longer. Dong Peng Lanzhou Railway Universiy China 2002-5-6 00:06 [2002-05-04 05:15:29] [EMAIL PROTECTED] The bug system is not the appropriate forum for asking support questions. For a list of a range of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php [2002-05-04 05:00:24] [EMAIL PROTECTED] Unable to load php_oci8.dll ONLY in command line mode I have just installed php 4.2.0 for win32 on my computer. I found the same bug as php (4.1.2). There is nothing wrong when I use php in ISAPI mode, and I can connect to Oracle 8i(8.1.7 Personal Edition) successfully and manipulate data too. but when I use php in command line mode to process some task which can only run once, the system show a message box with the text below : 'Unable to load dynamic library c:\php420\extensions\php_oci8.dll. ' The extension file php_oci8.dll does exist in the above directory, and can work correctly in ISAPI mode. So I considered that there is a bug in php.exe on loading dynamic library. Is it? Please help me. Dong Peng 2002-5-4 -- Edit this bug report at http://bugs.php.net/?id=17002edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #17324 [Opn-Csd]: charset in polish chm is wrong
ID: 17324 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: winxp PHP Version: 4.2.1 New Comment: This is fixed, from phpdoc/chm/make_chm.php pl = array( langcode = 0x415 Polish, preferred_charset = Windows-1250, preferred_font = $DEFAULT_FONT ), Previous Comments: [2002-11-01 04:10:10] [EMAIL PROTECTED] There are actually no 10th edition of the Polish manual... But there is a new one available from php.net approx. every week, if all goes well.. [2002-10-31 18:01:12] [EMAIL PROTECTED] Strangely there is still sth wrong with coding. All charset and coding is ok, but chm seems to set ISO-8859-1 or in some files also it is set to windows-1250 and letters coding is in ISO-8859-2. I suppose that coding it all to windows-1250 should make it work, because it's the only right coding in polish windows, and I don't think that anyone would use it outside of Poland and on other system than windows :) [2002-10-31 13:57:34] [EMAIL PROTECTED] Does the problem still exist in the latest version (10th edition) of the chm manual? [2002-05-21 02:13:27] [EMAIL PROTECTED] It's true. Additionaly, users can't search the manual because of incompatible charsets. I've investigated this problem about month ago. There is no other way to solve it than converting the whole manual to cp-1250 and changing meta before compiling chm. I hope it would be possible with the new version of chm. [2002-05-20 19:50:39] [EMAIL PROTECTED] codepage in polish chm is wrong. In head of all html files included into chm documentation charset is set to iso8952-2 but letters are written like this: Rozdzia#179; instead of Rozdzia³ But also in list on the left, polish letters are shown wrong despite of that are written ok. best regards Andrzej Korcala -- Edit this bug report at http://bugs.php.net/?id=17324edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/session/functions session-register.xml
philip Sat Jan 18 00:38:52 2003 EDT Modified files: /phpdoc/en/reference/session/functions session-register.xml Log: Mention that $_SESSION does not implicitly call session_start() like session_register() does. This deals with bug #19068 Index: phpdoc/en/reference/session/functions/session-register.xml diff -u phpdoc/en/reference/session/functions/session-register.xml:1.6 phpdoc/en/reference/session/functions/session-register.xml:1.7 --- phpdoc/en/reference/session/functions/session-register.xml:1.6 Tue Dec 17 05:30:05 2002 +++ phpdoc/en/reference/session/functions/session-register.xml Sat Jan 18 00:38:52 +2003 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.6 $ -- +!-- $Revision: 1.7 $ -- !-- splitted from ./en/functions/session.xml, last change in rev 1.2 -- refentry id=function.session-register refnamediv @@ -56,7 +56,8 @@ para If functionsession_start/function was not called before this function is called, an implicit call to functionsession_start/function with no - parameters will be made. + parameters will be made. varname$_SESSION/varname does not mimick + this behavior and requires functionsession_start/function before use. /para para You can also create a session variable by simply setting the -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/session reference.xml
philip Sat Jan 18 00:52:05 2003 EDT Modified files: /phpdoc/en/reference/sessionreference.xml Log: You must call session_start() before using $_SESSION. This closes bug #19068 Index: phpdoc/en/reference/session/reference.xml diff -u phpdoc/en/reference/session/reference.xml:1.27 phpdoc/en/reference/session/reference.xml:1.28 --- phpdoc/en/reference/session/reference.xml:1.27 Thu Dec 19 07:44:07 2002 +++ phpdoc/en/reference/session/reference.xml Sat Jan 18 00:52:05 2003 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.27 $ -- +!-- $Revision: 1.28 $ -- reference id=ref.session titleSession handling functions/title titleabbrevSessions/titleabbrev @@ -118,7 +118,7 @@ reftitle.examples; note para - As of PHP 4.1.0, varname$_SESSION/varname is available as + As of PHP 4.1.0, varname$_SESSION/varname is available as a global variable just like varname$_POST/varname, varname$_GET/varname, varname$_REQUEST/varname and so on. Unlike varname$HTTP_SESSION_VARS/varname, @@ -129,7 +129,9 @@ documentation has been changed to use varname$_SESSION/varname everywhere. You can substitute varname$HTTP_SESSION_VARS/varname for - varname$_SESSION/varname, if you prefer the former. + varname$_SESSION/varname, if you prefer the former. Also note + that you must start your session using functionsession_start/function + before use of varname$_SESSION/varname becomes available. /para para The keys in the varname$_SESSION/varname associative -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #19068 [Opn-Csd]: $_SESSION behaves like session_register(), but doesn't call session_start()
ID: 19068 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Any PHP Version: 4CVS-2002-08-23 New Comment: This has now been documented: http://cvs.php.net/cvs.php/phpdoc/en/reference/session/functions/session-register.xml http://cvs.php.net/cvs.php/phpdoc/en/reference/session/reference.xml Thanks for the report :) Previous Comments: [2002-08-23 08:12:00] [EMAIL PROTECTED] Damn, doc problem of course. [2002-08-23 08:10:38] [EMAIL PROTECTED] The manual page about session_register (http://www.php.net/manual/en/function.session-register.php) says: Caution: If you are using $_SESSION (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered() and session_unregister(). and a few lines later If session_start() was not called before this function is called, an implicit call to session_start() with no parameters will be made. But the latter is not true if only $_SESSION is used to register a session variable. The current implementation requires a manual call to session_start(). This should be noted there. Idially, it should be mentioned also at http://www.php.net/manual/en/ref.session.php (where it says: Note: As of PHP 4.1.0, $_SESSION is available as global variable just like ...) and maybe also at http://www.php.net/manual/en//language.variables.predefined.php (which may be too much good will though ;) -- Edit this bug report at http://bugs.php.net/?id=19068edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/strings/functions get-meta-tags.xml
philip Sat Jan 18 01:03:27 2003 EDT Removed files: /phpdoc/en/reference/strings/functions get-meta-tags.xml Log: Moving this to the Misc section as it's not a string function. It will be closer to get_browser and this closes bug #19208 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/misc get-meta-tags.xml
philip Sat Jan 18 01:04:15 2003 EDT Added files: /phpdoc/en/reference/misc get-meta-tags.xml Log: Moving this here from the string section. This closes bug #19208 Index: phpdoc/en/reference/misc/get-meta-tags.xml +++ phpdoc/en/reference/misc/get-meta-tags.xml ?xml version=1.0 encoding=iso-8859-1? !-- $Revision: 1.1 $ -- !-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -- refentry id=function.get-meta-tags refnamediv refnameget_meta_tags/refname refpurpose Extracts all meta tag content attributes from a file and returns an array /refpurpose /refnamediv refsect1 titleDescription/title methodsynopsis typearray/typemethodnameget_meta_tags/methodname methodparamtypestring/typeparameterfilename/parameter/methodparam methodparam choice=opttypeint/typeparameteruse_include_path/parameter/methodparam /methodsynopsis para Opens parameterfilename/parameter and parses it line by line for lt;meta tags of the form example titleMeta Tags Example/title programlisting role=html ![CDATA[ meta name=author content=name meta name=tags content=php3 documentation /head !-- parsing stops here -- ]] /programlisting /example (pay attention to line endings - PHP uses a native function to parse the input, so a Mac file won't work on Unix). /para para The value of the name property becomes the key, the value of the content property becomes the value of the returned array, so you can easily use standard array functions to traverse it or access single values. Special characters in the value of the name property are substituted with '_', the rest is converted to lower case. /para para Setting parameteruse_include_path/parameter to 1 will result in PHP trying to open the file along the standard include path. /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 -- -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/misc get-meta-tags.xml
philip Sat Jan 18 01:06:23 2003 EDT Removed files: /phpdoc/en/reference/misc get-meta-tags.xml Log: I'm dumb, this goes in the url section :) -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/url get-meta-tags.xml
philip Sat Jan 18 01:07:02 2003 EDT Added files: /phpdoc/en/reference/urlget-meta-tags.xml Log: This is the best place for this function and closes bug #19208 Index: phpdoc/en/reference/url/get-meta-tags.xml +++ phpdoc/en/reference/url/get-meta-tags.xml ?xml version=1.0 encoding=iso-8859-1? !-- $Revision: 1.1 $ -- !-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -- refentry id=function.get-meta-tags refnamediv refnameget_meta_tags/refname refpurpose Extracts all meta tag content attributes from a file and returns an array /refpurpose /refnamediv refsect1 titleDescription/title methodsynopsis typearray/typemethodnameget_meta_tags/methodname methodparamtypestring/typeparameterfilename/parameter/methodparam methodparam choice=opttypeint/typeparameteruse_include_path/parameter/methodparam /methodsynopsis para Opens parameterfilename/parameter and parses it line by line for lt;meta tags of the form example titleMeta Tags Example/title programlisting role=html ![CDATA[ meta name=author content=name meta name=tags content=php3 documentation /head !-- parsing stops here -- ]] /programlisting /example (pay attention to line endings - PHP uses a native function to parse the input, so a Mac file won't work on Unix). /para para The value of the name property becomes the key, the value of the content property becomes the value of the returned array, so you can easily use standard array functions to traverse it or access single values. Special characters in the value of the name property are substituted with '_', the rest is converted to lower case. /para para Setting parameteruse_include_path/parameter to 1 will result in PHP trying to open the file along the standard include path. /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 -- -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #19208 [Opn-Csd]: get_meta_tags appropriate for strings functions?
ID: 19208 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type:Documentation problem PHP Version: 4.2.2 New Comment: It has been moved to the URL section. Thanks for the report :) Previous Comments: [2002-08-30 23:19:41] [EMAIL PROTECTED] The function get_meta_tags listed in the string function does not operate on a string. The fact that it returns a string does not seem to be appropriate justification for it's placement here. It seems as if it should be in an html parsing functions sections. I would definately like to see more functions like this for parsing html content. -- Edit this bug report at http://bugs.php.net/?id=19208edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/language constants.xml
philip Sat Jan 18 01:42:27 2003 EDT Modified files: /phpdoc/en/language constants.xml Log: Document the special magical constants (__LINE__ and friends). This also closes bug #19196 Index: phpdoc/en/language/constants.xml diff -u phpdoc/en/language/constants.xml:1.26 phpdoc/en/language/constants.xml:1.27 --- phpdoc/en/language/constants.xml:1.26 Wed Oct 9 05:50:22 2002 +++ phpdoc/en/language/constants.xmlSat Jan 18 01:42:27 2003 @@ -1,16 +1,15 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.26 $ -- +!-- $Revision: 1.27 $ -- chapter id=language.constants titleConstants/title simpara A constant is a identifier (name) for a simple value. As the name suggests, that value cannot change during the execution of the - script. (The 'magic constants' constant__FILE__/constant and - constant__LINE__/constant appear to be an exception to this, - but they're not actually constants.) A constant is case-sensitive - by default. By convention constant identifiers are always - uppercase. + script (except the link linkend=language.constants.predefined + magic constants/link which aren't actually constants). + A constant is case-sensitive by default. By convention constant + identifiers are always uppercase. /simpara para The name of a constant follows the same rules as any label in PHP. A @@ -132,10 +131,57 @@ are available, either via dynamic loading or because they have been compiled in. /simpara + + para +There are four magical constants that change depending on +where they're used. For example, the value of +constant__LINE__/constant depends on the line that it's +used on in your script. These special constants are +case-insensitive and are as follows: + /para + para +table + titleA few magical PHP constants/title + tgroup cols=2 + thead + row +entryName/entry +entryDescription/entry + /row + /thead + tbody + row +entryconstant__LINE__/constant/entry +entry + The current line number of the file. +/entry + /row + row +entryconstant__FILE__/constant/entry +entry + The full path and filename of the file. +/entry + /row + row +entryconstant__FUNCTION__/constant/entry +entry + The function name. This was added in PHP 4.3.0 +/entry + /row + row +entryconstant__CLASS__/constant/entry +entry + The class name. This was added in PHP 4.3.0 +/entry + /row + /tbody + /tgroup +/table + /para simpara A list of predefined constants is available in the section link -linkend=reserved.constantsPredefined constants/link. +linkend=reserved.constantsReserved predefined constants/link. /simpara -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #19196 [Opn-Csd]: Explanation of magic constants not included in documentation
ID: 19196 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type:Documentation problem PHP Version: 4.3.0 New Comment: These have now been documented: http://cvs.php.net/cvs.php/phpdoc/en/language/constants.xml Thanks for the report :) Previous Comments: [2002-09-16 18:47:50] [EMAIL PROTECTED] On a related note, the new __CLASS__ and __FUNCTION__ constants should be documented with these too. These four magical constants are also listed here: http://www.php.net/manual/en/reserved.php (__CLASS__ and __FUNCTION__ were added in 4.3.0) [2002-08-30 07:58:55] [EMAIL PROTECTED] This bug report has little to do with the implementation of PHP itself. This is about the documentation for the language. I was having a very hard time finding information about the so-called magic constants, namely __FILE__ and __LINE__. Apparently, the use of these constants is very common. The problem is, throughout the entire PHP.net web site, there is only one reference made to these magic constants, and their mention is not very informative at all. See this page: http://www.php.net/manual/en/language.constants.php The only other references to __FILE__ I could find, using Google on the PHP.net site, were in user comments, and they were only used in examples, so there was no clear definition of the use of these constants. After searching the web for any sort of definition for the magic constants, I finally found one at this page: http://www.sunsite.ualberta.ca/Documentation/Misc/php-3.0.15/language.constants.html In any case, the reason I was writing is because I just thought it would be a good idea to include a definition of this sort somewhere in the online documentation of PHP. If it is included somewhere that I haven't looked or wasn't able to find, then I apologize for the intrusion. -- Edit this bug report at http://bugs.php.net/?id=19196edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/chapters install.iis.xml
philip Sat Jan 18 01:57:01 2003 EDT Modified files: /phpdoc/en/chapters install.iis.xml Log: Implemented changes to PSW4 docs as per bug #19491. This includes: s/forward slashes/backslashes and describing how to implement registery changes. Index: phpdoc/en/chapters/install.iis.xml diff -u phpdoc/en/chapters/install.iis.xml:1.2 phpdoc/en/chapters/install.iis.xml:1.3 --- phpdoc/en/chapters/install.iis.xml:1.2 Thu Mar 28 12:37:00 2002 +++ phpdoc/en/chapters/install.iis.xml Sat Jan 18 01:57:01 2003 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.2 $ -- +!-- $Revision: 1.3 $ -- sect1 id=install.iis titleServers-IIS/PWS/title para @@ -187,8 +187,11 @@ simpara Edit the enclosed filenamepws-php4cgi.reg/filename file (look into the SAPI dir) to reflect the location of -your php.exe. Forward slashes should be escaped, for example: +your filenamephp.exe/filename. Backslashes should be +escaped, for example: literal[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] .php=c:\\php\\php.exe/literal +Now merge this registery file into your system; you may do +this by double-clicking it. /simpara /listitem listitem @@ -208,8 +211,11 @@ simpara Edit the enclosed filenamepws-php4isapi.reg/filename file (look into the SAPI dir) to reflect the location of -your php4isapi.dll. Forward slashes should be escaped, for example: +your filenamephp4isapi.dll/filename. Backslashes should +be escaped, for example: literal[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] .php=c:\\php\\sapi\\php4isapi.dll/literal +Now merge this registery file into your system; you may do +this by double-clicking it. /simpara /listitem listitem -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #19491 [Opn-Csd]: Missing part of PWS 4 installation steps
ID: 19491 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Windows PHP Version: 4CVS-2002-09-19 New Comment: This has now been documented: http://cvs.php.net/cvs.php/phpdoc/en/chapters/install.iis.xml Thanks for the report :) Previous Comments: [2002-09-19 03:03:33] [EMAIL PROTECTED] In manual page: http://www.php.net/manual/en/install.iis.php Windows and PWS 4 or newer part, it said: [QUOTE] If you choose the CGI binary, do the following: Edit the enclosed pws-php4cgi.reg file (look into the SAPI dir) to reflect the location of your php.exe. Forward slashes should be escaped, for example: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] .php=c:\\php\\php.exe [QUOTE ENDS] That's all? At least you should double click this file and MERGE it to your registry. Also for ISAPI module part. There's more. It call '\' as Forward slash, but I call it backslash ... :-D -- Edit this bug report at http://bugs.php.net/?id=19491edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] cvs: phpdoc /en/reference/pdf reference.xml
philip Sat Jan 18 02:13:16 2003 EDT Modified files: /phpdoc/en/reference/pdfreference.xml Log: Replace deprecated function from example as per bug #20521 Index: phpdoc/en/reference/pdf/reference.xml diff -u phpdoc/en/reference/pdf/reference.xml:1.6 phpdoc/en/reference/pdf/reference.xml:1.7 --- phpdoc/en/reference/pdf/reference.xml:1.6 Sun Dec 1 12:10:16 2002 +++ phpdoc/en/reference/pdf/reference.xml Sat Jan 18 02:13:16 2003 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.6 $ -- +!-- $Revision: 1.7 $ -- reference id=ref.pdf titlePDF functions /title titleabbrevPDF/titleabbrev @@ -266,7 +266,8 @@ pdf_set_info($pdf, Subject, Testing); pdf_begin_page($pdf, 595, 842); pdf_add_outline($pdf, Page 1); -pdf_set_font($pdf, Times-Roman, 30, host); +$font = pdf_findfont($pdf, Times New Roman, winansi, 1); +pdf_setfont($pdf, $font, 10); pdf_set_value($pdf, textrendering, 1); pdf_show_xy($pdf, Times Roman outlined, 50, 750); pdf_moveto($pdf, 50, 740); -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DOC] #20521 [Opn-Csd]: pdf_set_font: Deprecated function in use (Examples)
ID: 20521 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type:Documentation problem PHP Version: 4.2.2 New Comment: This has been fixed. http://cvs.php.net/cvs.php/phpdoc/en/reference/pdf/reference.xml Thanks for the report :) Previous Comments: [2002-11-20 10:22:12] [EMAIL PROTECTED] I was visiting the following documentation part: http://www.php.net/manual/en/ref.pdf.php The first example contains the function pdf_set_font() which is deprecated. I guess it would be better to write examples without deprecated functions. Maybe this can be fixed in future, to avoid the use of deprecated functions. Greetings. -- Edit this bug report at http://bugs.php.net/?id=20521edit=1 -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php