RE: [PHP-DEV] show_source()
Since I'm not entirely comfortable with the lexer (or the Zend Engine) yet, I need to get a few questions answered: 1) I notice that there seems to be a T_LINE token, which should be the linenumber? However, this never seems To even come up in the lexer from the zend_highlight() function... 2) Assuming I'm wrong about the T_LINE token in this use, (I suspect I am)... I need to break up the parser So that it identifies NEWLINE differently than just WHITESPACE. Any thoughts/comments/etc on this? Regarding the function ref... 1) What is the token identifying a function name? 2) Is there a good way to determine if a function name is user-defined or not? I may be completely off base here (it wouldn't surprise me) but as far as I can tell thus far looking at the source, I need to modify the zend_highlight() function in order to add the requested features. I'm not so sure on how to handle Line numbers (I was thinking of a state machine that determined if the line number should be printed -- only should happen immediately before the first token is displayed every new-line)... But as far as the function-ref goes I'd Think I could simply add a condition to check if the token is a function ... Determine if it is user-defined or not, and if it isn't create a HREF wrapper... Like I said, am I completely off base? John |-Original Message- |From: Eric Coleman [mailto:eric.coleman;zaireweb.com] |Sent: Friday, November 15, 2002 12:29 AM |To: [EMAIL PROTECTED] |Subject: Re: [PHP-DEV] show_source() | | |I would actually love to see that :) | | |John Coggeshall [EMAIL PROTECTED] wrote in message |news:000701c28c5e$ac9cb200$9d10fea9;coogle... | |If no one has an objection, I'll look into making some of that happen. | |John | | ||-Original Message- ||From: [EMAIL PROTECTED] [mailto:nicos;php.net] ||Sent: Thursday, November 14, 2002 10:15 PM ||To: [EMAIL PROTECTED] ||Subject: [PHP-DEV] show_source() || || ||Hello, || ||Some users are requesting some new arguments in ||show_source() like having the line numbers, having a link to the php ||manual when a function is called... (see #12442 ) || ||What do you think of that? || ||Regards. ||M.CHAILLAN Nicolas ||[EMAIL PROTECTED] ||www.WorldAKT.com Hébergement de sites internets. || || || || ||-- ||PHP Development Mailing List http://www.php.net/ ||To unsubscribe, visit: http://www.php.net/unsub.php || || | | | |-- |PHP Development Mailing List http://www.php.net/ |To unsubscribe, visit: http://www.php.net/unsub.php | | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] mbstring and 4.3.0
At 09:14 AM 11/13/2002 -0500, Andrei Zmievski wrote: On Wed, 13 Nov 2002, Melvyn Sopacua wrote: FWIW: * If this is ever going to make core as a part of PHP's i18n efforts, you are going to have to deal with the 'unseen' at some point. You are not going to identify them, by testing it within a select group. For this reason, the userbase is always the guinnea-pig with every new feature in a release. Explain to me please why --enable-mbstring is not enough. The userbase is not going to be a guinea-pig since only a subset of users will have a need for mbsting and those that do can use the switch. Those that don't will not even notice that it's not enabled. It's not that I think enabling it is such a bad idea but as we're going for PHP 5 right after PHP 4.3 anyway I don't think it's too bad to wait for that. I'm sure lots of people will test PHP 5 RC's so there'll be lots of testing (long sentence but I hope it can be understood :) Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] 4.3 Branched
At 02:21 PM 11/13/2002 -0500, Andrei Zmievski wrote: I made a branch for 4.3 and tagged it PHP_4_3. Please remember to sync your fixes into the branch, if they are important and relevant, of course. BC still needs to be fixed in order to be thread-safe. The problem is that _one_, _two_, _zero_ need to be changed from global variables to TSRM variables. Any volunteers? :) Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: php4 / configure.in /main php_version.h
At 12:15 AM 11/14/2002 +0200, Jani Taskinen wrote: On Wed, 13 Nov 2002, Peter Neuman wrote: Hello, Andrei Zmievski [EMAIL PROTECTED]: andrei Wed Nov 13 14:19:07 2002 EDT Modified files: /php4 configure.in /php4/main php_version.h Log: Change version to 4.4.0-dev. hm? not 5.0.0-dev? it's time for this... It's not time. I thought we're going with 5.0.0 after 4.3.0? Obviously we'd maintain the 4.3.0 branch and continue to release bug fix releases. Or do you think we should wait for 4.3.1? I'm a bit concerned about 5.0 lingering for too long. You can see how 4.3 has lingered. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: php4 / configure.in /main php_version.h
On Fri, 15 Nov 2002, Andi Gutmans wrote: At 12:15 AM 11/14/2002 +0200, Jani Taskinen wrote: On Wed, 13 Nov 2002, Peter Neuman wrote: Hello, Andrei Zmievski [EMAIL PROTECTED]: andrei Wed Nov 13 14:19:07 2002 EDT Modified files: /php4 configure.in /php4/main php_version.h Log: Change version to 4.4.0-dev. hm? not 5.0.0-dev? it's time for this... It's not time. I thought we're going with 5.0.0 after 4.3.0? Obviously we'd maintain the 4.3.0 branch and continue to release bug fix releases. Or do you think we should wait for 4.3.1? I'm a bit concerned about 5.0 lingering for too long. You can see how 4.3 has lingered. It's just a number... but I also think we should head for 5.0.0-dev now. Derick -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: php4 / configure.in /main php_version.h
Derick Rethans wrote: It's just a number... but I also think we should head for 5.0.0-dev now. I would love to see that happen. But in this special case it's not just a number. Maybe we should create a new CVS module, php5, to which we copy php4/* and let cvs co php5 automatically checkout TSRM and ZendEngine2 (as Zend, of course). -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: php4 / configure.in /main php_version.h
I would love to see that happen. But in this special case it's not just a number. Maybe we should create a new CVS module, php5, to which we copy php4/* and let cvs co php5 automatically checkout TSRM and ZendEngine2 (as Zend, of course). You can do that without copying the repository. Currently the cvs alias for checking out ZE2 is php4-ze2 but I guess that can be changed to php5. Edin -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Re: php4 / configure.in /main php_version.h
|I thought we're going with 5.0.0 after 4.3.0? Obviously we'd |maintain the |4.3.0 branch and continue to release bug fix releases. Or do |you think we |should wait for 4.3.1? I'm a bit concerned about 5.0 lingering for too |long. You can see how 4.3 has lingered. I was under the impression there would be a 4.4.0 then a 5.0. I would like To see it head right toward 5.0 What is left to do to get 4.3.0 out the door? Anyone have any sort of list or idea Of where things need to be polished/cleaned up? John -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: php4 / configure.in /main php_version.h
|What is left to do to get 4.3.0 out the door? Anyone have any |sort of list or idea Of where things need to be polished/cleaned up? I meant of course beyond the little TODO already posted :) John -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: #20441 [Opn-Bgs]: PHP_AUTH_USER isn't set
Well actually you could. From the beginning of time up to 4.3.0. I expect to see a lot of bug reports similar to this one. Edin - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 15, 2002 10:10 AM Subject: #20441 [Opn-Bgs]: PHP_AUTH_USER isn't set ID: 20441 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Apache related Operating System: Redhat Linux 7.1 kernel 2.4.2-2 PHP Version: 4.3.0-pre2 New Comment: You need to decide if you are using an external auth mechanism or http auth from php. You can't do both. Previous Comments: -- -- [2002-11-15 02:58:24] [EMAIL PROTECTED] I've upgraded PHP 4.2.3 to the beta 4.3.0-pre2 and I've set register globals on in php.ini. My Apache version is 1.3.24. PHP configure: ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --enable-ftp --with-openssl The script is using this .htaccess-file AuthType Basic AuthName 'Urenregistratie' AuthUserFile /htpasswd/urenreg require valid-user I am sure that Apache is setting the PHP_AUTH_USER because the following script gives the correct output: // begin dirty hack $headers = apache_request_headers(); foreach ($headers as $header = $value) { if ($header == Authorization) { $value = str_replace( , , $value); $value = str_replace(Basic, , $value); $userArray = explode(:, base64_decode($value)); $PHP_AUTH_USER = $userArray[0]; } } echo $PHP_AUTH_USER; // end dirty hack If I echo $PHP_AUTH_USER or $_SERVER[PHP_AUTH_USER] above this script I am getting a empty result. Note: the script was functioning 100% properly with php 4.2.3 -- -- -- Edit this bug report at http://bugs.php.net/?id=20441edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: #20441 [Opn-Bgs]: PHP_AUTH_USER isn't set
That's not true. At least the From the beginning of time part. This used to be a restriction, then it was lost, now it is back. You can go scour cvs for the exact versions affected. I am personally not entirely happy about this change either. It is definitely a security issue for shared server environments, and as such perhaps the restriction should only be triggered when safe-mode is on. -Rasmus On Fri, 15 Nov 2002, Edin Kadribasic wrote: Well actually you could. From the beginning of time up to 4.3.0. I expect to see a lot of bug reports similar to this one. Edin - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 15, 2002 10:10 AM Subject: #20441 [Opn-Bgs]: PHP_AUTH_USER isn't set ID: 20441 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Apache related Operating System: Redhat Linux 7.1 kernel 2.4.2-2 PHP Version: 4.3.0-pre2 New Comment: You need to decide if you are using an external auth mechanism or http auth from php. You can't do both. Previous Comments: -- -- [2002-11-15 02:58:24] [EMAIL PROTECTED] I've upgraded PHP 4.2.3 to the beta 4.3.0-pre2 and I've set register globals on in php.ini. My Apache version is 1.3.24. PHP configure: ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --enable-ftp --with-openssl The script is using this .htaccess-file AuthType Basic AuthName 'Urenregistratie' AuthUserFile /htpasswd/urenreg require valid-user I am sure that Apache is setting the PHP_AUTH_USER because the following script gives the correct output: // begin dirty hack $headers = apache_request_headers(); foreach ($headers as $header = $value) { if ($header == Authorization) { $value = str_replace( , , $value); $value = str_replace(Basic, , $value); $userArray = explode(:, base64_decode($value)); $PHP_AUTH_USER = $userArray[0]; } } echo $PHP_AUTH_USER; // end dirty hack If I echo $PHP_AUTH_USER or $_SERVER[PHP_AUTH_USER] above this script I am getting a empty result. Note: the script was functioning 100% properly with php 4.2.3 -- -- -- Edit this bug report at http://bugs.php.net/?id=20441edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PHP-QA] Test results (fwd)
On Fri, 15 Nov 2002, Marcus Börger wrote: Locking does not work in db but now dba is a full superset. So i won't use db. That's why i am for moving db to pecl maybe we could print an endnote to configure saying db is deprecated? I'm +1 on that, lets's see what the list things. Derick At 09:45 15.11.2002, Derick Rethans wrote: On Thu, 14 Nov 2002, Marcus Börger wrote: At 12:05 14.11.2002, you wrote: O.k. i will try... Another thing: It seems i nearly fixed all db extension problems but dba extension is now a complete superset. So shall i fix locking for db and/or shall we move it to pecl? If we move db to pecl how about a configure switch to map dbmxxx functions to their dba counterparts? I guess this will have to wait until 4.4/5 yes, I think so too. If there are no bugreports about db things, I wouldn't put time in it to fix it... unless you use it yourself of course :) Derick -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- --- Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: #20438 [Opn-Bgs]: Bug en ImageCopyResampled
Here's a babel translation: The problem is the following one: ImageCopyResampled ignores the coordinates of the image origin. Although it is specified to them, this function ALWAYS takes them like 0,0... I am sure that he is bug, because ImageCopyResized works to me well but with such parametros. int imagecopyresampled (resource img_dst, resource img_org, int Xdst, int Ydst, int Xorg, int Yorg, int ancho_dst, int alto_dst, int ancho_org, int alto_org) That is, nonestaria respecting int Xorg and int Yorg, tomandolos always like 0,0 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Patch for bug #19566
The following patch for bug #19566 is open but should make it into 4.3. cvs -z3 -q diff zend_hash.c (in directory S:\php4-HEAD\Zend\) Index: zend_hash.c === RCS file: /repository/ZendEngine2/zend_hash.c,v retrieving revision 1.93 diff -u -r1.93 zend_hash.c --- zend_hash.c 5 Nov 2002 18:22:02 - 1.93 +++ zend_hash.c 15 Nov 2002 10:49:12 - -722,9 +722,9 HASH_PROTECT_RECURSION(ht); - va_start(args, num_args); p = ht-pListHead; while (p != NULL) { + va_start(args, num_args); hash_key.arKey = p-arKey; hash_key.nKeyLength = p-nKeyLength; hash_key.h = p-h; -733,8 +733,8 } else { p = p-pListNext; } + va_end(args); } - va_end(args); HASH_UNPROTECT_RECURSION(ht); }
Re: [PHP-DEV] mime_magic segfaults
Thanks, it works. Attacthed is a slightly modified version of Ilia's patch in consideration of win32 build. If there are no objections, I'll commit it. Moriyoshi Ilia A. [EMAIL PROTECTED] wrote: Could you try the attached patch and see if it fixes the problem. Ilia On November 14, 2002 03:10 pm, Moriyoshi Koizumi wrote: Hi, I found a bug in mime_magic. If the module fails to read the magic file specified by mime_magic.magicfile during the module initialisation, it tries to put an error, and then segfaults. Here's the backtrace. #0 0x0813402b in sapi_send_headers (tsrm_ls=0x8277f68) at /home/koizumi/src/php.net/HEAD/php4/main/SAPI.c:673 #1 0x080e5ce2 in php_header () at /home/koizumi/src/php.net/HEAD/php4/ext/standard/head.c:62 #2 0x08171433 in sapi_cli_log_message ( message=0x82a5c74 PHP Warning: mime_magic: can't read magic file .ext/mime _magic/tests/magic.test.1 in Unknown on line 0) at /home/koizumi/src/php.net/HEAD/php4/sapi/cli/php_cli.c:174 #3 0x0812d639 in php_log_err ( log_message=0x82a5c74 PHP Warning: mime_magic: can't read magic file .ext/ mime_magic/tests/magic.test.1 in Unknown on line 0, tsrm_ls=0x8277f68) at /home/koizumi/src/php.net/HEAD/php4/main/main.c:360 #4 0x0812dc9a in php_error_cb (type=2, error_filename=0x8228eab Unknown, error_lineno=0, format=0x81fcb00 mime_magic: can't read magic file %s, args=0xbfffd7b8) at /home/koizumi/src/php.net/HEAD/php4/main/main.c:600 #5 0x081581d9 in zend_error (type=2, format=0x81fcb00 mime_magic: can't read magic file %s) at /home/koizumi/src/php.net/HEAD/php4/Zend/zend.c:711 #6 0x080b2206 in apprentice () at /home/koizumi/src/php.net/HEAD/php4/ext/mime_magic/mime_magic.c:348 #7 0x080b1f4e in zm_startup_mime_magic (type=1, module_number=9, tsrm_ls=0x8277f68) at /home/koizumi/src/php.net/HEAD/php4/ext/mime_magic/mime_magic.c:266 #8 0x0815a053 in zend_startup_module (module=0x82577a0) at /home/koizumi/src/php.net/HEAD/php4/Zend/zend_API.c:1008 #9 0x0812ec2b in php_startup_extensions (ptr=0x82621a0, count=15) at /home/koizumi/src/php.net/HEAD/php4/main/main.c:974 #10 0x08172732 in php_startup_internal_extensions () at main/internal_functions_cli.c:79 #11 0x0812f090 in php_module_startup (sf=0x8261f60, additional_modules=0x0, num_additional_modules=0) at /home/koizumi/src/php.net/HEAD/php4/main/main.c:1138 #12 0x08171955 in main (argc=1, argv=0xba94) at /home/koizumi/src/php.net/HEAD/php4/sapi/cli/php_cli.c:446 #13 0x40318507 in __libc_start_main (main=0x81717e8 main, argc=1, ubp_av=0xba94, init=0x80671f8 _init, fini=0x8172770 _fini, rtld_fini=0x4000dc14 _dl_fini, stack_end=0xba8c) at ../sysdeps/generic/libc-start.c:129 IMO php_error() should not be used in PHP_MINIT_FUNCTION. Any fix else? Moriyoshi Index: mime_magic.c === RCS file: /repository/php4/ext/mime_magic/mime_magic.c,v retrieving revision 1.14 diff -u -r1.14 mime_magic.c --- mime_magic.c15 Nov 2002 01:45:23 - 1.14 +++ mime_magic.c15 Nov 2002 11:51:31 - @@ -304,6 +304,11 @@ return; } + if ((int) conf-magic == -1) { +php_error(E_ERROR, MODNAME could not be initialized, magic file %s +is not avaliable, conf-magicfile); + RETURN_FALSE; + } + if(!conf-magic) { php_error(E_WARNING, MODNAME not initialized); RETURN_FALSE; @@ -343,10 +348,9 @@ magic_server_config_rec *conf = mime_global; fname = conf-magicfile; /* todo cwd? */ -f = fopen(fname, r); +f = fopen(fname, rt); if (f == NULL) { - php_error(E_WARNING, -MODNAME : can't read magic file %s, fname); + (int) conf-magic = -1; return -1; } -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Patch for bug #19566
Hmm, your patch is a bit less sexy because of replaced white spaces. Moriyoshi [EMAIL PROTECTED] (Marcus Börger) wrote: The following patch for bug #19566 is open but should make it into 4.3. cvs -z3 -q diff zend_hash.c (in directory S:\php4-HEAD\Zend\) Index: zend_hash.c === RCS file: /repository/ZendEngine2/zend_hash.c,v retrieving revision 1.93 diff -u -r1.93 zend_hash.c --- zend_hash.c 5 Nov 2002 18:22:02 - 1.93 +++ zend_hash.c 15 Nov 2002 10:49:12 - @@ -722,9 +722,9 @@ HASH_PROTECT_RECURSION(ht); - va_start(args, num_args); p = ht-pListHead; while (p != NULL) { + va_start(args, num_args); hash_key.arKey = p-arKey; hash_key.nKeyLength = p-nKeyLength; hash_key.h = p-h; @@ -733,8 +733,8 @@ } else { p = p-pListNext; } + va_end(args); } - va_end(args); HASH_UNPROTECT_RECURSION(ht); } -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] ZE2 dlsym stuff
Here is a patch that hopefully would merge all the dlsym stuff from ZE1. After this patch i no longer get a warning while configuring ZE2. marcus cvs -z3 -q diff Zend\configure.in Zend\Zend.m4 (in directory S:\php4-HEAD\) Index: Zend/configure.in === RCS file: /repository/ZendEngine2/configure.in,v retrieving revision 1.33 diff -u -r1.33 configure.in --- Zend/configure.in 7 Feb 2002 14:08:43 - 1.33 +++ Zend/configure.in 15 Nov 2002 12:07:28 - -17,6 +17,8 sinclude(Zend.m4) LIBZEND_BASIC_CHECKS +LIBZEND_LIBDL_CHECKS +LIBZEND_DLSYM_CHECK AM_PROG_LIBTOOL if test $enable_debug != yes; then Index: Zend/Zend.m4 === RCS file: /repository/ZendEngine2/Zend.m4,v retrieving revision 1.35 diff -u -r1.35 Zend.m4 --- Zend/Zend.m423 Aug 2002 22:11:10 - 1.35 +++ Zend/Zend.m415 Nov 2002 12:07:28 - -57,9 +57,12 AC_TYPE_SIZE_T AC_TYPE_SIGNAL +AC_DEFUN(LIBZEND_LIBDL_CHECKS,[ AC_CHECK_LIB(dl, dlopen, [LIBS=-ldl $LIBS]) AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])]) +]) +AC_DEFUN(LIBZEND_DLSYM_CHECK,[ dnl dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name. dnl -72,6 +75,9 ], [ AC_MSG_RESULT(no) ], []) +]) + + dnl This is required for QNX and may be some BSD derived systems AC_CHECK_TYPE( uint, unsigned int )
[PHP-DEV] Test report
http://www.alkoholbedarf.de/kram/test_report_tru64.zip Regards, Sebastian Nohn -- [EMAIL PROTECTED] - http://www.nohn.net/ PGP Key Available - Did I help you? Consider a gift: http://www.amazon.de/exec/obidos/wishlist/3HYH6NR8ZI0WI/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Patch for bug #19566
Wasn't this commited a while ago? Andi At 11:58 AM 11/15/2002 +0100, Marcus Börger wrote: The following patch for bug #19566 is open but should make it into 4.3. cvs -z3 -q diff zend_hash.c (in directory S:\php4-HEAD\Zend\) Index: zend_hash.c === RCS file: /repository/ZendEngine2/zend_hash.c,v retrieving revision 1.93 diff -u -r1.93 zend_hash.c --- zend_hash.c 5 Nov 2002 18:22:02 - 1.93 +++ zend_hash.c 15 Nov 2002 10:49:12 - -722,9 +722,9 HASH_PROTECT_RECURSION(ht); - va_start(args, num_args); p = ht-pListHead; while (p != NULL) { + va_start(args, num_args); hash_key.arKey = p-arKey; hash_key.nKeyLength = p-nKeyLength; hash_key.h = p-h; -733,8 +733,8 } else { p = p-pListNext; } + va_end(args); } - va_end(args); HASH_UNPROTECT_RECURSION(ht); } -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Help on SAPI and TSRM ?
Hi there, I'm trying to write a C++ Wrapper, so it's possible for me to execute PHP code from my own C++ programms. I used the CLI-SAPI (php4/sapi/cli/...) as a template for my C++ Wrapper. This works fine if the calling application is a single process but I run into trouble if I call PHP (run PHP code) from threads. Could anybody give a quick overview on TSRM or tell me where to find some documentation (I couldn't find any) ? I'm especially interested in : How to call PHP from threads and how to access the result of the PHP run from different threads ? Thanks ! -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZE2 dlsym stuff
Can you please send the diff as an attachment? I'll apply it. Thanks, Andi At 01:13 PM 11/15/2002 +0100, Marcus Börger wrote: Here is a patch that hopefully would merge all the dlsym stuff from ZE1. After this patch i no longer get a warning while configuring ZE2. marcus cvs -z3 -q diff Zend\configure.in Zend\Zend.m4 (in directory S:\php4-HEAD\) Index: Zend/configure.in === RCS file: /repository/ZendEngine2/configure.in,v retrieving revision 1.33 diff -u -r1.33 configure.in --- Zend/configure.in 7 Feb 2002 14:08:43 - 1.33 +++ Zend/configure.in 15 Nov 2002 12:07:28 - -17,6 +17,8 sinclude(Zend.m4) LIBZEND_BASIC_CHECKS +LIBZEND_LIBDL_CHECKS +LIBZEND_DLSYM_CHECK AM_PROG_LIBTOOL if test $enable_debug != yes; then Index: Zend/Zend.m4 === RCS file: /repository/ZendEngine2/Zend.m4,v retrieving revision 1.35 diff -u -r1.35 Zend.m4 --- Zend/Zend.m423 Aug 2002 22:11:10 - 1.35 +++ Zend/Zend.m415 Nov 2002 12:07:28 - -57,9 +57,12 AC_TYPE_SIZE_T AC_TYPE_SIGNAL +AC_DEFUN(LIBZEND_LIBDL_CHECKS,[ AC_CHECK_LIB(dl, dlopen, [LIBS=-ldl $LIBS]) AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])]) +]) +AC_DEFUN(LIBZEND_DLSYM_CHECK,[ dnl dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name. dnl -72,6 +75,9 ], [ AC_MSG_RESULT(no) ], []) +]) + + dnl This is required for QNX and may be some BSD derived systems AC_CHECK_TYPE( uint, unsigned int ) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] mime_magic segfaults
Why was rb changed to rt? Ilia On November 15, 2002 06:58 am, Moriyoshi Koizumi wrote: Thanks, it works. Attacthed is a slightly modified version of Ilia's patch in consideration of win32 build. If there are no objections, I'll commit it. Moriyoshi Ilia A. [EMAIL PROTECTED] wrote: Could you try the attached patch and see if it fixes the problem. Ilia On November 14, 2002 03:10 pm, Moriyoshi Koizumi wrote: Hi, I found a bug in mime_magic. If the module fails to read the magic file specified by mime_magic.magicfile during the module initialisation, it tries to put an error, and then segfaults. Here's the backtrace. #0 0x0813402b in sapi_send_headers (tsrm_ls=0x8277f68) at /home/koizumi/src/php.net/HEAD/php4/main/SAPI.c:673 #1 0x080e5ce2 in php_header () at /home/koizumi/src/php.net/HEAD/php4/ext/standard/head.c:62 #2 0x08171433 in sapi_cli_log_message ( message=0x82a5c74 PHP Warning: mime_magic: can't read magic file .ext/mime _magic/tests/magic.test.1 in Unknown on line 0) at /home/koizumi/src/php.net/HEAD/php4/sapi/cli/php_cli.c:174 #3 0x0812d639 in php_log_err ( log_message=0x82a5c74 PHP Warning: mime_magic: can't read magic file .ext/ mime_magic/tests/magic.test.1 in Unknown on line 0, tsrm_ls=0x8277f68) at /home/koizumi/src/php.net/HEAD/php4/main/main.c:360 #4 0x0812dc9a in php_error_cb (type=2, error_filename=0x8228eab Unknown, error_lineno=0, format=0x81fcb00 mime_magic: can't read magic file %s, args=0xbfffd7b8) at /home/koizumi/src/php.net/HEAD/php4/main/main.c:600 #5 0x081581d9 in zend_error (type=2, format=0x81fcb00 mime_magic: can't read magic file %s) at /home/koizumi/src/php.net/HEAD/php4/Zend/zend.c:711 #6 0x080b2206 in apprentice () at /home/koizumi/src/php.net/HEAD/php4/ext/mime_magic/mime_magic.c:348 #7 0x080b1f4e in zm_startup_mime_magic (type=1, module_number=9, tsrm_ls=0x8277f68) at /home/koizumi/src/php.net/HEAD/php4/ext/mime_magic/mime_magic.c:266 #8 0x0815a053 in zend_startup_module (module=0x82577a0) at /home/koizumi/src/php.net/HEAD/php4/Zend/zend_API.c:1008 #9 0x0812ec2b in php_startup_extensions (ptr=0x82621a0, count=15) at /home/koizumi/src/php.net/HEAD/php4/main/main.c:974 #10 0x08172732 in php_startup_internal_extensions () at main/internal_functions_cli.c:79 #11 0x0812f090 in php_module_startup (sf=0x8261f60, additional_modules=0x0, num_additional_modules=0) at /home/koizumi/src/php.net/HEAD/php4/main/main.c:1138 #12 0x08171955 in main (argc=1, argv=0xba94) at /home/koizumi/src/php.net/HEAD/php4/sapi/cli/php_cli.c:446 #13 0x40318507 in __libc_start_main (main=0x81717e8 main, argc=1, ubp_av=0xba94, init=0x80671f8 _init, fini=0x8172770 _fini, rtld_fini=0x4000dc14 _dl_fini, stack_end=0xba8c) at ../sysdeps/generic/libc-start.c:129 IMO php_error() should not be used in PHP_MINIT_FUNCTION. Any fix else? Moriyoshi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] mbstring and 4.3.0
On Fri, 15 Nov 2002, Andi Gutmans wrote: It's not that I think enabling it is such a bad idea but as we're going for PHP 5 right after PHP 4.3 anyway I don't think it's too bad to wait for that. I'm sure lots of people will test PHP 5 RC's so there'll be lots of testing (long sentence but I hope it can be understood :) I think we will still have 4.4.0 before PHP 5. The timeframe between 4.3.0 and 5 is just too large not to have another release. -Andrei http://www.gravitonic.com/ Everything should be made as simple as possible, but not simpler. -- Albert Einstein -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Test report
You need to update again to get exif test fixed. I'll check into getimagesize() The microtime() fails often but your result seems like there is a 64bit problem. marcus At 14:49 15.11.2002, Sebastian Nohn wrote: http://www.alkoholbedarf.de/kram/test_report_tru64.zip Regards, Sebastian Nohn -- [EMAIL PROTECTED] - http://www.nohn.net/ PGP Key Available - Did I help you? Consider a gift: http://www.amazon.de/exec/obidos/wishlist/3HYH6NR8ZI0WI/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Patch for bug #19566
No, it's not committed yet. Both Marcus and me doesn't have access to Zend module. Moriyoshi Andi Gutmans [EMAIL PROTECTED] wrote: Wasn't this commited a while ago? Andi At 11:58 AM 11/15/2002 +0100, Marcus Börger wrote: The following patch for bug #19566 is open but should make it into 4.3. cvs -z3 -q diff zend_hash.c (in directory S:\php4-HEAD\Zend\) Index: zend_hash.c === RCS file: /repository/ZendEngine2/zend_hash.c,v retrieving revision 1.93 diff -u -r1.93 zend_hash.c --- zend_hash.c 5 Nov 2002 18:22:02 - 1.93 +++ zend_hash.c 15 Nov 2002 10:49:12 - @@ -722,9 +722,9 @@ HASH_PROTECT_RECURSION(ht); - va_start(args, num_args); p = ht-pListHead; while (p != NULL) { + va_start(args, num_args); hash_key.arKey = p-arKey; hash_key.nKeyLength = p-nKeyLength; hash_key.h = p-h; @@ -733,8 +733,8 @@ } else { p = p-pListNext; } + va_end(args); } - va_end(args); HASH_UNPROTECT_RECURSION(ht); } -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] mbstring and 4.3.0
At 11:14 PM 11/14/2002 -0500, Andrei Zmievski wrote: On Fri, 15 Nov 2002, Andi Gutmans wrote: It's not that I think enabling it is such a bad idea but as we're going for PHP 5 right after PHP 4.3 anyway I don't think it's too bad to wait for that. I'm sure lots of people will test PHP 5 RC's so there'll be lots of testing (long sentence but I hope it can be understood :) I think we will still have 4.4.0 before PHP 5. The timeframe between 4.3.0 and 5 is just too large not to have another release. Hmm, no matter when we create a PHP 5 CVS the timeframe will be too large. That's OK. I don't see a problem with having a 4.4.0 if it's needed but that doesn't mean I think work on PHP 5 should start right after 4.3.0. Preferably we'd stick to 4.3.x though. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Patch for bug #19566
Commited. Andi At 11:22 PM 11/15/2002 +0900, Moriyoshi Koizumi wrote: No, it's not committed yet. Both Marcus and me doesn't have access to Zend module. Moriyoshi Andi Gutmans [EMAIL PROTECTED] wrote: Wasn't this commited a while ago? Andi At 11:58 AM 11/15/2002 +0100, Marcus Börger wrote: The following patch for bug #19566 is open but should make it into 4.3. cvs -z3 -q diff zend_hash.c (in directory S:\php4-HEAD\Zend\) Index: zend_hash.c === RCS file: /repository/ZendEngine2/zend_hash.c,v retrieving revision 1.93 diff -u -r1.93 zend_hash.c --- zend_hash.c 5 Nov 2002 18:22:02 - 1.93 +++ zend_hash.c 15 Nov 2002 10:49:12 - @@ -722,9 +722,9 @@ HASH_PROTECT_RECURSION(ht); - va_start(args, num_args); p = ht-pListHead; while (p != NULL) { + va_start(args, num_args); hash_key.arKey = p-arKey; hash_key.nKeyLength = p-nKeyLength; hash_key.h = p-h; @@ -733,8 +733,8 @@ } else { p = p-pListNext; } + va_end(args); } - va_end(args); HASH_UNPROTECT_RECURSION(ht); } -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZE2 dlsym stuff
Never mind I did it manually. Andi At 03:57 PM 11/15/2002 +0200, Andi Gutmans wrote: Can you please send the diff as an attachment? I'll apply it. Thanks, Andi At 01:13 PM 11/15/2002 +0100, Marcus Börger wrote: Here is a patch that hopefully would merge all the dlsym stuff from ZE1. After this patch i no longer get a warning while configuring ZE2. marcus cvs -z3 -q diff Zend\configure.in Zend\Zend.m4 (in directory S:\php4-HEAD\) Index: Zend/configure.in === RCS file: /repository/ZendEngine2/configure.in,v retrieving revision 1.33 diff -u -r1.33 configure.in --- Zend/configure.in 7 Feb 2002 14:08:43 - 1.33 +++ Zend/configure.in 15 Nov 2002 12:07:28 - -17,6 +17,8 sinclude(Zend.m4) LIBZEND_BASIC_CHECKS +LIBZEND_LIBDL_CHECKS +LIBZEND_DLSYM_CHECK AM_PROG_LIBTOOL if test $enable_debug != yes; then Index: Zend/Zend.m4 === RCS file: /repository/ZendEngine2/Zend.m4,v retrieving revision 1.35 diff -u -r1.35 Zend.m4 --- Zend/Zend.m423 Aug 2002 22:11:10 - 1.35 +++ Zend/Zend.m415 Nov 2002 12:07:28 - -57,9 +57,12 AC_TYPE_SIZE_T AC_TYPE_SIGNAL +AC_DEFUN(LIBZEND_LIBDL_CHECKS,[ AC_CHECK_LIB(dl, dlopen, [LIBS=-ldl $LIBS]) AC_CHECK_FUNC(dlopen,[AC_DEFINE(HAVE_LIBDL, 1,[ ])]) +]) +AC_DEFUN(LIBZEND_DLSYM_CHECK,[ dnl dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name. dnl -72,6 +75,9 ], [ AC_MSG_RESULT(no) ], []) +]) + + dnl This is required for QNX and may be some BSD derived systems AC_CHECK_TYPE( uint, unsigned int ) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Patch for bug #19566
Thanks. Could you merge the patch into ZE1 also? Moriyoshi Andi Gutmans [EMAIL PROTECTED] wrote: Commited. Andi At 11:22 PM 11/15/2002 +0900, Moriyoshi Koizumi wrote: No, it's not committed yet. Both Marcus and me doesn't have access to Zend module. Moriyoshi Andi Gutmans [EMAIL PROTECTED] wrote: Wasn't this commited a while ago? Andi At 11:58 AM 11/15/2002 +0100, Marcus Börger wrote: The following patch for bug #19566 is open but should make it into 4.3. cvs -z3 -q diff zend_hash.c (in directory S:\php4-HEAD\Zend\) Index: zend_hash.c === RCS file: /repository/ZendEngine2/zend_hash.c,v retrieving revision 1.93 diff -u -r1.93 zend_hash.c --- zend_hash.c 5 Nov 2002 18:22:02 - 1.93 +++ zend_hash.c 15 Nov 2002 10:49:12 - @@ -722,9 +722,9 @@ HASH_PROTECT_RECURSION(ht); - va_start(args, num_args); p = ht-pListHead; while (p != NULL) { + va_start(args, num_args); hash_key.arKey = p-arKey; hash_key.nKeyLength = p-nKeyLength; hash_key.h = p-h; @@ -733,8 +733,8 @@ } else { p = p-pListNext; } + va_end(args); } - va_end(args); HASH_UNPROTECT_RECURSION(ht); } -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Test report
At 15:17 15.11.2002, Marcus Börger wrote: You need to update again to get exif test fixed. I'll check into getimagesize() Could you try the following patch: cvs -z3 -q diff image.c (in directory S:\php4-HEAD\ext\standard) Index: image.c === RCS file: /repository/php4/ext/standard/image.c,v retrieving revision 1.72 diff -u -r1.72 image.c --- image.c 12 Nov 2002 16:14:18 - 1.72 +++ image.c 15 Nov 2002 14:36:21 - @@ -167,7 +167,7 @@ char temp[15]; struct { - unsigned long in_width, in_height; + unsigned int in_width, in_height; unsigned short trash, bits; } dim; The microtime() fails often but your result seems like there is a 64bit problem. marcus At 14:49 15.11.2002, Sebastian Nohn wrote: http://www.alkoholbedarf.de/kram/test_report_tru64.zip Regards, Sebastian Nohn -- [EMAIL PROTECTED] - http://www.nohn.net/ PGP Key Available - Did I help you? Consider a gift: http://www.amazon.de/exec/obidos/wishlist/3HYH6NR8ZI0WI/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Test report
Please also update ext/standard/tests/time/001.phpt to shorten your testresult by some 10thousand lines. marcus At 15:38 15.11.2002, you wrote: At 15:17 15.11.2002, Marcus Börger wrote: You need to update again to get exif test fixed. I'll check into getimagesize() Could you try the following patch: cvs -z3 -q diff image.c (in directory S:\php4-HEAD\ext\standard) Index: image.c === RCS file: /repository/php4/ext/standard/image.c,v retrieving revision 1.72 diff -u -r1.72 image.c --- image.c 12 Nov 2002 16:14:18 - 1.72 +++ image.c 15 Nov 2002 14:36:21 - @@ -167,7 +167,7 @@ char temp[15]; struct { - unsigned long in_width, in_height; + unsigned int in_width, in_height; unsigned short trash, bits; } dim; The microtime() fails often but your result seems like there is a 64bit problem. marcus At 14:49 15.11.2002, Sebastian Nohn wrote: http://www.alkoholbedarf.de/kram/test_report_tru64.zip Regards, Sebastian Nohn -- [EMAIL PROTECTED] - http://www.nohn.net/ PGP Key Available - Did I help you? Consider a gift: http://www.amazon.de/exec/obidos/wishlist/3HYH6NR8ZI0WI/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] LCC compiler
Hey, Has anyone managed to get php to compile with lcc? It compiles much faster and therefore is good for development. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] show_source()
On Fri, Nov 15, 2002 at 03:11:10AM -0500, John Coggeshall wrote: 1) I notice that there seems to be a T_LINE token, which should be the linenumber? However, this never seems To even come up in the lexer from the zend_highlight() function... T_LINE is the token for the '__LINE__' constant. The current line number is stored in zend_lineno (e.g. CG(zend_lineno)). -- Jon Parise ([EMAIL PROTECTED]) :: The PHP Project (http://www.php.net/) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Test report
-Original Message- From: Marcus Börger [mailto:marcus.boerger;t-online.de] Sent: Friday, November 15, 2002 3:39 PM To: Sebastian Nohn Cc: PHP Developers Mailing List Subject: Re: [PHP-DEV] Test report At 15:17 15.11.2002, Marcus Börger wrote: You need to update again to get exif test fixed. I'll check into getimagesize() Could you try the following patch: I can do it by monday. I see these bugs much more critical: Test arsort, asort, krsort, ksort, rsort, and sort [ext/standard/tests/array/002.phpt] Test usort, uksort and uasort [ext/standard/tests/array/003.phpt] Reporting this on bugs.php.net and marking it as critical Regards, Sebastian Nohn -- [EMAIL PROTECTED] - http://www.nohn.net/ PGP Key Available - Did I help you? Consider a gift: http://www.amazon.de/exec/obidos/wishlist/3HYH6NR8ZI0WI/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Test report
Sure but ob those i cannot help you now. marcus At 17:38 15.11.2002, Sebastian Nohn wrote: -Original Message- From: Marcus Börger [mailto:marcus.boerger;t-online.de] Sent: Friday, November 15, 2002 3:39 PM To: Sebastian Nohn Cc: PHP Developers Mailing List Subject: Re: [PHP-DEV] Test report At 15:17 15.11.2002, Marcus Börger wrote: You need to update again to get exif test fixed. I'll check into getimagesize() Could you try the following patch: I can do it by monday. I see these bugs much more critical: Test arsort, asort, krsort, ksort, rsort, and sort [ext/standard/tests/array/002.phpt] Test usort, uksort and uasort [ext/standard/tests/array/003.phpt] Reporting this on bugs.php.net and marking it as critical Regards, Sebastian Nohn -- [EMAIL PROTECTED] - http://www.nohn.net/ PGP Key Available - Did I help you? Consider a gift: http://www.amazon.de/exec/obidos/wishlist/3HYH6NR8ZI0WI/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] PHP and Threading
Hi, I was wondering, is PHP in future going to support threading? This would be a very nice feature. I'am currently working on this project of mine, a FTP Server build in PHP which serve MySQL database records. It actually does work very nice, also multiple clients at the same time. It supports passive and active FTP. But my problem here is that the FTP server only can handle one file transfer at a time. Threading would be the solution. Are there any plans implementing it? Cheers, Arjen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP and Threading
Nope, that is unlikely to happen. The way to do this correctly is with a socket_select() anyway. -Rasmus On Thu, 14 Nov 2002, Arjen Brouwer wrote: Hi, I was wondering, is PHP in future going to support threading? This would be a very nice feature. I'am currently working on this project of mine, a FTP Server build in PHP which serve MySQL database records. It actually does work very nice, also multiple clients at the same time. It supports passive and active FTP. But my problem here is that the FTP server only can handle one file transfer at a time. Threading would be the solution. Are there any plans implementing it? Cheers, Arjen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] PHP and threading?
Hi, I was wondering, is PHP in future going to support threading? This would be a very nice feature. I'am currently working on this project of mine, a FTP Server build in PHP which serve MySQL database records. It actually does work very nice, also multiple clients at the same time. It supports passive and active FTP. But my problem here is that the FTP server only can handle one file transfer at a time. I thought of doing something with ticks. So threading would be a very nice feature! Are there plans implementing it? Cheers, Arjen
Re: [PHP-DEV] Sybase_ct and tli lib
I have a little more info to add. Our DBA opened a question to Sybase Tech support and received the following reply: The tli library was the Sybase network driver on Solaris. Since we had customers facing CR 186487, which arose from Sun Bug 1218173, a request for an interrupt-safe malloc() that Sun had decided not to fix, Sybase switched to the socket based driver, libinsck, on Solaris with OC 12.0 and EBF #4. It is possible that some component in your environment uses this tli library or a libtcl from a version of 12.0 netlib (libtcl) that used to look for libtli.so. When you start as 'root' maybe it picks up a different version and/or uses different environment variables that control the load library path. Nevertheless, from what this sounds there is definitely some sort of mismatch between the version used to build the webserver and the version currently in the load library path. I agree with his assessment that somehow, our root user is getting a different run path, but frankly I can't find it. Anyway, it seems that there is a sizeable amount of evidense that libtli should be linked on all Solaris builds if its present. Which agrees with most of my experience. Hope this helps. Brian Brian Foddy wrote: Timm Friebe wrote: On Wed, 2002-11-13 at 18:03, Brian Foddy wrote: Timm, I've seen it used for 10 years on Solaris, and I spent about a year working on Irix and Informix, and there were some references to it there also. strings libtli.so | grep ^Sybase Sybase TCP/IP TLI Library/12.0/P/SPARC/Solaris 2.5.1/1/OPT/Sat Sep 25 21:07:40 1999 Sybase, Inc. All rights reserved. Sybase, Inc. 6475 Christie Avenue, Emeryville, CA 94608, USA OK, so it should probably be added for those systems. A line like this should be added to config.m4 (wrapped for readability), could you provide the second parameter here: PHP_CHECK_LIBRARY( tli, ---???---, [PHP_ADD_LIBRARY(tli,,SYBASE_CT_SHARED_LIBADD)], [], [-L$SYBASE_CT_LIBDIR] ) or is maybe the pure existance of this file enough: I'm not familiar with what the second arg of this macro does. In our environment, which I've work on Solaris/Sybase for 10 yrs, we always include it by default. thekidfriebes:~/devel/php/php4 cvs diff ext/sybase_ct/config.m4 Index: ext/sybase_ct/config.m4 === RCS file: /repository/php4/ext/sybase_ct/config.m4,v retrieving revision 1.11 diff -u -r1.11 config.m4 --- ext/sybase_ct/config.m4 12 Mar 2002 16:36:30 - 1.11 +++ ext/sybase_ct/config.m4 14 Nov 2002 12:07:33 - -44,7 +44,11 ],[ $SYBASE_CT_LIBS ]) - + +if test -f $SYBASE_CT_LIBDIR/libtli.so ; then + PHP_ADD_LIBRARY(tli,, SYBASE_CT_SHARED_LIBADD) + SYBASE_CT_LIBS=$SYBASE_CT_LIBS -ltli +fi This looks fine. I still wish I knew why it seems to work with root permissions, and not with sudo; and in general knew more about this bugger. Maybe I'll just ask our Sybase DBA to open a case with Sybase and get the official answer. If I hear more, I'll pass it along. Thanks, Brian -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP and Threading
I was wondering, is PHP in future going to support threading? This would be a very nice feature. I'am currently working on this project of mine, a FTP Server build in PHP which serve MySQL database records. It actually does work very nice, also multiple clients at the same time. It supports passive and active FTP. But my problem here is that the FTP server only can handle one file transfer at a time. Threading would be the solution. Are there any plans implementing it? Take a look at the process control functions. (I only recently noticed them myself). http://www.php.net/manual/en/ref.pcntl.php It sounds like you need to fork on an accepted connection. Leon -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] PHP and Threading
Hi, I was wondering, is PHP in future going to support threading? This would be a very nice feature. I'am currently working on this project of mine, a FTP Server build in PHP which serve MySQL database records. It actually does work very nice, also multiple clients at the same time. It supports passive and active FTP. But my problem here is that the FTP server only can handle one file transfer at a time. Threading would be the solution. Are there any plans implementing it? Cheers, Arjen
[PHP-DEV] Re: #20443 [Opn-Fbk]: Jpeg colors change
Due to ISP limitations, CVS is not an option. Where exactly does the bug reside? Does any one know of a work-around? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.408 / Virus Database: 230 - Release Date: 10/24/2002 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZEND_ADD_STRING patch
George Schlossnagle wrote: I'm a tool. I sent the wrong patch to the list. Thanks to Andrei for pointing it out. Here is the _right_ patch (finally). diff -u -3 -r1.53 zend_language_scanner.l --- zend_language_scanner.l8 Nov 2002 13:40:54 -1.53 +++ zend_language_scanner.l15 Nov 2002 20:20:33 - -37,6 +37,7 %x ST_BACKQUOTE %x ST_HEREDOC %x ST_LOOKING_FOR_PROPERTY +%x ST_EXPECTING_OBJECT %x ST_LOOKING_FOR_VARNAME %x ST_COMMENT %x ST_ONE_LINE_COMMENT -692,6 +693,7 HNUM0x[0-9a-fA-F]+ LABEL[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* WHITESPACE [ \n\r\t]+ +LABEL_OR_WHITESPACE [a-zA-Z0-9_\x7f-\xff \t\n\r #'.:;,()|^+-/*=%!~?]+ TABS_AND_SPACES [ \t]* TOKENS [;:,.\[\]()|^+-/*=%!~$?] ENCAPSED_TOKENS [\[\]{}$] -823,13 +825,25 return T_EXTENDS; } -ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC- { +ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC${LABEL}-{LABEL} { +yy_push_state(ST_EXPECTING_OBJECT TSRMLS_CC); +yyless(0); +} + + +ST_IN_SCRIPTING,ST_EXPECTING_OBJECT- { yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC); return T_OBJECT_OPERATOR; } ST_LOOKING_FOR_PROPERTY{LABEL} { -yy_pop_state(TSRMLS_C); +if(yy_top_state(TSRMLS_C) == ST_EXPECTING_OBJECT) { +yy_pop_state(TSRMLS_C); +yy_pop_state(TSRMLS_C); +} +else { +yy_pop_state(TSRMLS_C); +} zend_copy_value(zendlval, yytext, yyleng); zendlval-value.str.len = yyleng; zendlval-type = IS_STRING; -1265,7 +1279,7 return T_INLINE_HTML; } -ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE${LABEL} { +ST_EXPECTING_OBJECT,ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE${LABEL} { zend_copy_value(zendlval, (yytext+1), (yyleng-1)); zendlval-type = IS_STRING; return T_VARIABLE; -1278,13 +1292,26 return T_STRING; } - -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{LABEL} { +ST_DOUBLE_QUOTES,ST_BACKQUOTE{LABEL_OR_WHITESPACE} { +HANDLE_NEWLINES(yytext, yyleng); zend_copy_value(zendlval, yytext, yyleng); zendlval-type = IS_STRING; return T_STRING; } +ST_HEREDOC{LABEL} { +zend_copy_value(zendlval, yytext, yyleng); +zendlval-type = IS_STRING; +return T_STRING; +} + +ST_HEREDOC{ESCAPED_AND_WHITESPACE} { +HANDLE_NEWLINES(yytext, yyleng); +zendlval-value.str.val = (char *) estrndup(yytext, yyleng); +zendlval-value.str.len = yyleng; +zendlval-type = IS_STRING; +return T_ENCAPSED_AND_WHITESPACE; +} ST_IN_SCRIPTING{WHITESPACE} { zendlval-value.str.val = yytext; /* no copying - intentional */ -1581,14 +1608,6 } } - -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{ESCAPED_AND_WHITESPACE} { -HANDLE_NEWLINES(yytext, yyleng); -zendlval-value.str.val = (char *) estrndup(yytext, yyleng); -zendlval-value.str.len = yyleng; -zendlval-type = IS_STRING; -return T_ENCAPSED_AND_WHITESPACE; -} ST_SINGLE_QUOTE([^'\\]|\\[^'\\])+ { HANDLE_NEWLINES(yytext, yyleng); -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Sybase_ct and tli lib
On Fri, 2002-11-15 at 19:15, Brian Foddy wrote: I have a little more info to add. Our DBA opened a question to Sybase Tech support and received the following reply: [...Explanation from Sybase...] I agree with his assessment that somehow, our root user is getting a different run path, but frankly I can't find it. Have you tried to strace httpd (strace -f httpd, or any of the apache childs running mod_php w/ sybase?) This should show you which libraries are used. -- Timm Any sufficiently advanced bug is indistinguishable from a feature -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] LCC compiler
Cool, I will have to try that. Thanks!! -Jason On Fri, 2002-11-15 at 09:11, Andi Gutmans wrote: Hey, Has anyone managed to get php to compile with lcc? It compiles much faster and therefore is good for development. Andi -- Jason T. Greene [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] LCC compiler
Very cool for development but there are a few files which don't quite compile. I was hoping someone's already played around with it. Andi At 04:39 PM 11/15/2002 -0600, Jason T. Greene wrote: Cool, I will have to try that. Thanks!! -Jason On Fri, 2002-11-15 at 09:11, Andi Gutmans wrote: Hey, Has anyone managed to get php to compile with lcc? It compiles much faster and therefore is good for development. Andi -- Jason T. Greene [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Bug #20377
Hello, What do you think of that? Davey propose to have : open_basedir session.save_path upload_tmp_dir PHP_INI_SYSTEM|PHP_INI_PERDIR. Regards. M.CHAILLAN [EMAIL PROTECTED] Hébergement de sites internets. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZEND_ADD_STRING patch
Hey, I think this patch makes the scanner much more complicated to understand. I have an idea of a patch which would make it much cleaner although under very certain cases might be a tad bit less optimized when it comes to the amount of tokens but it'd save all of the yyless() and push_stacks which are also not the fastest. I suggest changing the LABEL_OR_WHITESPACE (the name you gave it isn't too good so I'd change that too :) Change it to something like: LABEL_OR_WHITESPACE ([a-zA-Z0-9_\x7f-\xff \t\n\r #'.:;,()|^+/*=%!~?] | - | -[^])+ (I removed the - and and added possibilities of mixing them in all ways except for -) This is a very small change and much much cleaner. The only case which wouldn't be optimized is if you have -foo in your encapsed strings which doesn't happen too often and the speed difference would be negligible and we'd get 99% gain and a much cleaner scanner without rescanning input which is also slower (yyless()) and less state pushing. Try it out and let me know how the results are. Also *please* send diffs also as attachments so that when people apply them we won't get bad whitespace in our sources. Thanks! Andi At 03:23 PM 11/15/2002 -0500, George Schlossnagle wrote: George Schlossnagle wrote: I'm a tool. I sent the wrong patch to the list. Thanks to Andrei for pointing it out. Here is the _right_ patch (finally). diff -u -3 -r1.53 zend_language_scanner.l --- zend_language_scanner.l8 Nov 2002 13:40:54 -1.53 +++ zend_language_scanner.l15 Nov 2002 20:20:33 - -37,6 +37,7 %x ST_BACKQUOTE %x ST_HEREDOC %x ST_LOOKING_FOR_PROPERTY +%x ST_EXPECTING_OBJECT %x ST_LOOKING_FOR_VARNAME %x ST_COMMENT %x ST_ONE_LINE_COMMENT -692,6 +693,7 HNUM0x[0-9a-fA-F]+ LABEL[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* WHITESPACE [ \n\r\t]+ +LABEL_OR_WHITESPACE [a-zA-Z0-9_\x7f-\xff \t\n\r #'.:;,()|^+-/*=%!~?]+ TABS_AND_SPACES [ \t]* TOKENS [;:,.\[\]()|^+-/*=%!~$?] ENCAPSED_TOKENS [\[\]{}$] -823,13 +825,25 return T_EXTENDS; } -ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC- { +ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC${LABEL}-{LABEL} { +yy_push_state(ST_EXPECTING_OBJECT TSRMLS_CC); +yyless(0); +} + + +ST_IN_SCRIPTING,ST_EXPECTING_OBJECT- { yy_push_state(ST_LOOKING_FOR_PROPERTY TSRMLS_CC); return T_OBJECT_OPERATOR; } ST_LOOKING_FOR_PROPERTY{LABEL} { -yy_pop_state(TSRMLS_C); +if(yy_top_state(TSRMLS_C) == ST_EXPECTING_OBJECT) { +yy_pop_state(TSRMLS_C); +yy_pop_state(TSRMLS_C); +} +else { +yy_pop_state(TSRMLS_C); +} zend_copy_value(zendlval, yytext, yyleng); zendlval-value.str.len = yyleng; zendlval-type = IS_STRING; -1265,7 +1279,7 return T_INLINE_HTML; } -ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE${LABEL} { +ST_EXPECTING_OBJECT,ST_IN_SCRIPTING,ST_DOUBLE_QUOTES,ST_HEREDOC,ST_BACKQUOTE${LABEL} { zend_copy_value(zendlval, (yytext+1), (yyleng-1)); zendlval-type = IS_STRING; return T_VARIABLE; -1278,13 +1292,26 return T_STRING; } - -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{LABEL} { +ST_DOUBLE_QUOTES,ST_BACKQUOTE{LABEL_OR_WHITESPACE} { +HANDLE_NEWLINES(yytext, yyleng); zend_copy_value(zendlval, yytext, yyleng); zendlval-type = IS_STRING; return T_STRING; } +ST_HEREDOC{LABEL} { +zend_copy_value(zendlval, yytext, yyleng); +zendlval-type = IS_STRING; +return T_STRING; +} + +ST_HEREDOC{ESCAPED_AND_WHITESPACE} { +HANDLE_NEWLINES(yytext, yyleng); +zendlval-value.str.val = (char *) estrndup(yytext, yyleng); +zendlval-value.str.len = yyleng; +zendlval-type = IS_STRING; +return T_ENCAPSED_AND_WHITESPACE; +} ST_IN_SCRIPTING{WHITESPACE} { zendlval-value.str.val = yytext; /* no copying - intentional */ -1581,14 +1608,6 } } - -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{ESCAPED_AND_WHITESPACE} { -HANDLE_NEWLINES(yytext, yyleng); -zendlval-value.str.val = (char *) estrndup(yytext, yyleng); -zendlval-value.str.len = yyleng; -zendlval-type = IS_STRING; -return T_ENCAPSED_AND_WHITESPACE; -} ST_SINGLE_QUOTE([^'\\]|\\[^'\\])+ { HANDLE_NEWLINES(yytext, yyleng); -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZEND_ADD_STRING patch
Andi Gutmans wrote: Try it out and let me know how the results are. Also *please* send diffs also as attachments so that when people apply them we won't get bad whitespace in our sources. php-dev seems to eat my attachments -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZEND_ADD_STRING patch
I propose something like the following: (not tested) It's definitely a sexier patch :) Andi RCS file: /repository/ZendEngine2/zend_language_scanner.l,v retrieving revision 1.62 diff -u -u -r1.62 zend_language_scanner.l --- zend_language_scanner.l 5 Nov 2002 22:01:35 - 1.62 +++ zend_language_scanner.l 15 Nov 2002 23:22:34 - -474,6 +474,7 EXPONENT_DNUM (({LNUM}|{DNUM})[eE][+-]?{LNUM}) HNUM 0x[0-9a-fA-F]+ LABEL [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* +ENCAPSED_STRING ([a-zA-Z0-9_\x7f-\xff \t\n\r #'.:;,()|^+/*=%!~?]|-[^])+ WHITESPACE [ \n\r\t]+ TABS_AND_SPACES [ \t]* TOKENS [;:,.\[\]()|^+-/*=%!~$?] -1076,6 +1077,12 return T_VARIABLE; } +ST_DOUBLE_QUOTES,ST_BACKQUOTE{ENCAPSED_STRING} { + zendlval-value.str.val = (char *)estrndup(yytext, yyleng); + zendlval-value.str.len = yyleng; + zendlval-type = IS_STRING; + return T_STRING; +} ST_IN_SCRIPTING{LABEL} { zendlval-value.str.val = (char *)estrndup(yytext, yyleng); -1085,7 +1092,7 } -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{LABEL} { +ST_HEREDOC{LABEL} { zendlval-value.str.val = (char *)estrndup(yytext, yyleng); zendlval-value.str.len = yyleng; zendlval-type = IS_STRING; -1374,7 +1381,7 } -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{ESCAPED_AND_WHITESPACE} { +ST_HEREDOC{ESCAPED_AND_WHITESPACE} { HANDLE_NEWLINES(yytext, yyleng); zendlval-value.str.val = (char *) estrndup(yytext, yyleng); zendlval-value.str.len = yyleng; Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZEND_ADD_STRING patch
At 06:23 PM 11/15/2002 -0500, George Schlossnagle wrote: Andi Gutmans wrote: Try it out and let me know how the results are. Also *please* send diffs also as attachments so that when people apply them we won't get bad whitespace in our sources. php-dev seems to eat my attachments Maybe you should try pine or mutt. They usually work. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Bug #20377
That's what I think too so should we close this bug? M.CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com Hébergement de sites internets. - Original Message - From: Derick Rethans [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, November 16, 2002 12:47 AM Subject: Re: [PHP-DEV] Bug #20377 On Fri, 15 Nov 2002 [EMAIL PROTECTED] wrote: Hello, What do you think of that? Davey propose to have : open_basedir session.save_path upload_tmp_dir PHP_INI_SYSTEM|PHP_INI_PERDIR. -1 on that. .htaccess also falls in the PERDIR class, and it's not a good idea to allow setting open_basedir and the other settings from this file especially for ISPs and stuff. Derick -- -- - Derick Rethans http://derickrethans.nl/ JDI Media Solutions --[ if you hold a unix shell to your ear, do you hear the c? ]- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] on the subject of overloading: __call()
was there discussion about the interaction of __call() and methods which declaring their arguments as references? there's no way at present to make this work, as far as i can tell. seems like it could just be a documented limitation, but i thought i'd check. related topic: in the current state of ze2, there are several ways to call methods directly that can't be emulated by call_user_func() - calling self::method() for instance, or the visibility of $this if you call class::method(). is that likely to stay true? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZEND_ADD_STRING patch
Much sexier indeed. There are some flaws with it: o Tokenizes heredocs on whitespace o Doesn't count lines correctly for debug (since strings now have newlines in them) Here's a revised patch to yours that fixes those (heredocs are tokenized on newlines - I think that is best case) Andi Gutmans wrote: I propose something like the following: (not tested) It's definitely a sexier patch :) Andi RCS file: /repository/ZendEngine2/zend_language_scanner.l,v retrieving revision 1.62 diff -u -u -r1.62 zend_language_scanner.l --- zend_language_scanner.l 5 Nov 2002 22:01:35 - 1.62 +++ zend_language_scanner.l 15 Nov 2002 23:22:34 - -474,6 +474,7 EXPONENT_DNUM (({LNUM}|{DNUM})[eE][+-]?{LNUM}) HNUM 0x[0-9a-fA-F]+ LABEL [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* +ENCAPSED_STRING ([a-zA-Z0-9_\x7f-\xff \t\n\r #'.:;,()|^+/*=%!~?]|-[^])+ WHITESPACE [ \n\r\t]+ TABS_AND_SPACES [ \t]* TOKENS [;:,.\[\]()|^+-/*=%!~$?] -1076,6 +1077,12 return T_VARIABLE; } +ST_DOUBLE_QUOTES,ST_BACKQUOTE{ENCAPSED_STRING} { + zendlval-value.str.val = (char *)estrndup(yytext, yyleng); + zendlval-value.str.len = yyleng; + zendlval-type = IS_STRING; + return T_STRING; +} ST_IN_SCRIPTING{LABEL} { zendlval-value.str.val = (char *)estrndup(yytext, yyleng); -1085,7 +1092,7 } -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{LABEL} { +ST_HEREDOC{LABEL} { zendlval-value.str.val = (char *)estrndup(yytext, yyleng); zendlval-value.str.len = yyleng; zendlval-type = IS_STRING; -1374,7 +1381,7 } -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{ESCAPED_AND_WHITESPACE} { +ST_HEREDOC{ESCAPED_AND_WHITESPACE} { HANDLE_NEWLINES(yytext, yyleng); zendlval-value.str.val = (char *) estrndup(yytext, yyleng); zendlval-value.str.len = yyleng; Andi Index: Zend/zend_language_scanner.l === RCS file: /repository/Zend/zend_language_scanner.l,v retrieving revision 1.54 diff -u -3 -r1.54 zend_language_scanner.l --- Zend/zend_language_scanner.l13 Nov 2002 03:28:23 - 1.54 +++ Zend/zend_language_scanner.l15 Nov 2002 23:47:29 - -95,7 +95,7 \ while (pboundary) { \ if (*p == '\n') { \ - CG(zend_lineno)++; \ + CG(zend_lineno)++; + \ } else if ((*p == '\r') (p+1 boundary) (*(p+1) != '\n')) { \ CG(zend_lineno)++; \ } \ -707,6 +707,8 EXPONENT_DNUM (({LNUM}|{DNUM})[eE][+-]?{LNUM}) HNUM 0x[0-9a-fA-F]+ LABEL [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* +ENCAPSED_STRING ([a-zA-Z0-9_\x7f-\xff \t #'.:;,()|^+/*=%!~?]|-[^])+ +ENCAPSED_STRING_WITH_NEWLINE ([a-zA-Z0-9_\x7f-\xff \t\n\r +#'.:;,()|^+/*=%!~?]|-[^])+ WHITESPACE [ \n\r\t]+ TABS_AND_SPACES [ \t]* TOKENS [;:,.\[\]()|^+-/*=%!~$?] -1287,6 +1289,13 return T_VARIABLE; } +ST_DOUBLE_QUOTES,ST_BACKQUOTE{ENCAPSED_STRING_WITH_NEWLINE} { + HANDLE_NEWLINES(yytext, yyleng); + zendlval-value.str.val = (char *)estrndup(yytext, yyleng); + zendlval-value.str.len = yyleng; + zendlval-type = IS_STRING; + return T_STRING; +} ST_IN_SCRIPTING{LABEL} { zend_copy_value(zendlval, yytext, yyleng); -1295,7 +1304,7 } -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{LABEL} { +ST_HEREDOC{ENCAPSED_STRING} { zend_copy_value(zendlval, yytext, yyleng); zendlval-type = IS_STRING; return T_STRING; -1598,7 +1607,7 } -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{ESCAPED_AND_WHITESPACE} { +ST_HEREDOC{ESCAPED_AND_WHITESPACE} { HANDLE_NEWLINES(yytext, yyleng); zendlval-value.str.val = (char *) estrndup(yytext, yyleng); zendlval-value.str.len = yyleng; -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] ZEND_ADD_STRING patch
I commited it. Thanks, Andi At 06:48 PM 11/15/2002 -0500, George Schlossnagle wrote: Much sexier indeed. There are some flaws with it: o Tokenizes heredocs on whitespace o Doesn't count lines correctly for debug (since strings now have newlines in them) Here's a revised patch to yours that fixes those (heredocs are tokenized on newlines - I think that is best case) Andi Gutmans wrote: I propose something like the following: (not tested) It's definitely a sexier patch :) Andi RCS file: /repository/ZendEngine2/zend_language_scanner.l,v retrieving revision 1.62 diff -u -u -r1.62 zend_language_scanner.l --- zend_language_scanner.l 5 Nov 2002 22:01:35 - 1.62 +++ zend_language_scanner.l 15 Nov 2002 23:22:34 - @@ -474,6 +474,7 @@ EXPONENT_DNUM (({LNUM}|{DNUM})[eE][+-]?{LNUM}) HNUM 0x[0-9a-fA-F]+ LABEL [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* +ENCAPSED_STRING ([a-zA-Z0-9_\x7f-\xff \t\n\r #'.:;,()|^+/*=%!~?@]|-[^])+ WHITESPACE [ \n\r\t]+ TABS_AND_SPACES [ \t]* TOKENS [;:,.\[\]()|^+-/*=%!~$?@] @@ -1076,6 +1077,12 @@ return T_VARIABLE; } +ST_DOUBLE_QUOTES,ST_BACKQUOTE{ENCAPSED_STRING} { + zendlval-value.str.val = (char *)estrndup(yytext, yyleng); + zendlval-value.str.len = yyleng; + zendlval-type = IS_STRING; + return T_STRING; +} ST_IN_SCRIPTING{LABEL} { zendlval-value.str.val = (char *)estrndup(yytext, yyleng); @@ -1085,7 +1092,7 @@ } -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{LABEL} { +ST_HEREDOC{LABEL} { zendlval-value.str.val = (char *)estrndup(yytext, yyleng); zendlval-value.str.len = yyleng; zendlval-type = IS_STRING; @@ -1374,7 +1381,7 @@ } -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{ESCAPED_AND_WHITESPACE} { +ST_HEREDOC{ESCAPED_AND_WHITESPACE} { HANDLE_NEWLINES(yytext, yyleng); zendlval-value.str.val = (char *) estrndup(yytext, yyleng); zendlval-value.str.len = yyleng; Andi Index: Zend/zend_language_scanner.l === RCS file: /repository/Zend/zend_language_scanner.l,v retrieving revision 1.54 diff -u -3 -r1.54 zend_language_scanner.l --- Zend/zend_language_scanner.l13 Nov 2002 03:28:23 - 1.54 +++ Zend/zend_language_scanner.l15 Nov 2002 23:47:29 - @@ -95,7 +95,7 @@ \ while (pboundary) { \ if (*p == '\n') { \ - CG(zend_lineno)++; \ + CG(zend_lineno)++; \ } else if ((*p == '\r') (p+1 boundary) (*(p+1) != '\n')) { \ CG(zend_lineno)++; \ } \ @@ -707,6 +707,8 @@ EXPONENT_DNUM (({LNUM}|{DNUM})[eE][+-]?{LNUM}) HNUM 0x[0-9a-fA-F]+ LABEL [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* +ENCAPSED_STRING ([a-zA-Z0-9_\x7f-\xff \t #'.:;,()|^+/*=%!~?@]|-[^])+ +ENCAPSED_STRING_WITH_NEWLINE ([a-zA-Z0-9_\x7f-\xff \t\n\r #'.:;,()|^+/*=%!~?@]|-[^])+ WHITESPACE [ \n\r\t]+ TABS_AND_SPACES [ \t]* TOKENS [;:,.\[\]()|^+-/*=%!~$?@] @@ -1287,6 +1289,13 @@ return T_VARIABLE; } +ST_DOUBLE_QUOTES,ST_BACKQUOTE{ENCAPSED_STRING_WITH_NEWLINE} { + HANDLE_NEWLINES(yytext, yyleng); + zendlval-value.str.val = (char *)estrndup(yytext, yyleng); + zendlval-value.str.len = yyleng; + zendlval-type = IS_STRING; + return T_STRING; +} ST_IN_SCRIPTING{LABEL} { zend_copy_value(zendlval, yytext, yyleng); @@ -1295,7 +1304,7 @@ } -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{LABEL} { +ST_HEREDOC{ENCAPSED_STRING} { zend_copy_value(zendlval, yytext, yyleng); zendlval-type = IS_STRING; return T_STRING; @@ -1598,7 +1607,7 @@ } -ST_DOUBLE_QUOTES,ST_BACKQUOTE,ST_HEREDOC{ESCAPED_AND_WHITESPACE} { +ST_HEREDOC{ESCAPED_AND_WHITESPACE} { HANDLE_NEWLINES(yytext, yyleng); zendlval-value.str.val = (char *) estrndup(yytext, yyleng); zendlval-value.str.len = yyleng; -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Fwd: Bug #14870
Any ideas? Andi Date: Fri, 15 Nov 2002 17:14:51 +0100 To: Andi Gutmans [EMAIL PROTECTED] From: Melvyn Sopacua [EMAIL PROTECTED] Subject: Bug #14870 X-Bogosity: No, tests=bogofilter, spamicity=0.00, version=0.7.5 Andi, could I request your attention for this bug: http://bugs.php.net/bug.php?id=14870 Just tell me if it makes sence - I can further debug this, if you give me some hints what to look for, but I really don't get all the dlsym stuff. I've done a fair bit of research and it would help me enourmously if this could be fixed / worked around. Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua @Logan I spent a minute looking at my own code by accident. @Logan I was thinking What the hell is this guy doing? -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php