[PHP-DOC] #30960 [NEW]: Problem with String conversion to numbers example in french doc
From: fgaloppin at it-optics dot com Operating system: All PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: Problem with String conversion to numbers example in french doc Description: In String conversion to numbers part, in french documentation, there is this example code : $foo = 10.0 pigs + 1; // $foo is integer (11) It's wrong .. testing it give float (11) according to the english documentation. -- Edit bug report at http://bugs.php.net/?id=30960edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30960r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30960r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30960r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=30960r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=30960r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30960r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30960r=needscript Try newer version: http://bugs.php.net/fix.php?id=30960r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30960r=support Expected behavior: http://bugs.php.net/fix.php?id=30960r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30960r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30960r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=30960r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30960r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=30960r=dst IIS Stability: http://bugs.php.net/fix.php?id=30960r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30960r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30960r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30960r=mysqlcfg
[PHP-DOC] #30960 [Opn-Csd]: Problem with String conversion to numbers example in french doc
ID: 30960 Updated by: [EMAIL PROTECTED] Reported By: fgaloppin at it-optics dot com -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: All PHP Version: Irrelevant New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: [2004-12-02 14:15:53] fgaloppin at it-optics dot com Description: In String conversion to numbers part, in french documentation, there is this example code : $foo = 10.0 pigs + 1; // $foo is integer (11) It's wrong .. testing it give float (11) according to the english documentation. -- Edit this bug report at http://bugs.php.net/?id=30960edit=1
[PHP-DOC] #30437 [Opn]: include fails to open file from parent directory of include path
ID: 30437 Updated by: [EMAIL PROTECTED] Reported By: gabe at mudbuginfo dot com Status: Open -Bug Type: *Directory/Filesystem functions +Bug Type: Documentation problem Operating System: linux 2.4.26 PHP Version: 4.3.9 New Comment: Making it documentation problem then. Previous Comments: [2004-12-02 16:07:30] gabe at mudbuginfo dot com Bug is different from 30881: This bug does not refer to the CLI SAPI, and refers to files from the include_path and not the current working directory. Prehaps the documentation should be updated to mention that when including a file in a parent directory (eg: '../blah.php'), paths within the include_path will not be searched. [2004-11-27 16:46:11] [EMAIL PROTECTED] Same as #30881, which is already documented. [2004-10-14 22:22:51] gabe at mudbuginfo dot com Easier test case: Say for example, your include path is: /usr/local/lib/ php (most people have this or something similar) ?php echo including normal DB\n; include 'DB.php'; echo including ../php DB\n; include '../php/DB.php'; ? The second include statement will fail with: including normal DB including ../php DB Warning: main(../php/DB.php): failed to open stream: No such file or directory in /tmp/x.php on line 5 Warning: main(): Failed opening '../php/DB.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/ local/lib/mis:/usr/local/lib/eclipse') in /tmp/x.php on line 5 [2004-10-14 22:06:53] gabe at mudbuginfo dot com Note, open_basedir is not set anywhere for this site. [2004-10-14 18:23:32] gabe at mudbuginfo dot com Description: This site prepends the full path to the site's directory for site-specific include files with the following code in the file /files/client/ global_fellowship_search/proto1/include/init.php $site_include_path = dirname(__FILE__); $sys_include_path = ini_get('include_path'); ini_set('include_path', $site_include_path . ':' . $sys_include_path); which creates an include path of '/files/ client/global_fellowship_search/proto1/include:.:/usr/ local/lib/php:/usr/local/lib/mis:/usr/local/lib/ eclipse' When attempting to include the file /files/ client/global_fellowship_search/proto1/mail/ forgot_pass.mail relative to the site's prepended include directory with include_once '../mail/ forgot_pass.mail';, PHP fails to find the file. Supplying an absolute path to the file works. It just seems like PHP will not respect crawling up a '..' parent directory link for any path within the include_path except for '.' Note that this code was placed in the 'index2.php' file just for simplicity in demonstration; in implementation this inclusion code is held within another file in the include/ directory which is included several different directory levels. Reproduce code: --- (Within /files/client/ global_fellowship_search/proto1/index2.php) include_once '../mail/forgot_pass.mail'; Expected result: Inclusion of /files/client/ global_fellowship_search/proto1/mail/forgot_pass.mail Actual result: -- Warning: main(../mail/forgot_pass.mail): failed to open stream: No such file or directory in /files/client/ global_fellowship_search/proto1/index2.php on line 5 Warning: main(): Failed opening '../mail/ forgot_pass.mail' for inclusion (include_path='/files/ client/global_fellowship_search/proto1/include:.:/usr/ local/lib/php:/usr/local/lib/mis:/usr/local/lib/ eclipse') in /files/client/global_fellowship_search/ proto1/index2.php on line 5 -- Edit this bug report at http://bugs.php.net/?id=30437edit=1
[PHP-DOC] °í°´°ü¸®ÇÁ·Î±×·¥-¹®ÀÚ,Æѽº,À½¼º¾È³» ÇÁ·Î±×·¥ ¹«·á ¹èÆ÷À̺¥Æ® hqijr
jl uwxu pdmi m sbqbbcsyqxrylopbhbztx ou h jego
[PHP-DOC] Re: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] SimpleXML marked as EXPERIMENTAL
On Thu, 2 Dec 2004, Philip Olson wrote: As long as we are in dropping EXPERIMENTAL Mode: Shouldn't we drop EXPERIMENTAL from php4 domxml living in PECL? AFAIRC once Cgristian Stocker said, it is stable, obviously no API changes will happen etc. Any reason not to drop EXPERIMENTAL from docs and pecl source for domxml? Please don't drop it there because that would sooner or later mean that people will start using it a lot. The idea was to drop domxml once we have dom - we have dom now. Experimental is not a synonym for Deprecated. It sounds like DomXML is deprecated and not experimental. Since dom is only for php5 we can't deprecate domxml in php4 without deprecating all of php4 which would be a bad idea. -Rasmus
Re: [PHP-DOC] regd: Source code
Hello, It seems you've sent this to the wrong list. You want [EMAIL PROTECTED] S Tomar Rajeev (ext) wrote: Hello All, I am a new member of this group and in the world of PHP;-) In my company, around 12 web pages are there. So, I want to make a web portal in PHP from where all these web pages can be accessed. Also, I want to provide the link for the web pages ( will make three categories) in three horizontal dynamic menu. If some user clicks on the link then the corresponding web page should be shown in the same web page just below the dynamic menu. It will be great if you could help me in finding the source code of this type of web page in PHP. Thanking in Anticipation. Regards, Rajeev Tomar
Re: [PHP-DOC] SimpleXML marked as EXPERIMENTAL
Hi Marcus, Hello Friedhelm, Thursday, December 2, 2004, 2:18:08 AM, you wrote: Hi, It was probably just overlooked? I'll remove EXPERIMENTAL status, unless someone speaks up. S Andi Gutmans wrote: Hi, Is there a reason why SimpleXML is marked as experimental in the PHP documentation? EXPERIMENTAL status was removed from the source tree a few months ago. Andi As long as we are in dropping EXPERIMENTAL Mode: Shouldn't we drop EXPERIMENTAL from php4 domxml living in PECL? AFAIRC once Cgristian Stocker said, it is stable, obviously no API changes will happen etc. Any reason not to drop EXPERIMENTAL from docs and pecl source for domxml? Please don't drop it there because that would sooner or later mean that people will start using it a lot. The idea was to drop domxml once we have dom - we have dom now. Is your POV, that you don't want people to use domxml with php4? If so, the EXPERIMENTAL tag for php4 should stay to hinder people using domxml with php4? My impression was to use the EXPERIMENTAL tag for 'unstable' features, not to hinder people to use a feature. domxml is php4 only and not longer in the packages for php5, because it was moved to pecl and is deprecated for php5. One has to take extra steps to use domxml with php 5. That said, I can't imagine people start using php 5 with domxml, they would use dom. Simple question: Is domxml still experimental? I think no ;-) From the archives: http://marc.theaimsgroup.com/?l=php-devm=109358625722096w=2 Regards Friedhelm
[PHP-DOC] cvs: phpdoc /en/reference/strings/functions levenshtein.xml
seanThu Dec 2 12:52:04 2004 EDT Modified files: /phpdoc/en/reference/strings/functions levenshtein.xml Log: added example http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/levenshtein.xml?r1=1.5r2=1.6ty=u Index: phpdoc/en/reference/strings/functions/levenshtein.xml diff -u phpdoc/en/reference/strings/functions/levenshtein.xml:1.5 phpdoc/en/reference/strings/functions/levenshtein.xml:1.6 --- phpdoc/en/reference/strings/functions/levenshtein.xml:1.5 Thu Oct 28 05:44:22 2004 +++ phpdoc/en/reference/strings/functions/levenshtein.xml Thu Dec 2 12:52:04 2004 @@ -1,9 +1,9 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.5 $ -- +!-- $Revision: 1.6 $ -- !-- splitted from ./en/functions/strings.xml, last change in rev 1.12 -- refentry id=function.levenshtein refnamediv -refnamelevenshtein/refname +refnamelevenshtein/refname refpurpose Calculate Levenshtein distance between two strings /refpurpose @@ -48,14 +48,14 @@ insert, replace and delete operations needed to transform parameterstr1/parameter into parameterstr2/parameter. /para -para +para A second variant will take three additional parameters that define the cost of insert, replace and delete operations. This is more general and adaptive than variant one, but not as efficient. /para !-- Callback function not yet implemented, see bug #29552 -para +para The third variant (which is not implemented yet) will be the most general and adaptive, but also the slowest alternative. It will call a user-supplied function that will determine the cost for @@ -105,7 +105,7 @@ describing the cost for this particular operation, but it may decide to use only some of the supplied arguments. /para -para +para The user-supplied function approach offers the possibility to take into account the relevance of and/or difference between certain symbols (characters) or even the context those symbols @@ -116,6 +116,68 @@ /para -- para + example + titlefunctionlevenshtein/function example/title + programlisting role=php +![CDATA[ +?php +// input misspelled word +$myWord = 'carrrot'; + +// array of words to check against +$words = array('apple','pineapple','banana','orange', +'radish','carrot','pea','bean','potato'); + +// no shortest distance found, yet +$shortest = -1; + +// loop through words to find the closest +foreach ($words AS $word) { + +// calculate the distance between the input word, +// and the current word +$thisLev = levenshtein($myWord, $word); + +// check for an exact match +if ($thisLev == 0) { + +// closest word is this one (exact match) +$closest = $word; +$shortest = 0; + +// break out of the loop; we've found an exact match +break; +} + +// if this distance is less than the next found shortest +// distance, OR if a next shortest word has not yet been found +if ($thisLev = $shortest || $shortest 0) { +// set the closest matchm, and shortest distance +$closest = $word; +$shortest = $thisLev; +} +} + +echo Input word: $myWord\n; +if ($shortest == 0) { +echo Exact match found: $closest\n; +} else { +echo Did you mean: $closest?\n; +} + +? +]] + /programlisting + /example + example.outputs; + screen +![CDATA[ +Input word: carrrot +Did you mean: carrot? +]] + /screen +/para +para See also functionsoundex/function, functionsimilar_text/function, and functionmetaphone/function.
[PHP-DOC] #30955 [Opn-Fbk]: PATCH: setting TEMP so SQLite will work on Windows
ID: 30955 Updated by: [EMAIL PROTECTED] Reported By: danielc at analysisandsolutions dot com -Status: Open +Status: Feedback Bug Type: Documentation problem Operating System: Windows PHP Version: Irrelevant New Comment: But windows *always* set the TEMP var by default, doesn't it? I never had such problems on windows... To which version of windows are you refering to? Windows 9x? Previous Comments: [2004-12-02 02:45:47] danielc at analysisandsolutions dot com Description: If the TEMP environment variable isn't set and the computer in question has some semblance of security, the following error comes up: malformed database schema - unable to open a temporary database file for storing temporary tables This is a common problem that has been asked in various forums. Here is a documentation patch to explain what needs to be done in order to get SQLite to work on secure Windows machines: http://www.analysisandsolutions.com/php/sqlitetemp.diff Thanks. -- Edit this bug report at http://bugs.php.net/?id=30955edit=1
[PHP-DOC] Re: [PHP-DEV] Re: [PHP-DOC] Re: [PHP-DEV] SimpleXML marked as EXPERIMENTAL
As long as we are in dropping EXPERIMENTAL Mode: Shouldn't we drop EXPERIMENTAL from php4 domxml living in PECL? AFAIRC once Cgristian Stocker said, it is stable, obviously no API changes will happen etc. Any reason not to drop EXPERIMENTAL from docs and pecl source for domxml? Please don't drop it there because that would sooner or later mean that people will start using it a lot. The idea was to drop domxml once we have dom - we have dom now. Experimental is not a synonym for Deprecated. It sounds like DomXML is deprecated and not experimental. Regards, Philip
Re: [PHP-DOC] cvs: phpdoc /en/reference/strings/functions levenshtein.xml
Sorry about the WS changes. My editor trimmed the lines. I diffed, but didn't notice them until now. S Sean Coates wrote: seanThu Dec 2 12:52:04 2004 EDT Modified files: /phpdoc/en/reference/strings/functions levenshtein.xml Log: added example http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/levenshtein.xml?r1=1.5r2=1.6ty=u Index: phpdoc/en/reference/strings/functions/levenshtein.xml diff -u phpdoc/en/reference/strings/functions/levenshtein.xml:1.5 phpdoc/en/reference/strings/functions/levenshtein.xml:1.6 --- phpdoc/en/reference/strings/functions/levenshtein.xml:1.5 Thu Oct 28 05:44:22 2004 +++ phpdoc/en/reference/strings/functions/levenshtein.xml Thu Dec 2 12:52:04 2004 @@ -1,9 +1,9 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.5 $ -- +!-- $Revision: 1.6 $ -- !-- splitted from ./en/functions/strings.xml, last change in rev 1.12 -- refentry id=function.levenshtein refnamediv -refnamelevenshtein/refname +refnamelevenshtein/refname refpurpose Calculate Levenshtein distance between two strings /refpurpose @@ -48,14 +48,14 @@ insert, replace and delete operations needed to transform parameterstr1/parameter into parameterstr2/parameter. /para -para +para A second variant will take three additional parameters that define the cost of insert, replace and delete operations. This is more general and adaptive than variant one, but not as efficient. /para !-- Callback function not yet implemented, see bug #29552 -para +para The third variant (which is not implemented yet) will be the most general and adaptive, but also the slowest alternative. It will call a user-supplied function that will determine the cost for @@ -105,7 +105,7 @@ describing the cost for this particular operation, but it may decide to use only some of the supplied arguments. /para -para +para The user-supplied function approach offers the possibility to take into account the relevance of and/or difference between certain symbols (characters) or even the context those symbols @@ -116,6 +116,68 @@ /para -- para + example + titlefunctionlevenshtein/function example/title + programlisting role=php +![CDATA[ +?php +// input misspelled word +$myWord = 'carrrot'; + +// array of words to check against +$words = array('apple','pineapple','banana','orange', +'radish','carrot','pea','bean','potato'); + +// no shortest distance found, yet +$shortest = -1; + +// loop through words to find the closest +foreach ($words AS $word) { + +// calculate the distance between the input word, +// and the current word +$thisLev = levenshtein($myWord, $word); + +// check for an exact match +if ($thisLev == 0) { + +// closest word is this one (exact match) +$closest = $word; +$shortest = 0; + +// break out of the loop; we've found an exact match +break; +} + +// if this distance is less than the next found shortest +// distance, OR if a next shortest word has not yet been found +if ($thisLev = $shortest || $shortest 0) { +// set the closest matchm, and shortest distance +$closest = $word; +$shortest = $thisLev; +} +} + +echo Input word: $myWord\n; +if ($shortest == 0) { +echo Exact match found: $closest\n; +} else { +echo Did you mean: $closest?\n; +} + +? +]] + /programlisting + /example + example.outputs; + screen +![CDATA[ +Input word: carrrot +Did you mean: carrot? +]] + /screen +/para +para See also functionsoundex/function, functionsimilar_text/function, and functionmetaphone/function.
[PHP-DOC] Re: [PHP-DEV] Re: [PHP-DOC] SimpleXML marked as EXPERIMENTAL
On 2.12.2004 18:48 Uhr, Friedhelm Betz wrote: Hi Marcus, Hello Friedhelm, Thursday, December 2, 2004, 2:18:08 AM, you wrote: Hi, It was probably just overlooked? I'll remove EXPERIMENTAL status, unless someone speaks up. S Andi Gutmans wrote: Hi, Is there a reason why SimpleXML is marked as experimental in the PHP documentation? EXPERIMENTAL status was removed from the source tree a few months ago. Andi As long as we are in dropping EXPERIMENTAL Mode: Shouldn't we drop EXPERIMENTAL from php4 domxml living in PECL? AFAIRC once Cgristian Stocker said, it is stable, obviously no API changes will happen etc. Any reason not to drop EXPERIMENTAL from docs and pecl source for domxml? Please don't drop it there because that would sooner or later mean that people will start using it a lot. The idea was to drop domxml once we have dom - we have dom now. Is your POV, that you don't want people to use domxml with php4? If so, the EXPERIMENTAL tag for php4 should stay to hinder people using domxml with php4? My impression was to use the EXPERIMENTAL tag for 'unstable' features, not to hinder people to use a feature. domxml is php4 only and not longer in the packages for php5, because it was moved to pecl and is deprecated for php5. One has to take extra steps to use domxml with php 5. That said, I can't imagine people start using php 5 with domxml, they would use dom. You can't use domxml with php5. Doesn't work, AFAIK (actually, I never tested it, but I doubt it'll work...). And certainly doesn't work alongside dom... Simple question: Is domxml still experimental? I think no ;-) From the archives: http://marc.theaimsgroup.com/?l=php-devm=109358625722096w=2 It's not experimantal anymore in the sense of API changes. (Known) Bugs are not there, the limitations are in the implementation, which was fixed with dom in php5. I use it (domxml) a lot on my servers and doesn't cause any problems (anymore ;) ) I don't care a lot about the topic. IMHO, we can remove the experimental tag. Maybe add a warning, that it's not available in PHP 5 anymore and that it's not compatible with ext/dom. chregu Regards Friedhelm -- christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71 http://www.bitflux.ch | [EMAIL PROTECTED] | gnupg-keyid 0x5CE1DECB
[PHP-DOC] phpdoc¼vµµø°T²á¤Ñ«ÇPM 04:21:49
Title: ..~~ :002 ~??..~~ :003 ?~~! :005
[PHP-DOC] regd: Source code
Hello All, I am a new member of this group and in the world of PHP;-) In my company, around 12 web pages are there. So, I want to make a web portal in PHP from where all these web pages can be accessed. Also, I want to provide the link for the web pages ( will make three categories) in three horizontal dynamic menu. If some user clicks on the link then the corresponding web page should be shown in the same web page just below the dynamic menu. It will be great if you could help me in finding the source code of this type of web page in PHP. Thanking in Anticipation. Regards, Rajeev Tomar
[PHP-DOC] cvs: phpdoc /en/reference/dio/functions dio-fcntl.xml
tony2001Thu Dec 2 09:26:02 2004 EDT Modified files: /phpdoc/en/reference/dio/functions dio-fcntl.xml Log: fix example and make it work without warnings http://cvs.php.net/diff.php/phpdoc/en/reference/dio/functions/dio-fcntl.xml?r1=1.7r2=1.8ty=u Index: phpdoc/en/reference/dio/functions/dio-fcntl.xml diff -u phpdoc/en/reference/dio/functions/dio-fcntl.xml:1.7 phpdoc/en/reference/dio/functions/dio-fcntl.xml:1.8 --- phpdoc/en/reference/dio/functions/dio-fcntl.xml:1.7 Tue Sep 7 17:36:22 2004 +++ phpdoc/en/reference/dio/functions/dio-fcntl.xml Thu Dec 2 09:26:02 2004 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=iso-8859-1? -!-- $Revision: 1.7 $ -- +!-- $Revision: 1.8 $ -- !-- splitted from ./en/functions/dio.xml, last change in rev 1.1 -- refentry id=function.dio-fcntl refnamediv @@ -101,7 +101,7 @@ $fd = dio_open('/dev/ttyS0', O_RDWR); -if (dio_fcntl($fd, F_SETLK) == -1) { +if (dio_fcntl($fd, F_SETLK, Array(type=F_WRLCK)) == -1) { // the file descriptor appears locked echo The lock can not be cleared. It is held by someone else.; } else {
[PHP-DOC] #30955 [Fbk-Opn]: PATCH: setting TEMP so SQLite will work on Windows
ID: 30955 User updated by: danielc at analysisandsolutions dot com Reported By: danielc at analysisandsolutions dot com -Status: Feedback +Status: Open Bug Type: Documentation problem Operating System: Windows PHP Version: Irrelevant New Comment: I'm talking about Windows 2000 Pro and XP Pro. TEMP _might_ be set if the web server is running under the SYSTEM account. But if the web server service is running under an unprivilged user account TEMP isn't automatically available. If TEMP isn't set, the sqlite extension goes to write the temporary files into the windows directory. Not a good idea. Previous Comments: [2004-12-02 18:59:53] [EMAIL PROTECTED] But windows *always* set the TEMP var by default, doesn't it? I never had such problems on windows... To which version of windows are you refering to? Windows 9x? [2004-12-02 02:45:47] danielc at analysisandsolutions dot com Description: If the TEMP environment variable isn't set and the computer in question has some semblance of security, the following error comes up: malformed database schema - unable to open a temporary database file for storing temporary tables This is a common problem that has been asked in various forums. Here is a documentation patch to explain what needs to be done in order to get SQLite to work on secure Windows machines: http://www.analysisandsolutions.com/php/sqlitetemp.diff Thanks. -- Edit this bug report at http://bugs.php.net/?id=30955edit=1