[PHP-DEV] Bug #12531 Updated: undefined symbol: mxdriver
ID: 12531 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: IMAP related Operating System: RedHat 7.1 PHP Version: 4.0.6 New Comment: A little further information. This was a stock RedHat 7.0 install that I upgraded to 7.1. I've tried compiling PHP against the stock redhat distribution of apache and now the 1.3.20 source that i downloaded. Apache compiled fine and it runs with PHP4 compiled without imap support. I've installed most of the updates that are available at your favorite mirror site including glibc updates. The hardware is a K6II-233 IDE drive system with a 3Com 3c905 and 128MB of RAM. Its a workhorse machine and just gets it done. Its been very stable and hasn't burped while I've been playing around with all of this. I've also got the server running on Port 8000. That said, I had the same problem with the stock apache and it runs on port 80. Hope this is helpful. If you need more details, ask. Previous Comments: [2001-08-02 21:57:35] [EMAIL PROTECTED] uname -a produces the following: Linux pisces.maurand.com 2.4.2-2 #1 Sun Apr 8 19:37:14 EDT 2001 i586 unknown Syntax error on line 201 of /usr/local/apache/conf/httpd.conf: Cannot load /usr/local/apache/libexec/libphp4.so into server: /usr/local/apache/ libexec/libphp4.so: undefined symbol: mxdriver /usr/local/apache/bin/apachectl start: httpd could not be started [2001-08-02 16:48:26] [EMAIL PROTECTED] I'm still unable to reproduce this, even with the EXACT same rpms you are using. --Jani [2001-08-02 16:14:15] [EMAIL PROTECTED] what errors exactly are you getting? [2001-08-02 15:22:03] [EMAIL PROTECTED] I got them from: ftp://sunsite.unc.edu/pub/distributions/redhat/updates/7.1/en/os/i386 the src rpm comes from ftp://sunsite.unc.edu/pub/distributions/redhat/updates/7.1/en/os/SRPMS However, when you don't call out a directory for imap during configure, PHP will use its own extensions. It doesn't matter. any imap support and I get undefigned symbol: mxdriver. I've downloaded the source tarball from UW and I've compiled it. I have not had a chance to run a make clean and reconfigured from the PHP directory yet. Its still not supposed to be this hard. [2001-08-02 15:13:50] [EMAIL PROTECTED] I got them from: ftp://sunsite.unc.edu/pub/distributions/redhat/updates/7.1/en/os/i386 the src rpm comes from ftp://sunsite.unc.edu/pub/distributions/redhat/updates/7.1/en/os/SRPMS However, when you don't call out a directory for imap during configure, PHP will use its own extensions. It doesn't matter. any imap support and I get undefigned symbol: mxdriver. I've downloaded the source tarball from UW and I've compiled it. I have not had a chance to run a make clean and reconfigured from the PHP directory yet. Its still not supposed to be this hard. 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/?id=12531 Edit this bug report at http://bugs.php.net/?id=12531edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Portability concerns
[Phil Driscoll [EMAIL PROTECTED]] I was going to send a post on this topic yesterday, but then I deleted it, but maybe it is worth airing incase it prompts someone whose brain is working better than mine was yesterday to rifine the idea. My thought was that it may be possible to get rid of some of the portability issues by implementing a new function php_portability() which takes TRUE or FALSE arguments to turn it on or off. The idea is that when switched on, it could modify the behaviour of certain functions dependent on the php.ini settings - e.g. addslashes or stripslashes would do nothing if magic_quotes were on in php.ini and do its normal job if they were off. Sadly the above example is complicated by having magic_quotes_gpc and magic_quotes_runtime, so it may not be possible to sort out. The other reason I didn't post yesterday, was that I could not then think of any other functions for which this kind of behaviour would work :) With such a php_portability() function, it would be _even_ harder to write portable library code (because you need to handle both settings). Two wrongs won't make this one right. :-) - Stig -- Stig Sæther Bakken [EMAIL PROTECTED] Fast Search Transfer ASA, Trondheim, Norway -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Portability concerns
On Saturday 04 August 2001 08:49, Stig Sæther Bakken wrote: [Phil Driscoll [EMAIL PROTECTED]] With such a php_portability() function, it would be _even_ harder to write portable library code (because you need to handle both settings). Two wrongs won't make this one right. :-) Please explain! -- Phil Driscoll -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Tests: naming
[[EMAIL PROTECTED]] Hi, I assume that tests are named 001,002, etc, for historical reasons only? I believe that a test named 'trim.phpt', is better than 010.phpt? You can call them whatever.phpt, the reason they're numbered is to define the order they are checked in. Maybe naming them 03trim.phpt would be a good compromise? - Stig -- Stig Sæther Bakken [EMAIL PROTECTED] Fast Search Transfer ASA, Trondheim, Norway -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Re: [PHP-CVS] cvs: php4 /sapi/apache2filter sapi_apache2.c
Sebastian Bergmann wrote: - TSRMLS_FETCH(); TSRMLS_FETCH(); According to http://chora.php.net/diff.php/php4/sapi/apache2filter/sapi_apache2.c?r1=1.33r2=1.34f=h had already removed the superfluent call to TSRMLS_FETCH(). But what's really weird, is that I found no reference to the addition of three TSRMLS_DC instances to php_apache_sapi_register_variables() instead of one in http://chora.php.net/cvs.php/php4/sapi/apache2filter/sapi_apache2.c. Just curious, Sebastian -- Sebastian Bergmann Measure Traffic Usability http://sebastian-bergmann.de/http://phpOpenTracker.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] .cvsignore in Zend/TSRM
Could someone with cvs.zend.com Karma please add these lines to both TSRM's and Zend's .cvsignore *.plg *.opt *.ncb Release Release_inline Debug Release_TS Release_TSDbg Release_TS_inline Debug_TS and these only to Zend zend_language_scanner.cpp zend_ini_scanner.cpp TIA, Sebastian -- Sebastian Bergmann Measure Traffic Usability http://sebastian-bergmann.de/http://phpOpenTracker.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] HTML in phpinfo()
I just noticed that, for instance with Apache 1.3 phpinfo() shows HTML tags like in Per Child: 0brKeep Alive: onbrMax Per Connection: 100 What can be done about this? -- Sebastian Bergmann Measure Traffic Usability http://sebastian-bergmann.de/http://phpOpenTracker.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] API-change
On Sat, 4 Aug 2001, [EMAIL PROTECTED] wrote: Hi, What is the policy on changing the PHP_API? I modified php_trim, to require an extra argument. Currently, I've named the new function php_trim2, and php_trim now makes a call to php_trim2, for compatibility. I don't know wether it's allowed to break backwards-compatibility in the C-PHP_API? It's a bit of a hack now... I'd prefer not to see changes in the API whenever they can be avoided. Your solution is a standard way for addressing this issue, so it is quite acceptable. - Sascha Experience IRCG http://schumann.cx/http://schumann.cx/ircg -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP-DEV] Portability concerns
-Original Message- [Phil Driscoll [EMAIL PROTECTED]] My thought was that it may be possible to get rid of some of the portability issues by implementing a new function php_portability() which takes TRUE or FALSE arguments to turn it on or off. The idea is that when switched on, it could modify the behaviour of certain functions dependent on the php.ini settings - e.g. addslashes or stripslashes would do nothing if magic_quotes were on in php.ini and do its normal job if they were off. Sadly the above example is complicated by having magic_quotes_gpc and magic_quotes_runtime, so it may not be possible to sort out. The other reason I didn't post yesterday, was that I could not then think of any other functions for which this kind of behaviour would work :) I don't like the idea of a function like this, I think it's much more important to educate people on how they write portable PHP code (to the extent possible). If the PHP community is going to continue flaunting PHP as a a portable language, the very same community must have guidelines on how to make it portable. Now, one of the reason that I post this is that even though I have been programming PHP for two years, and feel fairly proficient at it, I know very little about which settings are available and what they do (this has generally been handled by the syops I've been working with.) I don't think I'm alone at feeling a bit at loss when it comes to all the different options and settings and stuff that might make your script break if you upgrade, change server, or let someone else use them. So, what I would like to see is a nice set of guidelines -- W3C style -- on how to write portable PHP code. I think there are a lot of people out there who could benefit from a such document. André Næss -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12565: array_map with NULL callback causes crash
From: [EMAIL PROTECTED] Operating system: Mac OS X 10.0.4 PHP version: 4.0.6 PHP Bug Type: Reproducible crash Bug description: array_map with NULL callback causes crash When used with NULL as the callback function, array_map causes a SIGBUS. Example: this crashes ?php $a=array(1,2,3,4); $b=array('a','b','c','d'); $c=array_map(NULL,$a,$b); print_r( $c); ? But this works: ?php function foo($x,$y) { return array($x,$y); } $ a=ar r a y(1,2, 3,4); $ b=array('a','b','c', 'd '); $c=array_map('foo ', $a,$b); print_r($c) ; ? configure flags: --w ith-apxs Apache (1.3.14) l og: [Sat Aug 4 1 6 : 54:19 2001] [notice] child pid 18915 exit signal Bus erro r (10) [Sat Aug 4 16: 54:20 2001] [notice] child pid 18916 exit signal Bus erro r (10) [Sat Aug 4 16: 54:20 2001] [error] (22)Invalid argument: getsockname gd b backtrace: Program received signal EXC_BAD_ACCESS, Could not access memory. 0x00c1ffac in _efree (ptr=0xbfffdf08) at zend_alloc.c:226 226 REMOVE_POINTER_FROM_LIST(p); (gdb) bt #0 0x00c1ffac in _efree (ptr=0xbfffdf08) at zend_alloc.c:226 #1 0x00c8fc98 in php_if_array_map (ht=3, return_value= 0x63e13c, this_ptr=0x0, return_value_used=13834456) at array.c:2999 #2 0x00c33384 in execute (op_array=0x5a079c) at ./ zend_execute.c:1504 #3 0x00c1fbe4 in zend_execute_scripts (type=-1073750264, file_count=3) at zend.c:752 #4 0x00c55a5c in php_execute_script (primary_file= 0xb558) at main.c:1206 #5 0x00c52b18 in apache_php_module_main (r=0xbfffdf08, display_source_mode=0) at sapi_apache.c:89 #6 0x00c515b8 in send_php (r=0x5990b4, display_source_mode=0, filename=0x0) at mod_php4.c:536 #7 0x00c515f4 in send_parsed_php (r=0xbfffdf08) at mod_php4.c:547 #8 0xc700 in ap_invoke_handler () #9 0x00016780 in process_request_internal () #10 0x000167fc in ap_process_request () #11 0x5ec4 in child_main () #12 0x6080 in make_child () #13 0x61ec in startup_children () #14 0x67f0 in standalone_main () #15 0x7074 in main () #16 0x2268 in _start () #17 0x20a8 in start () #18 0x in ?? () -- Edit bug report at: http://bugs.php.net/?id=12565edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12565 Updated: array_map with NULL callback causes crash
ID: 12565 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Reproducible crash Operating System: Mac OS X 10.0.4 PHP Version: 4.0.6 New Comment: I messed up the formatting, sorry Previous Comments: [2001-08-04 12:04:38] [EMAIL PROTECTED] When used with NULL as the callback function, array_map causes a SIGBUS. Example: this crashes ?php $a=array(1,2,3,4); $b=array('a','b','c','d'); $c=array_map(NULL,$a,$b); print_r( $c); ? But this works: ?php function foo($x,$y) { return array($x,$y); } $ a=ar r a y(1,2, 3,4); $ b=array('a','b','c', 'd '); $c=array_map('foo ', $a,$b); print_r($c) ; ? configure flags: --w ith-apxs Apache (1.3.14) l og: [Sat Aug 4 1 6 : 54:19 2001] [notice] child pid 18915 exit signal Bus erro r (10) [Sat Aug 4 16: 54:20 2001] [notice] child pid 18916 exit signal Bus erro r (10) [Sat Aug 4 16: 54:20 2001] [error] (22)Invalid argument: getsockname gd b backtrace: Program received signal EXC_BAD_ACCESS, Could not access memory. 0x00c1ffac in _efree (ptr=0xbfffdf08) at zend_alloc.c:226 226 REMOVE_POINTER_FROM_LIST(p); (gdb) bt #0 0x00c1ffac in _efree (ptr=0xbfffdf08) at zend_alloc.c:226 #1 0x00c8fc98 in php_if_array_map (ht=3, return_value= 0x63e13c, this_ptr=0x0, return_value_used=13834456) at array.c:2999 #2 0x00c33384 in execute (op_array=0x5a079c) at ./ zend_execute.c:1504 #3 0x00c1fbe4 in zend_execute_scripts (type=-1073750264, file_count=3) at zend.c:752 #4 0x00c55a5c in php_execute_script (primary_file= 0xb558) at main.c:1206 #5 0x00c52b18 in apache_php_module_main (r=0xbfffdf08, display_source_mode=0) at sapi_apache.c:89 #6 0x00c515b8 in send_php (r=0x5990b4, display_source_mode=0, filename=0x0) at mod_php4.c:536 #7 0x00c515f4 in send_parsed_php (r=0xbfffdf08) at mod_php4.c:547 #8 0xc700 in ap_invoke_handler () #9 0x00016780 in process_request_internal () #10 0x000167fc in ap_process_request () #11 0x5ec4 in child_main () #12 0x6080 in make_child () #13 0x61ec in startup_children () #14 0x67f0 in standalone_main () #15 0x7074 in main () #16 0x2268 in _start () #17 0x20a8 in start () #18 0x in ?? () Edit this bug report at http://bugs.php.net/?id=12565edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] RFC: New math functions: log2, etc
At 01:53 AM 8/4/2001 +0200, Jeroen van Wolffelaar wrote: log(a) / log(n) is not that much harder, and its the right way, imho. Yes, you're right that it is the right way. But for example, for tan(x), the right way is sin(x)/cos(x). (Not such a good example, but anyway) As you said :-) as an anal note, tan(x) is the correct notation, just as logarithms are also a wrapper type in themselves, log is also the correct notation. What is 'correct' here, mathematically correct, or something else? Mathematically you're right of course. But in mathematica co, you'll also get a much nicer view on formula's than in PHP... [snip] However, IMO the log, exp, sinus, etc. functions should be in the core. Yes, I agree, however, expm1 and log1p don't. I agree. Do you suggest here to hold these two, until some kind of advanced-math-extension will be added? Some other thing, the M_* constants. I always wondered why for example M_2_SQRTPI (2/sqrt(PI)) was in PHP. IMO, there are only one or two essential constants to be in the core: PI (of course), and (possibly) the EULER-constant. What about adding PI and, possibly, EULER as constant (without the M_), and deprecating those M_ constants? Or at least promote them to the math-extension? -Sterling Jeroen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12565 Updated: array_map with NULL callback causes crash
ID: 12565 Updated by: andrei Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: Reproducible crash Operating System: Mac OS X 10.0.4 PHP Version: 4.0.6 New Comment: Fixed in CVS. Previous Comments: [2001-08-04 12:08:05] [EMAIL PROTECTED] I messed up the formatting, sorry [2001-08-04 12:04:38] [EMAIL PROTECTED] When used with NULL as the callback function, array_map causes a SIGBUS. Example: this crashes ?php $a=array(1,2,3,4); $b=array('a','b','c','d'); $c=array_map(NULL,$a,$b); print_r( $c); ? But this works: ?php function foo($x,$y) { return array($x,$y); } $ a=ar r a y(1,2, 3,4); $ b=array('a','b','c', 'd '); $c=array_map('foo ', $a,$b); print_r($c) ; ? configure flags: --w ith-apxs Apache (1.3.14) l og: [Sat Aug 4 1 6 : 54:19 2001] [notice] child pid 18915 exit signal Bus erro r (10) [Sat Aug 4 16: 54:20 2001] [notice] child pid 18916 exit signal Bus erro r (10) [Sat Aug 4 16: 54:20 2001] [error] (22)Invalid argument: getsockname gd b backtrace: Program received signal EXC_BAD_ACCESS, Could not access memory. 0x00c1ffac in _efree (ptr=0xbfffdf08) at zend_alloc.c:226 226 REMOVE_POINTER_FROM_LIST(p); (gdb) bt #0 0x00c1ffac in _efree (ptr=0xbfffdf08) at zend_alloc.c:226 #1 0x00c8fc98 in php_if_array_map (ht=3, return_value= 0x63e13c, this_ptr=0x0, return_value_used=13834456) at array.c:2999 #2 0x00c33384 in execute (op_array=0x5a079c) at ./ zend_execute.c:1504 #3 0x00c1fbe4 in zend_execute_scripts (type=-1073750264, file_count=3) at zend.c:752 #4 0x00c55a5c in php_execute_script (primary_file= 0xb558) at main.c:1206 #5 0x00c52b18 in apache_php_module_main (r=0xbfffdf08, display_source_mode=0) at sapi_apache.c:89 #6 0x00c515b8 in send_php (r=0x5990b4, display_source_mode=0, filename=0x0) at mod_php4.c:536 #7 0x00c515f4 in send_parsed_php (r=0xbfffdf08) at mod_php4.c:547 #8 0xc700 in ap_invoke_handler () #9 0x00016780 in process_request_internal () #10 0x000167fc in ap_process_request () #11 0x5ec4 in child_main () #12 0x6080 in make_child () #13 0x61ec in startup_children () #14 0x67f0 in standalone_main () #15 0x7074 in main () #16 0x2268 in _start () #17 0x20a8 in start () #18 0x in ?? () Edit this bug report at http://bugs.php.net/?id=12565edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] CVS doesn't build (still the tsrm_ls issue)
Fresh checkout of php4, Zend, and TSRM Configuration: php4apache - Win32 Release_TS_inline Compiling... mod_php4.c D:\__SERVER__\INCLUDE\os.h(115) : warning C4142: benign redefinition of type D:\compile\php\php4\sapi\apache\mod_php4.h(49) : warning C4005: 'S_IXUSR' : macro redefinition ..\..\ext/standard/php_filestat.h(62) : see previous definition of 'S_IXUSR' D:\compile\php\php4\sapi\apache\mod_php4.c(135) : warning C4018: '!=' : signed/unsigned mismatch D:\compile\php\php4\sapi\apache\mod_php4.c(313) : error C2374: 'tsrm_ls' : redefinition; multiple initialization D:\compile\php\php4\sapi\apache\mod_php4.c(312) : see declaration of 'tsrm_ls' php_apache.c D:\__SERVER__\INCLUDE\os.h(115) : warning C4142: benign redefinition of type D:\compile\php\php4\sapi\apache\php_apache.c(145) : error C2082: redefinition of formal parameter 'tsrm_ls' D:\compile\php\php4\sapi\apache\php_apache.c(305) : error C2082: redefinition of formal parameter 'tsrm_ls' D:\compile\php\php4\sapi\apache\php_apache.c(345) : error C2082: redefinition of formal parameter 'tsrm_ls' D:\compile\php\php4\sapi\apache\php_apache.c(346) : error C2082: redefinition of formal parameter 'tsrm_ls' D:\compile\php\php4\sapi\apache\php_apache.c(372) : error C2082: redefinition of formal parameter 'tsrm_ls' sapi_apache.c D:\__SERVER__\INCLUDE\os.h(115) : warning C4142: benign redefinition of type D:\compile\php\php4\sapi\apache\mod_php4.h(49) : warning C4005: 'S_IXUSR' : macro redefinition ..\..\ext/standard/php_filestat.h(62) : see previous definition of 'S_IXUSR' Error executing xicl6.exe. php4apache.dll - 6 error(s), 43 warning(s) [EMAIL PROTECTED] - And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] RFC: New math functions: log2, etc
At 06:10 PM 8/4/2001 +0200, Jeroen van Wolffelaar wrote: At 01:53 AM 8/4/2001 +0200, Jeroen van Wolffelaar wrote: log(a) / log(n) is not that much harder, and its the right way, imho. Yes, you're right that it is the right way. But for example, for tan(x), the right way is sin(x)/cos(x). (Not such a good example, but anyway) As you said :-) as an anal note, tan(x) is the correct notation, just as logarithms are also a wrapper type in themselves, log is also the correct notation. What is 'correct' here, mathematically correct, or something else? Mathematically you're right of course. But in mathematica co, you'll also get a much nicer view on formula's than in PHP... I mean mathematically yep... ;-) [snip] However, IMO the log, exp, sinus, etc. functions should be in the core. Yes, I agree, however, expm1 and log1p don't. I agree. Do you suggest here to hold these two, until some kind of advanced-math-extension will be added? Some other thing, the M_* constants. I always wondered why for example M_2_SQRTPI (2/sqrt(PI)) was in PHP. IMO, there are only one or two essential constants to be in the core: PI (of course), and (possibly) the EULER-constant. What about adding PI and, possibly, EULER as constant (without the M_), and deprecating those M_ constants? Or at least promote them to the math-extension? Yeah, I'd say so... the reason? IMHO, no one was either paying attention to revert them, or wanted to revert someone else's commit (common problem ;-) -Sterling -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] CVS doesn't build (still the tsrm_ls issue)
Cynic wrote: Fresh checkout of php4, Zend, and TSRM Please check the current CVS, I commited a fix. -- Sebastian Bergmann Measure Traffic Usability http://sebastian-bergmann.de/http://phpOpenTracker.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Portability concerns
On Saturday 04 August 2001 15:03, André Næss wrote: I don't like the idea of a function like this, I think it's much more important to educate people on how they write portable PHP code (to the extent possible). That is my point really - what constitutes 'portable code' has changed quite a bit over the time I've been using PHP. I was hoping to provoke discussion of a mechanism whereby such changes might be made without breaking code, or changing the rules as to what constitutes portable code. Cheers -- Phil Driscoll -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] CVS doesn't build (still the tsrm_ls issue)
Hi Sebastian, four more to go. :) D:\compile\php\php4\sapi\apache\php_apache.c(145) : error C2082: redefinition of formal parameter 'tsrm_ls' D:\compile\php\php4\sapi\apache\php_apache.c(305) : error C2082: redefinition of formal parameter 'tsrm_ls' D:\compile\php\php4\sapi\apache\php_apache.c(345) : error C2082: redefinition of formal parameter 'tsrm_ls' D:\compile\php\php4\sapi\apache\php_apache.c(371) : error C2082: redefinition of formal parameter 'tsrm_ls' At 19:02 8/4/2001, Sebastian Bergmann wrote the following: -- Cynic wrote: Fresh checkout of php4, Zend, and TSRM Please check the current CVS, I commited a fix. -- Sebastian Bergmann Measure Traffic Usability http://sebastian-bergmann.de/http://phpOpenTracker.de/ --end of quote-- [EMAIL PROTECTED] - And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12566: Cascaded ternaries evaluate incorrectly
From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.0.6 PHP Bug Type: *Programming Data Structures Bug description: Cascaded ternaries evaluate incorrectly The following emits 'two' rather than 'one' as one would expect. $a = 1; $b = 2; echo (($a == 1) ? 'one' : ($b == 2) ? 'two' : 'unknown'); Apologies if for PHP this unusual behaviour actually is as expected, but being counter-intuituve, and of course inconsistent from other languages with a ?: operator, this is an undesirable result. In 'C', the following of course outputs 'one' #include stdio.h int main() { int a = 1, b = 2; puts((a == 1) ? one : (b == 2) ? two : unknown); return 0; } -- Edit bug report at: http://bugs.php.net/?id=12566edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Coding standard: API functions
Hi, Some PHPAPI function demand a char* and int when they want a string, others a zval which is expected to be IS_STRING. Which one is preferred? Jeroen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] RFC: mt_* functions
Hi, Currently, the rand_functions all have mt_ clones, which use a in-PHP-implementation (Mersenne-Twister) rather than an external implementation. This is IMHO a bit strange way of chosing between implementation. My suggestion is to make it only one familiy of functions, the implementation of which is determined by an ini-entry. (rand = system vs. rand = mt, or something like that, default: mt). The functionality is the same (*), and IMO it's a per-system-decision wether you want to use the mt-algorithms or the system ones. (usually mt, unless your system has a real good / very special one) For backwards compatibility, mt_* can be aliased to their normal equivalents. Greetz, Jeroen (*) as far as you can speak of functionality in this context -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12567: file_exists('') === NULL
From: [EMAIL PROTECTED] Operating system: PHP version: 4.0.6 PHP Bug Type: Filesystem function related Bug description: file_exists('') === NULL file_exists('') === NULL -- Edit bug report at: http://bugs.php.net/?id=12567edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Portability concerns
[Phil Driscoll [EMAIL PROTECTED]] On Saturday 04 August 2001 08:49, Stig Sæther Bakken wrote: [Phil Driscoll [EMAIL PROTECTED]] With such a php_portability() function, it would be _even_ harder to write portable library code (because you need to handle both settings). Two wrongs won't make this one right. :-) Please explain! Say PHP had a function to put it in portable mode changing the behaviour of a few functions. Then for example PEAR classes would have to deal with running both with and without this mode, since the user can enable or disable it at will. So this would in fact add complexity to the process of writing portable PHP code. I think André is right that it's better to educate users (for example by telling them to disable magic_quotes :-). - Stig -- Stig Sæther Bakken [EMAIL PROTECTED] Fast Search Transfer ASA, Trondheim, Norway -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12566 Updated: Cascaded ternaries evaluate incorrectly
ID: 12566 Updated by: jeroen Reported By: [EMAIL PROTECTED] Status: Open Bug Type: *Programming Data Structures Operating System: Linux PHP Version: 4.0.6 New Comment: Confirmed in latest CVS: --- echo TRUE ? 'one' : TRUE ? 'two' : 'unknown'; = two --- echo TRUE ? 'one' : FALSE ? 'two' : 'unknown'; = two --- This definitely is a bug, and IMO a serious one. A parse error would be acceptable IMO (then use ( and )), but this isn't. Previous Comments: [2001-08-04 15:33:28] [EMAIL PROTECTED] The following emits 'two' rather than 'one' as one would expect. $a = 1; $b = 2; echo (($a == 1) ? 'one' : ($b == 2) ? 'two' : 'unknown'); Apologies if for PHP this unusual behaviour actually is as expected, but being counter-intuituve, and of course inconsistent from other languages with a ?: operator, this is an undesirable result. In 'C', the following of course outputs 'one' #include stdio.h int main() { int a = 1, b = 2; puts((a == 1) ? one : (b == 2) ? two : unknown); return 0; } Edit this bug report at http://bugs.php.net/?id=12566edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] RFC: mt_* functions
[[EMAIL PROTECTED]] Hi, Currently, the rand_functions all have mt_ clones, which use a in-PHP-implementation (Mersenne-Twister) rather than an external implementation. This is IMHO a bit strange way of chosing between implementation. My suggestion is to make it only one familiy of functions, the implementation of which is determined by an ini-entry. (rand = system vs. rand = mt, or something like that, default: mt). The functionality is the same (*), and IMO it's a per-system-decision wether you want to use the mt-algorithms or the system ones. (usually mt, unless your system has a real good / very special one) For backwards compatibility, mt_* can be aliased to their normal equivalents. Please don't. Ini settings that change semantics are a bother, and people should be able to choose their random function. - Stig -- Stig Sæther Bakken [EMAIL PROTECTED] Fast Search Transfer ASA, Trondheim, Norway -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] RFC: mt_* functions
At 11:15 PM 8/4/2001 +0200, Stig Sæther Bakken wrote: [[EMAIL PROTECTED]] Hi, Currently, the rand_functions all have mt_ clones, which use a in-PHP-implementation (Mersenne-Twister) rather than an external implementation. This is IMHO a bit strange way of chosing between implementation. My suggestion is to make it only one familiy of functions, the implementation of which is determined by an ini-entry. (rand = system vs. rand = mt, or something like that, default: mt). The functionality is the same (*), and IMO it's a per-system-decision wether you want to use the mt-algorithms or the system ones. (usually mt, unless your system has a real good / very special one) For backwards compatibility, mt_* can be aliased to their normal equivalents. Please don't. Ini settings that change semantics are a bother, and people should be able to choose their random function. +1 for the -1 (does that equal 0?) -Sterling -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Bug #12566 Updated: Cascaded ternaries evaluateincorrectly
It's not a bug, but a feature. :) PHP has the inverse associativity of ?: compared to C (and every other language). This was originally a mistake, but now it won't be changed, due to historical reasons. See some messages I had on php-dev back around the first week of January, 2001 on this topic. FWIW, I would like to change it. -adam On 4 Aug 2001 [EMAIL PROTECTED] wrote: ID: 12566 Updated by: jeroen Reported By: [EMAIL PROTECTED] Status: Open Bug Type: *Programming Data Structures Operating System: Linux PHP Version: 4.0.6 New Comment: Confirmed in latest CVS: --- echo TRUE ? 'one' : TRUE ? 'two' : 'unknown'; = two --- echo TRUE ? 'one' : FALSE ? 'two' : 'unknown'; = two --- This definitely is a bug, and IMO a serious one. A parse error would be acceptable IMO (then use ( and )), but this isn't. Previous Comments: -- adam maccabee trachtenberg [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12566 Updated: Cascaded ternaries evaluate incorrectly
ID: 12566 Updated by: jeroen Reported By: [EMAIL PROTECTED] Status: Open Bug Type: *Programming Data Structures Operating System: Linux PHP Version: 4.0.6 New Comment: [EMAIL PROTECTED]: It's not a bug, but a feature. :) PHP has the inverse associativity of ?: compared to C (and every other language). This was originally a mistake, but now it won't be changed, due to historical reasons. See some messages I had on php-dev back around the first week of January, 2001 on this topic. FWIW, I would like to change it. -adam So, you need to read it as: echo (TRUE ? 'one' : TRUE) ? 'two' : 'unknown';, and echo 'one' ? 'two' : 'unknown' is, correctly, 'two' Maybe a fix for PHP 4.1 / PHP 5? Previous Comments: [2001-08-04 17:04:43] [EMAIL PROTECTED] Confirmed in latest CVS: --- echo TRUE ? 'one' : TRUE ? 'two' : 'unknown'; = two --- echo TRUE ? 'one' : FALSE ? 'two' : 'unknown'; = two --- This definitely is a bug, and IMO a serious one. A parse error would be acceptable IMO (then use ( and )), but this isn't. [2001-08-04 15:33:28] [EMAIL PROTECTED] The following emits 'two' rather than 'one' as one would expect. $a = 1; $b = 2; echo (($a == 1) ? 'one' : ($b == 2) ? 'two' : 'unknown'); Apologies if for PHP this unusual behaviour actually is as expected, but being counter-intuituve, and of course inconsistent from other languages with a ?: operator, this is an undesirable result. In 'C', the following of course outputs 'one' #include stdio.h int main() { int a = 1, b = 2; puts((a == 1) ? one : (b == 2) ? two : unknown); return 0; } Edit this bug report at http://bugs.php.net/?id=12566edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12568: Feature Request for function is_subclass_of
From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.0.6 PHP Bug Type: Feature/Change Request Bug description: Feature Request for function is_subclass_of unfortunately the function is_subclass_of does not accept class names in both arguments like get_parent_class since 4.0.5. it would be nice if you could use is_subclass_of in the following way: is_subclass_of($foo,bar) true if $foo is an object of a subclass of bar (this is how it works now) is_subclass_of(foo,bar) true if foo is a subclass of bar (a wrote a function to do this, see my note on is_subclass_of) is_subclass_of(foo,$bar) true if foo is a subclass of the class $bar = is_subclass_of(foo,get_class($bar)); is_subclass_of($foo,$bar) true if $foo is an object of the class of $bar thanx a lot! Jakob -- Edit bug report at: http://bugs.php.net/?id=12568edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Bug #12566 Updated: Cascaded ternaries evaluate incorrectly
See some messages I had on php-dev back around the first week of January, 2001 on this topic. FWIW, I would like to change it. On http://marc.theaimsgroup.com/?w=4r=1s=trachtenbergq=a , I could only find messages about break/continue in switch statements... Am I overlooking something? Of did you have another mail-name then? Greetz, Jeroen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Bug #12566 Updated: Cascaded ternaries evaluateincorrectly
On Sun, 5 Aug 2001, Jeroen van Wolffelaar wrote: On http://marc.theaimsgroup.com/?w=4r=1s=trachtenbergq=a , I could only find messages about break/continue in switch statements... The subject line is misleading. We shifted into talking about ?:. See me at the bottom of: http://marc.theaimsgroup.com/?l=php-devm=97896924723440w=4 and the follow ups. -adam -- adam maccabee trachtenberg [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12530 Updated: Shuffle shouldn't use the least significant bit of rand()
ID: 12530 Updated by: andy Reported By: [EMAIL PROTECTED] Status: Open Old Bug Type: Arrays related Bug Type: Feature/Change Request Operating System: Solaris (most unices) PHP Version: 4.0.6 New Comment: reclassified Previous Comments: [2001-08-02 07:24:41] [EMAIL PROTECTED] In ext/standard/array.c, the sorting algorithm of shuffle is defined as (php_rand() % 2) ? 1 : -1 This is fine for rand algorithms in which all bits are random but with Solaris and other unices this is not so. Quoting man random(): The difference is that rand(3C) produces a much less random sequence-in fact, the low dozen bits generated by rand go through a cyclic pattern. All the bits generated by random() are usable. This is not true however - the LSB of random() calls are predictable on some systems. You can verify if your system is affected by running this: ?PHP $a = array(); $b = array(); for($i=0; $i1000; $i++) // iterate 1000 times { $foo = ; // initialize random seq with new seed srand ($i); // create a string with the LSB of first 24 random numbers for($j=0; $j24; $j++) { $c = rand(); // $c = rand(0,32000); works on all systems // store the random number so we can check how many different // numbers were really generated $b[$c]= 1; // append the least signicant bit to the string $foo .= ($c % 2); } // store the parity string $a[$foo]= 1; } echo Parity string count: . count($a), BR; echo Random number count: . count($b), BR; ? If the counts are 1000/24000 you're fine. Affected systems I've tried this on return 4/24000. Proposed fix: change shuffle to call PHP's own rand function with limits, ie, rand(0,32000). This introduces randomness into the LSB and fixes shuffle. Edit this bug report at http://bugs.php.net/?id=12530edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] HTML in phpinfo()
the functions obviously uses something like html_entites() On Sat, 04 Aug 2001, Sebastian Bergmann wrote: I just noticed that, for instance with Apache 1.3 phpinfo() shows HTML tags like in Per Child: 0brKeep Alive: onbrMax Per Connection: 100 What can be done about this? -- Sebastian Bergmann Measure Traffic Usability http://sebastian-bergmann.de/http://phpOpenTracker.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] RFC: mt_* functions
Please don't. Ini settings that change semantics are a bother, and people should be able to choose their random function. Both function families are the same in syntax returning, only the algorithm is different. I.e.: the semantics is the same. The algorithm - if correct - shouldn't bother, and shouldn't be the concern of the programmer, but rather the system maintainer (specific cases excluded, but than you leave the high-level of PHP, and go to low-level implementation issues.). - Stig Jeroen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #11283 Updated: read_exif_data only gets first Comments record
ID: 11283 Updated by: rasmus Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: *Graphics related Operating System: Linux 2.2.16/RedHat 7.0 PHP Version: 4.0 Latest CVS (2001-06-05) New Comment: Ok, read_exif_data() will now return an array of comments if there is more than 1. Please check the CVS version and let me know if it works for you. Previous Comments: [2001-08-03 22:29:52] [EMAIL PROTECTED] I've put a picture online which has the following JPEG comments Title:Looking Coy Subject:Matthew Roberts Location:Forest Hills, NY The image is at http://www.astrofoto.org/~roland/tmp/20010601-0001.jpg [2001-08-03 21:57:22] [EMAIL PROTECTED] could you please place some of those jpegs somewhere where we can access them to test this. --Jani [2001-06-05 05:33:22] [EMAIL PROTECTED] This is actually CVS from 2001-06-03/04. I have a JPG which has comments added to it of the form KEY: VALUE so I can add image titles and such that will propagate with the image. When I look at the array retrieved by read_exif_data, it includes only one [Comments] element, the first comment added to the file. The comments were added with wrjpgcom and can be read back with rdjpgcom; the latter retrieves all of the comments. For my purposes, I can shove everything into a single comment, but it still looks like a bug to me. I would guess that if there is more than one commen block that read_exif_data should make the [Comments] element an array. Edit this bug report at http://bugs.php.net/?id=11283edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] A patch to get rid of system rand/srand/etc.
On Fri, 3 Aug 2001, Rasmus Lerdorf wrote: This patch will replace PHP functions srand() / rand() / getrandmax() with the mt_*() ones. The mt_*() are changed to aliases. If nobody objects, I will commit this tomorrow. I object. srand/rand are deterministic and usually portable algorithms (i.e. with the same seed, the return results of rand are the same) which certain programs rely on. There might be some scripts out there which use this feature, either for themselves or in order to communicate/synchronize with programs written in C. I have code which relies on this in the regression test harness for it. Ah. Let's forget about it then. I wasn't aware of this. Could you show me this example?? --Jani -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] RFC: mt_* functions
Both function families are the same in syntax returning, only the algorithm is different. I.e.: the semantics is the same. The algorithm - if correct - shouldn't bother, and shouldn't be the concern of the programmer, but rather the system maintainer (specific cases excluded, but than you leave the high-level of PHP, and go to low-level implementation issues.). But they are different in that each will produce a deterministic sequence based on their seeds. If I, as an application developer, distributes a regression test harness which tests my app with a specific seed expecting a specific sequence and the server my app runs on has switched rand() to use the mt_rand() algorithm my regression test will fail. This is somewhat like saying that we should make crypt() just be an alias for md5() since md5() is a better algorithm. The fact that it is better is rather irrelevant since the output of the algorithm itself is sometimes important. Many times you can swap crypt() for md5(), but many times you can't. Same goes for rand() and mt_rand(). -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] RFC: mt_* functions
On Sat, 4 Aug 2001, Rasmus Lerdorf wrote: based on their seeds. If I, as an application developer, distributes a regression test harness which tests my app with a specific seed expecting a specific sequence and the server my app runs on has switched rand() to use the mt_rand() algorithm my regression test will fail. So, if you always use mt_rand() you should be okay? Since the algorithm for rand() might be different from system to system..? --Jani -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] RFC: mt_* functions
On Sat, 4 Aug 2001, Rasmus Lerdorf wrote: based on their seeds. If I, as an application developer, distributes a regression test harness which tests my app with a specific seed expecting a specific sequence and the server my app runs on has switched rand() to use the mt_rand() algorithm my regression test will fail. So, if you always use mt_rand() you should be okay? Since the algorithm for rand() might be different from system to system..? Sure, although rand() tends to be the same everywhere as well. At least on all the systems I care about it is the same. Linux, FreeBSD, OpenBSD and Solaris all seem to use the same algorithm. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12569: Consistent Apache crash on 22nd request in Zend Optimiser
From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.0.6 PHP Bug Type: Scripting Engine problem Bug description: Consistent Apache crash on 22nd request in Zend Optimiser The apache module with optimiser enabled, and which up to now hasn't been crashing, now does so reproducably. A b/t is below although maybe not a lot to go on I'm afraid, but the events around the crash are *very significant*. The point of failure is always the same, and after starting a single apache process with -X, was always crashing on the 22nd request. A *most significant* thing is that adding effectively a dummy line of code, e.g. $x = true; changed the period of crashing from being the 22nd time to always the 16th time. Adding a second line the crashing stopped. Note that once determined, the crash interval is ALWAYS the same for a given state of my application. Clearly this is a serious, although in the general case possibly rare, problem, and probably one of those bugs that only emmerges for a very specific set of circumstances. I'll happily arrange access to my machine for an official developer to help diagnose this now, but I'll take a snapshot of my DB, code base and shared memory anyway for a chance of future analysis. Clearly something to focus on is why the crash would always occur after: 1) a specific number of apache requests, and 2) this number depends on the code structure. For the trace below, assuming that the zend_file_handle structures being passed are already initialised, then they're corrupt with bogus fd's and file file names for example. As an aside, I did a purify run on Solaris and there are a significant number UMR instances, which whilst not always indicative of a problem, typically are, and so I suspect some fundamental memory problems that one typically 'gets away with'. I'll look at this more next week. Anyway, the trace is: (gdb) where #0 0x80f5b39 in php_if_array_reduce (ht=3, return_value=0x8279dc4, this_ptr=0x0, return_value_used=1) at array.c:2886 #1 0x40253f84 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #2 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #3 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #4 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #5 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #6 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #7 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #8 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #9 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #10 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #11 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #12 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #13 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #14 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #15 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #16 0x4025f01d in zstd__mhm () from /usr/local/Zend/lib/ZendOptimizer.so #17 0x80dde0b in zend_execute_scripts (type=8, file_count=3) at zend.c:752 #18 0x806a6fb in php_execute_script (primary_file=0xb768) at main.c:1206 #19 0x80eaa1b in apache_php_module_main (r=0x8246a2c, display_source_mode=0) at sapi_apache.c:89 #20 0x8067bee in send_php () #21 0x8067c36 in send_parsed_php () #22 0x8111609 in ap_invoke_handler () #23 0x8126a1f in process_request_internal () #24 0x8126a92 in ap_process_request () #25 0x811d8a6 in child_main () #26 0x811da85 in make_child () ---Type return to continue, or q return to quit--- #27 0x811dc06 in startup_children () #28 0x811e27d in standalone_main () #29 0x811eacc in main () #30 0x400c4a5e in __libc_start_main () at ../sysdeps/generic/libc-start.c:93 (gdb) Nick -- Edit bug report at: http://bugs.php.net/?id=12569edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12569 Updated: Consistent Apache crash on 22nd request in Zend Optimiser
ID: 12569 Updated by: rasmus Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 4.0.6 New Comment: Please don't post bug reports for proprietary products in the PHP bug database. Previous Comments: [2001-08-04 18:56:57] [EMAIL PROTECTED] The apache module with optimiser enabled, and which up to now hasn't been crashing, now does so reproducably. A b/t is below although maybe not a lot to go on I'm afraid, but the events around the crash are *very significant*. The point of failure is always the same, and after starting a single apache process with -X, was always crashing on the 22nd request. A *most significant* thing is that adding effectively a dummy line of code, e.g. $x = true; changed the period of crashing from being the 22nd time to always the 16th time. Adding a second line the crashing stopped. Note that once determined, the crash interval is ALWAYS the same for a given state of my application. Clearly this is a serious, although in the general case possibly rare, problem, and probably one of those bugs that only emmerges for a very specific set of circumstances. I'll happily arrange access to my machine for an official developer to help diagnose this now, but I'll take a snapshot of my DB, code base and shared memory anyway for a chance of future analysis. Clearly something to focus on is why the crash would always occur after: 1) a specific number of apache requests, and 2) this number depends on the code structure. For the trace below, assuming that the zend_file_handle structures being passed are already initialised, then they're corrupt with bogus fd's and file file names for example. As an aside, I did a purify run on Solaris and there are a significant number UMR instances, which whilst not always indicative of a problem, typically are, and so I suspect some fundamental memory problems that one typically 'gets away with'. I'll look at this more next week. Anyway, the trace is: (gdb) where #0 0x80f5b39 in php_if_array_reduce (ht=3, return_value=0x8279dc4, this_ptr=0x0, return_value_used=1) at array.c:2886 #1 0x40253f84 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #2 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #3 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #4 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #5 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #6 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #7 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #8 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #9 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #10 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #11 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #12 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #13 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #14 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #15 0x40254183 in zend_reverse_table () from /usr/local/Zend/lib/ZendOptimizer.so #16 0x4025f01d in zstd__mhm () from /usr/local/Zend/lib/ZendOptimizer.so #17 0x80dde0b in zend_execute_scripts (type=8, file_count=3) at zend.c:752 #18 0x806a6fb in php_execute_script (primary_file=0xb768) at main.c:1206 #19 0x80eaa1b in apache_php_module_main (r=0x8246a2c, display_source_mode=0) at sapi_apache.c:89 #20 0x8067bee in send_php () #21 0x8067c36 in send_parsed_php () #22 0x8111609 in ap_invoke_handler () #23 0x8126a1f in process_request_internal () #24 0x8126a92 in ap_process_request () #25 0x811d8a6 in child_main () #26 0x811da85 in make_child () ---Type return to continue, or q return to quit--- #27 0x811dc06 in startup_children () #28 0x811e27d in standalone_main () #29 0x811eacc in main () #30 0x400c4a5e in __libc_start_main () at ../sysdeps/generic/libc-start.c:93 (gdb) Nick Edit this bug report at http://bugs.php.net/?id=12569edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Troubles compiling current CVS
You probably created configure using libtool 1.3, so it is still referencing ltconfig. A ./cvsclean; ./buildconf should help. Right, I compiled all the new m4 type stuff when adding libtool 1.4, like m4, automake and autoconfig. I did the ./cvsclean, but the ./buildconf failed with the following output: rebuilding Makefile templates automake: configure.in: installing `Zend/ylwrap' rebuilding main/php_config.h.in ./aclocal.m4:943: error: m4_defn: undefined macro: _m4_divert_diversion ./aclocal.m4:472: PHP_SUBST is expanded from... ./aclocal.m4:943: the top level autoconf: tracing failed -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Re: Bug #12566 Updated: Cascaded ternaries evaluate incorrectly
Fair enough :-) In which case there is a documentation bug, and the paragraph: another conditional operator is the ?: (or ternary) operator, which operates as in C and many other languages. might perhaps read better: another conditional operator is the ?: (or ternary) operator, which operates unlike C and all other languages. ;-) I appreciate the note on the historical accident, and in which case clearly the behaviour should indeed not be changed now. Cheers, Nick On Sat, Aug 04, 2001 at 09:21:33PM -, Bug Database wrote: ID: 12566 Updated by: jeroen Reported By: [EMAIL PROTECTED] Status: Open Bug Type: *Programming Data Structures Operating System: Linux PHP Version: 4.0.6 New Comment: [EMAIL PROTECTED]: It's not a bug, but a feature. :) PHP has the inverse associativity of ?: compared to C (and every other language). This was originally a mistake, but now it won't be changed, due to historical reasons. See some messages I had on php-dev back around the first week of January, 2001 on this topic. FWIW, I would like to change it. -adam So, you need to read it as: echo (TRUE ? 'one' : TRUE) ? 'two' : 'unknown';, and echo 'one' ? 'two' : 'unknown' is, correctly, 'two' Maybe a fix for PHP 4.1 / PHP 5? Previous Comments: [2001-08-04 17:04:43] [EMAIL PROTECTED] Confirmed in latest CVS: --- echo TRUE ? 'one' : TRUE ? 'two' : 'unknown'; = two --- echo TRUE ? 'one' : FALSE ? 'two' : 'unknown'; = two --- This definitely is a bug, and IMO a serious one. A parse error would be acceptable IMO (then use ( and )), but this isn't. [2001-08-04 15:33:28] [EMAIL PROTECTED] The following emits 'two' rather than 'one' as one would expect. $a = 1; $b = 2; echo (($a == 1) ? 'one' : ($b == 2) ? 'two' : 'unknown'); Apologies if for PHP this unusual behaviour actually is as expected, but being counter-intuituve, and of course inconsistent from other languages with a ?: operator, this is an undesirable result. In 'C', the following of course outputs 'one' #include stdio.h int main() { int a = 1, b = 2; puts((a == 1) ? one : (b == 2) ? two : unknown); return 0; } ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=12566edit=2 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] RFC: mt_* functions
On Sat, 4 Aug 2001, Rasmus Lerdorf wrote: On Sat, 4 Aug 2001, Rasmus Lerdorf wrote: based on their seeds. If I, as an application developer, distributes a regression test harness which tests my app with a specific seed expecting a specific sequence and the server my app runs on has switched rand() to use the mt_rand() algorithm my regression test will fail. So, if you always use mt_rand() you should be okay? Since the algorithm for rand() might be different from system to system..? Sure, although rand() tends to be the same everywhere as well. At least on all the systems I care about it is the same. Linux, FreeBSD, OpenBSD and Solaris all seem to use the same algorithm. Then why do some people have troubles with rand() on Solaris? :) Or is it some specific version of it? --Jani -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] RFC: mt_* functions
Sure, although rand() tends to be the same everywhere as well. At least on all the systems I care about it is the same. Linux, FreeBSD, OpenBSD and Solaris all seem to use the same algorithm. Then why do some people have troubles with rand() on Solaris? :) Or is it some specific version of it? No idea. -Rasmus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] LE INTERESARA
OFERTA PARA MEXICO: [EMAIL PROTECTED] 1.8.2001.Publicidad/Enseñanza a Distancia Hola que tal: El motivo de la presente carta es informarte de la posibilidad de poder realizar algún curso a distancia de tu interés, cursos relacionados con tu trabajo inquietudes y ocio.ect.El conocimiento es el mayor patrimonio de que podemos disponer. Nos dedicamos desde 1996.a impartir cursos a distancia disponemos de una amplia variedad de cursos sencillos para poder seguirlos comodamente desde cualquier parte del mundo y a unos precios muy competitivos. NET Redes y Sistemas Sistemas Servers Diseño Web BUSSINES Gestion Comercial y Marketing Relaciones Publicas Recursos Humanos Comercio Exterior Direccion Comercial Gestión Medio Ambiental SALUD SUPERACION PERSONAL - Psicoterapia Psicologia Practica Nutrí terapia y Salud Monitor Yoga Tai-Chi Hipnoterapia Quiromasaje y Reflexoterapia Aromaterapia Cosmética Natural Hierbas Medicinales -- CURSOS BECADOS: Los cursos son de 200.horas lectivas el precio standar por curso es de 35.000.pts(Despues de beca)España a plazos.Iberoamerica 150.usa dolar aplazados.(Despues de beca) El Diploma: Técnico Especialista El tiempo aproximado por curso dependiendo de los conocimientos en areas similares de que se disponga,es entre 2-6.meses.aprox. Si desean que les ampliemos información pueden enviar un e-mail les contestaremos con la mayor brevedad y les indicaremos nuestro espacio web que se encuentra en reformas.No lo pienses mas y envia un e-mail y recibiras todo tipo de informes y detalles muy en breve. Envie e-mail: [EMAIL PROTECTED] Sin otra que rogarte me envies un e-mail si estas interesado/a Te enviamos un saludo. Si desea no recibir mas e-mail. remove/mail [EMAIL PROTECTED] [EMAIL PROTECTED] Jose Garceran Broker-COFOR Gestion Integral 1.SL C/Constitucion.34 03310-Alicante España -- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #11885 Updated: Link problems with OpenSSL 0.9.6a
ID: 11885 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Open Status: Feedback Bug Type: OpenSSL related Operating System: Solaris 7 08/99 PHP Version: 4.0.6 New Comment: Could you please try the latest CVS snapshot from http://snaps.php.net/ to verify if this is fixed now? --Jani Previous Comments: [2001-07-04 15:14:50] [EMAIL PROTECTED] I'm unable to link libphp4.la using --with-openssl. I'm using: gcc version 2.95.3 20010315 (release) ltmain.sh (GNU libtool) 1.4 (1.920 2001/04/24 23:26:18) GNU ld 2.11.2 Apache/1.3.20 (Unix) openssl-0.9.6a binutils-2.11.2 make[1]: Entering directory `/usr/local/src/newapache/apachee/t2/php-4.0.6' /bin/sh /usr/local/src/newapache/apachee/t2/php-4.0.6/libtool --silent --mode=compile gcc -I. -I/usr/local/src/newapache/apachee/t2/php-4.0.6/ -I/usr/local/src/newapache/apachee/t2/php-4.0.6/main -I/usr/local/src/newapache/apachee/t2/php-4.0.6 -I/usr/local/newapache/include -I/usr/local/src/newapache/apachee/t2/php-4.0.6/Zend -I/usr/local/apachedeps/include -I/usr/local/apachedeps/include/freetype2/freetype -I/usr/local/apachedeps/include/c-client -I/usr/local/apachedeps/include/mysql -I/usr/local/src/newapache/apachee/t2/php-4.0.6/ext/xml/expat/xmltok -I/usr/local/src/newapache/apachee/t2/php-4.0.6/ext/xml/expat/xmlparse -I/usr/local/src/newapache/apachee/t2/php-4.0.6/TSRM -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=270 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_EXPAT -DSHARED_CORE -DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -Os -c stub.c /bin/sh /usr/local/src/newapache/apachee/t2/php-4.0.6/libtool --silent --mode=link gcc -I. -I/usr/local/src/newapache/apachee/t2/php-4.0.6/ -I/usr/local/src/newapache/apachee/t2/php-4.0.6/main -I/usr/local/src/newapache/apachee/t2/php-4.0.6 -I/usr/local/newapache/include -I/usr/local/src/newapache/apachee/t2/php-4.0.6/Zend -I/usr/local/apachedeps/include -I/usr/local/apachedeps/include/freetype2/freetype -I/usr/local/apachedeps/include/c-client -I/usr/local/apachedeps/include/mysql -I/usr/local/src/newapache/apachee/t2/php-4.0.6/ext/xml/expat/xmltok -I/usr/local/src/newapache/apachee/t2/php-4.0.6/ext/xml/expat/xmlparse -I/usr/local/src/newapache/apachee/t2/php-4.0.6/TSRM -D_POSIX_PTHREAD_SEMANTICS -DSOLARIS2=270 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DUSE_EXPAT -DSHARED_CORE -DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -Os -o libphp4.la -rpath /usr/local/src/newapache/apachee/t2/php-4.0.6/libs -avoid-version -L/usr/ucblib -L/usr/local/apachedeps/lib -L/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3 -L/usr/local/apachedeps/lib/mysql -R /usr/ucblib -R /usr/local/apachedeps/lib -R /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.3 -R /usr/local/apachedeps/lib/mysql stub.lo Zend/libZend.la sapi/apache/libsapi.la main/libmain.la regex/libregex.la ext/zlib/libzlib.la ext/bz2/libbz2.la ext/db/libdb.la ext/dba/libdba.la ext/ftp/libftp.la ext/gd/libgd.la ext/gettext/libgettext.la ext/imap/libimap.la ext/mysql/libmysql.la ext/openssl/libopenssl.la ext/pcre/libpcre.la ext/posix/libposix.la ext/session/libsession.la ext/standard/libstandard.la ext/sysvsem/libsysvsem.la ext/sysvshm/libsysvshm.la ext/xml/libxml.la TSRM/libtsrm.la -lgdbm -lpam -lc-client -ldl -lmysqlclient -lz -lpam -lintl -lgd -lfreetype -lpng -lz -ljpeg -lgdbm -lbz2 -lz -lcrypt -lssl -lcrypto -lresolv -lresolv -lm -ldl -lsocket -lsocket -lgcc /usr/local/sparc-sun-solaris2.7/bin/ld: .libs/libphp4.so: undefined versioned symbol name des_encrypt1@@SUNWprivate_1.1 /usr/local/sparc-sun-solaris2.7/bin/ld: failed to set dynamic section sizes: Bad value collect2: ld returned 1 exit status make[1]: *** [libphp4.la] Error 1 make[1]: Leaving directory `/usr/local/src/newapache/apachee/t2/php-4.0.6' make: *** [all-recursive] Error 1 All the above mentioned tools except gcc are built from source. I've also tried linking some of them with Sun's ld (/usr/ccs/bin/ld), resulting in the same link error (php uses libtool and GNU ld any way). If I leave out --with-openssl, building and linking goes fine. My complete configure command: # CFLAGS=-Os ./configure --enable-sysvsem --enable-sysvshm --enable-ftp \ --with-mysql=/usr/local/apachedeps --with-apxs=/usr/local/newapache/bin/apxs \ --with-zlib=/usr/local/apachedeps --with-bz2=/usr/local/apachedeps \ --with-jpeg-dir=/usr/local/apachedeps --with-tiff-dir=/usr/local/apachedeps \ --with-png-dir=/usr/local/apachedeps --enable-shared --enable-libgcc \ --with-freetype-dir=/usr/local/apachedeps --with-gd=/usr/local/apachedeps \ --with-gdbm=/usr/local/apachedeps --with-openssl=/usr/local/apachedeps \ --with-imap=/usr/local/apachedeps --with-config-file-path=/etc \ --with-gettext=/usr/local/apachedeps --with-db \ --with-prefix=/usr/local/apachedeps This does not happen with php 4.0.5. It builds and links fine with (the same installation of..) OpenSSL 0.9.6a.
[PHP-DEV] Bug #10822 Updated: CRYPT_SALT_LENGTH == 2 even when CRYPT_MD5 available
ID: 10822 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: *Encryption and hash functions Operating System: Linux 2.4.4 PHP Version: 4.0.5 New Comment: Fixed in CVS. --Jani Previous Comments: [2001-05-11 18:54:00] [EMAIL PROTECTED] Against the documentation, at least on Linux systems the const CRYPT_SALT_LENGTH is 2 even when the system is capable of encrypting MD5. Most likely, this is related to bug #9177. As stated there, I compiled php (after a make clean; rm config.cache) without openssl support, but ?php printf(%d, CRYPT_SALT_LENGTH); ? still emits 2 (but MD5 encryption works fine). It gets pretty complicated to maintain compatibility with former versions of PHP. This bug also causes compatibility probs when porting DBs with crypt() encrypted passwords from Linux to BSD and vice versa (MD5 ist std on most (all?) BSD platforms. I'd like to propose the following: CRYPT_SALT_LENGTH should be set to the longest salt the system is capable of (like it is staded in the docs). The 4 different consts specifying the salt of a requested encryprion (eg. CRYPT_MD5) should be set to 0 (==not available) or the salt length for this kind/flavour of encryption. Edit this bug report at http://bugs.php.net/?id=10822edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12570: feof () - no break on eof of socket
From: [EMAIL PROTECTED] Operating system: SuSE 7.0 PHP version: 4.0.6 PHP Bug Type: Network related Bug description: feof () - no break on eof of socket Hallo, I have a problem with the fsock-Funktions: $sock = fsockopen ($ip, $port, $errno, $errstr, 30); while (!feof ($sock)) { echo fgetc ($sock); flush () } fclose ($sock); This function hangs after correct output of the initial Data. (It seems that feof () ist false also on end of the $sock) Or is there an other way to check if the end is reached? By(t)e, Matthias -- Edit bug report at: http://bugs.php.net/?id=12570edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Constanst are case-insensitive
If you register the constant with CONST_CS, it will be case sensitive. Most of the constants in PHP are case sensitive. Zeev At 08:34 04/08/2001, Andrei Zmievski wrote: Does PHP really support case-sensitive constants? PHP-GTK needs to register both GDK_A and GDK_a constants (they define key symbols), but it seems that zend_register_constant() always puts the constant into the hash table under the lowercase name. What is the point of case-sensitivity then? -Andrei -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Zeev Suraski [EMAIL PROTECTED] CTO co-founder, Zend Technologies Ltd. http://www.zend.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Re: rand_str
sounds useful and cool, me thinks :o) / d [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I'm thinking about a new function: [mt_]rand_str Syntax: string [mt_]rand_str(minlen,maxlen[,charlist]); where charlist is in addcslashes (and now also [l|r]trim) syntax. Charlist defaults to 0..9a..zA..Z IMHO, this would be a very useful function. Any comments? Maybe not minmaxlen, but simply a fixed len? (since randomness on the length is ambigious to implement, there are less possibilities with shorter strings, which raises some issues). As an extension, the function could also accept an array as charlist, containing small strings, to produce pronouncable strings. Jeroen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Re: rand_str
is it that much more useful than md5(microtime()) ? ah-oh, you want to be able to specify the set of characters... At 04:28 8/5/2001, Daniel Andersson wrote the following: -- sounds useful and cool, me thinks :o) / d [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I'm thinking about a new function: [mt_]rand_str Syntax: string [mt_]rand_str(minlen,maxlen[,charlist]); where charlist is in addcslashes (and now also [l|r]trim) syntax. Charlist defaults to 0..9a..zA..Z IMHO, this would be a very useful function. Any comments? Maybe not minmaxlen, but simply a fixed len? (since randomness on the length is ambigious to implement, there are less possibilities with shorter strings, which raises some issues). As an extension, the function could also accept an array as charlist, containing small strings, to produce pronouncable strings. Jeroen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] --end of quote-- [EMAIL PROTECTED] - And the eyes of them both were opened and they saw that their files were world readable and writable, so they chmoded 600 their files. - Book of Installation chapt 3 sec 7 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12571: Apache segfaults(11)
From: [EMAIL PROTECTED] Operating system: Linux Debian woody PHP version: 4.0.6 PHP Bug Type: Apache related Bug description: Apache segfaults(11) I've got php-4.0.6 compiled with apache 1.3.20 (config options below), running horde 1.3.4, IMP 2.3.7, Turba 0.0.2. I'm doing a full upgrade from an older version of all of these. The old setup works fine for user Amy, and everyone else, this new install seems to work for every account that I've tried *except* Amy's. When I login, apache segfaults (11). Normally I would think that this might be because of mysql or imap (running pine4.33's newest IMAP), but it works fine for all the other users. I can reproduce the error every time I login as Amy, but not when I login as myself. Here is my configure for php: ./configure \ --with-zlib --with-mm --with-mysql=/usr \ --with-mcal=../libmcal-0.6.orig \ --with-config-file-path=/usr/local/lib \ --with-imap=/usr/local/src/pine4.33/imap \ --with-gettext --enable-ftp --with-gdbm \ --with-apache=../apache_1.3.20 --with-mcrypt --disable-magic-quotes Here is my configure for apache: ./configure --enable-module=mime_magic --enable-module=unique_id --enable-module=rewrite --enable-module=setenvif --enable-module=speling --enable-module=expires --enable-module=info --enable-module=log_agent --enable-module=log_referer --enable-module=so --enable-suexec --suexec-caller=www-data --suexec-docroot=/usr/var/www --activate module=src/modules/php4/libphp4.a Horde/IMP folks say that it is a php problem. gdb backtrace: gdb ./httpd -f conf/httpd.conf GNU gdb 19990928 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i686-pc-linux-gnu... /usr/local/apache/bin/conf/httpd.conf: No such file or directory. (gdb) run -X Starting program: /usr/local/apache/bin/./httpd -X Program received signal SIGSEGV, Segmentation fault. 0x2775e0 in realloc () from /lib/libc.so.6 (gdb) bt #0 0x2775e0 in realloc () from /lib/libc.so.6 #1 0x81d8f36 in fs_resize (block=0x85674b8, size=2048) at fs_unix.c:46 #2 0x81e8e61 in imap_sort (stream=0x84b8fb0, charset=0x0, spg=0x852cd70, pgm=0x8515a60, flags=1) at imap4r1.c:1667 #3 0x81d0003 in mail_sort (stream=0x84b8fb0, charset=0x0, spg=0x852cd70, pgm=0x8515a60, flags=1) at mail.c:3501 #4 0x80b1e9f in php_if_imap_sort (ht=5, return_value=0x852cd54, this_ptr=0x0, return_value_used=1) at php_imap.c:2773 #5 0x817e25a in execute (op_array=0x83a14ac) at ./zend_execute.c:1504 #6 0x8144874 in zend_execute_scripts (type=8, file_count=3) at zend.c:752 #7 0x809757f in php_execute_script (primary_file=0xb318) at main.c:1206 #8 0x81555fc in apache_php_module_main (r=0x8346af4, display_source_mode=0) at sapi_apache.c:89 #9 0x80941f2 in send_php () #10 0x809422a in send_parsed_php () #11 0x8188c99 in ap_invoke_handler () #12 0x819d5ff in process_request_internal () #13 0x819d666 in ap_process_request () #14 0x8194586 in child_main () #15 0x8194741 in make_child () #16 0x81948bc in startup_children () #17 0x8194f2c in standalone_main () #18 0x819575c in main () #19 0x2232db in __libc_start_main () from /lib/libc.so.6 (gdb) -- Edit bug report at: http://bugs.php.net/?id=12571edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12571 Updated: Apache segfaults(11)
ID: 12571 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Open Status: Feedback Bug Type: IMAP related Operating System: Linux Debian woody PHP Version: 4.0.6 New Comment: Could you please try to compile PHP with the latest c-client ?? As this looks like it happens in the c-client code rather that in PHP. And have you checked the mailserver's logs? Do they have anything about this? And the 'horde/IMP people' could also help out a little and help users to create short test scripts when they claim it to be PHP problem.. :) --Jani Previous Comments: [2001-08-04 22:35:43] [EMAIL PROTECTED] I've got php-4.0.6 compiled with apache 1.3.20 (config options below), running horde 1.3.4, IMP 2.3.7, Turba 0.0.2. I'm doing a full upgrade from an older version of all of these. The old setup works fine for user Amy, and everyone else, this new install seems to work for every account that I've tried *except* Amy's. When I login, apache segfaults (11). Normally I would think that this might be because of mysql or imap (running pine4.33's newest IMAP), but it works fine for all the other users. I can reproduce the error every time I login as Amy, but not when I login as myself. Here is my configure for php: ./configure \ --with-zlib --with-mm --with-mysql=/usr \ --with-mcal=../libmcal-0.6.orig \ --with-config-file-path=/usr/local/lib \ --with-imap=/usr/local/src/pine4.33/imap \ --with-gettext --enable-ftp --with-gdbm \ --with-apache=../apache_1.3.20 --with-mcrypt --disable-magic-quotes Here is my configure for apache: ./configure --enable-module=mime_magic --enable-module=unique_id --enable-module=rewrite --enable-module=setenvif --enable-module=speling --enable-module=expires --enable-module=info --enable-module=log_agent --enable-module=log_referer --enable-module=so --enable-suexec --suexec-caller=www-data --suexec-docroot=/usr/var/www --activate module=src/modules/php4/libphp4.a Horde/IMP folks say that it is a php problem. gdb backtrace: gdb ./httpd -f conf/httpd.conf GNU gdb 19990928 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as i686-pc-linux-gnu... /usr/local/apache/bin/conf/httpd.conf: No such file or directory. (gdb) run -X Starting program: /usr/local/apache/bin/./httpd -X Program received signal SIGSEGV, Segmentation fault. 0x2775e0 in realloc () from /lib/libc.so.6 (gdb) bt #0 0x2775e0 in realloc () from /lib/libc.so.6 #1 0x81d8f36 in fs_resize (block=0x85674b8, size=2048) at fs_unix.c:46 #2 0x81e8e61 in imap_sort (stream=0x84b8fb0, charset=0x0, spg=0x852cd70, pgm=0x8515a60, flags=1) at imap4r1.c:1667 #3 0x81d0003 in mail_sort (stream=0x84b8fb0, charset=0x0, spg=0x852cd70, pgm=0x8515a60, flags=1) at mail.c:3501 #4 0x80b1e9f in php_if_imap_sort (ht=5, return_value=0x852cd54, this_ptr=0x0, return_value_used=1) at php_imap.c:2773 #5 0x817e25a in execute (op_array=0x83a14ac) at ./zend_execute.c:1504 #6 0x8144874 in zend_execute_scripts (type=8, file_count=3) at zend.c:752 #7 0x809757f in php_execute_script (primary_file=0xb318) at main.c:1206 #8 0x81555fc in apache_php_module_main (r=0x8346af4, display_source_mode=0) at sapi_apache.c:89 #9 0x80941f2 in send_php () #10 0x809422a in send_parsed_php () #11 0x8188c99 in ap_invoke_handler () #12 0x819d5ff in process_request_internal () #13 0x819d666 in ap_process_request () #14 0x8194586 in child_main () #15 0x8194741 in make_child () #16 0x81948bc in startup_children () #17 0x8194f2c in standalone_main () #18 0x819575c in main () #19 0x2232db in __libc_start_main () from /lib/libc.so.6 (gdb) Edit this bug report at http://bugs.php.net/?id=12571edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Here's the information you asked for...
Title: You're receiving this because you've expressed an interest in receiving information about Internet based businesses, and because of that expressed interest, you appear in our opt-in list. If you don't want to receive future offers or correspondence from us, Remove Me instructions appear at the end of this letter. Isn't it time you stop saying No? No, we can't afford it. No, I don't have time. No, it won't work for me. Wouldn't you like to put an end to that kind of thinking? There are only two ways you ultimately live your life:you'll either learn to cope with what little you have, or you'll enjoy a life of abundance by getting what you want. Which is it for you? Instead of living without, imagine making an extra five, ten, twenty thousand dollars or more before the end of August! No inflated promises, no boastful brags - we'll reveal the proven secrets of how to do this step-by-step with no expensive advertising, and no selling! This isn't an MLM, and it doesn't involve network marketing - so you're not going to be approaching friends and family members.In fact, it won't be long before they're approaching you - wanting to know what you're doing that has you... displaying a new level of confidence driving the car you've always wanted free from stress, and... obviously making more money! Discover a brand new way to make money, if you'd like information on becoming part of the 1% who actually generate a sizeable, RESIDUAL income month-after-month-after-month, click on our logo... If your mail reader doesn't display the logo, our web site is located at:http://www.vbmarketing.com --- We don't send unsolicited e-mail! In accordance with the statutes of the 105th United States Congress, we provide both contact information and a no charge method of removal. If you don't want to receive future opportunities and/or offers from us, send an e-mail to: [EMAIL PROTECTED] We don't sell or share your information with any third party, and our database is reconciled daily. Your request to be removed will be honored immediately. Thanks. --- -- PHP Development Mailing List To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12572: sort() doesn't reindex 1 element arrays at 0
From: [EMAIL PROTECTED] Operating system: Redhat Linux 7.0 PHP version: 4.0.6 PHP Bug Type: Arrays related Bug description: sort() doesn't reindex 1 element arrays at 0 sort() reindexes arrays of length 1 at 0, but doesn't do this for 1 element arrays. The following patch, fixes this minor inconsistancy. Please review it carefully, my C is rusty and I don't normally play with these files. It does build and seem to run correctly for me, with limited testing. -adam Here is an example: $array = array(2 = 'foo', 'bar'); sort($array); print_r($array); Array ( [0] = bar [1] = foo ) But, $array = array(2 = 'foo'); sort($array); print_r($array); Array ( [2] = foo ) --- zend_hash.c Sun Aug 5 01:17:22 2001 +++ /home/adam/zend_hash.c Sun Aug 5 00:54:21 2001 @@ -1097,6 +1097,13 @@ IS_CONSISTENT(ht); if (ht-nNumOfElements = 1) { /* Doesn't require sorting */ + if (ht-nNumOfElements == 1 renumber) { /* Renumber 1 element arrays to O */ + p = ht-pListHead; + p-nKeyLength = 0; + p-h = 0; + ht-nNextFreeElement = 1; + zend_hash_rehash(ht); + } return SUCCESS; } arTmp = (Bucket **) pemalloc(ht-nNumOfElements * sizeof(Bucket *), ht-persistent); -- Edit bug report at: http://bugs.php.net/?id=12572edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DEV] Constanst are case-insensitive
At 06:34 PM 8/4/01 +0300, Zeev Suraski wrote: If you register the constant with CONST_CS, it will be case sensitive. Most of the constants in PHP are case sensitive. But it doesn't work. I register GDK_A with CONST_CS and then when I try to register GDK_a with CONST_CS as well it complains that it's already registered. Try it yourself. -Andrei -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]