Re: [PHP-DEV] New extension: netfilter/iptables
Can i code a netfilter extension for PHP or don't you guys see the need for it ? It could result in some great firewall frontends in PHP Go for it. Assuming the netfilter library is not under the GPL. LGPL is fine. -Rasmus It's under GPL, i'll email their core team and ask if they'll consider LGPL !Exclude Disclaimer! Well they said no to LGPL. So that leaves the option of writing a lib to connect to netfilter via sockets, problem is that it uses RAW IP sockets which requires root access. I've searched the mailing lists and docs for setuid/suexec and found the posix_setuid() function, should i leave it up to the user to run posix_setuid() or set User/Group from httpd.conf in order to be able to use this new netfilter extension ? - Corne' -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Specifying pass-by-ref parameters
im a bit rusty, so could someone explain how i would set up a function to accept a byref parameter ? no zend api documentation i ran across is clear on this issue. l0t3k -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: messju
hello, i need a cvs-account for development on the smarty repository. is here the right place to apply for one? regards messju -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] CVS Account Request: messju
Hi, On Fri, 7 Mar 2003, messju mohr wrote: i need a cvs-account for development on the smarty repository. is here the right place to apply for one? You will need to fill in the forms available on: http://www.php.net/cvs-php.php Derick -- Stop mad cowboy disease! - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: messju
I need it for active development on the Smarty Template Engine. Monte Ohrt [EMAIL PROTECTED] who is the maintainer it asked me for help with smarty. He will give me access to the smarty-Repository, once i have a cvs-account. Thanks in advance... -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Sqlite-php module in php-distribution?
Hi, At http://sourceforge.net/projects/sqlite-php/, i found a module for php which implements database functions for sqlite (http://www.sqlite.org) which is a wonderful small, efficient and fast flatfile sql database. I compiled it yesterday and was very surprised. I think i want to develop on that module and contribute to it. Now my question is, is there a way to contribute that module (or another module) to the core php distribution ? Or is this just contributed and i haven't seen it yet ? It will be nice to see this database implemented in the php distribution, because it's a great alternative to the server-databases. Sqlite is something like dbm with sql92 language and more. Bye Björn Kalkbrenner --Rother-DATA GmbH -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Sqlite-php module in php-distribution?
Björn Kalkbrenner wrote: is there a way to contribute that module (or another module) to the core php distribution ? Modules like the one you mention should go into PECL [1]. -- [1] http://pear.php.net/ -- 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] Specifying pass-by-ref parameters
Look at the function table in basic_functions.c: { PHP_FE(nameoffunc), NULL } This NULL can be replaced with an array that specifies BYREF_FORCE for the relevant arguments; look for first_and_second__args_force_ref for an exmaple. --Wez. On Fri, 7 Mar 2003, l0t3k wrote: im a bit rusty, so could someone explain how i would set up a function to accept a byref parameter ? no zend api documentation i ran across is clear on this issue. l0t3k -- 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] fun with autoconf on Tru64
# ./flex --version flex 2.5.27 What does this output? flex -V -v --version 2/dev/null - Sascha -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] url_rewriter.tags and JS
Hi ! Is there any way to get PHP add the session id to a JS call like onClick = location.href='whatever.php' ? Thanks, Viorel -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fun with autoconf on Tru64
What does this output? flex -V -v --version 2/dev/null - Sascha # flex-2.5.27/flex -V -v --version 2/dev/null flex 2.5.27 # flex-2.5.4/flex -V -v --version 2/dev/null flex-2.5.4/flex version 2.5.4 Nice consistancy eh ? Dave -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fun with autoconf on Tru64
On Fri, 7 Mar 2003, David Hill wrote: What does this output? flex -V -v --version 2/dev/null - Sascha # flex-2.5.27/flex -V -v --version 2/dev/null flex 2.5.27 This should be parsed correctly. What kind of OS and /bin/sh do you have? What does ver1=2.5.27 ver2=2 5 27 set $ver2; echo $3 IFS=.; set $ver1; echo $3 output? - Sascha -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: akelavlk
I want add DotPHP layer into PHP. See webcomp.sourceforge.net Or CVS repository on sourceforge.net/projects/webcomp -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fun with autoconf on Tru64
# flex-2.5.27/flex -V -v --version 2/dev/null flex 2.5.27 This should be parsed correctly. What kind of OS and /bin/sh OS == Tru65, shell is /bin/sh do you have? What does ver1=2.5.27 ver2=2 5 27 set $ver2; echo $3 27 IFS=.; set $ver1; echo $3 27 The test in php4/configure.in (and php5/configure.in) is set `echo | $LEX -V -v --version 2/dev/null | grep 'version' | cut -d ' ' -f 3 | sed -e 's/\./ /g' | sed -e 's/[^0-9 ]//g'` if test ${1} != 2 -o ${2} != 5 -o ${3} -lt 4; then In the newer flex output it does not have the work 'version' in it, and the version is the second not the third arg which is why this test fails. changing that to set `echo | $LEX -V -v --version 2/dev/null | sed -e 's/^.* //' -e 's/\./ /g' works for me in both cases. It also handles this case: # flex-2.5.4/flex -v -V --version 21 flex-2.5.4/flex version 2.5.4 which has a double version number. Dave -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fun with autoconf on Tru64
I set up a debian linux box and after getting the right versions of things I am still getting the same results from configure. I am getting a syntax error saying else unexpected. With php5 module HEAD? No - php4 HEAD, should I be doing this with php5 instead ? What line is the error at? What does running the build/buildcheck.sh script output for the tool versions? # ./buildconf using default Zend directory buildconf: checking installation... buildconf: autoconf version 2.13 (ok) buildconf: automake version 1.5 (ok) buildconf: libtool version 1.4.3 (ok) rebuilding configure rebuilding acconfig.h rebuilding main/php_config.h.in # CC='cc -std1' ./configure (I normally add more options - but I am trying to get the simple case to work) ... checking style of sigwait... other checking style of sigwait... other checking for mysqli support... no -l ./configure[53629]: syntax error at line 53630 : `else' unexpected $ODBC_LIBDIR/lib${ac_solid_prefix}${ac_solid_os}${ac_solid_version}.so echo * else ODBC_LFLAGS=-L$ODBC_LIBDIR ODBC_LIBS=-l${ac_solid_prefix}${ac_solid_os}${ac_solid_version} fi echo $ac_t`echo $ODBC_LIBS | sed -e 's!.*/!!'` 16 else 53629 echo $ac_tno 16 fi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] patch for trivial ZE2 leaks
I found memleaks in the current HEAD. A Patch for this issue attached. $ php -r class foo {} /home/koizumi/src/php5/Zend/zend_hash.c(198) : Freeing 0x400C1034 (64 bytes), s cript=- /home/koizumi/src/php5/Zend/zend_hash.c(176) : Actual location (location was rel ayed) Last leak repeated 5 times /home/koizumi/src/php5/Zend/zend_compile.c(3454) : Freeing 0x400C0ED4 (44 bytes ), script=- /home/koizumi/src/php5/Zend/zend_compile.c(2201) : Freeing 0x400C0CD0 (296 byte s), script=- /home/koizumi/src/php5/Zend/zend_language_scanner.l(1107) : Freeing 0x400C0C94 (4 bytes), script=- Index: Zend/zend_compile.c === RCS file: /repository/ZendEngine2/zend_compile.c,v retrieving revision 1.388 diff -u -r1.388 zend_compile.c --- Zend/zend_compile.c 6 Mar 2003 23:45:50 - 1.388 +++ Zend/zend_compile.c 7 Mar 2003 15:29:42 - @@ -2207,6 +2207,7 @@ zend_error(E_COMPILE_ERROR, Cannot use '%s' as class name as it is reserved, class_name-u.constant.value.str.val); } + new_class_entry-type = ZEND_USER_CLASS; new_class_entry-name = class_name-u.constant.value.str.val; new_class_entry-name_length = class_name-u.constant.value.str.len; -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] why is iconv not working as expected?
Hi there, I'm puzzled by the iconv() call from php. When I test it with cyrillic text, in the utf-8 or windows-1251 charsets, or when I try with iranian text, the following php call ?php echo @iconv($charset, 'ASCII//TRANSLIT', $texte)) ? brings me only question marks ???. What I don't understand is that lynx parses those same texts very well, and it is (I think?) based on the same iconv() library... What can I do to either tune my system or do the right call to iconv()? The aim is to have a nice search engine for SPIP, a GPL'd CMS, so the most portable answer will be the best ;) (I'm not on the php-dev list, so please Cc: me.) -- Fil -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] why is iconv not working as expected?
Hello, please forward user questions to the [EMAIL PROTECTED] mailinglist, this list is for development _OF_ PHP, not development _with_ PHP. Derick On Fri, 7 Mar 2003, Fil wrote: Hi there, I'm puzzled by the iconv() call from php. When I test it with cyrillic text, in the utf-8 or windows-1251 charsets, or when I try with iranian text, the following php call ?php echo @iconv($charset, 'ASCII//TRANSLIT', $texte)) ? brings me only question marks ???. What I don't understand is that lynx parses those same texts very well, and it is (I think?) based on the same iconv() library... What can I do to either tune my system or do the right call to iconv()? The aim is to have a nice search engine for SPIP, a GPL'd CMS, so the most portable answer will be the best ;) (I'm not on the php-dev list, so please Cc: me.) -- Fil -- Stop mad cowboy disease! - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] nested namespace
Hi, I'm wondering if a note of clarification could be added to ZEND_CHANGES. The sentences: A namespace's name may contain colons to denote sub-namespaces. This is pure syntactic sugar, the Zend Engine will not see, for instance, the namespaces Package, Package:Subpackage and Package:Subpackage:Subsubpackage as related. will possibly be clearer if modified like: A namespace's name may contain SINGLE colons (:) to denote sub-namespaces. This is pure syntactic sugar, the Zend Engine will not see, for instance, the namespaces Package, Package:Subpackage and Package:Subpackage:Subsubpackage as related. DOUBLE colons are used to distinguish between nested namespaces as in Package::Subpackage. A namespace identifier may not begin with a colon. namespace Package { const one = 1; namespace SubPackage { const one = 'one'; } } namespace Package:Subpackage { const one = 'einz'; } echo Package::one; // 1 echo Package::Subpackage::one; // one echo Package:Subpackage::one // einz This is assuming I understand namespaces. Modify as needed. Regards, Greg -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] nested namespace
On Fri, 7 Mar 2003, Greg Beaver wrote: namespace Package { const one = 1; namespace SubPackage { const one = 'one'; } } You can not nest namespaces, so this wont work. Derick -- Stop mad cowboy disease! - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] nested namespace
Derick Rethans wrote: On Fri, 7 Mar 2003, Greg Beaver wrote: namespace Package { const one = 1; namespace SubPackage { const one = 'one'; } } You can not nest namespaces, so this wont work. Derick OK, makes sense. Adding this sentence would clear up a great deal of confusion. Regards, Greg -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Refreshing pages after HTTP redirects
Well, I've gone on to the next step of my project. I've finally moved to a more structured development approach, treating web pages as forms as having them call a central cgi script that dispatchs calls to other scripts, and then redirects the client to the next step Basically, a mini servlet idea. So, in my pages, the forms call a central script, say 'foo.php'. foo.php redirects the client to a webpage that shows a Please wait, processing your request' page, using http header rediracts. When processing completes, foo.php sends another http redirect header to the client to redirect it to the next step. The problem is the following... Say the client is on a.php, which renders a form that calls foo.php when submitted. After processing, foo.php redirects the client back to a.php. ( a.php has a search form, and displays query results from the DB ). The problem is that a.php is not refreshed, it shows the last value. I've tried various http caching headers, and other items, and I can't seem to force a refresh when redirecting back to a.php. Is there a header that says Go to a, but refresh it too.? -Daniel -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Refreshing pages after HTTP redirects
Hello, please forward user questions to the [EMAIL PROTECTED] mailinglist, this list is for development _OF_ PHP, not development _with_ PHP. Derick On Fri, 7 Mar 2003, Daniel Joyce wrote: Well, I've gone on to the next step of my project. I've finally moved to a more structured development approach, treating web pages as forms as having them call a central cgi script that dispatchs calls to other scripts, and then redirects the client to the next step Basically, a mini servlet idea. So, in my pages, the forms call a central script, say 'foo.php'. foo.php redirects the client to a webpage that shows a Please wait, processing your request' page, using http header rediracts. When processing completes, foo.php sends another http redirect header to the client to redirect it to the next step. The problem is the following... Say the client is on a.php, which renders a form that calls foo.php when submitted. After processing, foo.php redirects the client back to a.php. ( a.php has a search form, and displays query results from the DB ). The problem is that a.php is not refreshed, it shows the last value. I've tried various http caching headers, and other items, and I can't seem to force a refresh when redirecting back to a.php. Is there a header that says Go to a, but refresh it too.? -Daniel -- Stop mad cowboy disease! - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fun with autoconf on Tru64
On Fri, 7 Mar 2003 10:07:31 -0500 David Hill [EMAIL PROTECTED] wrote: I set up a debian linux box and after getting the right versions of things I am still getting the same results from configure. I am getting a syntax error saying else unexpected. With php5 module HEAD? I do also get this on Tru64. Removing ext/mysqli helps. / Magnus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fun with autoconf on Tru64
On Fri, 7 Mar 2003, David Hill wrote: I set up a debian linux box and after getting the right versions of things I am still getting the same results from configure. I am getting a syntax error saying else unexpected. With php5 module HEAD? No - php4 HEAD, should I be doing this with php5 instead ? Don't even try php4 HEAD, it won't work anyway. You either use: # cvs co -rPHP_4_3 php4 or # cvs co php5 (with the correct -d option of course) These are the ONLY useful and up-to-date modules at the moment. --Jani -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fun with autoconf on Tru64
# cvs co -rPHP_4_3 php4 Or for experimental code which should not go into a release branch like PHP_4_3 $ cvs co -r PHP_4 php4 These are the ONLY useful and up-to-date modules at the moment. I'm planning on syncing those changes which have been forgotten to PHP_4, so please stop the FUD. - Sascha -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fun with autoconf on Tru64
On Fri, 7 Mar 2003 19:35:09 +0100 Magnus M [EMAIL PROTECTED] wrote: On Fri, 7 Mar 2003 10:07:31 -0500 David Hill [EMAIL PROTECTED] wrote: I set up a debian linux box and after getting the right versions of things I am still getting the same results from configure. I am getting a syntax error saying else unexpected. With php5 module HEAD? I do also get this on Tru64. Removing ext/mysqli helps. Using php5 HEAD.. 19:58 [EMAIL PROTECTED]:/php/php4 # flex --version flex version 2.5.4 19:59 [EMAIL PROTECTED]:/php/php4 # automake --version automake (GNU automake) 1.5 19:59 [EMAIL PROTECTED]:/php/php4 # autoconf --version Autoconf version 2.13 19:59 [EMAIL PROTECTED]:/php/php4 # m4 --version GNU m4 1.4 19:59 [EMAIL PROTECTED]:/php/php4 # libtool --version ltmain.sh (GNU libtool) 1.4.3 (1.922.2.110 2002/10/23 01:39:54) / Magnus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Sqlite-php module in php-distribution?
At 10:32 07.03.2003, Björn Kalkbrenner wrote: Sqlite is something like dbm with sql92 language and more. I would much more appreciate a new submodule for the dbx module! regards marcus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fun with autoconf on Tru64
Thank you all for you tips and pointers on this build issue. Once I switched to the PHP_4_3 tree I things got much better :-) I built it and hand installed the .so and am seeing a phpinfo() page in my browser. Dave -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Bug fixing and CVS
Hello, I'm not sure this is the right mailing list, but at least it's not about development _with_ php, it's about development _of_ php ;-) I maintain PHP for Mandrake Linux, and I try to ship a bug-free PHP. That is, if there were some showstopper bugs that were not corrected in 4.3.1, I take the bugfixes from CVS and apply them. My concern is: php-bugs always says This bug is fixed in CVS, then I have to look through php-cvs and try to find what changes were made concerning that specific bug. Is there a better way? Is there a special CVS command to show the diffs on a changelog entry? Would something like bugs.php.net/patches with a list of all closed bugs and their corresponding diffs be thinkable? Jean-Michel -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] bug in zend_API.c (with patch)
Why can't you just simply name your classes all lowercase. All of the extensions currently do this and it works fine. - Brad --- Eric Lambart [EMAIL PROTECTED] wrote: Hello. After a short bout of hair-pulling, I have discovered the source (in the Zend engine) of a recent problem, and have fixed it. BACKGROUND: As I have mentioned previously on this list, I am developing a complex PHP extension, which among many other things creates its own PHP classes, and when these classes are instantiated, I manually call the class constructor (as one must) from my C code. I am creating the extension from existing C++ and Java versions of the same system, so I am trying to maintain things as much as possible, including names (including capitalization) of classes and functions (although I am prefixing them all with eo_ to avoid potential conflicts with functions and classes from other PHP extensions). Thus, I have classes such as eo_list, eo_table and eo_NVList. THE SYMPTOM: I had no trouble instantiating and calling the constructors for the first two classes, but when I tried to do it for eo_NVList, call_user_function_ex() was returning FAILURE, which I discovered can occur for one of seven reasons. I tracked down the problem to a failure of zend_hash_find() to lookup the function. Using zend_hash_display() I was able to verify that the eo_NVList constructor was indeed contained in the function table for the eo_NVList class. THE PROBLEM: call_user_function_ex() is converting the requested function name to lower case (at zend_execute_API.c:463) before performing the zend_hash_find(), but zend_register_functions() (in zend_API.c) does NOT convert the function names to lower case before storing them in the function table--so call_user_function_ex() was searching for a function called eo_nvlist and could never find eo_NVList! Class lookups worked fine of course, because object_init_ex() takes a pointer to the class entry rather than a name. Additionally, zend_register_internal_class() (also in zend_API.c) converts all class names to lower case, and execute() (in zend_execute.c) does the same when looking up a class to instantiate it from a script. I haven't looked into script-driven function registration and execution, but presumably case-insensitivity is properly supported there, or I'm sure you would have heard of it long ago! MY SOLUTION: I present the following little patch for your approval. I apologize that it is done against 4.3.1 rather than the latest CVS but I do not have time to deal with CVS at this time, as my project is already behind schedule and of course I need to work with a stable engine. If zend_API.c has changed since the 4.3.1 release, it should be trivial to change these few lines of code (yes, I'm sure they all say that!). =) I didn't find any patch submission guidlines in a quick web search; I'm afraid you'll have to change the file/pathnames in the first lines. If you don't want to deal with that, point me to the guidelines and I will resubmit the patch. For now I will get back to work. Respectfully, Eric Lambart --- Zend/OLD_zend_API.c Wed Oct 9 07:17:52 2002 +++ Zend/zend_API.c Fri Mar 7 13:10:38 2003 @@ -1039,6 +1039,12 @@ internal_function-type = ZEND_INTERNAL_FUNCTION; while (ptr-fname) { +/* store all function names in lower case so they will always be found by + * call_user_function_ex() */ +size_t fname_len = strlen(ptr-fname); +char *lowercase_name = zend_strndup(ptr-fname, fname_len); +zend_str_tolower(lowercase_name, fname_len); + internal_function-handler = ptr-handler; internal_function-arg_types = ptr-func_arg_types; internal_function-function_name = ptr-fname; @@ -1047,7 +1053,7 @@ zend_unregister_functions(functions, count, target_function_table TSRMLS_CC); return FAILURE; } - if (zend_hash_add(target_function_table, ptr-fname, strlen(ptr-fname)+1, function, sizeof(zend_function), NULL) == FAILURE) { + if (zend_hash_add(target_function_table, lowercase_name, fname_len+1, function, sizeof(zend_function), NULL) == FAILURE) { unload=1; break; } -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] bug in zend_API.c (with patch)
On Fri, 2003-03-07 at 14:24, Brad LaFountain wrote: Why can't you just simply name your classes all lowercase. Because then I wouldn't have discovered the bug! =) All of the extensions currently do this and it works fine. Apparently that is the case--that's probably why I had the pleasure of discovering this bug myself. Although we are not currently developing this extension for public release, it may be open-sourced in the future, and for that reason I have followed the CODING_STANDARDS document fairly closely. We could, of course, give all classes and functions lower case names, but as I explained in my previous post, we are porting an existing application that exists in C++ and Java and the developers of those original versions chose to use CamelCaps. AFAIC, the less changes needed to the code, the better. Personally, I'd rather have case-sensitive class and function names in PHP, but the whole point is, if the Zend engine is going to try and look them up them in lowercase, IMHO it'd be really nice if it'd store it the same way :) BTW, since my first post I have discovered the README.SUBMITTING_PATCH file. I still don't have the time now to deal with CVS, though if pushed I will do so, sometime in the future. Nonetheless, I am re-submitting the patch here as requested in the form of a MIME attachment. FWIW I also performed a make test with no FAILs, though I did not create a new test case for this bug. Let me know if there's anything else I can do to help. If this patch will not be accepted SOLEY due to the fact that it's not done on CVS, please let me know and I will take care of that when I have time, and resubmit it. For now, I have spent enough time on this problem already. Regards, Eric --- Zend/OLD_zend_API.c Wed Oct 9 07:17:52 2002 +++ Zend/zend_API.c Fri Mar 7 14:49:36 2003 @@ -1039,6 +1039,12 @@ internal_function-type = ZEND_INTERNAL_FUNCTION; while (ptr-fname) { + /* store all function names in lower case so they will always be found by +* call_user_function_ex() */ + size_t fname_len = strlen(ptr-fname); + char *lowercase_name = zend_strndup(ptr-fname, fname_len); + zend_str_tolower(lowercase_name, fname_len); + internal_function-handler = ptr-handler; internal_function-arg_types = ptr-func_arg_types; internal_function-function_name = ptr-fname; @@ -1047,7 +1053,7 @@ zend_unregister_functions(functions, count, target_function_table TSRMLS_CC); return FAILURE; } - if (zend_hash_add(target_function_table, ptr-fname, strlen(ptr-fname)+1, function, sizeof(zend_function), NULL) == FAILURE) { + if (zend_hash_add(target_function_table, lowercase_name, fname_len+1, function, sizeof(zend_function), NULL) == FAILURE) { unload=1; break; } -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] bug in zend_API.c (with patch)
It's not a bug; PHP is a case-IN-sensitive language when it comes to function and class names. Adding strtolower calls will only slow down the whole language. Using lowercase function and class names is the best solution. --Wez. On Fri, 7 Mar 2003, Eric Lambart wrote: On Fri, 2003-03-07 at 14:24, Brad LaFountain wrote: Why can't you just simply name your classes all lowercase. Because then I wouldn't have discovered the bug! =) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Apache2 SAPI
Le ven 07/03/2003 à 02:56, Derick Rethans a écrit : I think it would be in everyone's best interest if apache2handler was introduced in 4.3.X series probably replace the current apache2filter all together. I'm big +1 on this as it can be considered as a FIX.. Let's just replace the other one with this new one. Ok, I'm convinced now too :) Just one thing before we make the move: what about the thing with virtual and php re-entrancy? Is that fixed? Jean-Michel -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Apache2 SAPI
On Fri, 7 Mar 2003, Jean-Michel Dault wrote: Le ven 07/03/2003 à 02:56, Derick Rethans a écrit : I think it would be in everyone's best interest if apache2handler was introduced in 4.3.X series probably replace the current apache2filter all together. I'm big +1 on this as it can be considered as a FIX.. Let's just replace the other one with this new one. Ok, I'm convinced now too :) Just one thing before we make the move: what about the thing with virtual and php re-entrancy? Is that fixed? I've no idea what you're talking about, care to elaborate? Derick -- my other box is your windows PC - Derick Rethans http://derickrethans.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Apache2 SAPI
Jean-Michel Dault wrote: Le ven 07/03/2003 à 02:56, Derick Rethans a écrit : I think it would be in everyone's best interest if apache2handler was introduced in 4.3.X series probably replace the current apache2filter all together. I'm big +1 on this as it can be considered as a FIX.. Let's just replace the other one with this new one. Ok, I'm convinced now too :) Just one thing before we make the move: what about the thing with virtual and php re-entrancy? Is that fixed? Jean-Michel I belive justin fixed that by using the same method the 1.3 handler used (called zend_xyz instead of php_xyz .. i don't have the code in front of me) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] bug in zend_API.c (with patch)
On Sat, 7 Mar 2003, Eric Lambart wrote: Adding strtolower calls will only slow down the whole language. but my point is the overhead involved cannot possibly rival the amount already created by the zend_str_tolower() calls within zend_execute.c, which is surely encountered far more often in everyday use of PHP. Does what I am suggesting make sense, now? Yes, but simple maths suggests that adding a strtolower call when building the initial hash for each of 2837 functions is surely slower than not having it :) (this is just for extensions in the core). You have to remember that this cost is incurred each time php is loaded; a big performance hit for people using CGI for example. But as I have seen no warnings or admonitions about using one or more upper case letters in a function or class name in the available extension-writing documentation (either online, or in the book ... Consider this thread a warning ;-) --Wez. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Namespaces
this may be a bit premature, but how do i inject the classes, functions and constants in my extension into a namespace ? l0t3k -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Namespaces
this may be a bit premature, but how do i inject the classes, functions and constants in my extension into a namespace ? l0t3k -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Re: [PHP-I18N] Help: Sablotron and Shift-jis
On Fri, 2003-03-07 at 08:50, Moriyoshi Koizumi wrote: It works for me. See the attached example. Anyway, you don't have to crosspost your question to [EMAIL PROTECTED], which is for developing php internals and irrelevant for such user questions. ditto for php-xml-dev, a list _for_ developing of the xml extensions in PHP and not _with_. Your issue looks like a Sablotron problem and not a php at all, by the way ;) chregu Hope this helps Moriyoshi Michel Sahyoun [EMAIL PROTECTED] wrote: Does anyone have an example of using XSLT with Sablotron to transform and XML document containing Shift-jis encoded characters? I keep getting the following error message: Illegal Character for Encoding 'Shift-jis' I am using the latest from snap.php.net and sablotron 0.97 FullPack with iconv, and Javascript. In my php file, I call xslt_set_encoding($xsltHandle, 'Shift-jis'); My xsl file has xsl:output method=xml omit-xml-declaration=yes encoding=Shift-jis / My XML file has: ?xml version=1.0 encoding=Shift-jis ? Am I doing something wrong? Is the encoding name misspelled? Anything else I could check? Thanks, Michel -- PHP Internationalization 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 -- Christian Stocker [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: [PHP-XML-DEV] Re: [PHP-I18N] Help: Sablotron and Shift-jis
At 08:50 3/7/2003, Moriyoshi Koizumi wrote: Anyway, you don't have to crosspost your question to [EMAIL PROTECTED], which is for developing php internals and irrelevant for such user questions. The same applies to [EMAIL PROTECTED] Note the pattern :) 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