[PHP-DEV] Bug #12607 Updated: undefined reference to gdImageGifCtx
ID: 12607 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Open Status: Feedback Old Bug Type: *Compile Issues Bug Type: GD related Operating System: NetBSD/Alpha 1.5W PHP Version: 4.0CVS-2001-08-06 New Comment: Are you sure you don't have some old GD library remains in your system, like old .h files from previous version? With which GD library version are you trying this with? With which capabilities was it compiled with? What is on line 23508 in your configure file? (And that last configure option to enable some 'hack' does not exist anymore.. :) --Jani Previous Comments: [2001-08-06 16:42:24] [EMAIL PROTECTED] # uname -a NetBSD ns01 1.5W NetBSD 1.5W (ALPHA-$Revision: 1.127.2.2 $) #5: Mon Jun 25 22:34:09 CDT 2001 tom@ns01:/usr/src/sys/arch/alpha/compile/ns01 alpha rm config.cache export LIBS=-lm -lc -lintl -lX11 \ export LDFLAGS=-Wl,-export-dynamic \ -Wl,-R/usr/lib -L/usr/lib \ -Wl,-R/usr/pkg/lib -L/usr/pkg/lib \ -Wl,-R/usr/local/lib -L/usr/local/lib \ -Wl,-R/usr/X11R6/lib -L/usr/X11R6/lib ./configure \ --with-apxs \ --disable-pear \ --with-gd=/usr/pkg \ --with-png-dir=/usr/pkg \ --with-jpeg-dir=/usr/pkg \ --with-freetype-dir=/usr/pkg \ --with-xpm-dir=/usr/X11R6 \ --with-pgsql=/usr/local \ --with-mysql=/usr/local \ --enable-libgcc \ --with-gnu-ld \ --with-zlib \ --with-system-regex \ --with-config-file-path=/usr/local/etc \ --enable-track-vars \ --enable-force-cgi-redirect \ --enable-discard-path \ --enable-memory-limit \ --enable-sysvsem \ --enable-sysvshm \ --enable-sockets \ --with-ttf=/usr/pkg \ --enable-freetype-4bit-antialias-hack configure status hangs at: ... checking for gdImageColorResolve in -lgd... yes checking for gdImageGifCtx in -lgd... no checking whether to include GNU gettext support... no checking for gmp support... no checking for Hyperwave support... no checking for ICAP support... no checking for iconv support... no ./configure: 23508: Syntax error: redirection unexpected config.log: # tail -20 config.log /home/staffs/t/tom/work/php/php4-current/php4/configure:22183: undefined reference to `gdImageGif Ctx' /home/staffs/t/tom/work/php/php4-current/php4/configure:22183: undefined reference to `gdImageGif Ctx' collect2: ld returned 1 exit status configure: failed program was: #line 22176 configure #include confdefs.h /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gdImageGifCtx(); int main() { gdImageGifCtx() ; return 0; } configure:22274: checking whether to include GNU gettext support configure:22697: checking for gmp support configure:22977: checking for Hyperwave support configure:23146: checking for ICAP support configure:23465: checking for iconv support Edit this bug report at http://bugs.php.net/?id=12607edit=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] Re: To deprecate dl() or not.. (Was: something messy.. :)
First, I'm 100% with Zeev here, kill dl()! It's evil. Second, I had an idea related to this discussion. I have been compiling PHP with almost every extension in the CVS (excluding the win32 specific) plus couple of 'renegade' extensions and all of them as 'static' extensions. Before I start to wonder into the land of Zend Magic, I wanted to ask first before I (again) waste my time creating something nobody likes/needs.. :) Would it be stupid to have a possibility to disable a static extension on startup? (for CGI) Either as php.ini directive or as command line option or both. It takes couple of seconds now to run some short script like this: ?php echo 'Foo\n'; ? on the command line.. :) --Jani On Tue, 7 Aug 2001, Zeev Suraski wrote: I disagree in two levels. First, I think that saying We can't protect people from their stupidity, so let's lift all bars is just plain wrong and a bad approach in a real world situation. Sure, it's true, but we can definitely reduce the risks involved in common mistakes that people make. Not bulletproof, but sometimes simply hinting people not to go around places where shots are fired is good enough. On the second level, there are several other reasons not to keep dl() which aren't related to security or preventing people from doing the wrong things. These are: - Slow performance, encourages slow app writing - Complicates the development of extensions and the engine - Will not work in thread safe mode All in all, dl() is simply bad, in just about every level. Zeev At 00:03 07-08-01, George Schlossnagle wrote: In a few words: For a webserver: ban dl() For generic scripting: keep dl() What's really the point of protecting people from their stupidity. If you're going to keep it in the generic scripting engine (which I think has lots of value), why not keep it in the webserver engine as well. There are plenty of php extensions which, imho, operate way to slow to called on a busy production site. Does that mean they should be eliminated? No, it means they should just be used with a 'buyer-beware' mentality. George -- 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] Bug #12609 Updated: Problem at restart (?)
ID: 12609 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Summary: problema en restart Old Status: Open Status: Bogus Bug Type: Unknown/Other Function Operating System: Linux PHP Version: 4.0.6 New Comment: Please use english to submit bug reports. Also, DO NOT USE 'apachectl restart'!!! Use this instead: ./apachectl stop ; ./apachectl start --Jani Previous Comments: [2001-08-06 19:22:12] [EMAIL PROTECTED] Estoy trabajndo con php 4.0.5 , apache 1.3.20 y mysql 3.22.32. El problema es que luego de hacer make install, cuando voy a reiniciar el servidor con /sbin/apachectl restart me da el siguiente mensaje de error: Can´t resolve symbol open64 Can´t resolve symbol __lxstat64 Can´t resolve symbol fopen64 Can´t load /usr/local/apache/libexec/libphp4.so into server Edit this bug report at http://bugs.php.net/?id=12609edit=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] Re: Bug #12596 Updated: Definition of array using constants in array doesn't work
This is a bug. If it's not a bug in classes, it definitely is a bug in the language scanner/parser. It doesn't even issue a warning, it just happily crunches the code and executes it. This is not the way a robust interpreter should behave. Jan Bug Database wrote: ID: 12596 Updated by: jeroen Reported By: [EMAIL PROTECTED] Old Status: Open Status: Feedback Bug Type: Class/Object related Operating System: Linux PHP Version: 4.0.5 New Comment: This isn't supposed to work (class-var initing is not allowed for non-scalar (for example array) values). It is funny that it turns out to work this way, a parse-error would be better IMO. But it is not a bug, changing status to feedback. It is in the manual somewhere that this isn't allowed, try language - classes and object Previous Comments: [2001-08-06 09:41:56] [EMAIL PROTECTED] The following piece of code doesn't work: ? define ('A', 20); class B { var $a = array(A = 10); } $b = new B(); var_dump($b); ? It produces: object(b)(1) { [a]= array(1) { [A]= int(10) } } which is unexpected (at least for me). ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=12596edit=2 -- Jan Fedak mailto:[EMAIL PROTECTED] Linux - the ultimate NT Service Pack. -- 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 #12611: problems with ImageColorSet and ImageColorAt
From: [EMAIL PROTECTED] Operating system: Windows PHP version: 4.0.6 PHP Bug Type: *Graphics related Bug description: problems with ImageColorSet and ImageColorAt It's not possible to add colors to image using this function - setting colors with index greater than ImageColorsTotal does nothing. - tested on PNG image with 10 colors. Also ImageColorAt crashes webserver, when used on TrueColor images. -- Edit bug report at: http://bugs.php.net/?id=12611edit=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] Re: To deprecate dl() or not.. (Was: something messy.. :)
On Tue, Aug 07, 2001 at 09:13:16AM +0200, Jani Taskinen wrote: First, I'm 100% with Zeev here, kill dl()! It's evil. Second, I had an idea related to this discussion. I have been compiling PHP with almost every extension in the CVS (excluding the win32 specific) plus couple of 'renegade' extensions and all of them as 'static' extensions. Before I start to wonder into the land of Zend Magic, I wanted to ask first before I (again) waste my time creating something nobody likes/needs.. :) Would it be stupid to have a possibility to disable a static extension on startup? (for CGI) Either as php.ini directive or as command line option or both. It takes couple of seconds now to run some short script like this: ?php echo 'Foo\n'; ? on the command line.. :) i bet this is the pure load-time of your php-executable (loading a lot of shared libs). tc --Jani On Tue, 7 Aug 2001, Zeev Suraski wrote: I disagree in two levels. First, I think that saying We can't protect people from their stupidity, so let's lift all bars is just plain wrong and a bad approach in a real world situation. Sure, it's true, but we can definitely reduce the risks involved in common mistakes that people make. Not bulletproof, but sometimes simply hinting people not to go around places where shots are fired is good enough. On the second level, there are several other reasons not to keep dl() which aren't related to security or preventing people from doing the wrong things. These are: - Slow performance, encourages slow app writing - Complicates the development of extensions and the engine - Will not work in thread safe mode All in all, dl() is simply bad, in just about every level. Zeev At 00:03 07-08-01, George Schlossnagle wrote: In a few words: For a webserver: ban dl() For generic scripting: keep dl() What's really the point of protecting people from their stupidity. If you're going to keep it in the generic scripting engine (which I think has lots of value), why not keep it in the webserver engine as well. There are plenty of php extensions which, imho, operate way to slow to called on a busy production site. Does that mean they should be eliminated? No, it means they should just be used with a 'buyer-beware' mentality. George -- 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 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 #12612: unsigned integer problem
From: [EMAIL PROTECTED] Operating system: Windows 2000 Server SP1 5.0.2195 PHP version: 4.0.4pl1 PHP Bug Type: Scripting Engine problem Bug description: unsigned integer problem $qq = 0x8000; echo $qq; //2147483648 ok $qq = 0x8000 | 0; echo $qq; //-2147483648 ??? echo abs($qq); //-2147483648 ??? echo $qq * -1; //2147483648 -- Edit bug report at: http://bugs.php.net/?id=12612edit=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 #9836 Updated: php unexpectedly ends on too long scripts
ID: 9836 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: Scripting Engine problem Old Operating System: linux 2.2.18 Operating System: linux Old PHP Version: 4.0.4pl1 PHP Version: 4.0.5 New Comment: so it has happened again. I again offer to provide the script so that you can see where the problem is. I won't paste it here because it has 730K. The script cannot really run because it is supposed to have many includes and it itself should be included by other script -- but it should fail with some reason (like unknown function). Instead it just dies with return code 1. Previous Comments: [2001-05-10 05:57:58] [EMAIL PROTECTED] No feedback. If problem exists with PHP 4.0.5, reopen. [2001-04-19 09:35:10] [EMAIL PROTECTED] Does this happen with latest CVS from http://snaps.php.net/ ? --Jani [2001-03-19 13:57:54] [EMAIL PROTECTED] With that limited information you gave in the first comments I couldn't know that. Ok, so it doesn't crash? Just stops? Computer generated scripts? How big? And what do they do? Could you check that it doesn't crash, ie. run the php script which 'ends' within gdb: # gdb php (gdb) run -f thisscriptendstoosoon.php --Jani [2001-03-19 12:13:53] [EMAIL PROTECTED] I know of time limit, smart guy. But I don't have it set to 1 sec -- that is approximately the time in which php terminates. (I hope you mark this problem as closed now -- THAT YOU'VE SOLVED IT). Damn. [2001-03-19 11:55:37] [EMAIL PROTECTED] RTFM: http://www.php.net/manual/en/function.set-time-limit.php 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=9836 Edit this bug report at http://bugs.php.net/?id=9836edit=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 #9836 Updated: php unexpectedly ends on too long scripts
ID: 9836 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Closed Status: Feedback Bug Type: Scripting Engine problem Operating System: linux PHP Version: 4.0.5 New Comment: And now we have already released PHP 4.0.6. But could you PLEASE try the latest CVS snapshot: http://snaps.php.net/ After you have tested your script with these and if it still fails, provide the GDB backtrace I asked a long ago. --Jani Previous Comments: [2001-08-07 05:28:09] [EMAIL PROTECTED] so it has happened again. I again offer to provide the script so that you can see where the problem is. I won't paste it here because it has 730K. The script cannot really run because it is supposed to have many includes and it itself should be included by other script -- but it should fail with some reason (like unknown function). Instead it just dies with return code 1. [2001-05-10 05:57:58] [EMAIL PROTECTED] No feedback. If problem exists with PHP 4.0.5, reopen. [2001-04-19 09:35:10] [EMAIL PROTECTED] Does this happen with latest CVS from http://snaps.php.net/ ? --Jani [2001-03-19 13:57:54] [EMAIL PROTECTED] With that limited information you gave in the first comments I couldn't know that. Ok, so it doesn't crash? Just stops? Computer generated scripts? How big? And what do they do? Could you check that it doesn't crash, ie. run the php script which 'ends' within gdb: # gdb php (gdb) run -f thisscriptendstoosoon.php --Jani [2001-03-19 12:13:53] [EMAIL PROTECTED] I know of time limit, smart guy. But I don't have it set to 1 sec -- that is approximately the time in which php terminates. (I hope you mark this problem as closed now -- THAT YOU'VE SOLVED IT). Damn. 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=9836 Edit this bug report at http://bugs.php.net/?id=9836edit=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 #12613: _ldap.dll extension cannot be loaded
From: [EMAIL PROTECTED] Operating system: winnt_server sp3 iis4.0 PHP version: 4.0.6 PHP Bug Type: *Configuration Issues Bug description: _ldap.dll extension cannot be loaded I tried to install the php_ldap.dll but there is always the following error message when I try to execute phpinfo(); PHP Warning: Unable to load dynamic library 'c:/php/extensions/php_ldap.dll' - in Unknown on line 0 php.ini looks like: extension_dir = c:/php/extensions/ extension=php_ldap.dll what is wrong there? Gregor -- Edit bug report at: http://bugs.php.net/?id=12613edit=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 #12613 Updated: _ldap.dll extension cannot be loaded
ID: 12613 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: *Configuration Issues Operating System: winnt_server sp3 iis4.0 PHP Version: 4.0.6 New Comment: You didn't read the bugs-dos-and-donts, did you?? And you didn't bother searching the bug database for similar problems, did you? If you had, you would have saved my time, bandwidth and propably couple of broken veins in my brain. Search the database as I'm NOT gonna give you any answers. Also, READ the install.txt. The answer is there.. --Jani Previous Comments: [2001-08-07 06:06:22] [EMAIL PROTECTED] I tried to install the php_ldap.dll but there is always the following error message when I try to execute phpinfo(); PHP Warning: Unable to load dynamic library 'c:/php/extensions/php_ldap.dll' - in Unknown on line 0 php.ini looks like: extension_dir = c:/php/extensions/ extension=php_ldap.dll what is wrong there? Gregor Edit this bug report at http://bugs.php.net/?id=12613edit=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] Re: Bug #9836 Updated: php unexpectedly ends on too long scripts
S... all the relevant info coming: latest snapshot. compile-time: ./configure \ -with-sybase-ct=/home/sybase \ --enable-sysvsem \ --enable-sysvshm \ --enable-memory-limit \ --enable-sockets \ --disable-session \ --with-gmp \ --enable-debug and after make we finally see that: $ ./php ~/5.skr (failed: 1) $ gdb ./php (gdb) run -f ~/5.skr Starting program: ./php -f ~/5.skr Program exited with code 01. It doesn't crash, it just exits with errcode. I attach php.ini and the script. Jan Bug Database wrote: ID: 9836 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Closed Status: Feedback Bug Type: Scripting Engine problem Operating System: linux PHP Version: 4.0.5 New Comment: And now we have already released PHP 4.0.6. But could you PLEASE try the latest CVS snapshot: http://snaps.php.net/ After you have tested your script with these and if it still fails, provide the GDB backtrace I asked a long ago. --Jani Previous Comments: [2001-08-07 05:28:09] [EMAIL PROTECTED] so it has happened again. I again offer to provide the script so that you can see where the problem is. I won't paste it here because it has 730K. The script cannot really run because it is supposed to have many includes and it itself should be included by other script -- but it should fail with some reason (like unknown function). Instead it just dies with return code 1. [2001-05-10 05:57:58] [EMAIL PROTECTED] No feedback. If problem exists with PHP 4.0.5, reopen. [2001-04-19 09:35:10] [EMAIL PROTECTED] Does this happen with latest CVS from http://snaps.php.net/ ? --Jani [2001-03-19 13:57:54] [EMAIL PROTECTED] With that limited information you gave in the first comments I couldn't know that. Ok, so it doesn't crash? Just stops? Computer generated scripts? How big? And what do they do? Could you check that it doesn't crash, ie. run the php script which 'ends' within gdb: # gdb php (gdb) run -f thisscriptendstoosoon.php --Jani [2001-03-19 12:13:53] [EMAIL PROTECTED] I know of time limit, smart guy. But I don't have it set to 1 sec -- that is approximately the time in which php terminates. (I hope you mark this problem as closed now -- THAT YOU'VE SOLVED IT). Damn. 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=9836 ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9836edit=2 -- Jan Fedak mailto:[EMAIL PROTECTED] Linux - the ultimate NT Service Pack. 5.skr.gz [PHP] ;;; ; About this file ; ;;; ; This file controls many aspects of PHP's behavior. In order for PHP to ; read it, it must be named 'php.ini'. PHP looks for it in the current ; working directory, in the path designated by the environment variable ; PHPRC, and in the path that was defined in compile time (in that order). ; Under Windows, the compile-time path is the Windows directory. The ; path in which the php.ini file is looked for can be overriden using ; the -c argument in command line mode. ; ; The syntax of the file is extremely simple. Whitespace and Lines ; beginning with a semicolon are silently ignored (as you probably guessed). ; Section headers (e.g. [Foo]) are also silently ignored, even though ; they might mean something in the future. ; ; Directives are specified using the following syntax: ; directive = value ; Directive names are *case sensitive* - foo=bar is different from FOO=bar. ; ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression ; (e.g. E_ALL ~E_NOTICE), or a quoted string (foo). ; ; Expressions in the INI file are limited to bitwise operators and parentheses: ; | bitwise OR ; bitwise AND ; ~ bitwise NOT ; ; Boolean flags can be turned on using the values 1, On, True or Yes. ; They can be turned off using the values 0, Off, False or No. ; ; An empty string can be denoted by simply not writing anything after the equal ; sign, or by using the None keyword: ; ; foo = ; sets foo to an empty string ; foo = none ;
[PHP-DEV] Bug #12614: AddSlashes doen't escape Curly braces {'s
From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.0CVS-2001-08-07 PHP Bug Type: Strings related Bug description: AddSlashes doen't escape Curly braces {'s AFAIK this is not fixed in versoins beyong 4.0.1pl2 which is what I'm using. I'm using PHP to modify Latex files - particularly to substitute PHP variables with values from a database. Therefore my Latex file could contain: \textbf{$php_variable} I read lines from the Latex file and use something like: $input_line = AddSlashes( fgets($fp)); $str = eval($input_line); As the input line includes a {$ the eval function assumes an array calculation and the { is left out of the output string. I've fixed the problem by adding an additional str_replace to escape the { with \{ first. Kind regards Mark -- Edit bug report at: http://bugs.php.net/?id=12614edit=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] Re: Bug #9836 Updated: php unexpectedly ends on toolong scripts
On Tue, 7 Aug 2001, Jan Fedak wrote: latest snapshot. Good. and after make we finally see that: $ ./php ~/5.skr (failed: 1) $ gdb ./php (gdb) run -f ~/5.skr Starting program: ./php -f ~/5.skr Program exited with code 01. I get tons of these: Warning - Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. And after those: bFatal error/b: Call to undefined function: getparameter() in b5.skr/b on line b15/bbr 5.skr(15) : Fatal error - Call to undefined function: getparameter() --Jani It doesn't crash, it just exits with errcode. I attach php.ini and the script. Jan Bug Database wrote: ID: 9836 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Closed Status: Feedback Bug Type: Scripting Engine problem Operating System: linux PHP Version: 4.0.5 New Comment: And now we have already released PHP 4.0.6. But could you PLEASE try the latest CVS snapshot: http://snaps.php.net/ After you have tested your script with these and if it still fails, provide the GDB backtrace I asked a long ago. --Jani Previous Comments: [2001-08-07 05:28:09] [EMAIL PROTECTED] so it has happened again. I again offer to provide the script so that you can see where the problem is. I won't paste it here because it has 730K. The script cannot really run because it is supposed to have many includes and it itself should be included by other script -- but it should fail with some reason (like unknown function). Instead it just dies with return code 1. [2001-05-10 05:57:58] [EMAIL PROTECTED] No feedback. If problem exists with PHP 4.0.5, reopen. [2001-04-19 09:35:10] [EMAIL PROTECTED] Does this happen with latest CVS from http://snaps.php.net/ ? --Jani [2001-03-19 13:57:54] [EMAIL PROTECTED] With that limited information you gave in the first comments I couldn't know that. Ok, so it doesn't crash? Just stops? Computer generated scripts? How big? And what do they do? Could you check that it doesn't crash, ie. run the php script which 'ends' within gdb: # gdb php (gdb) run -f thisscriptendstoosoon.php --Jani [2001-03-19 12:13:53] [EMAIL PROTECTED] I know of time limit, smart guy. But I don't have it set to 1 sec -- that is approximately the time in which php terminates. (I hope you mark this problem as closed now -- THAT YOU'VE SOLVED IT). Damn. 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=9836 ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9836edit=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]
[PHP-DEV] Bug #12615: Integer?
From: [EMAIL PROTECTED] Operating system: Win2000 PHP version: 4.0.5 PHP Bug Type: *General Issues Bug description: Integer? ?php for ($i=1; $i=10; $i+=0.01) { print br$i; } ? and the output look like ... 1 1.01 1.02 1.03 . . . . 4.3 4.31 4.32 4.33 4.34 4.35 4.36 4.37 4.38 4.38999 4.3 4.40999 4.41999 4.42999 4.43999 . . . . . -- Edit bug report at: http://bugs.php.net/?id=12615edit=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 #12616: Apache make fails, can't find php header files
From: [EMAIL PROTECTED] Operating system: Redhat Linux 7.1 PHP version: 4.0.5 PHP Bug Type: Compile Failure Bug description: Apache make fails, can't find php header files apache_1.3.19# ./configure --prefix=/usr/local/apache php-4.05# ./configure --with-mysql --enable-track-vars --with-apache=../apache_1.3.19 php-4.05# make -ok, make install - ok apache_1.3.19# ./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libmodphp4.a - ok apache_1.3.19# make -errors see below gcc -c -I../../os/unix -I../../include -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../../lib/expat-lite -DNO_DL_NEEDED `../../apaci` mod_ph4.c mod_php4.c:28:18: zend.h: No such file or directory mod_php4.c:29:17: php.h: No such file or directory mod_php4.c:30:27: php_variables.h: No such file or directory mod_php4.c:47:21: php_ini.h: No such file or directory mod_php4.c:48:25: php_globals.h: No such file or directory mod_php4.c:49:18: SAPI.h: No such file or directory mod_php4.c:50:22: php_main.h: No such file or directory mod_php4.c:52:26: zend_compile.h: No such file or directory mod_php4.c:53:26: zend_execute.h: No such file or directory mod_php4.c:54:28: zend_highlight.h: No such file or directory mod_php4.c:55:25: zend_indent.h: No such file or directory mod_php4.c:57:39: ext/standard/php_standard.h: No such file or directory make[4]: *** [mod_php4.o] Error 1 etc. I tried to change the gcc command to include the /usr/local/include directory in which the missing files are located (well they are under that directory) however it caused another bunch of dependency problems. I have had this problem with Redhat7.0 all versions of php and apache I could get my hands on. I can't find any reports of this problem, and don't see what I may be doing wrong. -- Edit bug report at: http://bugs.php.net/?id=12616edit=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] Re: how do i check if a field exists
where field_name actually exists but may not be used (null). the problem is that if it is not used then warnings are generated, even if i do;- if($myrow[field_name] != null){ $data = $myrow[field_name]; } is there any proposal to unify database extensions ? it seems that the mysql-extension doesn't set NULL values whereas the mssql-extension sets them to FALSE and the generic ODBC-extension sets them to 0. i haven't tried the others. there are a few other points that should be genrealized too here. harald. -- 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: To deprecate dl() or not.. (Was: something messy..:)
On Tue, 7 Aug 2001, Thies C. Arntzen wrote: On Tue, Aug 07, 2001 at 09:13:16AM +0200, Jani Taskinen wrote: Would it be stupid to have a possibility to disable a static extension on startup? (for CGI) Either as php.ini directive or as command line option or both. It takes couple of seconds now to run some short script like this: ?php echo 'Foo\n'; ? on the command line.. :) i bet this is the pure load-time of your php-executable (loading a lot of shared libs). Well of course..I should first drink 3 Red Bulls before asking anything so early in the morning. :) I have about 50 shared libs linked to the php executable. So the best way is to compile extensions as shared and load them in php.ini or using a commandline option..which doesn't exist yet. --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]
[PHP-DEV] PHP Bug 11647 11690 (fwd)
-- Forwarded message -- Date: Thu, 2 Aug 2001 17:28:09 +0100 From: John Hagerty [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: PHP Bug 11647 11690 Hi Derek, I hope you don't mind me mailing you directly, but I don't think I'm able to comment on bugs that I haven't registered on the PHP site myself. Bugs 11647 11690 relate to APXS failing under PHP.4.0.6 on installation. I noticed that you suggested upgrading Apache from 1.3.6 to 1.3.20 to combat this problem, but the user in question was running on a Cobalt RaQ server and was unable to do so. URL: http://www.php.net/bugs.php?id=11647edit=2 This morning I upgraded our Linux based Apache server to 1.3.20, but I suffered this problem as well. Although -S is listed as an acceptible option on the APXS man pages, it doesn't seem to like it. I hope this is of some use to you, if not, my apologies for cluttering your mail box! Regards, John John Hagerty Internet Developer WebShed - Effective Internet Solutions e: [EMAIL PROTECTED] w: www.webshed.co.uk WebShed Ltd 30-32 Faraday Road Wavertree Technology Park Liverpool L13 1EH t: +44 (0) 151 281 4040 f: +44 (0) 151 281 0060 WebShed London Ltd 55 St John Street London EC1M 4AN t: +44 (0) 207 253 6278 t: +44 (0) 207 253 6294 Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my firm shall be understood as neither given nor endorsed by it. -- 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 #12335 Updated: mail() function returns false but the email was sent.
ID: 12335 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Mail related Operating System: Sun Solaris 2.6 PHP Version: 4.0.6 New Comment: I found out, that the problem is not the EX_OK or EX_TEMPFAIL but the sendmail return value. Sendmail (the sendmail qmail wrapper) is returning the value -1 when I call it with php 4.0.6. When I call it with 4.0.4pl than 0 is returned. What could be the reason for this behaviour? Previous Comments: [2001-08-01 05:20:35] [EMAIL PROTECTED] I had a look on the mail.c sourcecode and I made a change. So I found the part where the error appears. But I do not know why, in version 4.0.4pl1 it is the same code and with this version it works. This is the extract from mail.c where the error appears: ret = pclose(sendmail); #if definded (EX_TEMPFAIL) if ((ret != EX_OK)(ret != EX_TEMPFAIL)) { #else if (ret != EX_OK) { #endif return 0; } else { return 1; } If I change the 0 to 1 than I get true as response of the mail() function. So what could be the problem with EX_OK and EX_TEMPFAIL that the same if query is working in 4.0.4pl1 and not in 4.0.6? Who is EX_OK and EX_TEMPFAIL defined? [2001-07-30 01:42:49] [EMAIL PROTECTED] This was a misunderstanding. I have the problems with version 4.0.6. But this machine is not on the internet. Because it's our testmachine. Our livesystem thats on the internet has version 4.0.4 and we want to update this machine to 4.0.6 but we can't do that as long as we have the problem with the mail function. The both systems are exactly the same. I wrote this only to explain why I can't put the test script on the internet. [2001-07-27 13:27:28] [EMAIL PROTECTED] So which version of PHP are you using? In your comments you say 4.0.4 but in the headers there is 4.0.6?? [2001-07-25 02:55:32] [EMAIL PROTECTED] I can't put this script to the internet, because I test it only on a fallback server that is currently not avaliable via the internet. On our live system that is in the internet we still use an older version (4.0.4), because of the problem with the mail() function in version 4.0.4. Some more information: I use the sendmail wrapper from qmail. In the php.ini file the I have made the following entry: sendmail_path = /usr/lib/sendmail -t To update apache to the new php version I replaced only the libphp4.so file. [2001-07-24 17:41:53] [EMAIL PROTECTED] Since everybody else that has tried this says it works fine, can you put this script on the internet so that I can see this happen? 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=12335 Edit this bug report at http://bugs.php.net/?id=12335edit=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 #12608 Updated: $REDIRECT_QUERY_STRING isn't parsed into $HTTP_GET_VARS
ID: 12608 Updated by: andy Reported By: [EMAIL PROTECTED] Old Status: Open Status: Feedback Bug Type: Variables related Old Operating System: Debian potato GNU/Linux Operating System: Debian potato GNU/Linux PHP Version: 4.0.5 New Comment: I don't know if I read this right, because it was a bit confusing, but I'll take a shot. $HTTP_GET_VARS parses the query string for the current page... I can't think of a good example right now, but it could mess things up if REDIRECT_QUERY_STRING broke up into HTTP_GET_VARS. If you wanted to do something like that try a script like the following... [not tested] ? $splitby=split(,$HTTP_SERVER_VARS[REDIRECT_QUERY_STRING]); for ($i=0;$icount($splitby);$i++){ $splitfurther=split(=,$splitby[$i]); $$splitfurther[0]=$splitfurther=[1]; } This should put the REDIRECT_QUERY_STRING into variables, like if the redirect query string was foo=bar, then your script should parse it so that $foo=bar; Does this help? Previous Comments: [2001-08-06 18:57:51] [EMAIL PROTECTED] The summary field really says it all: Upon writing a customized 404 script, I stumbled upon the fact that the $HTTP_SERVER_VARS[REDIRECT_QUERY_STRING] didn't break up into $HTTP_GET_VARS, even though one would expect it to. Is there a reason to this? I tried going through the bug database and the email archives, but I didn't seem to find anything similar. My apologies if this still is a second bug report, or if there's some perfectly valid explanation given somewhere. Thanks for a great tool, by the way. Edit this bug report at http://bugs.php.net/?id=12608edit=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] Re: Bug #9836 Updated: php unexpectedly ends on toolong scripts (fwd)
-- Forwarded message -- Date: Tue, 7 Aug 2001 13:19:58 +0200 From: Jan Fedak [EMAIL PROTECTED] To: Jani Taskinen [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Re: Bug #9836 Updated: php unexpectedly ends on too long scripts After further testing I found out it depends on memory limit. But usually if you violate memory limit, you get a warning. The warning is probably not issued when parsing the script. (I am not sure about it as I didn't look at the sources). Jan Jani Taskinen wrote: On Tue, 7 Aug 2001, Jan Fedak wrote: latest snapshot. Good. and after make we finally see that: $ ./php ~/5.skr (failed: 1) $ gdb ./php (gdb) run -f ~/5.skr Starting program: ./php -f ~/5.skr Program exited with code 01. I get tons of these: Warning - Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. And after those: bFatal error/b: Call to undefined function: getparameter() in b5.skr/b on line b15/bbr 5.skr(15) : Fatal error - Call to undefined function: getparameter() --Jani It doesn't crash, it just exits with errcode. I attach php.ini and the script. Jan Bug Database wrote: ID: 9836 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Closed Status: Feedback Bug Type: Scripting Engine problem Operating System: linux PHP Version: 4.0.5 New Comment: And now we have already released PHP 4.0.6. But could you PLEASE try the latest CVS snapshot: http://snaps.php.net/ After you have tested your script with these and if it still fails, provide the GDB backtrace I asked a long ago. --Jani Previous Comments: [2001-08-07 05:28:09] [EMAIL PROTECTED] so it has happened again. I again offer to provide the script so that you can see where the problem is. I won't paste it here because it has 730K. The script cannot really run because it is supposed to have many includes and it itself should be included by other script -- but it should fail with some reason (like unknown function). Instead it just dies with return code 1. [2001-05-10 05:57:58] [EMAIL PROTECTED] No feedback. If problem exists with PHP 4.0.5, reopen. [2001-04-19 09:35:10] [EMAIL PROTECTED] Does this happen with latest CVS from http://snaps.php.net/ ? --Jani [2001-03-19 13:57:54] [EMAIL PROTECTED] With that limited information you gave in the first comments I couldn't know that. Ok, so it doesn't crash? Just stops? Computer generated scripts? How big? And what do they do? Could you check that it doesn't crash, ie. run the php script which 'ends' within gdb: # gdb php (gdb) run -f thisscriptendstoosoon.php --Jani [2001-03-19 12:13:53] [EMAIL PROTECTED] I know of time limit, smart guy. But I don't have it set to 1 sec -- that is approximately the time in which php terminates. (I hope you mark this problem as closed now -- THAT YOU'VE SOLVED IT). Damn. 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=9836 ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9836edit=2 -- Jan Fedak mailto:[EMAIL PROTECTED] Linux - the ultimate NT Service Pack. -- 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 #9836 Updated: php unexpectedly ends on too long scripts
ID: 9836 Updated by: sniper Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Bug Type: Scripting Engine problem Operating System: linux Old PHP Version: 4.0.5 PHP Version: 4.0.7-dev New Comment: User feedback: -- After further testing I found out it depends on memory limit. But usually if you violate memory limit, you get a warning. The warning is probably not issued when parsing the script. (I am not sure about it as I didn't look at the sources). --- User used the latest CVS snapshot. --Jani Previous Comments: [2001-08-07 05:48:20] [EMAIL PROTECTED] And now we have already released PHP 4.0.6. But could you PLEASE try the latest CVS snapshot: http://snaps.php.net/ After you have tested your script with these and if it still fails, provide the GDB backtrace I asked a long ago. --Jani [2001-08-07 05:28:09] [EMAIL PROTECTED] so it has happened again. I again offer to provide the script so that you can see where the problem is. I won't paste it here because it has 730K. The script cannot really run because it is supposed to have many includes and it itself should be included by other script -- but it should fail with some reason (like unknown function). Instead it just dies with return code 1. [2001-05-10 05:57:58] [EMAIL PROTECTED] No feedback. If problem exists with PHP 4.0.5, reopen. [2001-04-19 09:35:10] [EMAIL PROTECTED] Does this happen with latest CVS from http://snaps.php.net/ ? --Jani [2001-03-19 13:57:54] [EMAIL PROTECTED] With that limited information you gave in the first comments I couldn't know that. Ok, so it doesn't crash? Just stops? Computer generated scripts? How big? And what do they do? Could you check that it doesn't crash, ie. run the php script which 'ends' within gdb: # gdb php (gdb) run -f thisscriptendstoosoon.php --Jani 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=9836 Edit this bug report at http://bugs.php.net/?id=9836edit=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 Account Request
Full name: Mitja Slenc Email: [EMAIL PROTECTED] ID:mitja Purpose: Translating documentation into Slovenian -- 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 #12616 Updated: Apache make fails, can't find php header files
ID: 12616 Updated by: andy Reported By: [EMAIL PROTECTED] Old Status: Open Status: Feedback Bug Type: Compile Failure Operating System: Redhat Linux 7.1 PHP Version: 4.0.5 New Comment: does this stil happen with latest CVS??? http://snaps.php.net Previous Comments: [2001-08-07 06:52:48] [EMAIL PROTECTED] apache_1.3.19# ./configure --prefix=/usr/local/apache php-4.05# ./configure --with-mysql --enable-track-vars --with-apache=../apache_1.3.19 php-4.05# make -ok, make install - ok apache_1.3.19# ./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libmodphp4.a - ok apache_1.3.19# make -errors see below gcc -c -I../../os/unix -I../../include -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../../lib/expat-lite -DNO_DL_NEEDED `../../apaci` mod_ph4.c mod_php4.c:28:18: zend.h: No such file or directory mod_php4.c:29:17: php.h: No such file or directory mod_php4.c:30:27: php_variables.h: No such file or directory mod_php4.c:47:21: php_ini.h: No such file or directory mod_php4.c:48:25: php_globals.h: No such file or directory mod_php4.c:49:18: SAPI.h: No such file or directory mod_php4.c:50:22: php_main.h: No such file or directory mod_php4.c:52:26: zend_compile.h: No such file or directory mod_php4.c:53:26: zend_execute.h: No such file or directory mod_php4.c:54:28: zend_highlight.h: No such file or directory mod_php4.c:55:25: zend_indent.h: No such file or directory mod_php4.c:57:39: ext/standard/php_standard.h: No such file or directory make[4]: *** [mod_php4.o] Error 1 etc. I tried to change the gcc command to include the /usr/local/include directory in which the missing files are located (well they are under that directory) however it caused another bunch of dependency problems. I have had this problem with Redhat7.0 all versions of php and apache I could get my hands on. I can't find any reports of this problem, and don't see what I may be doing wrong. Edit this bug report at http://bugs.php.net/?id=12616edit=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 #12477 Updated: preg_replace evaluates dollar signs as variables (eg $1,000 becomes ,000)
On Mon, 06 Aug 2001, [EMAIL PROTECTED] wrote: ID: 12477 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: Feature/Change Request Operating System: Linux and SCO PHP Version: 4.0.6 New Comment: I was trying to have to walk the array twice. The following works: $pagevars = str_replace($,\\\$,$pagevars); $page = preg_replace($template,$pagevars,$page); The reason for using preg_replace is that it does a recursive? replace. What do you mean, 'recursive' replace? -Andrei * I don't mind going nowhere as long as it's an interesting path. * -- 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 #12617: make test fails on strtotime
From: [EMAIL PROTECTED] Operating system: solaris PHP version: 4.0.6 PHP Bug Type: *Compile Issues Bug description: make test fails on strtotime make test fails on the test ext/standard/tests/time/002.php. 002.out says: 1999-10-13 939769200 939769200 2000-01-19 94824 94824 2001-12-21 1008892800 1008892800 2001-12-21 12:16 1008936960 1008936960 Which are an hour out, my timezone is BST (1 hour from GMT). Presumably this is a bug in the test script, since the source for strtotime() uses mktime() rather than timegm(). So I guess the person who wrote this test script was in GMT or you have changed strtotime to use local times since it was written. -- Edit bug report at: http://bugs.php.net/?id=12617edit=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 #12618: unable to select colors using palette of (loaded ) pngs or gifs
From: [EMAIL PROTECTED] Operating system: Debian Woody PHP version: 4.0.4pl1 PHP Bug Type: GD related Bug description: unable to select colors using palette of (loaded ) pngs or gifs Hi, It maybe is a problem of concept. I do not have any knowledge about the inside, but think of following problem: Imagine a image, saved as png and loaded with ImageCreateFromPNG. The image has maybe 2 different colors (to be simple), but with the same RGB-value. Ok, this does not seem to make sense, but think of a more complicated situation. You can get a color handle from a loaded image only with imagecolorexact or imagecolorclosest. Both functions would maybe return the unwanted color. So, the problem of concept as I said is maybe the kind of 'save' the image. In a GIF I think you have a palette, so to say a table with an index and for each index you have the RGB-values. In the image itself only the index of a color is saved. If you now 'save' the image in the way, that you save for each pixel the RGB-values and so do not need a palette, you loose information. If this is the case here, I do not know a solution to the problem that is simple. Then maybe close this bug, but please confirm it. If it is not, then a function ImageColorExtractByIndex or something similar would be fine. Thanks for work on PHP, Frank -- Edit bug report at: http://bugs.php.net/?id=12618edit=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 #12619: ImageCreateFromPNG does not set transparent color
From: [EMAIL PROTECTED] Operating system: Debian Woody PHP version: 4.0.4pl1 PHP Bug Type: GD related Bug description: ImageCreateFromPNG does not set transparent color Hi, ImageCreateFromPNG does not set transparent color and I found no way to find out, which color was set transparent on the original file (automatically). This Bug is related to Bug #12618 because it would maybe require to select a color depending on its index in the loaded image. Thanks, Frank -- Edit bug report at: http://bugs.php.net/?id=12619edit=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 #12615 Updated: Integer?
ID: 12615 Updated by: phildriscoll Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: *General Issues Operating System: Win2000 PHP Version: 4.0.5 New Comment: Welcome to the world of floating point arithmetic on computers. Internal binary representations cannot exactly match the decimal values you require. Previous Comments: [2001-08-07 06:48:13] [EMAIL PROTECTED] ?php for ($i=1; $i=10; $i+=0.01) { print br$i; } ? and the output look like ... 1 1.01 1.02 1.03 . . . . 4.3 4.31 4.32 4.33 4.34 4.35 4.36 4.37 4.38 4.38999 4.3 4.40999 4.41999 4.42999 4.43999 . . . . . Edit this bug report at http://bugs.php.net/?id=12615edit=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 #12608 Updated: $REDIRECT_QUERY_STRING isn't parsed into $HTTP_GET_VARS
ID: 12608 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Bug Type: Variables related Operating System: Debian potato GNU/Linux PHP Version: 4.0.5 New Comment: Thanks for the reply. Sorry that the first post was confusing, I'll try explaining my situation more thoroughly: I have a site that generates dynamic content. I don't want long, not-user-friendly urls of the form http://../project/read.php?objectid=33255section=2355;, so I've written a custom 404 script that lets me do a http://.../project/sectionname/objectname; in true Jakob Nielsen spirit. So far so good, but say I want to append ?lang=en (or any get variable) to the url? If I do, the 404 script doesn't see $HTTP_GET_VARS(it is empty), so I have to look at $RQS ($REDIRECT_QUERY_STRING), as per the original note. This isn't really a problem, I use parse_str() to break up $RQS, and all is well. So why all the hassle, if all is well? Well, because contrary to what you say, I think (but I may ofcoursly be wrong on this, it wouldn't be the first time :) that breaking up the query string into HTTP_GET_VARS would be a right thing. If I understand the whole 404 process correctly, there will never be a $QUERY_STRING (which normally is what ends up in HTTP_GET_VARS and $argv, I presume) in a 404 script, but instead a $REDIRECT_QUERY_STRING. If this is correct, using $REDIRECT_QUERY_STRING in the same manner as $QUERY_STRING is ok, because both cannot be set at the same time. Please correct me if I'm wrong. Previous Comments: [2001-08-07 08:40:42] [EMAIL PROTECTED] I don't know if I read this right, because it was a bit confusing, but I'll take a shot. $HTTP_GET_VARS parses the query string for the current page... I can't think of a good example right now, but it could mess things up if REDIRECT_QUERY_STRING broke up into HTTP_GET_VARS. If you wanted to do something like that try a script like the following... [not tested] ? $splitby=split(,$HTTP_SERVER_VARS[REDIRECT_QUERY_STRING]); for ($i=0;$icount($splitby);$i++){ $splitfurther=split(=,$splitby[$i]); $$splitfurther[0]=$splitfurther=[1]; } This should put the REDIRECT_QUERY_STRING into variables, like if the redirect query string was foo=bar, then your script should parse it so that $foo=bar; Does this help? [2001-08-06 18:57:51] [EMAIL PROTECTED] The summary field really says it all: Upon writing a customized 404 script, I stumbled upon the fact that the $HTTP_SERVER_VARS[REDIRECT_QUERY_STRING] didn't break up into $HTTP_GET_VARS, even though one would expect it to. Is there a reason to this? I tried going through the bug database and the email archives, but I didn't seem to find anything similar. My apologies if this still is a second bug report, or if there's some perfectly valid explanation given somewhere. Thanks for a great tool, by the way. Edit this bug report at http://bugs.php.net/?id=12608edit=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 #7280 Updated: global iniline not supported in SGI Compiler
ID: 7280 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Closed Bug Type: Compile Failure Operating System: SGI IRIX 6.5.8 PHP Version: 4.0.4 New Comment: Hi, I've tested it with PHP-4.0.7-cvs (snapshot of 2001/08/06) and it appears to be fixed. Thanks! Note: PHP-4.0.6 still had the bug. Robert Marchand Université de Montréal Previous Comments: [2001-08-04 00:04:02] [EMAIL PROTECTED] Fixed in CVS. [2001-04-16 06:09:36] [EMAIL PROTECTED] same as 5882. There is a fix included Stas or andi you responded to 5882 perhaps you can look at the fix. - James [2001-01-03 11:59:14] [EMAIL PROTECTED] Hi, I didn't have time to check it before. The bug is still there with php 4.0.4 (exactly the same as already described) and the line #define inline __inline is still in main/php_config.h. Changing it for #define inline work as before. Do I have to add some flag to the configure line? Thanks. [2000-12-30 20:20:09] [EMAIL PROTECTED] No feedback. If this happens with PHP 4.0.4 reopen this bug report. --Jani [2000-11-21 06:12:07] [EMAIL PROTECTED] Please try the latest snapshot from http://snaps.php.net/ as this should be fixed now. --Jani 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=7280 Edit this bug report at http://bugs.php.net/?id=7280edit=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] Re: [PEAR-DEV] DB : affectedRows() on an UPDATE query ?
Hello, Tomas V.V.Cox wrote: It would be great to allow an affectedRows() (returning a DB_Result instead of a DB_OK) with UPDATE or DELETE queries ! affectedRows() works only with UPDATES/INSERT/DELETE queries. $db-query('delete * from users'); echo I have deleted . $db-affectedRows() . users; It works with mysql but I dont know if it is possible with others db so that it could be done It's implemented in all backends. Ermm... Interbase API does not seem to provide a way for determine the number of affected rows, Someone sent time ago a patch for supporting affected row in Ibase: http://www.geocrawler.com/lists/3/Web/5/75/4454246/ http://www.phpbuilder.com/mail/php-db/2000101/0275.php So my though is that probably is supported by the API but not yet by PHP. Ok, but it is fair to say that it is not supported in all PEAR-DB backends even if it is just a limitation of PHP Interbase API. Maybe sometime later somebody adds a ibase_affected_rows() function, but PHP scripts can't assume that the function exists because the PHP version that is installed may not have such function yet. I suggest that somebody apply that patch and PHP scripts that use function_exists() function to figure if PHP Interbase API can figure the number of affected rows. Manuel Lemos -- 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 #12621: is always ORA-12699 Native service internal error
From: [EMAIL PROTECTED] Operating system: PHP version: 4.0.4 PHP Bug Type: OCI8 related Bug description: is always ORA-12699 Native service internal error I have installed NT4+PHP+ORACLE8.0.4+APACHE in my computer. I want to access ORACLE server to another computer from web server. It is ok to access ORACLE SERVER with PERL, but i cannot access using PHP. The first error is ora-12514 , but i change, change and change, now it is always ORA-12699 Native service internal error . ? php ocilogon(system,manager,$db); ? $db=(DESCRIPTION=(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.4)(PORT = 1521))(CONNECT_DATA = (SID = ORCL))); Warning: _oci_open_server: ORA-12699:Native service internal error -- Edit bug report at: http://bugs.php.net/?id=12621edit=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] [patch] IMAP setacl command...
I have enclosed a patch that adds support for the IMAP setacl command that is found in the Cyrus IMAP package (and probably others). If anyone has any problems with this, please let me know. Brian diff -ru php-4.0.6-orig/ext/imap/php_imap.c php-4.0.6/ext/imap/php_imap.c --- php-4.0.6-orig/ext/imap/php_imap.c Wed May 30 13:27:49 2001 +++ php-4.0.6/ext/imap/php_imap.c Tue Aug 7 10:48:29 2001 @@ -108,6 +108,7 @@ #ifdef HAVE_IMAP2000 PHP_FE(imap_get_quota, NULL) PHP_FE(imap_set_quota, NULL) + PHP_FE(imap_setacl, NULL) #endif PHP_FALIAS(imap_listmailbox, imap_list, NULL) PHP_FALIAS(imap_getmailboxes, imap_list_full, NULL) @@ -1094,6 +1095,36 @@ RETURN_LONG(imap_setquota(imap_le_struct-imap_stream, Z_STRVAL_PP(qroot), limits)); } /* }}} */ + + +/* {{{ proto int imap_setacl(int stream_id, string mailbox, string id, string rights) + Sets the ACL for a giving mailbox */ +PHP_FUNCTION(imap_setacl) +{ + zval **streamind, **mailbox, **id, **rights; + int ind, ind_type; + pils *imap_le_struct; + + if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, streamind, mailbox, +id, rights) == FAILURE) { + ZEND_WRONG_PARAM_COUNT(); + } + + convert_to_long_ex(streamind); + convert_to_string_ex(mailbox); + convert_to_string_ex(id); + convert_to_string_ex(rights); + + ind = Z_LVAL_PP(streamind); + imap_le_struct = (pils *) zend_list_find(ind, ind_type); + if (!imap_le_struct || !IS_STREAM(ind_type)) { + php_error(E_WARNING, Unable to find stream pointer); + RETURN_FALSE; + } + + RETURN_LONG(imap_setacl(imap_le_struct-imap_stream, Z_STRVAL_PP(mailbox), +Z_STRVAL_PP(id), Z_STRVAL_PP(rights))); +} +/* }}} */ + #endif diff -ru php-4.0.6-orig/ext/imap/php_imap.h php-4.0.6/ext/imap/php_imap.h --- php-4.0.6-orig/ext/imap/php_imap.h Mon Feb 26 13:14:28 2001 +++ php-4.0.6/ext/imap/php_imap.h Tue Aug 7 10:48:33 2001 @@ -110,6 +110,7 @@ #ifdef HAVE_IMAP2000 PHP_FUNCTION(imap_get_quota); PHP_FUNCTION(imap_set_quota); +PHP_FUNCTION(imap_setacl); #endif PHP_FUNCTION(imap_subscribe); PHP_FUNCTION(imap_unsubscribe); -- 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: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c incomplete_class.c php_incomplete_class.h var.c /ext/wddx wddx.c
[Zeev Suraski [EMAIL PROTECTED]] At 19:40 06/08/2001, Andrei Zmievski wrote: On Mon, 06 Aug 2001, Zeev Suraski wrote: At 07:10 06/08/2001, Sterling Hughes wrote: What if you use 50 different shared extensions, for different scripts on the same box? Should you load them all in each time? I don't think so... Other than your phobia, there's no real reason not to do it :) No performance hit at all? Nothing measurable. That was actually measured (changing PHP to initialize extensions just-in-time, in case they're actually being used) - and it turned out it wasn't giving any noticeable performance gain. If there were a thousand extensions, we may have to rethink it - but the good solution would probably be JIT initialization. Now we're talking! I assume it is not straightforward, what are the technical challenges in doing JIT module initialization? - 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] Re: [PHP-CVS] cvs: php4 /ext/standard basic_functions.cincomplete_class.c php_incomplete_class.h var.c /ext/wddx wddx.c
On 7 Aug 2001, Stig Sæther Bakken wrote: If there were a thousand extensions, we may have to rethink it - but the good solution would probably be JIT initialization. Now we're talking! I assume it is not straightforward, what are the technical challenges in doing JIT module initialization? Is it just my imagination, or can anyone say for sure if we'll even have shared libraries by the time someone's trying to load a thousand extensions at once? :-) -- 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 #12622: scope of $this and static functions
From: [EMAIL PROTECTED] Operating system: linux 2.2 PHP version: 4.0.6 PHP Bug Type: Class/Object related Bug description: scope of $this and static functions When calling a static function from within another class the $this - reference is not empty, but it points to the class in which you call the static function. To illustrate: class Static { function method() { echo get_class($this); } } class Container { function Container() { Static::method(); } } $Container = new Container(); The output is Container, but there shouldn't be a reference, because it's not anymore the scope of the reference. -- Edit bug report at: http://bugs.php.net/?id=12622edit=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 #11964 Updated: libphp4.so fails during load
ID: 11964 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: Apache related Operating System: Solaris 5.8 4/01 (Sparc) PHP Version: 4.0.6 New Comment: My bad not reading the Apache documentation: htdocs/manual/dso.html Sorry for the inconvenience! Previous Comments: [2001-07-09 01:08:14] [EMAIL PROTECTED] I can't get php 4.0.6 to load as an Apache module - running configtest I get the following. --- bash-2.05# /www/bin/apachectl configtest Syntax error on line 205 of /www/conf/httpd.conf: Cannot load /www/libexec/libphp4.so into server: ld.so.1: /www/bin/httpd: fatal: relocation error: file /www/libexec/libphp4.so: symbol ap_block_alarms: referenced symbol not found --- Apache 1.3.20 is configured like this: -- % ./configure --prefix=/www --enable-module=so -- PHP 4.0.6 is configured like this: % ./configure --prefix=/www/local/php \ --with-apxs=/www/bin/apxs As you see, I've taken it down to a bare minimum to reduse the number of error source. I also tried to include libpthread.so in apache, though this had no effect. My setup is like this: - Solaris 5.8 4/01 (Sparc) (with only core software) - Apache 1.3.20 - PHP 4.0.6 - gcc 2.95.3 - GNU ld 2.11.2 - GNU make 3.79.1 --- bash-2.05# ldd /www/bin/httpd libpthread.so.1 = /usr/lib/libpthread.so.1 libsocket.so.1 =/usr/lib/libsocket.so.1 libnsl.so.1 = /usr/lib/libnsl.so.1 libc.so.1 = /usr/lib/libc.so.1 libdl.so.1 =/usr/lib/libdl.so.1 libmp.so.2 =/usr/lib/libmp.so.2 libthread.so.1 =/usr/lib/libthread.so.1 /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1 --- --- bash-2.05# ldd /www/libexec/libphp4.so libpam.so.1 = /usr/lib/libpam.so.1 libdl.so.1 =/usr/lib/libdl.so.1 libcrypt_i.so.1 = /usr/lib/libcrypt_i.so.1 libresolv.so.2 =/usr/lib/libresolv.so.2 libm.so.1 = /usr/lib/libm.so.1 libsocket.so.1 =/usr/lib/libsocket.so.1 libc.so.1 = /usr/lib/libc.so.1 libgen.so.1 = /usr/lib/libgen.so.1 libnsl.so.1 = /usr/lib/libnsl.so.1 libmp.so.2 =/usr/lib/libmp.so.2 /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1 --- If it's of any interest... - bash-2.05# gcc -v Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs gcc version 2.95.3 20010315 (release) bash-2.05# ld -v GNU ld version 2.11.2 (with BFD 2.11.2) bash-2.05# make -v GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. Built for sparc-sun-solaris2.8 Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Report bugs to [EMAIL PROTECTED]. Edit this bug report at http://bugs.php.net/?id=11964edit=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 #11964 Updated: libphp4.so fails during load
ID: 11964 Updated by: andy Reported By: [EMAIL PROTECTED] Old Status: Closed Status: Bogus Bug Type: Apache related Operating System: Solaris 5.8 4/01 (Sparc) PHP Version: 4.0.6 New Comment: user error - bogus Previous Comments: [2001-08-07 11:10:12] [EMAIL PROTECTED] My bad not reading the Apache documentation: htdocs/manual/dso.html Sorry for the inconvenience! [2001-07-09 01:08:14] [EMAIL PROTECTED] I can't get php 4.0.6 to load as an Apache module - running configtest I get the following. --- bash-2.05# /www/bin/apachectl configtest Syntax error on line 205 of /www/conf/httpd.conf: Cannot load /www/libexec/libphp4.so into server: ld.so.1: /www/bin/httpd: fatal: relocation error: file /www/libexec/libphp4.so: symbol ap_block_alarms: referenced symbol not found --- Apache 1.3.20 is configured like this: -- % ./configure --prefix=/www --enable-module=so -- PHP 4.0.6 is configured like this: % ./configure --prefix=/www/local/php \ --with-apxs=/www/bin/apxs As you see, I've taken it down to a bare minimum to reduse the number of error source. I also tried to include libpthread.so in apache, though this had no effect. My setup is like this: - Solaris 5.8 4/01 (Sparc) (with only core software) - Apache 1.3.20 - PHP 4.0.6 - gcc 2.95.3 - GNU ld 2.11.2 - GNU make 3.79.1 --- bash-2.05# ldd /www/bin/httpd libpthread.so.1 = /usr/lib/libpthread.so.1 libsocket.so.1 =/usr/lib/libsocket.so.1 libnsl.so.1 = /usr/lib/libnsl.so.1 libc.so.1 = /usr/lib/libc.so.1 libdl.so.1 =/usr/lib/libdl.so.1 libmp.so.2 =/usr/lib/libmp.so.2 libthread.so.1 =/usr/lib/libthread.so.1 /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1 --- --- bash-2.05# ldd /www/libexec/libphp4.so libpam.so.1 = /usr/lib/libpam.so.1 libdl.so.1 =/usr/lib/libdl.so.1 libcrypt_i.so.1 = /usr/lib/libcrypt_i.so.1 libresolv.so.2 =/usr/lib/libresolv.so.2 libm.so.1 = /usr/lib/libm.so.1 libsocket.so.1 =/usr/lib/libsocket.so.1 libc.so.1 = /usr/lib/libc.so.1 libgen.so.1 = /usr/lib/libgen.so.1 libnsl.so.1 = /usr/lib/libnsl.so.1 libmp.so.2 =/usr/lib/libmp.so.2 /usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1 --- If it's of any interest... - bash-2.05# gcc -v Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs gcc version 2.95.3 20010315 (release) bash-2.05# ld -v GNU ld version 2.11.2 (with BFD 2.11.2) bash-2.05# make -v GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. Built for sparc-sun-solaris2.8 Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Report bugs to [EMAIL PROTECTED]. Edit this bug report at http://bugs.php.net/?id=11964edit=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] [patch] IMAP setacl command...
Quoting Brian Masney [EMAIL PROTECTED]: I have enclosed a patch that adds support for the IMAP setacl command that is found in the Cyrus IMAP package (and probably others). If anyone has any problems with this, please let me know. Please attach the patch in plain text format or post a link where we can download it - the list strips non text attachments and attachments over a certain size. -chuck -- Charles Hagenbuch, [EMAIL PROTECTED] Some fallen angels have their good reasons. -- 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 Account Request
Full name: Cornelia Boenigk Email: [EMAIL PROTECTED] ID:conni Purpose: Helping Egon to translate the manual into German -- 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 #12623: mod operator
From: [EMAIL PROTECTED] Operating system: linux (suse) PHP version: 4.0.4pl1 PHP Bug Type: Math related Bug description: mod operator Modulus (%) operator i am not sure if the behavior for non-integer operands is defined, so i am not sure how important this actually is check 2035 % 179 = 66 // correct! 203.5 % 17.9 = 16// incorrect - should be 6.6! ?php echo 2035 % 179 == . 2035 % 179; echo br\n; echo 203.5 % 17.9 == . 203.5 % 17.9; ? -- Edit bug report at: http://bugs.php.net/?id=12623edit=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] ImageCreateFromString; support for .gd and .gd2
Hi, ImageCreateFromString doesnt support .gd and .gd2 file types. I think, its important to support this types, because ImageCreateFromString its ideal for images from databases and .gd2 its much more faster than PNG. Explicite the time to save a PNG with ImagePNG and higher resolutions (800x600) is absolute not reasonable. Also i miss an implementation of the memory block functions of libgd, like gdImagePngPtr, gdImageJpegPtr, gdImageWBMPPtr, gdImageGdPtr, gdImageGd2Ptr. This is usefull for getting an image with ImagePNG, manipulate it and wrote direct to a database. -- Holger -- 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 #12624: Installation Apache/Php/Interbase
From: [EMAIL PROTECTED] Operating system: Windows98 PHP version: 4.0.5 PHP Bug Type: Any Bug description: Installation Apache/Php/Interbase When I launch Apache (1.3.20) configurated with PHP (4.0.5) and Interbase, there is a Warning message: PHP Warning: Unable to load dynamic library 'C:/Program Files/PHP/extensions/php_interbase.dll' - Un périphérique ataché au système ne fonctionne pas correctement. in Unknown on line 0 I don't know if it is a bug or a problem of configuration, but I am working on Appache/PHP/Interbase for 2 month, and it was working without any pb. Today, I have install a new version of Interbase(5.5) and ... my Apache server is not running any more. Have you ever heared about a problème like this? Perhaps is it a pb of Interbase or Apache, but the PHP is the link between those 2 softs. I would be very happy if you could answer me. Thank you (I hope that you understand what I write, I'm just a french programer.) -- Edit bug report at: http://bugs.php.net/?id=12624edit=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 #12624 Updated: Installation Apache/Php/Interbase
ID: 12624 Updated by: alindeman Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Any Operating System: Windows98 PHP Version: 4.0.5 New Comment: read: http://bugs.php.net/?id=12613 Previous Comments: [2001-08-07 11:42:09] [EMAIL PROTECTED] When I launch Apache (1.3.20) configurated with PHP (4.0.5) and Interbase, there is a Warning message: PHP Warning: Unable to load dynamic library 'C:/Program Files/PHP/extensions/php_interbase.dll' - Un périphérique ataché au système ne fonctionne pas correctement. in Unknown on line 0 I don't know if it is a bug or a problem of configuration, but I am working on Appache/PHP/Interbase for 2 month, and it was working without any pb. Today, I have install a new version of Interbase(5.5) and ... my Apache server is not running any more. Have you ever heared about a problème like this? Perhaps is it a pb of Interbase or Apache, but the PHP is the link between those 2 softs. I would be very happy if you could answer me. Thank you (I hope that you understand what I write, I'm just a french programer.) Edit this bug report at http://bugs.php.net/?id=12624edit=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] Error compiling latest CVS
Hi all, I'm getting this error when I try to compile the lates CVS of PHP4: php_domxml.c: In function `php_xpathobject_new': php_domxml.c:464: `tsrm_ls' undeclared (first use in this function) php_domxml.c:464: (Each undeclared identifier is reported only once php_domxml.c:464: for each function it appears in.) php_domxml.c: In function `php_xpathcontext_new': php_domxml.c:543: `tsrm_ls' undeclared (first use in this function) php_domxml.c: In function `php_domobject_new': php_domxml.c:609: `tsrm_ls' undeclared (first use in this function) make[3]: *** [php_domxml.lo] Error 1 make[3]: Leaving directory `/root/progs/www/NEW/php4/ext/domxml' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/root/progs/www/NEW/php4/ext/domxml' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/progs/www/NEW/php4/ext' make: *** [all-recursive] Error 1 I've tried to configure without dom, but then it stops with almost the same error with imap. Thanks. Stig Smelror -- Best regards The DeadWhale Crew http://deadwhale.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] could someone apply this patch
should fix custom build steps in zend/ZendTS.dsp ZendTS.diff -- 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] Error compiling latest CVS
Steeg wrote: Hi all, I'm getting this error when I try to compile the lates CVS of PHP4: php_domxml.c: In function `php_xpathobject_new': php_domxml.c:464: `tsrm_ls' undeclared (first use in this function) php_domxml.c:464: (Each undeclared identifier is reported only once php_domxml.c:464: for each function it appears in.) php_domxml.c: In function `php_xpathcontext_new': php_domxml.c:543: `tsrm_ls' undeclared (first use in this function) php_domxml.c: In function `php_domobject_new': php_domxml.c:609: `tsrm_ls' undeclared (first use in this function) make[3]: *** [php_domxml.lo] Error 1 make[3]: Leaving directory `/root/progs/www/NEW/php4/ext/domxml' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/root/progs/www/NEW/php4/ext/domxml' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/progs/www/NEW/php4/ext' make: *** [all-recursive] Error 1 I've tried to configure without dom, but then it stops with almost the same error with imap. I forgot to mention that I run Mandrake 8.0 and Apache 2.0.22 alpha. Sorry ;) Thanks again. Stig Smelror -- Best regards The DeadWhale Crew http://deadwhale.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]
Re: [PHP-DEV] RFC: New math functions: log2, etc
Aparently PAN (the newsreader I used) does not make the right stuff for the MARC archive to add the poster name. -- Jesus M. Castagnetto ([EMAIL PROTECTED]) In article [EMAIL PROTECTED], Jesus M. Castagnetto [EMAIL PROTECTED] wrote: In article [EMAIL PROTECTED], Sterling Hughes [EMAIL PROTECTED] wrote: [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? Perhaps not too many people that use PHP for biz purposes use them, but the few that do use it for some scientific/math stuff will appreciate those functions, in particular when dealing with numerical methods (derivation, integration, etc.). Of course I am all for putting them in a extension, perhaps of GSL (the lib that AFAICT is more complete among the Open Sources ones) 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 Mea culpa, I use those for geometrical/trigonometrical conversions (along with some PHP implemented versions of the hyperbolic funcs and the like), and they are part of the math.h IIRC and the ISO specs for the C library. When we get ready the (future) GSL/math extension (matrices, vectors, yes), we could easily move them there (same for some functions). Apropos, how would I go about implementing a new variable type, namely complex numbers? AFAICT, we can do the vectors in GSL as linear arrays, I got no clue as to how to translate the comple number record type into something already defined in PHP/Zend. (Please cc me as I usually read this via the news interface) -- 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] Programming question
Right now, the zend_function struct contains a char *function_name but no int function_name_len. In light of the comments below, I think this is a bug, or a bug waiting to happen. George If the string functions (str*()) don't work with function names in PHP, it's all for the better. Code that works with these function names should only be using mem*() functions anyway, they're quicker and they're binary safe. Zeev At 10:22 02/08/2001, George Schlossnagle wrote: It seem sto me that there are ways of accomplishing this that allow for this without breaking compatibility of that string with standard string functions, for exampla an ANSI-like standard prohibiting userland functions begnning with __ or using a non-null, low ascii character (say 0x07). agreed, but php has been binary-safe for a looong time. and \0 is the most obvious thing to embed and show anybody (who reads the c-code) that this is only to-be used internally. I guess, but it means that it is unsafe to use the common string functions on function names in the function_table. There are valid reasons to directly access function_table in php extensions, so why severely limit the library functions you can use to manipulate function names? It just seems to me that while it may make it obvious that it's for internal use, there are better ways of doing it that still allow you to treat a string as a string in c. tc -- 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] Bug #12625: (latest) php_oci8.dll can not be loaded
From: [EMAIL PROTECTED] Operating system: win2000 PHP version: 4.0.6 PHP Bug Type: Oracle related Bug description: (latest) php_oci8.dll can not be loaded Sir, I download 4.06 install files yesterday. I have tried a lot of ways to config php.ini in order to load php_oci8.dll functions. but I had php_oci8.dll can not be load information. These are several tests I did (1) uncomment other dll (oracle) one and it can be loaded (working) (2) download the binary code again and re-put the php_oci8.dll into current extensions dir ( not working) (3) download the Previous version binary code and only take out (V4.05) php_oci8.dll and put it into current extensions dir ( it's working) so is there any thing wrong with the latest php_oci8.dll? tks !! -- Edit bug report at: http://bugs.php.net/?id=12625edit=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] ImageCreateFromString; support for .gd and .gd2
On Tue, 7 Aug 2001, Holger Schopohl wrote: Hi, ImageCreateFromString doesnt support .gd and .gd2 file types. I think, its important to support this types, because ImageCreateFromString its ideal for images from databases and .gd2 its much more faster than PNG. Explicite the time to save a PNG with ImagePNG and higher resolutions (800x600) is absolute not reasonable. I added the GD2 support for this function now. I don't think the 'plain' GD support is that useful.. Also i miss an implementation of the memory block functions of libgd, like gdImagePngPtr, gdImageJpegPtr, gdImageWBMPPtr, gdImageGdPtr, gdImageGd2Ptr. This is usefull for getting an image with ImagePNG, manipulate it and wrote direct to a database. This would have needed more work..I'll look into this when I have more time. If someone else has time/interest to implement this, feel free. :) --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] Error compiling latest CVS
Should be fixed now. Update and try again. If you get more errors, let me know. --Jani On Tue, 7 Aug 2001, Steeg wrote: Steeg wrote: Hi all, I'm getting this error when I try to compile the lates CVS of PHP4: php_domxml.c: In function `php_xpathobject_new': php_domxml.c:464: `tsrm_ls' undeclared (first use in this function) php_domxml.c:464: (Each undeclared identifier is reported only once php_domxml.c:464: for each function it appears in.) php_domxml.c: In function `php_xpathcontext_new': php_domxml.c:543: `tsrm_ls' undeclared (first use in this function) php_domxml.c: In function `php_domobject_new': php_domxml.c:609: `tsrm_ls' undeclared (first use in this function) make[3]: *** [php_domxml.lo] Error 1 make[3]: Leaving directory `/root/progs/www/NEW/php4/ext/domxml' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/root/progs/www/NEW/php4/ext/domxml' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/progs/www/NEW/php4/ext' make: *** [all-recursive] Error 1 I've tried to configure without dom, but then it stops with almost the same error with imap. I forgot to mention that I run Mandrake 8.0 and Apache 2.0.22 alpha. Sorry ;) Thanks again. Stig Smelror -- 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 #12608 Updated: $REDIRECT_QUERY_STRING isn't parsed into $HTTP_GET_VARS
ID: 12608 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Variables related Operating System: Debian potato GNU/Linux PHP Version: 4.0.5 New Comment: Thanks for the reply. Sorry that the first post was confusing, I'll try explaining my situation more thoroughly: I have a site that generates dynamic content. I don't want long, not-user-friendly urls of the form http://../project/read.php?objectid=33255section=2355;, so I've written a custom 404 script that lets me do a http://.../project/sectionname/objectname; in true Jakob Nielsen spirit. So far so good, but say I want to append ?lang=en (or any get variable) to the url? If I do, the 404 script doesn't see $HTTP_GET_VARS(it is empty), so I have to look at $RQS ($REDIRECT_QUERY_STRING), as per the original note. This isn't really a problem, I use parse_str() to break up $RQS, and all is well. So why all the hassle, if all is well? Well, because contrary to what you say, I think (but I may ofcoursly be wrong on this, it wouldn't be the first time :) that breaking up the query string into HTTP_GET_VARS would be a right thing. If I understand the whole 404 process correctly, there will never be a $QUERY_STRING (which normally is what ends up in HTTP_GET_VARS and $argv, I presume) in a 404 script, but instead a $REDIRECT_QUERY_STRING. If this is correct, using $REDIRECT_QUERY_STRING in the same manner as $QUERY_STRING is ok, because both cannot be set at the same time. Please correct me if I'm wrong. Previous Comments: [2001-08-07 09:38:53] [EMAIL PROTECTED] Thanks for the reply. Sorry that the first post was confusing, I'll try explaining my situation more thoroughly: I have a site that generates dynamic content. I don't want long, not-user-friendly urls of the form http://../project/read.php?objectid=33255section=2355;, so I've written a custom 404 script that lets me do a http://.../project/sectionname/objectname; in true Jakob Nielsen spirit. So far so good, but say I want to append ?lang=en (or any get variable) to the url? If I do, the 404 script doesn't see $HTTP_GET_VARS(it is empty), so I have to look at $RQS ($REDIRECT_QUERY_STRING), as per the original note. This isn't really a problem, I use parse_str() to break up $RQS, and all is well. So why all the hassle, if all is well? Well, because contrary to what you say, I think (but I may ofcoursly be wrong on this, it wouldn't be the first time :) that breaking up the query string into HTTP_GET_VARS would be a right thing. If I understand the whole 404 process correctly, there will never be a $QUERY_STRING (which normally is what ends up in HTTP_GET_VARS and $argv, I presume) in a 404 script, but instead a $REDIRECT_QUERY_STRING. If this is correct, using $REDIRECT_QUERY_STRING in the same manner as $QUERY_STRING is ok, because both cannot be set at the same time. Please correct me if I'm wrong. [2001-08-07 08:40:42] [EMAIL PROTECTED] I don't know if I read this right, because it was a bit confusing, but I'll take a shot. $HTTP_GET_VARS parses the query string for the current page... I can't think of a good example right now, but it could mess things up if REDIRECT_QUERY_STRING broke up into HTTP_GET_VARS. If you wanted to do something like that try a script like the following... [not tested] ? $splitby=split(,$HTTP_SERVER_VARS[REDIRECT_QUERY_STRING]); for ($i=0;$icount($splitby);$i++){ $splitfurther=split(=,$splitby[$i]); $$splitfurther[0]=$splitfurther=[1]; } This should put the REDIRECT_QUERY_STRING into variables, like if the redirect query string was foo=bar, then your script should parse it so that $foo=bar; Does this help? [2001-08-06 18:57:51] [EMAIL PROTECTED] The summary field really says it all: Upon writing a customized 404 script, I stumbled upon the fact that the $HTTP_SERVER_VARS[REDIRECT_QUERY_STRING] didn't break up into $HTTP_GET_VARS, even though one would expect it to. Is there a reason to this? I tried going through the bug database and the email archives, but I didn't seem to find anything similar. My apologies if this still is a second bug report, or if there's some perfectly valid explanation given somewhere. Thanks for a great tool, by the way. Edit this bug report at http://bugs.php.net/?id=12608edit=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 #12625 Updated: (latest) php_oci8.dll can not be loaded
ID: 12625 Updated by: alindeman Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Oracle related Operating System: win2000 PHP Version: 4.0.6 New Comment: read: http://bugs.php.net/?id=12502 Previous Comments: [2001-08-07 12:15:47] [EMAIL PROTECTED] Sir, I download 4.06 install files yesterday. I have tried a lot of ways to config php.ini in order to load php_oci8.dll functions. but I had php_oci8.dll can not be load information. These are several tests I did (1) uncomment other dll (oracle) one and it can be loaded (working) (2) download the binary code again and re-put the php_oci8.dll into current extensions dir ( not working) (3) download the Previous version binary code and only take out (V4.05) php_oci8.dll and put it into current extensions dir ( it's working) so is there any thing wrong with the latest php_oci8.dll? tks !! Edit this bug report at http://bugs.php.net/?id=12625edit=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 #10800 Updated: File uploads take ~70 times longer than downloading files on Apache/PHP.
ID: 10800 Updated by: alindeman Reported By: [EMAIL PROTECTED] Old Status: Open Status: Feedback Bug Type: HTTP related Operating System: NT 2000 PHP Version: 4.0.5 New Comment: status - feedback Previous Comments: [2001-07-21 21:46:17] [EMAIL PROTECTED] Could you please include the script that accepts the form input and uploads the file (the ACTION param of the form.) -Andy [2001-05-10 17:51:00] [EMAIL PROTECTED] I logged this prior to PHP 4.0.5 and was told to do it again if it still occurs. Please help: ID: 9294 Updated by: andi Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Closed Bug Type: Performance problem PHP Version: 4.0.2 Assigned To: Comments: Please try PHP 4.0.4pl1 or 4.0.5 which is due out tomorrow and open a new bug report if this still happens. Previous Comments: --- [2001-02-16 03:59:04] [EMAIL PROTECTED] Sorry - I'm also using code like this to do the upload: FORM ENCTYPE=multipart/form-data ACTION=_URL_ METHOD=POST INPUT TYPE=hidden name=MAX_FILE_SIZE value=2 Send this file: INPUT NAME=userfile TYPE=file INPUT TYPE=submit VALUE=Send File /FORM --- [2001-02-16 03:57:16] [EMAIL PROTECTED] When performing a file upload, PHP runs the CPU to 100% and takes 3.5-4 minutes on a Pentium III 850MHz CPU to upload a 10MB file when downloading the same file on Apache/PHP only takes 3 seconds on the same host and client. It appears the file is being parsed when being uploaded. Is there an option to tell PHP to upload the data and nothing else? Otherwise, it is roughly 70 times slower to upload a file than to download one. I'm using Nusphere's CD when installing the software. Edit this bug report at http://bugs.php.net/?id=10800edit=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] [patch] IMAP setacl command...
On Tue, 7 Aug 2001, Chuck Hagenbuch wrote: Quoting Brian Masney [EMAIL PROTECTED]: I have enclosed a patch that adds support for the IMAP setacl command that is found in the Cyrus IMAP package (and probably others). If anyone has any problems with this, please let me know. Please attach the patch in plain text format or post a link where we can download it - the list strips non text attachments and attachments over a certain size. -chuck Oops, I'm sorry! Here's it in plaintext: diff -ru php-4.0.6-orig/ext/imap/php_imap.c php-4.0.6/ext/imap/php_imap.c --- php-4.0.6-orig/ext/imap/php_imap.c Wed May 30 13:27:49 2001 +++ php-4.0.6/ext/imap/php_imap.c Tue Aug 7 10:48:29 2001 @@ -108,6 +108,7 @@ #ifdef HAVE_IMAP2000 PHP_FE(imap_get_quota, NULL) PHP_FE(imap_set_quota, NULL) + PHP_FE(imap_setacl, NULL) #endif PHP_FALIAS(imap_listmailbox, imap_list, NULL) PHP_FALIAS(imap_getmailboxes, imap_list_full, NULL) @@ -1094,6 +1095,36 @@ RETURN_LONG(imap_setquota(imap_le_struct-imap_stream, Z_STRVAL_PP(qroot), limits)); } /* }}} */ + + +/* {{{ proto int imap_setacl(int stream_id, string mailbox, string id, string rights) + Sets the ACL for a giving mailbox */ +PHP_FUNCTION(imap_setacl) +{ + zval **streamind, **mailbox, **id, **rights; + int ind, ind_type; + pils *imap_le_struct; + + if (ZEND_NUM_ARGS() != 4 || zend_get_parameters_ex(4, streamind, mailbox, +id, rights) == FAILURE) { + ZEND_WRONG_PARAM_COUNT(); + } + + convert_to_long_ex(streamind); + convert_to_string_ex(mailbox); + convert_to_string_ex(id); + convert_to_string_ex(rights); + + ind = Z_LVAL_PP(streamind); + imap_le_struct = (pils *) zend_list_find(ind, ind_type); + if (!imap_le_struct || !IS_STREAM(ind_type)) { + php_error(E_WARNING, Unable to find stream pointer); + RETURN_FALSE; + } + + RETURN_LONG(imap_setacl(imap_le_struct-imap_stream, Z_STRVAL_PP(mailbox), +Z_STRVAL_PP(id), Z_STRVAL_PP(rights))); +} +/* }}} */ + #endif diff -ru php-4.0.6-orig/ext/imap/php_imap.h php-4.0.6/ext/imap/php_imap.h --- php-4.0.6-orig/ext/imap/php_imap.h Mon Feb 26 13:14:28 2001 +++ php-4.0.6/ext/imap/php_imap.h Tue Aug 7 10:48:33 2001 @@ -110,6 +110,7 @@ #ifdef HAVE_IMAP2000 PHP_FUNCTION(imap_get_quota); PHP_FUNCTION(imap_set_quota); +PHP_FUNCTION(imap_setacl); #endif PHP_FUNCTION(imap_subscribe); PHP_FUNCTION(imap_unsubscribe); -- 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] Programming question
On Thu, Aug 02, 2001 at 12:24:03PM -0400, George Schlossnagle wrote: On a related note, placing null-bytes in the middle of strings (for example in the names of the so-called lambda_functions generated from create_function()) seems like a pretty questionable practice. why, this makes sure that function-names generated by create_function() will never clash with userland code. i think that makes perfect sense. tc In that case, I should point out that function __lambda_func() {} $fn = create_function('', ''); does not work. Dan -- 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 #12626: string to int incorrect if string containts 0 characters
From: [EMAIL PROTECTED] Operating system: win32 PHP version: 4.0.6 PHP Bug Type: Scripting Engine problem Bug description: string to int incorrect if string containts 0 characters if you convert a string containing chr(0) characters to an int, php cuts off conversion on reaching the first ascii 0. The resulting integer is incorrect, of course. I found it out having a string constructed of concatenated single characters which would not convert correctly. However, checking the string length would show more characters than those visible. Basic string handling stuff seems to work ok on those strings, however. This seems weird because I would have expected php to consider the first 0 character terminate the string, which it does not. Or does it? Stefan -- Edit bug report at: http://bugs.php.net/?id=12626edit=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 Updated: feof () - no break on eof of socket
ID: 12570 Updated by: alindeman Reported By: [EMAIL PROTECTED] Old Status: Open Status: Analyzed Bug Type: Network related Operating System: SuSE 7.0 PHP Version: 4.0.6 Edit this 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]
[PHP-DEV] Bug #12623 Updated: mod operator
ID: 12623 Updated by: jmcastagnetto Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: Math related Operating System: linux (suse) PHP Version: 4.0.4pl1 New Comment: The modulus operator is strictly defined for integer numbers, because it ... basically just returns the remainder of an integer division operation ... (paraphrasing from the KR book) In this case the floats are truncated to integers and then the modulus operator is applied, i.e. 203.5 turns into 203 17.9 turns into 17 then 203 % 17 = 16 (as expected) Other languages follow this approach, while other round up the float previous to operating on them, in those languages the result would be: 6 And other languages, like Java, have a third behavior in which when using floats, a number of integer substractions is made and a floating point reminder is calculated, see for example: http://softwaredev.earthweb.com/multi/article/0,,12079_630791,00.html (explanation to question 3) BTW, gawk also performs an integer number of substractions, if you try: gawk '{ print (203.5 % 17.9) }' you'll get 6.6 Bottomline, as this is an operator meant to work with integers, make the appropriate conversion for the appropriate results, or implement a modulus function like: function modulus_of ($q, $d) { $rem = $q; while ($rem $d ) $rem -= $d; return $rem; } which *will* return 6.6 for floats, and should also work on integers. Previous Comments: [2001-08-07 11:14:21] [EMAIL PROTECTED] Modulus (%) operator i am not sure if the behavior for non-integer operands is defined, so i am not sure how important this actually is check 2035 % 179 = 66 // correct! 203.5 % 17.9 = 16// incorrect - should be 6.6! ?php echo 2035 % 179 == . 2035 % 179; echo br\n; echo 203.5 % 17.9 == . 203.5 % 17.9; ? Edit this bug report at http://bugs.php.net/?id=12623edit=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 #12155 Updated: modulus %
ID: 12155 Updated by: jmcastagnetto Reported By: [EMAIL PROTECTED] Old Status: Bogus Status: Closed Bug Type: Math related Operating System: linux 2.4.3 PHP Version: 4.0.5 New Comment: See Bug #12623 for a more complete explanation on modulus ( http://www.php.net/bugs.php?id=12623 ) Previous Comments: [2001-08-06 19:57:53] [EMAIL PROTECTED] float % int could lead to rounding difficulties, which is not a bug. [2001-07-13 20:34:11] [EMAIL PROTECTED] Integer limited to 204700 so there. [2001-07-13 18:29:23] [EMAIL PROTECTED] Appears to be broken on large(r) integers. Is this a limitation on the type used? (I am coding working ip2long/long2ip). $temp = 3194548456; print correct: . ($temp - 255*floor($temp/255)); print php: . $temp % 255 . br; as defined in maths, the % is equiv to MOD(n, d) = n - d*INT(n/d) where n is the number, d is the divisor. Edit this bug report at http://bugs.php.net/?id=12155edit=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 #12570 Updated: feof () - no break on eof of socket
Would you also mind telling WHY it's analyzed? :) ie. If you could reproduce it by yourself, mention it. And always try reproducing bugs with the latest CVS. --Jani On 7 Aug 2001 [EMAIL PROTECTED] wrote: ID: 12570 Updated by: alindeman Reported By: [EMAIL PROTECTED] Status: Analyzed Bug Type: Network related Operating System: SuSE 7.0 PHP Version: 4.0.6 New Comment: status - analyzed (!) Previous Comments: [2001-08-04 20:43:38] [EMAIL PROTECTED] 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 this 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]
[PHP-DEV] Bug #11058 Updated: php_network_getaddresses: getaddrinfo failed
ID: 11058 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Bug Type: HTTP related Operating System: OpenBSD 2.6 Old PHP Version: 4.0.5 PHP Version: 4.0.6 New Comment: Still having the same issue with 4.0.6 now. I'll try and recompile without the GETADDRINFO line and see what happens. Previous Comments: [2001-08-03 22:53:11] [EMAIL PROTECTED] What's the status for this?? [2001-07-22 04:45:41] [EMAIL PROTECTED] Could you try to comment out the line #define HAVE_GETADDRINFO 1 in main/php_config.h and rebuild without doing configure? Does it work then? There are some broken getaddrinfo() implementations out there, but I would be surprised if there were problems with OpenBSD in general. Might be something wrong with your resolver library. OTH, you also have a problem with fsockopen() and that uses the old gethostbyname() I think, so it seems to be resolving in general. [2001-07-21 21:47:35] [EMAIL PROTECTED] Please check that your nameserver is running and setup correctly. Check the same with your internet server. [2001-05-23 11:58:00] [EMAIL PROTECTED] I've seen this issue posted here a few times, and I think my problem is similar to Bug id #7880. fopen(), fsockopen(), and file() will not work with URL or IP address parameters. include() has the same issue. I believe it has something to do with getaddrinfo. Before upgrading to PHP4, I was running 3.0.16 and all of these functions were working perfectly with URL parameters. My configure script looks like this: ./configure --with-apache=/usr/temp/apache_1.3.19 --with-mysql=/usr/local --enable-track-vars --with-xml --with-openssl=/usr/local/ssl My php.ini DOES contain the line allow_url_fopen = On The fopen() script looks like this: $fd = fopen( http://www.php.net/;, r ); if( !$fd ) { echo Cannot open URL; } else { while ( !feof( $fd ) ) { $buffer = fgets( $fd, 4096 ); echo $buffer; } fclose ( $fd ); } and produces this output: Warning: php_network_getaddresses: getaddrinfo failed: name or service is not known in /var/www/patrickhaney.com/www/weather/test.php on line 24 Warning: fopen(http://www.php.net/,r;) - Bad file descriptor in /var/www/patrickhaney.com/www/weather/test.php on line 24 Cannot open URL and yes, I can resolve php.net to 208.247.106.187. Using the IP address in place of the hostname produces the same output. If I use the fsockopen() function with this script: fsockopen(http://www.php.net/;, 80, $errno, $errstr, 30); if(!$fp) { echo Error: $errstr ($errno)br\n; } else { fputs($fp,GET / HTTP/1.0\n\n); while(!feof($fp)) { echo fgets($fp,128); } fclose($fp); } I get this output: Error: (0) Edit this bug report at http://bugs.php.net/?id=11058edit=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 #12625 Updated: (latest) php_oci8.dll can not be loaded
ID: 12625 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Oracle related Operating System: win2000 PHP Version: 4.0.6 New Comment: Dear Sir, just FYI. the same setup in php.ini (version 4.06)-52Mb php_oci8.dll can not be loaded. (version 4.05)-44Mb php_oci8.dll can be loaded with other version 4.06 files. Previous Comments: [2001-08-07 12:22:17] [EMAIL PROTECTED] read: http://bugs.php.net/?id=12502 [2001-08-07 12:15:47] [EMAIL PROTECTED] Sir, I download 4.06 install files yesterday. I have tried a lot of ways to config php.ini in order to load php_oci8.dll functions. but I had php_oci8.dll can not be load information. These are several tests I did (1) uncomment other dll (oracle) one and it can be loaded (working) (2) download the binary code again and re-put the php_oci8.dll into current extensions dir ( not working) (3) download the Previous version binary code and only take out (V4.05) php_oci8.dll and put it into current extensions dir ( it's working) so is there any thing wrong with the latest php_oci8.dll? tks !! Edit this bug report at http://bugs.php.net/?id=12625edit=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] Error compiling latest CVS
Jani Taskinen wrote: Should be fixed now. Update and try again. If you get more errors, let me know. --Jani Almost :) - php_domxml.c: In function `php_if_domxml_node_attributes': php_domxml.c:1469: too many arguments to function `node_attributes' php_domxml.c: At top level: php_domxml.c:2304: conflicting types for `node_attributes' php_domxml.c:74: previous declaration of `node_attributes' php_domxml.c:2339: conflicting types for `node_children' php_domxml.c:75: previous declaration of `node_children' make[3]: *** [php_domxml.lo] Error 1 - Regards, Stig Smelror -- Best regards The DeadWhale Crew http://deadwhale.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]
Re: [PHP-DEV] Error compiling latest CVS
Now it should compile. Tested it myself. :) --Jani On Tue, 7 Aug 2001, Steeg wrote: Jani Taskinen wrote: Should be fixed now. Update and try again. If you get more errors, let me know. --Jani Almost :) - php_domxml.c: In function `php_if_domxml_node_attributes': php_domxml.c:1469: too many arguments to function `node_attributes' php_domxml.c: At top level: php_domxml.c:2304: conflicting types for `node_attributes' php_domxml.c:74: previous declaration of `node_attributes' php_domxml.c:2339: conflicting types for `node_children' php_domxml.c:75: previous declaration of `node_children' make[3]: *** [php_domxml.lo] Error 1 - Regards, Stig Smelror -- 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 #12627: configure creates config_vars.mk incorrectly as of aug 7,2001
From: [EMAIL PROTECTED] Operating system: SCO OpenServer 5.x PHP version: 4.0CVS-2001-08-07 PHP Bug Type: Compile Failure Bug description: configure creates config_vars.mk incorrectly as of aug 7,2001 make has problems with this... Must be a separator on rules line 62 (bu39). file config_vars.mk configure used to create this file as CONFIGURE_COMMAND = './configure' '--with-gd=/usr/local' '- now it creates it as CONFIGURE_COMMAND = './configure' '--with-mysql' '--with-apxs=/usr/httpd/bin/apxs' -- Edit bug report at: http://bugs.php.net/?id=12627edit=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] added a few *_EXTERN_C() macro calls
any objections commiting this ? if not, please do so, i don't have karma for the zend repository. -harald. -- 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 Updated: feof () - no break on eof of socket
ID: 12570 Updated by: alindeman Reported By: [EMAIL PROTECTED] Status: Analyzed Bug Type: Network related Operating System: SuSE 7.0 PHP Version: 4.0.6 New Comment: reproduced with latest CVS. Previous Comments: [2001-08-07 12:36:46] [EMAIL PROTECTED] status - analyzed (!) [2001-08-04 20:43:38] [EMAIL PROTECTED] 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 this 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]
[PHP-DEV] Bug #10116 Updated: bcpow treats second argument as integer
ID: 10116 Updated by: jmcastagnetto Reported By: [EMAIL PROTECTED] Old Status: Open Status: Closed Bug Type: BC math related Operating System: Windows 98 PHP Version: 4.0.4pl1 New Comment: This is an issue w/ the bcmath library itself, not a PHP bug. If you look in ext/bcmath/libbcmath/src/raise.c you'll see that in the function bc_raise(), the exponent is coherced to a long, and the comments says: /* Raise NUM1 to the NUM2 power. The result is placed in RESULT. Maximum exponent is LONG_MAX. If a NUM2 is not an integer, only the integer part is used. */ Suggest submitting as a bug to the author of bcmath (if you think it is a bug): [EMAIL PROTECTED] Check also the definition of BC numbers in POSIX, the FAQ for bcmath, and the Unix/Linux command bc Previous Comments: [2001-04-02 09:29:49] [EMAIL PROTECTED] Function bcpow is supposed to work with arbitrary precision numbers. However, it seems to treat its second argument as an integer. E.g. echo bcpow(256,0.5); echo bcpow(256,0.99); both produce 1. It seems that the second argument is truncated down to integer value. Either this is a feature and documentation must be changed or it is a bug of either Windows version or even other versions of BCMath/PHP. bcpow(0.5,2); produces 0.25, which is all right. Regards, -- Dan Edit this bug report at http://bugs.php.net/?id=10116edit=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 #12628: Cannot Successfully map soname 'libexpat.so.1'
From: [EMAIL PROTECTED] Operating system: sgi irix 6.5 PHP version: 4.0.5 PHP Bug Type: *Web Server problem Bug description: Cannot Successfully map soname 'libexpat.so.1' I've Netscape Fasttrack 3.x and I've installed php 4.05. When I start script php-fixconf.sh trying to enable php for NS everything seems fine, but web server won't start and I'm getting this error in logs: 71143:./php: rld: Fatal Error: Cannot Successfully map soname 'libexpat.so.1' under any of the filenames /usr/freeware/lib32/libexpat.so.1:/xlv1/freeware/2001.Aug/php/4.0.5-root/usr/freeware/lib/libexpat.so.1:/xlv1/freeware/2001.Aug/php/4.0.5-root/usr/freeware/lib32/lib/libexpat.so.1:/usr/lib32/libexpat.so.1:/usr/lib32/internal/libexpat.so.1:/lib32/libexpat.so.1:/opt/lib32/libexpat.so.1:/usr/freeware/lib32/libexpat.so.1.1:/xlv1/freeware/2001.Aug/php/4.0.5-root/usr/freeware/lib/libexpat.so.1.1:/xlv1/freeware/2001.Aug/php/4.0.5-root/usr/freeware/lib32/lib/libexpat.so.1.1:/usr/lib32/libexpat.so.1.1:/usr/lib32/internal/libexpat.so.1.1:/lib32/libexpat.so.1.1:/opt/lib32/libexpat.so.1.1: What to do? Thanks for any advice. -- Edit bug report at: http://bugs.php.net/?id=12628edit=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] Chora
Hi, The following link used to take me to the latest version of the news file, is there a similar option with Chora? http://cvs.php.net/viewcvs.cgi/~checkout~/php4/NEWS?content-type=text/plain -- Richard Heyes I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones. - Albert Einstein -- 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 #12625 Updated: (latest) php_oci8.dll can not be loaded
ID: 12625 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Oracle related Operating System: win2000 PHP Version: 4.0.6 New Comment: sorry I mean 44Kb not Mb = Dear Sir, just FYI. the same setup in php.ini (version 4.06)-52Mb php_oci8.dll can not be loaded. (version 4.05)-44Mb php_oci8.dll can be loaded with other version 4.06 files. Previous Comments: [2001-08-07 13:00:54] [EMAIL PROTECTED] Dear Sir, just FYI. the same setup in php.ini (version 4.06)-52Mb php_oci8.dll can not be loaded. (version 4.05)-44Mb php_oci8.dll can be loaded with other version 4.06 files. [2001-08-07 12:22:17] [EMAIL PROTECTED] read: http://bugs.php.net/?id=12502 [2001-08-07 12:15:47] [EMAIL PROTECTED] Sir, I download 4.06 install files yesterday. I have tried a lot of ways to config php.ini in order to load php_oci8.dll functions. but I had php_oci8.dll can not be load information. These are several tests I did (1) uncomment other dll (oracle) one and it can be loaded (working) (2) download the binary code again and re-put the php_oci8.dll into current extensions dir ( not working) (3) download the Previous version binary code and only take out (V4.05) php_oci8.dll and put it into current extensions dir ( it's working) so is there any thing wrong with the latest php_oci8.dll? tks !! Edit this bug report at http://bugs.php.net/?id=12625edit=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 #12629: small compile errors
From: [EMAIL PROTECTED] Operating system: SCO OpenServer 5.x PHP version: 4.0CVS-2001-08-07 PHP Bug Type: Unknown/Other Function Bug description: small compile errors SCO Openserver 5.x does not have the getrusage function, the configure command seems to detect it, I always have to edit it out by hand. --- also CFLAGS=-g -O2 need to be changed to CFLAGS = -s -O2 -belf otherwise it compiles with the debug option and configure can't find or use the dynamic libraries such as zlib, gd .etc. -- Edit bug report at: http://bugs.php.net/?id=12629edit=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 #12630 Updated: BUG: cannot return'' with the function() or dosomething'' construct
ID: 12630 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Scripting Engine problem Old Operating System: Win2000 sp2 Operating System: Red Hat Linux, Win2000 sp2 PHP Version: 4.0.6 New Comment: Tested on Red Hat Previous Comments: [2001-08-07 13:54:44] [EMAIL PROTECTED] Hello! This seems quite odd... In the ... function() or dosomething; ...construct it seems that PHP only allows the usage of standard operators and functions in the place of dosomething, so the 'return' doesn't work at all since it's a operator-like thingy. The following snippet will produce a parse error: -- function test(){ return false; }; function test2(){ test() or return; } -- Thanks in advance for a quick fix :) Keep up the good work! Edit this bug report at http://bugs.php.net/?id=12630edit=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 #12630 Updated: BUG: cannot return
ID: 12630 Updated by: alindeman Reported By: [EMAIL PROTECTED] Old Summary: BUG: cannot return'' with the function() or dosomething'' construct Old Status: Open Status: Bogus Bug Type: Scripting Engine problem Operating System: Red Hat Linux, Win2000 sp2 PHP Version: 4.0.6 New Comment: this is not implemented in php if you want to try something like that try... if (!test())return; Previous Comments: [2001-08-07 13:59:07] [EMAIL PROTECTED] Tested on Red Hat [2001-08-07 13:54:44] [EMAIL PROTECTED] Hello! This seems quite odd... In the ... function() or dosomething; ...construct it seems that PHP only allows the usage of standard operators and functions in the place of dosomething, so the 'return' doesn't work at all since it's a operator-like thingy. The following snippet will produce a parse error: -- function test(){ return false; }; function test2(){ test() or return; } -- Thanks in advance for a quick fix :) Keep up the good work! Edit this bug report at http://bugs.php.net/?id=12630edit=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] Re: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c incomplete_class.c php_incomplete_class.h var.c /ext/wddx wddx.c
At 17:55 07-08-01, Stig Sæther Bakken wrote: Now we're talking! I assume it is not straightforward, what are the technical challenges in doing JIT module initialization? It's not much of a challenge really. If we decide it should be done, it can be done... Zeev -- 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] Chora
I don't know how to make it show the current version, but this is the format is http://cvs.php.net/co.php/php4/NEWSr=1.726 where 1.78 is the latest revision Anybody know how to get the current version? --Andy :) On Mon, 06 Aug 2001, Richard Heyes wrote: Hi, The following link used to take me to the latest version of the news file, is there a similar option with Chora? http://cvs.php.net/viewcvs.cgi/~checkout~/php4/NEWS?content-type=text/plain -- Richard Heyes I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones. - Albert Einstein -- 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]
Fwd: Re: [PHP-DEV] Chora
Of course I meant that it was http://cvs.php.net/co.php/php4/NEWS?r=1.726 -- Forwarded Message -- Subject: Re: [PHP-DEV] Chora Date: Tue, 7 Aug 2001 13:09:34 -0500 From: Andrew Lindeman formally [EMAIL PROTECTED] [EMAIL PROTECTED] I don't know how to make it show the current version, but this is the format is http://cvs.php.net/co.php/php4/NEWSr=1.726 where 1.78 is the latest revision Anybody know how to get the current version? --Andy :) On Mon, 06 Aug 2001, Richard Heyes wrote: Hi, The following link used to take me to the latest version of the news file, is there a similar option with Chora? http://cvs.php.net/viewcvs.cgi/~checkout~/php4/NEWS?content-type=text/plain -- Richard Heyes I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones. - Albert Einstein -- 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] --- -- 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 #12631: Fatal: ob_get_length() returns wrong value when compressed OB is on
From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.0.6 PHP Bug Type: Output Control Bug description: Fatal: ob_get_length() returns wrong value when compressed OB is on When output buffering is on, using the gzhandler, then ob_get_length() returns the uncompressed content length in stead of the actual (compressed) payload. This is fatal if a Content-Length HTTP-header is sent and the browser implements HTTP keep-alive. The result is a web-site which appears to be down or with extremely slow responses. Example PHP code: ?php ob_start('ob_gzhandler'); print aa; // 30 a's print bb; // 30 b's print aa; // 30 a's header('Content-Length: '.ob_get_length()); ob_end_flush(); ? If this is saved as http://localhost/ob.php then try the following wget command: wget --header=Accept-Encoding: gzip --header=Connection: close -S http://localhost/ob.php Notice that wget displays the following error message continuously: Connection closed at byte 36. Retrying. Also notice that the web-server told wget to expect 90 bytes (the uncompressed payload). -- Edit bug report at: http://bugs.php.net/?id=12631edit=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] Security proposal - SPHP and helper functions
-Original Message- From: David Wheeler [mailto:[EMAIL PROTECTED]] Sent: August 6, 2001 8:20 PM To: [EMAIL PROTECTED] Subject: [PHP-DEV] Security proposal - SPHP and helper functions Dear Developers of PHP: I have a proposal that I hope you'll like that I think will improve the security of PHP programs. Shaun Clowes recently posted A Study in Scarlet, identifying common vulnerabilities in PHP applications; you can see it at: http://www.securereality.com.au/studyinscarlet.txt I agree with Rasmus Lerdorf that several of these issues are present in other scripting languages, and that a key issue is that you need to check input before depending on it. However, Clowes makes some very good points too. In particular, it's not just that PHP makes input easier to get at. PHP allows attackers to totally control all global variables unless the Personally, I think that having the functions mentioned in David's post are a great idea. These options would not only improve security by helping people work around not having globals registered, but it would also make data validation much simpler. Currently, I have a bigass form_handler class -- which validates data, cleans it, etc, etc -- but it would be much simpler if I had a better way to get/check some things. -Brian Tanner //Original Message function get_input ($variable) # Return value of input named variable, or if unset. # This pays attention to gpc_order, and looks at # $HTTP_COOKIE_VARS, $HTTP_GET_VARS, and $HTTP_POST_VARS function import_variables ($list_of_variables) # Take a list of input (field) names as strings, and import any that exist. function import_input_ifmatch($pattern, $list_of_variables) # Take a list of input (field) names as strings, and import any that exist, # but only if they match pattern (a Perl5 pattern, see preg_match). # The pattern wll apply to each variable in its entirety, as though # the pattern has '\A' prepended and '\z' appended. function import_input_int($list_of_variables) # Take a list of input (field) names as strings, and import any that exist # as ints. function import_input_double($list_of_variables) # Take a list of input (field) names as strings, and import any that exist # as ints. For your abusement, here's an implementation of import_variables: function import_variables () { # Take a list of input (field) names as strings, and import any that exist. $numargs = func_num_args(); $arg_list = func_get_args(); for ($i = 0; $i $numargs; $i++) { $v = $arg_list[$i]; global $$v; $$v = get_input($v); }; }; In SPHP, programs would generally begin with calls to these import functions, so that programs would only import values that they wanted (instead of trusting attackers not to create new variables), e.g.: import_variables(name, description); import_input_ifmatch(yes|no, bald); import_input_int(age); This is a little different than Zeev Suraski's 2001-07-29 post (http://marc.theaimsgroup.com/?l=php-devm=99638994225888w=2), because it leaves the (less secure) mode of running PHP scripts running as-is. Basically, this has a migration plan. Someday in the future you might even make register_globals off for regular PHP -- but this would at least give you a transition approach. And if you're willing to change PHP to make register_globals the default, that would be MUCH better from a security standpoint. Even then, though, I think a set of helper functions to make it easy to import only the values we expect is important -- developers will only write secure programs if it's easy to do the right way. Anyway, I'd like to see future versions of PHP make it easy, not hard, to write secure programs in. I hope this email helps! --- David A. Wheeler [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 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 #12630 Updated: BUG: cannot return
ID: 12630 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Scripting Engine problem Operating System: Red Hat Linux, Win2000 sp2 PHP Version: 4.0.6 New Comment: BOGUS ? The above is just a workaround... I've used it, though it's the only reasonable way to code some routines. But it's quite a LONG workaround and makes the code quite obfuscated and unclear... not mentioning possible performance losses. Any plans to implement that ? (haven't seen the php source yet, but I could imagine that preety simple to implement) Previous Comments: [2001-08-07 14:04:59] [EMAIL PROTECTED] this is not implemented in php if you want to try something like that try... if (!test())return; [2001-08-07 13:59:07] [EMAIL PROTECTED] Tested on Red Hat [2001-08-07 13:54:44] [EMAIL PROTECTED] Hello! This seems quite odd... In the ... function() or dosomething; ...construct it seems that PHP only allows the usage of standard operators and functions in the place of dosomething, so the 'return' doesn't work at all since it's a operator-like thingy. The following snippet will produce a parse error: -- function test(){ return false; }; function test2(){ test() or return; } -- Thanks in advance for a quick fix :) Keep up the good work! Edit this bug report at http://bugs.php.net/?id=12630edit=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 #12630 Updated: BUG: cannot return
ID: 12630 Updated by: alindeman Reported By: [EMAIL PROTECTED] Old Status: Bogus Status: Open Old Bug Type: Scripting Engine problem Bug Type: Feature/Change Request Operating System: Red Hat Linux, Win2000 sp2 PHP Version: 4.0.6 New Comment: I'll make this a feature request/change... Previous Comments: [2001-08-07 14:15:13] [EMAIL PROTECTED] BOGUS ? The above is just a workaround... I've used it, though it's the only reasonable way to code some routines. But it's quite a LONG workaround and makes the code quite obfuscated and unclear... not mentioning possible performance losses. Any plans to implement that ? (haven't seen the php source yet, but I could imagine that preety simple to implement) [2001-08-07 14:04:59] [EMAIL PROTECTED] this is not implemented in php if you want to try something like that try... if (!test())return; [2001-08-07 13:59:07] [EMAIL PROTECTED] Tested on Red Hat [2001-08-07 13:54:44] [EMAIL PROTECTED] Hello! This seems quite odd... In the ... function() or dosomething; ...construct it seems that PHP only allows the usage of standard operators and functions in the place of dosomething, so the 'return' doesn't work at all since it's a operator-like thingy. The following snippet will produce a parse error: -- function test(){ return false; }; function test2(){ test() or return; } -- Thanks in advance for a quick fix :) Keep up the good work! Edit this bug report at http://bugs.php.net/?id=12630edit=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 #10116 Updated: bcpow treats second argument as integer
ID: 10116 Updated by: jmcastagnetto Reported By: [EMAIL PROTECTED] Old Status: Closed Status: Bogus Bug Type: BC math related Operating System: Windows 98 PHP Version: 4.0.4pl1 Previous Comments: [2001-04-02 09:29:49] [EMAIL PROTECTED] Function bcpow is supposed to work with arbitrary precision numbers. However, it seems to treat its second argument as an integer. E.g. echo bcpow(256,0.5); echo bcpow(256,0.99); both produce 1. It seems that the second argument is truncated down to integer value. Either this is a feature and documentation must be changed or it is a bug of either Windows version or even other versions of BCMath/PHP. bcpow(0.5,2); produces 0.25, which is all right. Regards, -- Dan Edit this bug report at http://bugs.php.net/?id=10116edit=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 #12623 Updated: mod operator
ID: 12623 Updated by: jmcastagnetto Reported By: [EMAIL PROTECTED] Old Status: Closed Status: Bogus Bug Type: Math related Operating System: linux (suse) PHP Version: 4.0.4pl1 Previous Comments: [2001-08-07 11:14:21] [EMAIL PROTECTED] Modulus (%) operator i am not sure if the behavior for non-integer operands is defined, so i am not sure how important this actually is check 2035 % 179 = 66 // correct! 203.5 % 17.9 = 16// incorrect - should be 6.6! ?php echo 2035 % 179 == . 2035 % 179; echo br\n; echo 203.5 % 17.9 == . 203.5 % 17.9; ? Edit this bug report at http://bugs.php.net/?id=12623edit=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 #12155 Updated: modulus %
ID: 12155 Updated by: jmcastagnetto Reported By: [EMAIL PROTECTED] Old Status: Closed Status: Bogus Bug Type: Math related Operating System: linux 2.4.3 PHP Version: 4.0.5 Previous Comments: [2001-08-06 19:57:53] [EMAIL PROTECTED] float % int could lead to rounding difficulties, which is not a bug. [2001-07-13 20:34:11] [EMAIL PROTECTED] Integer limited to 204700 so there. [2001-07-13 18:29:23] [EMAIL PROTECTED] Appears to be broken on large(r) integers. Is this a limitation on the type used? (I am coding working ip2long/long2ip). $temp = 3194548456; print correct: . ($temp - 255*floor($temp/255)); print php: . $temp % 255 . br; as defined in maths, the % is equiv to MOD(n, d) = n - d*INT(n/d) where n is the number, d is the divisor. Edit this bug report at http://bugs.php.net/?id=12155edit=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 #10166 Updated: read_exif_data loads whole image into memory
ID: 10166 Updated by: jmcastagnetto Reported By: [EMAIL PROTECTED] Old Status: Closed Status: Bogus Bug Type: *Graphics related Operating System: Linux 2.2 PHP Version: 4.0 Latest CVS (04/04/2001) Previous Comments: [2001-07-30 13:03:01] [EMAIL PROTECTED] In latest CVS there I have added an optional parameter for read_exif_data(): proto read_exif_data(string filename [, int readall]) By setting 'readall' to 0 you can prevent it from loading all of the file into memory. Please test this. --Jani [2001-04-04 13:48:56] [EMAIL PROTECTED] Some users observed that read_exif_data is too slow with 1MB image files, which is a typical size for digital camera output. I looked into the implementation (ext/exif/exif.c) and it looks like the whole compressed image data is always read into memory, even though read_exif_data should be concerned with just the file header. Here's a line from function read_exif_data: PRE ret = php_read_jpeg_exif(ImageInfo, (*p_name)-value.str.val,1); /PRE The last parameter (ReadAll=1), causes the whole image data loaded into memory inside function scan_JPEG_header: PRE if (ReadAll) { int cp, ep, size; /* Determine how much file is left. */ cp = ftell(infile); fseek(infile, 0, SEEK_END); ep = ftell(infile); fseek(infile, cp, SEEK_SET); size = ep-cp; Data = (uchar *)malloc(size); if (Data == NULL) { php_error(E_ERROR,could not allocate data for entire image); } got = fread(Data, 1, size, infile); if (got != size) { php_error(E_ERROR,could not read the rest of the image); } Sections[*SectionsRead].Data = Data; Sections[*SectionsRead].Size = size; Sections[*SectionsRead].Type = PSEUDO_IMAGE_MARKER; (*SectionsRead)++; /* *HaveAll = 1; */ } return TRUE; /PRE I believe the line above should be changed to feed 0 as value of parameter ReadAll. Thanks. V Edit this bug report at http://bugs.php.net/?id=10166edit=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 #10166 Updated: read_exif_data loads whole image into memory
ID: 10166 Updated by: jmcastagnetto Reported By: [EMAIL PROTECTED] Old Status: Bogus Status: Closed Bug Type: *Graphics related Operating System: Linux 2.2 PHP Version: 4.0 Latest CVS (04/04/2001) New Comment: Reclosed, edited wrong bug Previous Comments: [2001-08-03 21:56:04] [EMAIL PROTECTED] Reopen if this isn't what you wanted. [2001-07-30 13:03:01] [EMAIL PROTECTED] In latest CVS there I have added an optional parameter for read_exif_data(): proto read_exif_data(string filename [, int readall]) By setting 'readall' to 0 you can prevent it from loading all of the file into memory. Please test this. --Jani [2001-04-04 13:48:56] [EMAIL PROTECTED] Some users observed that read_exif_data is too slow with 1MB image files, which is a typical size for digital camera output. I looked into the implementation (ext/exif/exif.c) and it looks like the whole compressed image data is always read into memory, even though read_exif_data should be concerned with just the file header. Here's a line from function read_exif_data: PRE ret = php_read_jpeg_exif(ImageInfo, (*p_name)-value.str.val,1); /PRE The last parameter (ReadAll=1), causes the whole image data loaded into memory inside function scan_JPEG_header: PRE if (ReadAll) { int cp, ep, size; /* Determine how much file is left. */ cp = ftell(infile); fseek(infile, 0, SEEK_END); ep = ftell(infile); fseek(infile, cp, SEEK_SET); size = ep-cp; Data = (uchar *)malloc(size); if (Data == NULL) { php_error(E_ERROR,could not allocate data for entire image); } got = fread(Data, 1, size, infile); if (got != size) { php_error(E_ERROR,could not read the rest of the image); } Sections[*SectionsRead].Data = Data; Sections[*SectionsRead].Size = size; Sections[*SectionsRead].Type = PSEUDO_IMAGE_MARKER; (*SectionsRead)++; /* *HaveAll = 1; */ } return TRUE; /PRE I believe the line above should be changed to feed 0 as value of parameter ReadAll. Thanks. V Edit this bug report at http://bugs.php.net/?id=10166edit=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 #12630 Updated: BUG: cannot return
ID: 12630 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Feature/Change Request Operating System: Red Hat Linux, Win2000 sp2 PHP Version: 4.0.6 New Comment: I'm getting multiple Undelivered Mail Returned to Sender messages from Your mail gateway... these contain eg.: -- This is the Postfix program at host localhost.localdomain. I'm sorry to have to inform you that the message returned below could not be delivered to one or more destinations. For further assistance, please send mail to postmaster If you do so, please include this problem report. You can delete your own text from the message returned below. The Postfix program @localhost.localdomain: unknown user: [EMAIL PROTECTED]: unknown user: 75 [EMAIL PROTECTED]: unknown user: exec '@localhost.localdomain: unknown user: ' - Sorry for posting here but I couldn't post to [EMAIL PROTECTED] I hope You're able to cut this one :) Previous Comments: [2001-08-07 14:17:40] [EMAIL PROTECTED] I'll make this a feature request/change... [2001-08-07 14:15:13] [EMAIL PROTECTED] BOGUS ? The above is just a workaround... I've used it, though it's the only reasonable way to code some routines. But it's quite a LONG workaround and makes the code quite obfuscated and unclear... not mentioning possible performance losses. Any plans to implement that ? (haven't seen the php source yet, but I could imagine that preety simple to implement) [2001-08-07 14:04:59] [EMAIL PROTECTED] this is not implemented in php if you want to try something like that try... if (!test())return; [2001-08-07 13:59:07] [EMAIL PROTECTED] Tested on Red Hat [2001-08-07 13:54:44] [EMAIL PROTECTED] Hello! This seems quite odd... In the ... function() or dosomething; ...construct it seems that PHP only allows the usage of standard operators and functions in the place of dosomething, so the 'return' doesn't work at all since it's a operator-like thingy. The following snippet will produce a parse error: -- function test(){ return false; }; function test2(){ test() or return; } -- Thanks in advance for a quick fix :) Keep up the good work! Edit this bug report at http://bugs.php.net/?id=12630edit=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] Fw: added a few *_EXTERN_C() macro calls
uups. Harald Radi [EMAIL PROTECTED] schrieb im Newsbeitrag news:001d01c11f65$08fc8790$6500a8c0@Thinkphed... any objections commiting this ? if not, please do so, i don't have karma for the zend repository. -harald. extern_c.diff -- 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 #12633: --enable-gd-native-ttf vs. --enable-gd-native-tt
From: [EMAIL PROTECTED] Operating system: FreeBSD 4.3 PHP version: 4.0.6 PHP Bug Type: *Compile Issues Bug description: --enable-gd-native-ttf vs. --enable-gd-native-tt When configuring PHP it says to use --enable-gd-native-ttf, but if configure actually checks for --enable-gd-native-tt. configure, line 496: --enable-gd-native-ttfGD: Enable TrueType string function in gd configure, line 17676: echo $ac_n checking whether to enable truetype string function in gd... $ac_c 16 echo configure:17678: checking whether to enable truetype string function in gd 5 # Check whether --enable-gd-native-tt or --disable-gd-native-tt was given. if test ${enable_gd_native_tt+set} = set; then enableval=$enable_gd_native_tt PHP_GD_NATIVE_TT=$enableval else PHP_GD_NATIVE_TT=no fi -- Edit bug report at: http://bugs.php.net/?id=12633edit=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] Re: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c formatted_print.c php_string.h
In what case is this useful? I'm kind of worried that so many functions are popping up in PHP which accept arrays as parameters. It's much slower than passing the arguments in a regular way. How often do people dynamically build formats *and* then dynamically build an array of arguments? Andi At 07:44 PM 8/7/2001 +, Andrei Zmievski wrote: andrei Tue Aug 7 15:44:46 2001 EDT Modified files: /php4/ext/standard basic_functions.c formatted_print.c php_string.h Log: @- Added vprintf() and vsprintf() functions that allow passing all arguments @ after format as an array. (Andrei) Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.379 php4/ext/standard/basic_functions.c:1.380 --- php4/ext/standard/basic_functions.c:1.379 Mon Aug 6 09:36:08 2001 +++ php4/ext/standard/basic_functions.c Tue Aug 7 15:44:44 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.379 2001/08/06 13:36:08 thies Exp $ */ +/* $Id: basic_functions.c,v 1.380 2001/08/07 19:44:44 andrei Exp $ */ #include php.h #include php_main.h @@ -208,6 +208,8 @@ PHP_FALIAS(strchr, strstr, NULL) PHP_NAMED_FE(sprintf, PHP_FN(user_sprintf), NULL) PHP_NAMED_FE(printf,PHP_FN(user_printf),NULL) + PHP_FE(vprintf, NULL) + PHP_FE(vsprintf, NULL) PHP_FE(sscanf, third_and_rest_force_ref) PHP_FE(fscanf, third_and_rest_force_ref) PHP_FE(parse_url, NULL) Index: php4/ext/standard/formatted_print.c diff -u php4/ext/standard/formatted_print.c:1.38 php4/ext/standard/formatted_print.c:1.39 --- php4/ext/standard/formatted_print.c:1.38Mon Jul 30 04:24:36 2001 +++ php4/ext/standard/formatted_print.c Tue Aug 7 15:44:45 2001 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: formatted_print.c,v 1.38 2001/07/30 08:24:36 zeev Exp $ */ +/* $Id: formatted_print.c,v 1.39 2001/08/07 19:44:45 andrei Exp $ */ #include math.h /* modf() */ #include php.h @@ -408,23 +408,40 @@ * */ static char * -php_formatted_print(int ht, int *len TSRMLS_DC) +php_formatted_print(int ht, int *len, int use_array TSRMLS_DC) { - pval ***args; + zval ***args, **z_format, **array; int argc, size = 240, inpos = 0, outpos = 0, temppos; int alignment, width, precision, currarg, adjusting, argnum; char *format, *result, padding; argc = ZEND_NUM_ARGS(); - if (argc 1) { - WRONG_PARAM_COUNT_WITH_RETVAL(NULL); - } - args = (pval ***)emalloc(argc * sizeof(pval *)); + if (use_array) { + int i = 1; + + if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(argc, z_format, array) == FAILURE) { + WRONG_PARAM_COUNT_WITH_RETVAL(NULL); + } + SEPARATE_ZVAL(array); + convert_to_array_ex(array); + argc = 1 + zend_hash_num_elements(Z_ARRVAL_PP(array)); + args = (zval ***)emalloc(argc * sizeof(zval *)); + args[0] = z_format; + for (zend_hash_internal_pointer_reset(Z_ARRVAL_PP(array)); + zend_hash_get_current_data(Z_ARRVAL_PP(array), (void **)args[i++]) == SUCCESS; + zend_hash_move_forward(Z_ARRVAL_PP(array))); + } else { + if (argc 1) { + WRONG_PARAM_COUNT_WITH_RETVAL(NULL); + } + + args = (zval ***)emalloc(argc * sizeof(zval *)); - if (zend_get_parameters_array_ex(argc, args) == FAILURE) { - efree(args); - WRONG_PARAM_COUNT_WITH_RETVAL(NULL); + if (zend_get_parameters_array_ex(argc, args) == FAILURE) { + efree(args); + WRONG_PARAM_COUNT_WITH_RETVAL(NULL); + } } convert_to_string_ex(args[0]); format = (*args[0])-value.str.val; @@ -632,7 +649,22 @@ char *result; int len; - if ((result=php_formatted_print(ht, len TSRMLS_CC))==NULL) { + if ((result=php_formatted_print(ht, len, 0 TSRMLS_CC))==NULL) { + RETURN_FALSE; + } + RETVAL_STRINGL(result,len,1); + efree(result); +} +/* }}} */ + +/* {{{ proto string vsprintf(string format, array args) + Return a formatted string */ +PHP_FUNCTION(vsprintf) +{ + char *result; + int len; + + if ((result=php_formatted_print(ht, len, 1 TSRMLS_CC))==NULL) { RETURN_FALSE; } RETVAL_STRINGL(result,len,1); @@ -647,7 +679,22 @@ char *result; int len; - if ((result=php_formatted_print(ht, len TSRMLS_CC))==NULL) { + if
[PHP-DEV] Bug #12633 Updated: --enable-gd-native-ttf vs. --enable-gd-native-tt
ID: 12633 Updated by: alindeman Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: *Compile Issues Operating System: FreeBSD 4.3 PHP Version: 4.0.6 New Comment: has been fixed in CVS for a long time Previous Comments: [2001-08-07 15:45:35] [EMAIL PROTECTED] When configuring PHP it says to use --enable-gd-native-ttf, but if configure actually checks for --enable-gd-native-tt. configure, line 496: --enable-gd-native-ttfGD: Enable TrueType string function in gd configure, line 17676: echo $ac_n checking whether to enable truetype string function in gd... $ac_c 16 echo configure:17678: checking whether to enable truetype string function in gd 5 # Check whether --enable-gd-native-tt or --disable-gd-native-tt was given. if test ${enable_gd_native_tt+set} = set; then enableval=$enable_gd_native_tt PHP_GD_NATIVE_TT=$enableval else PHP_GD_NATIVE_TT=no fi Edit this bug report at http://bugs.php.net/?id=12633edit=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] Re: [PHP-CVS] cvs: php4 /ext/standard basic_functions.c formatted_print.c php_string.h
On Tue, 07 Aug 2001, Andi Gutmans wrote: In what case is this useful? I'm kind of worried that so many functions are popping up in PHP which accept arrays as parameters. It's much slower than passing the arguments in a regular way. How often do people dynamically build formats *and* then dynamically build an array of arguments? Here's request from Colin: What are the chances of getting printf() and sprintf() to have an optional syntax: string sprintf( string format, array args ); Where $args would be an array of all the arguments to be passed, instead of listing them one by one. This would be useful if one needed to write some kind of a wrapper function for printf() that processed the format string and/or each of the arguments before passing them to printf(). -Andrei Computer, if you don't open that exit hatch this moment I shall zap straight off to your major data banks and reprogram you with a very large axe. -- Douglas Adams / The Hitchhiker's Guide to the Galaxy -- 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 /ext/standard basic_functions.c formatted_print.c php_string.h
At 02:53 PM 8/7/2001 -0500, Andrei Zmievski wrote: On Tue, 07 Aug 2001, Andi Gutmans wrote: In what case is this useful? I'm kind of worried that so many functions are popping up in PHP which accept arrays as parameters. It's much slower than passing the arguments in a regular way. How often do people dynamically build formats *and* then dynamically build an array of arguments? Here's request from Colin: What are the chances of getting printf() and sprintf() to have an optional syntax: string sprintf( string format, array args ); Where $args would be an array of all the arguments to be passed, instead of listing them one by one. This would be useful if one needed to write some kind of a wrapper function for printf() that processed the format string and/or each of the arguments before passing them to printf(). Do you really think it's worth it? People will use features which are available. I don't think it's the right thing to allow them to write code which is *much* slower than the old way when it usually doesn't give you much advantage over the old way. Anyway, if you guys think it's really needed, so be it. I just think it's kind of slow and I personally think we should not encourage people to pass arguments with arrays. We're doing this in far too many places for my taste. Andi -- 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 /ext/standard basic_functions.c formatted_print.c php_string.h
On Tue, 07 Aug 2001, Andi Gutmans wrote: Do you really think it's worth it? People will use features which are available. I don't think it's the right thing to allow them to write code which is *much* slower than the old way when it usually doesn't give you much advantage over the old way. Anyway, if you guys think it's really needed, so be it. I just think it's kind of slow and I personally think we should not encourage people to pass arguments with arrays. We're doing this in far too many places for my taste. We've been over this before and my point of view has not really changed: having functions like this in PHP is not a bad thing, because people will usually figure out what suits their needs performance-wise and otherwise. -Andrei * Ethernet n.: something used to catch the etherbunny. * -- 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 #12612 Updated: unsigned integer problem
ID: 12612 Updated by: jeroen Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Scripting Engine problem Operating System: Windows 2000 Server SP1 5.0.2195 PHP Version: 4.0.4pl1 New Comment: PHP 4 handles number-constants smartly. I.e., when a number is out of range of integers, it will be auto-converted to float. var_dump(0x8000) - float(2147483648) While | requires int-arguments, and because it cannot convert float(2147483648) to int, it will take MAX_INT instead. That abs(MINIMAL_INT) bug, is a bug which I fixed yesterday (coincidence...) The 0x8000 | 0; : apparently (int) 2147483648.0 = -2147483648 This IS a bug, because it should have been INT_MAX (2147483647) I'm currently trying to sort that out. By the way, do not put multiple bugs in one report. Previous Comments: [2001-08-07 05:10:52] [EMAIL PROTECTED] $qq = 0x8000; echo $qq; //2147483648 ok $qq = 0x8000 | 0; echo $qq; //-2147483648 ??? echo abs($qq); //-2147483648 ??? echo $qq * -1; //2147483648 Edit this bug report at http://bugs.php.net/?id=12612edit=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 #12612 Updated: unsigned integer problem
ID: 12612 Updated by: jeroen Reported By: [EMAIL PROTECTED] Old Status: Open Status: Analyzed Bug Type: Scripting Engine problem Operating System: Windows 2000 Server SP1 5.0.2195 PHP Version: 4.0.4pl1 New Comment: I wan't really clear on this one: PHP _does not support unsigned ints_ Generally, it support integers from -2147483648 to 2147483647 Previous Comments: [2001-08-07 16:54:30] [EMAIL PROTECTED] PHP 4 handles number-constants smartly. I.e., when a number is out of range of integers, it will be auto-converted to float. var_dump(0x8000) - float(2147483648) While | requires int-arguments, and because it cannot convert float(2147483648) to int, it will take MAX_INT instead. That abs(MINIMAL_INT) bug, is a bug which I fixed yesterday (coincidence...) The 0x8000 | 0; : apparently (int) 2147483648.0 = -2147483648 This IS a bug, because it should have been INT_MAX (2147483647) I'm currently trying to sort that out. By the way, do not put multiple bugs in one report. [2001-08-07 05:10:52] [EMAIL PROTECTED] $qq = 0x8000; echo $qq; //2147483648 ok $qq = 0x8000 | 0; echo $qq; //-2147483648 ??? echo abs($qq); //-2147483648 ??? echo $qq * -1; //2147483648 Edit this bug report at http://bugs.php.net/?id=12612edit=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]