[PHP-DEV] Re: problems on building php_win32 release binaries
http://www.php.net/manual/en/install.windows.php follow the steps releted to win32build. anyway u always can use cygwin building the source. moshe -- Ernani Joppert Pontes Martins [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Fellows, I was trying to build a win32 version of the CVS Snapshots and I got some problems on its build. Anyways I wish to help with a odbc bug that in not solved yet and I can't understant why some files in the project is missing... The Snapshot version I got was php4-STABLE-200302021430.tar.gz Here is the log of VStudio Configuration: TSRM - Win32 Release_TS Compiling... TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c tsrm_win32.c Creating library... Configuration: Zend - Win32 Release_inline Compiling... zend.c zend_alloc.c zend_API.c zend_builtin_functions.c zend_compile.c zend_constants.c zend_execute.c zend_execute_API.c C:\Documents and Settings\Administrador\Desktop\php4_source\Zend\zend_execute_API.c(362) : warning C4018: '==' : signed/unsigned mismatch zend_extensions.c zend_hash.c zend_highlight.c zend_indent.c zend_ini.c zend_ini_parser.c zend_ini_scanner.c zend_language_parser.c zend_language_scanner.c C:\Documents and Settings\Administrador\Desktop\php4_source\Zend\zend_language_scanner.c(5558 ) : warning C4273: 'isatty' : inconsistent dll linkage. dllexport assumed. zend_list.c zend_llist.c zend_multibyte.c Generating Code... Compiling... zend_opcode.c zend_operators.c zend_ptr_stack.c zend_qsort.c zend_sprintf.c zend_stack.c zend_variables.c Generating Code... Creating library... Configuration: libmysql - Win32 Release_inline Compiling... array.c bchange.c bmove.c bmove_upp.c charset.c ctype.c dbug.c default.c dll.c errmsg.c errors.c get_password.c int2str.c is_prefix.c libmysql.c C:\Documents and Settings\Administrador\Desktop\php4_source\ext\mysql\libmysql\libmysql.c(923 ) : warning C4018: '' : signed/unsigned mismatch C:\Documents and Settings\Administrador\Desktop\php4_source\ext\mysql\libmysql\libmysql.c(982 ) : warning C4018: '' : signed/unsigned mismatch list.c longlong2str.c mf_casecnv.c mf_dirname.c mf_fn_ext.c mf_format.c mf_loadpath.c mf_pack.c mf_path.c mf_unixpath.c mf_wcomp.c mulalloc.c my_alloc.c my_compress.c my_create.c my_delete.c my_div.c my_error.c my_fopen.c my_getwd.c my_init.c my_lib.c my_malloc.c my_messnc.c my_net.c my_once.c my_open.c my_pthread.c my_read.c my_realloc.c my_static.c my_tempnam.c my_thr_init.c my_wincond.c my_winthread.c my_write.c net.c password.c safemalloc.c str2int.c strcend.c strcont.c strend.c strfill.c string.c strinstr.c strmake.c strmov.c strnmov.c strtoll.c strtoull.c strxmov.c thr_mutex.c typelib.c violite.c Creating library... Configuration: php4dll - Win32 Release_inline Compiling... aggregation.c css.c cyr_convert.c fopen_wrappers.c C:\Documents and Settings\Administrador\Desktop\php4_source\main\php_network.h(28) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory main.c C:\Documents and Settings\Administrador\Desktop\php4_source\main\php_network.h(28) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory mergesort.c network.c C:\Documents and Settings\Administrador\Desktop\php4_source\main\php_network.h(28) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory output.c ..\ext/zlib/php_zlib.h(25) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory php_content_types.c php_ini.c php_logos.c php_open_temporary_file.c php_ticks.c php_variables.c C:\Documents and Settings\Administrador\Desktop\php4_source\main\php_network.h(28) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory quot_print.c reentrancy.c rfc1867.c safe_mode.c SAPI.c ..\ext/zlib/php_zlib.h(25) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory snprintf.c spprintf.c streams.c C:\Documents and Settings\Administrador\Desktop\php4_source\main\php_network.h(28) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory strlcat.c strlcpy.c user_streams.c C:\Documents and Settings\Administrador\Desktop\php4_source\main\user_streams.c(640) : warning C4244: '=' : conversion from 'long ' to 'unsigned short ', possible loss of data C:\Documents and Settings\Administrador\Desktop\php4_source\main\user_streams.c(641) : warning C4244: '=' :
Re: [PHP-DEV] Mono PHP
I'm having fun with it :) /usr/src/php/php5/ext/sockets/php_sockets.h:89: conflicting types for `SOCKET' /usr/include/mono/io-layer/uglify.h:38: previous declaration of `SOCKET' also had a bit of trouble with mono's exception.h including config.h (which wasnt installed into the bulid stuff) (hacked mono's header for the time being) not sure if that's an old version of mono though.. Regards Alan Sterling Hughes wrote: I spent a little time this weekend implementing an extension that allows PHP to load .NET classes on the Unix environment - 100% open source, by leveraging the mono library(*). For more information, view the README file in the distribution by downloading the file http://www.edwardbear.org/php_mono_0_1.tar.gz. Its PHP5 only, as that's what I've switched to for all new development. Hi Ho. ?php $Console = new Mono('System.Console'); $Console-WriteLine('Hello World, PHP is .NET ready!'); ? - Sterling No More Extensions Needed Hughes (*) Mono is much more than library, of course. But it links to/uses the mono library. PS: I'll be adding it into PECL in a little bit, I want to finish the type proxying code. I'd also like to add all of the object and method caching. PPS: If anyone has suggestions for a better way of doing type proxying than what's described in the README, please let me know. -- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Problems with zand_API.c
Marcus Börger wrote: Since i have no karma there somebody else must fix this. Done, Sebastian -- 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] Mono PHP
Is it true you can catch mono from using php? -- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software Systems Engineer First Creative -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Mono PHP
Seems like it :) In a pre-alpha phase ;) Ans, I also want to do the same for Ruby (in case you haven't heard ;) ) -- Maxim Maletsky [EMAIL PROTECTED] Dan Hardiker [EMAIL PROTECTED] wrote... : Is it true you can catch mono from using php? -- Dan Hardiker [[EMAIL PROTECTED]] ADAM Software Systems Engineer First Creative -- 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] problems on building php_win32 release binaries
you need to include a few libs to VC before building. Most of it is within win32build.zip, which you should unpack on your system and set the inc/lib/bin of your VC pointing there. Should fix your issues. -- Maxim Maletsky [EMAIL PROTECTED] Ernani Joppert Pontes Martins [EMAIL PROTECTED] wrote... : Hi Fellows, I was trying to build a win32 version of the CVS Snapshots and I got some problems on its build. Anyways I wish to help with a odbc bug that in not solved yet and I can't understant why some files in the project is missing... The Snapshot version I got was php4-STABLE-200302021430.tar.gz Here is the log of VStudio Configuration: TSRM - Win32 Release_TS Compiling... TSRM.c tsrm_strtok_r.c tsrm_virtual_cwd.c tsrm_win32.c Creating library... Configuration: Zend - Win32 Release_inline Compiling... zend.c zend_alloc.c zend_API.c zend_builtin_functions.c zend_compile.c zend_constants.c zend_execute.c zend_execute_API.c C:\Documents and Settings\Administrador\Desktop\php4_source\Zend\zend_execute_API.c(362) : warning C4018: '==' : signed/unsigned mismatch zend_extensions.c zend_hash.c zend_highlight.c zend_indent.c zend_ini.c zend_ini_parser.c zend_ini_scanner.c zend_language_parser.c zend_language_scanner.c C:\Documents and Settings\Administrador\Desktop\php4_source\Zend\zend_language_scanner.c(5558 ) : warning C4273: 'isatty' : inconsistent dll linkage. dllexport assumed. zend_list.c zend_llist.c zend_multibyte.c Generating Code... Compiling... zend_opcode.c zend_operators.c zend_ptr_stack.c zend_qsort.c zend_sprintf.c zend_stack.c zend_variables.c Generating Code... Creating library... Configuration: libmysql - Win32 Release_inline Compiling... array.c bchange.c bmove.c bmove_upp.c charset.c ctype.c dbug.c default.c dll.c errmsg.c errors.c get_password.c int2str.c is_prefix.c libmysql.c C:\Documents and Settings\Administrador\Desktop\php4_source\ext\mysql\libmysql\libmysql.c(923 ) : warning C4018: '' : signed/unsigned mismatch C:\Documents and Settings\Administrador\Desktop\php4_source\ext\mysql\libmysql\libmysql.c(982 ) : warning C4018: '' : signed/unsigned mismatch list.c longlong2str.c mf_casecnv.c mf_dirname.c mf_fn_ext.c mf_format.c mf_loadpath.c mf_pack.c mf_path.c mf_unixpath.c mf_wcomp.c mulalloc.c my_alloc.c my_compress.c my_create.c my_delete.c my_div.c my_error.c my_fopen.c my_getwd.c my_init.c my_lib.c my_malloc.c my_messnc.c my_net.c my_once.c my_open.c my_pthread.c my_read.c my_realloc.c my_static.c my_tempnam.c my_thr_init.c my_wincond.c my_winthread.c my_write.c net.c password.c safemalloc.c str2int.c strcend.c strcont.c strend.c strfill.c string.c strinstr.c strmake.c strmov.c strnmov.c strtoll.c strtoull.c strxmov.c thr_mutex.c typelib.c violite.c Creating library... Configuration: php4dll - Win32 Release_inline Compiling... aggregation.c css.c cyr_convert.c fopen_wrappers.c C:\Documents and Settings\Administrador\Desktop\php4_source\main\php_network.h(28) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory main.c C:\Documents and Settings\Administrador\Desktop\php4_source\main\php_network.h(28) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory mergesort.c network.c C:\Documents and Settings\Administrador\Desktop\php4_source\main\php_network.h(28) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory output.c ..\ext/zlib/php_zlib.h(25) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory php_content_types.c php_ini.c php_logos.c php_open_temporary_file.c php_ticks.c php_variables.c C:\Documents and Settings\Administrador\Desktop\php4_source\main\php_network.h(28) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory quot_print.c reentrancy.c rfc1867.c safe_mode.c SAPI.c ..\ext/zlib/php_zlib.h(25) : fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory snprintf.c spprintf.c streams.c C:\Documents and Settings\Administrador\Desktop\php4_source\main\php_network.h(28) : fatal error C1083: Cannot open include file: 'arpa/inet.h': No such file or directory strlcat.c strlcpy.c user_streams.c C:\Documents and Settings\Administrador\Desktop\php4_source\main\user_streams.c(640) : warning C4244: '=' : conversion from 'long ' to 'unsigned short ', possible loss of data C:\Documents and Settings\Administrador\Desktop\php4_source\main\user_streams.c(641) : warning C4244: '=' : conversion from 'long ' to 'unsigned short ', possible loss of data C:\Documents and Settings\Administrador\Desktop\php4_source\main\user_streams.c(642) :
Re: [PHP-DEV] preg_replace oddity [exploitable]
James E. Flemer [EMAIL PROTECTED] wrote... : I found a more evil example: ?php $a = ___! `rm -rf /tmp/sess_*` !___; $b = preg_replace(/!(.*)!/e, print(\\1);, $a); ? This happily executes rm -rf /tmp/sess_*. I will not give out more examples, but if one examines the code for addslashes() it is quite obvious what you can an cannot do here. Thus it is clearly a Bad Thing for someone to use preg_replace with the /e modifier and not use quotes around the \\n or $n backrefs. The docs should be updated to include a very noticeable warning about this hole. I am contemplating possible solutions for this problem... Also as a side note, it does not seem to be possible to use 'echo' as part of the expression, print must be used. (Yes I know why, just pointing it out.) -James On Thu, 30 Jan 2003, James E. Flemer wrote: Can someone explain what is going on here: --- foo.php --- ?php $a = ___! 52); echo(42 !___; $b = preg_replace(/!(.*)!/e, print(\\1);, $a); print(\n---\na: $a\nb: $b\n); ? --- end --- --- output --- 52 --- a: ___! 52); echo(42 !___ b: ___1___ --- end --- I understand that one is supposed to use single quotes around the \\1 in the above preg_replace. But what happens when they do not? Clearly the echo(42); is not executed, and it is not printed by print(). Even more interesting is if you put something like echo(\42 in $a, then you get a bunch of errors including: Fatal error - Failed evaluating code: print( 52); echo(\42 ); In fact, /e eval()uates the code. It does with the replaced result just what eval() does with a string PHP code. At most, it could be noted in docs. -- Maxim Maletsky [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] sapi/nsapi/nsapi.c
The variables you explain are surely there. But a lot of scripts depend on other headers, which the client sent. The SAPI module only creates Variables for a subset of them (HTTP_USER_AGENT). But not for all like the other SAPI modules. So with this patch you get for example the missing HTTP_HOST-Header (HTTP/1.1) because the patch creates for every variable in the request a HTTP_XXX-Variable. So you can see all headers the client have sent. This is the way the other SAPI modules (APACHE) and the normal CGI environment works. Without it about 50% of the currently available PHP scripts do not run correctly. You can try it with: http://www.emarcon.net/test.php which runs the patched Version. Yo will see all headers sent by your client not only the ones explained below and HTTP_USER_AGENT and HTTP_ACCEPT_* Greetings from Germany, Uwe At 15:52 02.02.2003 -0800, you wrote: Hi Uwe, I haven't looked at the patch, but I am wondering if the nsapi sapi module creates variables for php that conform to the cgi spec. Can you try the following url against a phpinfo(); script: http://localhost/info.php/test/path?query=string You should get: PATH_INFO=/test/path PATH_TRANSLATED=/your_web_document_root/test/path QUERY_STRING=query=string SCRIPT_NAME=/info.php PHP_SELF=/info.php If you do not, then the sapi module is not conformant to cgi spec, and still needs some work. Shane Uwe Schindler wrote: I submit a patch for the NSAPI SAPI module and hope that it fixes a lot of problems I have (and others as seen in the bug database). As a lot of variables which are needed by a lot of PHP scripts which use $_SERVER[...] are not transferred correctly to the PHP script that runs in iPlanet Webserver (4 or 6). An example are the Host and X-Forwarded headers. This is so, because the transferred variables are static in the SAPI module. The new nsapi.c file now transfers _ALL_ variables from rc-rq-headers to php_register_variable(HTTP_+headername_uppercase, ...). Also missing variables like SERVER_SOFTWARE are added. A lot of customers complain about memory leaks in this module. I hope they are also fixed by freeing the by nsapi allocated strings (the return value of session_dns and http_uri2url). The patch should work with Netscape/iPlanet Servers from version 3 on (I used no newer API calls). If you are interested I could eventually create a patch for supporting the virtual servers in SunONE/iPlanet Web Server 6, because some vars only get the default-hostname not the real virtual server name (for example $_SERVER[SERVER_URL] which is often used in scripts to refer together with $_SERVER[PHP_SELF]). But this mut be done with #ifdefs because some new functions are in the nsapi since version 6. A good fix would be also to map $_SERVER[SERVER_URL] to http://$SERVER[HTTP_HOST];, because in iPlanet-Servers the Host variable is everytime available (if not in original HTTP-headers it is defined to be the default hostname). Greetings, Uwe - Uwe Schindler Addr 1: Bamberger Str. 24a, D-96049 Bamberg Addr 2: Drausnickstr. 153, D-91052 Erlangen http://www.thetaphi.de - http:///www.schindlers-software.de eMails: [EMAIL PROTECTED] (private); [EMAIL PROTECTED] (company) Tel./Fax: +49 700 PCLATEIN (+49 700 72528346) Schindlers Software - Home of Schindlers PC-LATEIN 3.10 DIE Software zum Lateinlernen! - Uwe Schindler Addr 1: Bamberger Str. 24a, D-96049 Bamberg Addr 2: Drausnickstr. 153, D-91052 Erlangen http://www.thetaphi.de - http:///www.schindlers-software.de eMails: [EMAIL PROTECTED] (private); [EMAIL PROTECTED] (company) Tel./Fax: +49 700 PCLATEIN (+49 700 72528346) Schindlers Software - Home of Schindlers PC-LATEIN 3.10 DIE Software zum Lateinlernen! -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Segfault with ZE2
I'll file a bug report on this, but I wasn't sure if it would get noticed and figured those involved might be interested... As of the CVS from last Monday (as well as head) ZE2 is segfaulting... Here's the bt.. #0 0x081114b4 in zend_register_functions (scope=0x0, functions=0x4001a260, function_table=0x0, type=1) at /home/php/php4-ze2/Zend/zend_API.c:1099 #1 0x08111704 in zend_register_module (module=0x400237a0) at /home/php/php4-ze2/Zend/zend_API.c:1172 #2 0x080941a5 in php_dl (file=0x8183ee8, type=1, return_value=0xb860) at /home/php/php4-ze2/ext/standard/dl.c:242 #3 0x080ee128 in php_load_function_extension_cb (arg=0x8183ee8) at /home/php/php4-ze2/main/php_ini.c:247 #4 0x08108a35 in zend_llist_apply (l=0x8175c3c, func=0x80ee114 php_load_function_extension_cb) at /home/php/php4-ze2/Zend/zend_llist.c:190 #5 0x080ee5aa in php_ini_delayed_modules_startup () at /home/php/php4-ze2/main/php_ini.c:499 #6 0x080eb0bc in php_module_startup (sf=0x8174ac0, additional_modules=0x0, num_additional_modules=0) at /home/php/php4-ze2/main/main.c:1284 #7 0x08132530 in main (argc=1, argv=0xbaf4) at /home/php/php4-ze2/sapi/cli/php_cli.c:480 #8 0x400c8306 in __libc_start_main (main=0x8132420 main, argc=1, ubp_av=0xbaf4, init=0x8063128 _init, fini=0x8133140 _fini, rtld_fini=0x4000d2dc _dl_fini, stack_end=0xbaec) at ../sysdeps/generic/libc-start.c:129 John -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] please apply to PHP_4_3 branch: servlet build fix
hi, committed some fixes to build the servlet sapi, but have no permission to commit this small fix, please apply to 4_3 branch thanks a log Giuseppe -- --- Giuseppe Tanzilli [EMAIL PROTECTED] CSF Sistemi srl phone ++39 0775 7771 Via del Ciavattino Anagni FR Italy -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] [begginer] openssl problem when compiling
Hi, I'm trying to compile my own module, but i keep getting errors in: /bin/sh libtool --silent --mode=compile gcc -Imain/ -I/root/php4/main/ -DPHP_ATOM_INC -I/root/php4/include -I/root/ php4/main -I/root/php4 -I/root/php4/Zend -I/usr/local/include -I/usr/include /libxml2 -I/usr/include/freetype -I/root/php4/ext/xml/expat -DLINUX=22 -DEA PI -DTARGET=apache -DDEV_RANDOM=/dev/random -DUSE_HSREGEX -D_LARGEFILE_SOU RCE -D_FILE_OFFSET_BITS=64 -I/root/php4/TSRM -g -O2 -prefer-pic -c main/internal_functions.c -o main/internal_functions.lo In file included from /usr/include/openssl/comp.h:5, from /usr/include/openssl/ssl.h:116, from /root/php4/ext/paysystems/libps/common.h:28, from /root/php4/ext/paysystems/libps/client.h:113, from /root/php4/ext/paysystems/php_paysystems.h:37, (... some other errors from openssl) My module is using OpenSSL lib and i tried to configure config.m4 properly but i'm probably doing something wrong. Note that when i ./configure with --with-openssl everything compiles fine so i suppose i have some errors in config.m4 file of my module - i tried to look at other modules but all the changes i make are not giving me a clean compile. Thanks for support, LK -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] please apply to PHP_4_3 branch: servlet build fix
Hi, Where's the patch? Perhaps the attachment was eliminated by the list program. Try suffixing it with .txt or inlining it. Thanks Moriyoshi Giuseppe Tanzilli - CSF [EMAIL PROTECTED] wrote: hi, committed some fixes to build the servlet sapi, but have no permission to commit this small fix, please apply to 4_3 branch thanks a log Giuseppe -- --- Giuseppe Tanzilli [EMAIL PROTECTED] CSF Sistemi srl phone ++39 0775 7771 Via del Ciavattino Anagni FR Italy -- 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] Question on bug list
On Sun, Feb 02, 2003 at 01:17:41PM -0800, Sara Golemon wrote: Jesus suggested the same thing, I'm trying out a few different approaches to see what looks best, I'll post again when I have something usable. http://frankenbox.alphaweb.net/test/export.phps Looks good and useful. +1. Sander -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: cellog
help develop smarty template engine, help develop pear script for windows/linux to get it working properly to install phpDocumentor -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: zend_API.c
2003-02-02 Harald Radi [EMAIL PROTECTED] * zend_API.c zend_API.h: extend the parameter parsing API by two functions for parsing method parameters with automatic detection if the function was called as such or as a class method (with a valid this ptr). if called as a function the first parameter has to be the object it is operating on, if called as a method this is used. Would have been nice of you to talk with me about this first, since I maintain that code. -Andrei http://www.gravitonic.com/ * Use the source, Luke. * -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: zend_API.c
hi andrei, what would you think if we add a zend_parse_method_parameters() function to the parse parameters API ? as you're maintaining that part of the code i thought it would be a good idea to ask you first, before i'm going to commit something. :) to be serious: it is not yet used anywhere, so we can still change it however we want. if you think it doesn't belong there we can even remove it, but i already needed that functionality in 3+ extensions and i guess you even will like it for your gtk stuff. i even have to review the thing as i don't think it that it works as expected right now, but i was in a hurry yesterday and made a skeleton for georgs mysqli extension which needed that functions. i also postet a message to php5-dev first but somehow it doesn't show up there (?). harald. Andrei Zmievski [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED]... 2003-02-02 Harald Radi [EMAIL PROTECTED] * zend_API.c zend_API.h: extend the parameter parsing API by two functions for parsing method parameters with automatic detection if the function was called as such or as a class method (with a valid this ptr). if called as a function the first parameter has to be the object it is operating on, if called as a method this is used. Would have been nice of you to talk with me about this first, since I maintain that code. -Andrei http://www.gravitonic.com/ * Use the source, Luke. * -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] can't get wincvs to ask for login
Hi, I'm trying to commit some changes, and can't get wincvs to log me in or even to request a password with pserver. I've changed the username from cvsread to cellog. Anyone with wincvs experience know how to make the stupid thing work? Greg -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Mono PHP
On Mon, 2003-02-03 at 03:51, Alan Knowles wrote: I'm having fun with it :) /usr/src/php/php5/ext/sockets/php_sockets.h:89: conflicting types for `SOCKET' /usr/include/mono/io-layer/uglify.h:38: previous declaration of `SOCKET' also had a bit of trouble with mono's exception.h including config.h (which wasnt installed into the bulid stuff) (hacked mono's header for the time being) not sure if that's an old version of mono though.. Ahh, should have mentioned that. I hacked php_sockets.h, just change the typedef to a #define. -Sterling Regards Alan Sterling Hughes wrote: I spent a little time this weekend implementing an extension that allows PHP to load .NET classes on the Unix environment - 100% open source, by leveraging the mono library(*). For more information, view the README file in the distribution by downloading the file http://www.edwardbear.org/php_mono_0_1.tar.gz. Its PHP5 only, as that's what I've switched to for all new development. Hi Ho. ?php $Console = new Mono('System.Console'); $Console-WriteLine('Hello World, PHP is .NET ready!'); ? - Sterling No More Extensions Needed Hughes (*) Mono is much more than library, of course. But it links to/uses the mono library. PS: I'll be adding it into PECL in a little bit, I want to finish the type proxying code. I'd also like to add all of the object and method caching. PPS: If anyone has suggestions for a better way of doing type proxying than what's described in the README, please let me know. -- Whether you think you can or think you can't -- you are right. - Henry Ford -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] can't get wincvs to ask for login
Hi, I'm trying to commit some changes, and can't get wincvs to log me in or even to request a password with pserver. I've changed the username from cvsread to cellog. Anyone with wincvs experience know how to make the stupid thing work? Your best bet is to use the CVS win32 port, located at http://ftp.cvshome.org/win32/cvs-1-11-5.zip -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: can't get wincvs to ask for login
menu - admin - login Greg Beaver [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED]... Hi, I'm trying to commit some changes, and can't get wincvs to log me in or even to request a password with pserver. I've changed the username from cvsread to cellog. Anyone with wincvs experience know how to make the stupid thing work? Greg -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: zend_API.c
On Mon, 03 Feb 2003, Harald Radi wrote: it is not yet used anywhere, so we can still change it however we want. if you think it doesn't belong there we can even remove it, but i already needed that functionality in 3+ extensions and i guess you even will like it for your gtk stuff. i even have to review the thing as i don't think it that it works as expected right now, but i was in a hurry yesterday and made a skeleton for georgs mysqli extension which needed that functions. Continuing from IRC discussion: why do we need extensions that provide both function and object APIs for the same functionality? Are we trying to emulate Perl or something? To me, that is introducing more confusion for the sake of flexibility. I am strongly of the opinion that we should stick to having it one way or the other. -Andrei http://www.gravitonic.com/ Music expresses that which can not be said and on which it is impossible to be silent. -Victor Hugo -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] RE: zend_API.c
-Original Message- From: Andrei Zmievski [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 4:04 PM Continuing from IRC discussion: why do we need extensions that provide both function and object APIs for the same functionality? Are we trying to emulate Perl or something? To me, that is introducing more confusion for the sake of flexibility. I am strongly of the opinion that we should stick to having it one way or the other. because people prefer either the one or the other way to manipulate things. people not familiar with oo will most likely not not stick with the oo api nor will they be happy if they're forced to use it. on the other hand people writing their scripts entirely oo will propably hate it to mix function calls with method invokations all the time. furthermore functions are supposed to issue warnings and methods are supposed to throw exceptions, two entirely different concepts of error handling where neitherone is preferable. so the question is to give rope or not. harald. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: zend_API.c
On Mon, 03 Feb 2003, Harald Radi wrote: because people prefer either the one or the other way to manipulate things. people not familiar with oo will most likely not not stick with the oo api nor will they be happy if they're forced to use it. on the other hand people writing their scripts entirely oo will propably hate it to mix function calls with method invokations all the time. furthermore functions are supposed to issue warnings and methods are supposed to throw exceptions, two entirely different concepts of error handling where neitherone is preferable. so the question is to give rope or not. Ugh, so following your line of reasoning we should rewrite all extensions to provide both function and OO apis? A better approach would be to have extensions provide only function API and then write a PEAR class to expose them as objects. -Andrei http://www.gravitonic.com/ * My wishlist: http://www.amazon.com/exec/obidos/wishlist/2Q2DIPY7BZLSH/ * -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] can't get wincvs to ask for login
it happens if you are behind the firewall. If so, then create the SSH tunnel from localhost:2401 to cvs.php.net:2401 and connect to localhost instead -- Maxim Maletsky [EMAIL PROTECTED] Greg Beaver [EMAIL PROTECTED] wrote... : Hi, I'm trying to commit some changes, and can't get wincvs to log me in or even to request a password with pserver. I've changed the username from cvsread to cellog. Anyone with wincvs experience know how to make the stupid thing work? Greg -- 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] RE: zend_API.c
From: Andrei Zmievski [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 4:18 PM so the question is to give rope or not. Ugh, so following your line of reasoning we should rewrite all extensions to provide both function and OO apis? A better approach would be to have extensions provide only function API and then write a PEAR class to expose them as objects. that would be a big step back again for several reasons: -) if done in c code you have one function serving as function and method, thus you have the same order/amount of arguments for the function _and_ the method. -) if something changes in the code, it automatically changes for the function and the method, if we had a pear class someone would have to maintain that. -) we finally brought down the cost of handling object beeing virtually the same as for handling resources, so why should we try that hard to make the damn thing slow again ? -) the errorhandling issue is not (easily) coverable if we simple wrap the funcitons as pear classes. harald -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] can't get wincvs to ask for login
Try out : http://www.tortoisecvs.org/ This is shell extension to explorer.exe .Everything is done with the right button of the mouse wherever you are (except Java programs). On the same page there is project for Subversion shell of the same type. Andrey - Original Message - From: Greg Beaver [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 5:27 PM Subject: [PHP-DEV] can't get wincvs to ask for login Hi, I'm trying to commit some changes, and can't get wincvs to log me in or even to request a password with pserver. I've changed the username from cvsread to cellog. Anyone with wincvs experience know how to make the stupid thing work? Greg -- 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] Re: zend_API.c
On Mon, 03 Feb 2003, Harald Radi wrote: that would be a big step back again for several reasons: -) if done in c code you have one function serving as function and method, thus you have the same order/amount of arguments for the function _and_ the method. I don't see this as an issue - the OO API in PEAR would be a simple wrapper for the function. -) if something changes in the code, it automatically changes for the function and the method, if we had a pear class someone would have to maintain that. See above. -) we finally brought down the cost of handling object beeing virtually the same as for handling resources, so why should we try that hard to make the damn thing slow again ? You are proving my point - the cost of handling objects is minimal, so why not do it in userland? -) the errorhandling issue is not (easily) coverable if we simple wrap the funcitons as pear classes. What errorhandling issue? -Andrei http://www.gravitonic.com/ * Quantum Mechanics: The Dreams of Which Stuff is Made. * -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] RE: zend_API.c
-) we finally brought down the cost of handling object beeing virtually the same as for handling resources, so why should we try that hard to make the damn thing slow again ? You are proving my point - the cost of handling objects is minimal, so why not do it in userland? because then we have userland - ze2 oo - userland - php function instead of userland - php function. maybe that's negligable, i didn't benchmark it. -) the errorhandling issue is not (easily) coverable if we simple wrap the funcitons as pear classes. What errorhandling issue? exception vs. warning. harald -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: zend_API.c
On Mon, 03 Feb 2003, Harald Radi wrote: because then we have userland - ze2 oo - userland - php function instead of userland - php function. maybe that's negligable, i didn't benchmark it. Hmm, care to explain this? It should just be object call - PHP function call. exception vs. warning. The underlying function can still print warning. No exceptions needed. -Andrei http://www.gravitonic.com/ Music expresses that which can not be said and on which it is impossible to be silent. -Victor Hugo -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] RE: zend_API.c
On Mon, 03 Feb 2003, Harald Radi wrote: because then we have userland - ze2 oo - userland - php function instead of userland - php function. maybe that's negligable, i didn't benchmark it. Hmm, care to explain this? It should just be object call - PHP function call. if $obj is an overloaded object $obj-method() would directly call the native implementation of method(), if it is a pear object, $obj-method() will result in a userspace method invokation that actually calls the native implementation adding a further level of indirection for each method call. for something like while($mysqli-fetch_row()) {} this could be an issue (though i don't know how much of an issue). exception vs. warning. The underlying function can still print warning. No exceptions needed. you're missing the point. if i invoke a method i don't expect it to print a warning, i expect it to throw an exception (most likely) and imho this is the prevailing opinion in oo. harald -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] can't get wincvs to ask for login
Hi Andrey, Tortoisecvs is much better than wincvs, thank you. The only other problem I have is that cvs says I don't have karma to commit things in smarty. I assume this is because I have a new account, but if I should have enough karma to commit, I may have configured something wrong (although there doesn't appear to be anything to configure in tortoise). Otherwise, I need more karma :) Thanks, Greg - Original Message - From: Andrey Hristov [EMAIL PROTECTED] To: Greg Beaver [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 10:32 AM Subject: Re: [PHP-DEV] can't get wincvs to ask for login Try out : http://www.tortoisecvs.org/ This is shell extension to explorer.exe .Everything is done with the right button of the mouse wherever you are (except Java programs). On the same page there is project for Subversion shell of the same type. Andrey - Original Message - From: Greg Beaver [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 5:27 PM Subject: [PHP-DEV] can't get wincvs to ask for login Hi, I'm trying to commit some changes, and can't get wincvs to log me in or even to request a password with pserver. I've changed the username from cvsread to cellog. Anyone with wincvs experience know how to make the stupid thing work? Greg -- 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] can't get wincvs to ask for login
Did you checked out from smarty with your new account or with anonymous ? Andrey - Original Message - From: Greg Beaver [EMAIL PROTECTED] To: Andrey Hristov [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 6:42 PM Subject: Re: [PHP-DEV] can't get wincvs to ask for login Hi Andrey, Tortoisecvs is much better than wincvs, thank you. The only other problem I have is that cvs says I don't have karma to commit things in smarty. I assume this is because I have a new account, but if I should have enough karma to commit, I may have configured something wrong (although there doesn't appear to be anything to configure in tortoise). Otherwise, I need more karma :) Thanks, Greg - Original Message - From: Andrey Hristov [EMAIL PROTECTED] To: Greg Beaver [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 10:32 AM Subject: Re: [PHP-DEV] can't get wincvs to ask for login Try out : http://www.tortoisecvs.org/ This is shell extension to explorer.exe .Everything is done with the right button of the mouse wherever you are (except Java programs). On the same page there is project for Subversion shell of the same type. Andrey - Original Message - From: Greg Beaver [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 5:27 PM Subject: [PHP-DEV] can't get wincvs to ask for login Hi, I'm trying to commit some changes, and can't get wincvs to log me in or even to request a password with pserver. I've changed the username from cvsread to cellog. Anyone with wincvs experience know how to make the stupid thing work? Greg -- 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] Re: zend_API.c
On Mon, 03 Feb 2003, Harald Radi wrote: if $obj is an overloaded object $obj-method() would directly call the native implementation of method(), if it is a pear object, $obj-method() will result in a userspace method invokation that actually calls the native implementation adding a further level of indirection for each method call. for something like while($mysqli-fetch_row()) {} this could be an issue (though i don't know how much of an issue). It's a difference between doing a call_user_function_ex() and invoking the handler directly. you're missing the point. if i invoke a method i don't expect it to print a warning, i expect it to throw an exception (most likely) and imho this is the prevailing opinion in oo. No, I'm not missing the point. How is this going to be achieved with your approach? You have the same function handling both function and OO API? Is it going to throw exception based on how it's called? -Andrei http://www.gravitonic.com/ The 3 great virtues of a programmer: Laziness, Impatience, and Hubris. --Larry Wall -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] can't get wincvs to ask for login
Hi, I manually modified the Root file in each dir to have [EMAIL PROTECTED] instead of cvsread. The problem was karma, everything should be fixed now. Thanks, Greg - Original Message - From: Andrey Hristov [EMAIL PROTECTED] To: Greg Beaver [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 11:16 AM Subject: Re: [PHP-DEV] can't get wincvs to ask for login Did you checked out from smarty with your new account or with anonymous ? Andrey - Original Message - From: Greg Beaver [EMAIL PROTECTED] To: Andrey Hristov [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 6:42 PM Subject: Re: [PHP-DEV] can't get wincvs to ask for login Hi Andrey, Tortoisecvs is much better than wincvs, thank you. The only other problem I have is that cvs says I don't have karma to commit things in smarty. I assume this is because I have a new account, but if I should have enough karma to commit, I may have configured something wrong (although there doesn't appear to be anything to configure in tortoise). Otherwise, I need more karma :) Thanks, Greg - Original Message - From: Andrey Hristov [EMAIL PROTECTED] To: Greg Beaver [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 10:32 AM Subject: Re: [PHP-DEV] can't get wincvs to ask for login Try out : http://www.tortoisecvs.org/ This is shell extension to explorer.exe .Everything is done with the right button of the mouse wherever you are (except Java programs). On the same page there is project for Subversion shell of the same type. Andrey - Original Message - From: Greg Beaver [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 03, 2003 5:27 PM Subject: [PHP-DEV] can't get wincvs to ask for login Hi, I'm trying to commit some changes, and can't get wincvs to log me in or even to request a password with pserver. I've changed the username from cvsread to cellog. Anyone with wincvs experience know how to make the stupid thing work? Greg -- 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] RE: zend_API.c
It's a difference between doing a call_user_function_ex() and invoking the handler directly. i don't get your point. how would such a pear class look like ? you're missing the point. if i invoke a method i don't expect it to print a warning, i expect it to throw an exception (most likely) and imho this is the prevailing opinion in oo. No, I'm not missing the point. How is this going to be achieved with your approach? You have the same function handling both function and OO API? Is it going to throw exception based on how it's called? yup, that was the idea. harald -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] preg_replace oddity [exploitable]
On Mon, 3 Feb 2003, Maxim Maletsky wrote: James E. Flemer [EMAIL PROTECTED] wrote... : I found a more evil example: ?php $a = ___! `rm -rf /tmp/sess_*` !___; $b = preg_replace(/!(.*)!/e, print(\\1);, $a); ? This happily executes rm -rf /tmp/sess_*. I will not give out more examples, but if one examines the code for addslashes() it is quite obvious what you can an cannot do here. Thus it is clearly a Bad Thing for someone to use preg_replace with the /e modifier and not use quotes around the \\n or $n backrefs. The docs should be updated to include a very noticeable warning about this hole. I am contemplating possible solutions for this problem... --snip-- In fact, /e eval()uates the code. It does with the replaced result just what eval() does with a string PHP code. At most, it could be noted in docs. Yes, I am aware of that, that is what /e is for. The issue is not that it eval()s the code, the issue is weather or not the backrefs (\\1 or $1 etc) are enclosed in single quotes. The preg_replace() code calls php_addslashes() on the backref data, so if the backref is enclosed in quotes then there is no way to do anything malicious. However if a PHP coder writes a script that uses preg_replace() without placing quotes around a backref, and the subject (arg 1) of the function can be supplied by the remote user, then the remote user can easily insert potentially dangerous code that will be executed on the server with the running permision of the web server. Now consider the use of this expliot in conjunction with a know local-user expliot for some OS. PHP provides convinient easy access to execute arbitrary commands as a local user... I think it should be explicitly stated in the docs for preg_replace() that Bad Things can occur if backrefs are not enclosed in single quotes, and that mildly bad things can occur if they are enclosed in double quotes (i.e. variable expansion of possibly sensative local variables). -James -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: hatem
contributions to arabic documentation translation (php pear manual). thx -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] writing test cases
Hi all, please take care if you write test cases. Tests for PHP5/ZE2 only are also in the PHP4 branch, but some of them have no SKIPIF for versions 5.0.0, please use version_compare() to skip these tests for lower versions. Same problem with tests for changed functions (for instance range()). This test failed for 4.3.1-dev, because PHP 5 doesn't know the third parameter. Please don't mix tests across the versions, write a new test with version check for a new parameter/feature. In addition to my yesterday's mail I've found a new broken test: tests/lang/bug21961.phpt Thanks, Kai -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] writing test cases
Kai Schröder [EMAIL PROTECTED] wrote: In addition to my yesterday's mail I've found a new broken test: tests/lang/bug21961.phpt Fixed. Thanks for the notification. Moriyoshi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] writing test cases
that's not true guys, PHP4 is in the PHP_4_3 branch and if you don't explicitely commit the tests to that branch they won't be there. HEAD is PHP5. there's no need for comparing versions or whatever except if you want to make one test work differently for both php versions. harald Moriyoshi Koizumi [EMAIL PROTECTED] schrieb im Newsbeitrag news:20030204015827W=3'[EMAIL PROTECTED]... Kai Schröder [EMAIL PROTECTED] wrote: In addition to my yesterday's mail I've found a new broken test: tests/lang/bug21961.phpt Fixed. Thanks for the notification. Moriyoshi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] writing test cases
I got the same idea in the first place and so I didn't append SKIPIF section. I simply don't know much about Windows testruns. Moriyoshi Harald Radi [EMAIL PROTECTED] wrote: that's not true guys, PHP4 is in the PHP_4_3 branch and if you don't explicitely commit the tests to that branch they won't be there. HEAD is PHP5. there's no need for comparing versions or whatever except if you want to make one test work differently for both php versions. harald Moriyoshi Koizumi [EMAIL PROTECTED] schrieb im Newsbeitrag news:20030204015827W=3'[EMAIL PROTECTED]... Kai Schröder [EMAIL PROTECTED] wrote: In addition to my yesterday's mail I've found a new broken test: tests/lang/bug21961.phpt Fixed. Thanks for the notification. Moriyoshi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Using CLI as a shell
After adding -B, -F, -R and -E which will hopefully liked by the rest of development team so that the stuff need not to be removed. I (or better a friend of mine) had another idea. Here comes: Why not use CLI as a shell? I'd say adding a command line switch say -S which parses and executes every line that is entered. What do you think? regards marcus -- --- mailto:[EMAIL PROTECTED] -- We are animals among animals, all children of matter, save that we are the more disarmed. But since, unlike animals, we know that we must die, let us prepare for that moment by enjoying the life that has been given us by chance and for chance. Umberto Eco, The island of the day before - http://marcus-boerger.de - -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Using CLI as a shell
On Mon, 3 Feb 2003, Marcus [iso-8859-1] Börger wrote: After adding -B, -F, -R and -E which will hopefully liked by the rest of development team so that the stuff need not to be removed. Perhaps start by explaining what they do? I (or better a friend of mine) had another idea. Here comes: Why not use CLI as a shell? I'd say adding a command line switch say -S which parses and executes every line that is entered. What do you think? PHP is not a shell, and we have interactive mode for that already. I really don't see the use for this. Derick -- - 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] writing test cases
that's not true guys, PHP4 is in the PHP_4_3 branch and if you don't explicitely commit the tests to that branch they won't be there. HEAD is PHP5. Because tests are not in the win32 snaps, I make cvs -z9 -d :pserver:[EMAIL PROTECTED]:/repository co php4 to checkout the PHP4 branch. Is this wrong? Regards, Kai -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] writing test cases
On Mon, 3 Feb 2003, [iso-8859-1] Kai Schröder wrote: that's not true guys, PHP4 is in the PHP_4_3 branch and if you don't explicitely commit the tests to that branch they won't be there. HEAD is PHP5. Because tests are not in the win32 snaps, I make cvs -z9 -d :pserver:[EMAIL PROTECTED]:/repository co php4 to checkout the PHP4 branch. Is this wrong? yes, use: cvs co -r PHP_4_3 php4 or: cvs co php5 Derick -- - 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] writing test cases
On Mon, 3 Feb 2003, Derick Rethans wrote: On Mon, 3 Feb 2003, [iso-8859-1] Kai Schröder wrote: that's not true guys, PHP4 is in the PHP_4_3 branch and if you don't explicitely commit the tests to that branch they won't be there. HEAD is PHP5. Because tests are not in the win32 snaps, I make cvs -z9 -d :pserver:[EMAIL PROTECTED]:/repository co php4 to checkout the PHP4 branch. Is this wrong? yes, use: cvs co -r PHP_4_3 php4 or: cvs co php5 And don't try to run tests written for HEAD with PHP 4.3.x.. --Jani -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Using CLI as a shell
At 19:37 03.02.2003, Derick Rethans wrote: On Mon, 3 Feb 2003, Marcus [iso-8859-1] Börger wrote: After adding -B, -F, -R and -E which will hopefully liked by the rest of development team so that the stuff need not to be removed. Perhaps start by explaining what they do? First simply use php -h but i am also thinking about adding a man page. Ok an example even though i do not know if it is a good one because you may find better solutions but it shows how it works. Type the following shell command at the php source directory: find . -name '*.c' -o -name '*.h' | php -B '$l=0;' -R '$f=count(file($argn)); echo $argn($n)\n;$l+=$f;' -E 'echo Files: $argi, Lines: $l\n;' This one uses find to search for all .c and .h files in the current directory. At startup it initialises $l to zero. For every line reported by find (every file) the statement in -R gets executed. That statement counts the lines in the current file and shows its name and linecount. After all files are processed the statement in -E show the result (line count of all files). I hope the above example points out the idea. I (or better a friend of mine) had another idea. Here comes: Why not use CLI as a shell? I'd say adding a command line switch say -S which parses and executes every line that is entered. What do you think? PHP is not a shell, and we have interactive mode for that already. I really don't see the use for this. Just an idea to think about There is a difference between interactive mode and this idea. The idea was to execute every single line. So if you type 'echo Hello\n; and press enter Hello should be displayed. regards marcus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Using CLI as a shell
At 07:31 PM 2/3/2003 +0100, Marcus Börger wrote: After adding -B, -F, -R and -E which will hopefully liked by the rest of development team so that the stuff need not to be removed. I (or better a friend of mine) had another idea. Here comes: I am glad to hear someone else is interested in php.cli improvements. I have written an extension to Gnu Make which enables using sapi/cli/php in a makefile environment with auto-detection of dependencies. See: http://www.xmake.org I have previously posted twice on the subject of a -M switch (similar to gcc -M), for enabling proper use of sapi/cli/php in a makefile environment - I got no responses. Here is the proposal: * Add a '-M' option to sapi/cli/php that would behave essentially the same as gcc -M and enable the use of php command-line scripts to work properly in a makefile build environment (See below for explanation of gcc -M). * 'php -M -f myFile.php' should differ from 'gcc -M myFile.c', in two ways: a) Command output should only list prerequisite files rather than a complete dependency makefile rule since there is no standard suffix for php output as for C [ myFile.o : myFile.c ... ] b) Detect dependencies other than included and required files, as reported by get_included_files(). There are many other ways that a PHP script could become dependent on other files which cannot easily be determined automatically unless a function is available for a script to explicitly declare that it depends on an external file. [Example: ? if (file_exists($myFile)) echo hello;?]. * Add two built-in PHP functions to allow '-M' option to accurately identify file dependencies in PHP source files (the names could change): void register_prerequisite_file( string $myFile ) Array get_prerequisite_files( ) * With the above two functions, this is how the system should work: In the following example, /usr/local/bin/php-cli is the command-line version of PHP: sapi/cli/php - file: test.php #!/usr/local/bin/php-cli ? php include( myIncludedFile.php ); register_prerequisite_file( myRequiredFile) if (file_exists( myRequiredFile )) echo got file; ? eof Internally php-cli -M would call get_included_files() and get_prerequisite_files() and join them together in a space separated list, with the first item being the source file. Here is what php-cli would do from the command line: $/usr/local/bin/php-cli -M -f test.php test.php myIncludedFile.php myRequiredFile --- # example makefile which implements the functionality without php -M # Command for generating output files from source files # the command-line version of php binary must be specified in: XME_php.cli_outfileCmd # this is built under php_source_dir/sapi/cli/php XME_php.cli_outfileCmd:=/usr/local/bin/php # Command to generate a list of dependencies from a source file (including the source file) # $(1) - source file define XME_php.cli_dependCmd $(shell $(XME_php.cli_outfileCmd) -r 'include $(1); $$tmpFile = $(XMAKE_TMP_DIR)/php.cli_dependCmd_out; if (function_exists('get_prerequisite_files')){ $$files = get_prerequisite_files();}else{$$files = get_included_files();} $$str = join( ,$$files); $$fp = @fopen( $$tmpFile, w); fputs( $$fp, $$str );' 1$(XMAKE_TMP_DIR)/php.cli_dependCmd_junk || { cat $(XMAKE_TMP_DIR)/php.cli_dependCmd_junk; exit 1; }; cat $(XMAKE_TMP_DIR)/php.cli_dependCmd_out; ) endef # end of makefile Below is what the include file looks like ?php /* These functions supporting php dependency makefile rule generation This file would become obsolete if sapi/cli/php -M option is approved for inclusion in PHP USAGE: // paths to files must be ABSOLUTE paths, resolving any symbolic links // assume your script uses a file 'file1', in the same directory as the script file // $file1=realpath(file1) doesn't work since it returns false if the file doesn't exist // since file1 may be created by XMake, we need the path whether or not it exists // Try this: require_once( getenv(XMAKE_HOME)./config/XMExtensions/php.cli.inc ); $filesArray=array( dirname(__FILE__).'/file1' ); register_prerequisite_files( $filesArray ); */ $XMAKE_PHP_PREREQUISITE_FILES=array(); function register_prerequisite_files( $filesArray ){ global $XMAKE_PHP_PREREQUISITE_FILES; $XMAKE_PHP_PREREQUISITE_FILES = array_merge($XMAKE_PHP_PREREQUISITE_FILES, $filesArray); } function get_prerequisite_files(){ global $XMAKE_PHP_PREREQUISITE_FILES; $filesArray = array_merge(get_included_files(), $XMAKE_PHP_PREREQUISITE_FILES); return $filesArray; } ? - Greg Keraunen http://www.xmake.org http://www.xmlmake.com -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Using CLI as a shell
There is a difference between interactive mode and this idea. The idea was to execute every single line. So if you type 'echo Hello\n; and press enter Hello should be displayed. i like this idea, so i no longer have to type echo Hello on my bash prompt :) harald -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] sapi/nsapi/nsapi.c
Excelent, The CGI vars are correct. One less sapi module to deal with :) Shane Uwe Schindler wrote: The variables you explain are surely there. But a lot of scripts depend on other headers, which the client sent. The SAPI module only creates Variables for a subset of them (HTTP_USER_AGENT). But not for all like the other SAPI modules. So with this patch you get for example the missing HTTP_HOST-Header (HTTP/1.1) because the patch creates for every variable in the request a HTTP_XXX-Variable. So you can see all headers the client have sent. This is the way the other SAPI modules (APACHE) and the normal CGI environment works. Without it about 50% of the currently available PHP scripts do not run correctly. You can try it with: http://www.emarcon.net/test.php which runs the patched Version. Yo will see all headers sent by your client not only the ones explained below and HTTP_USER_AGENT and HTTP_ACCEPT_* Greetings from Germany, Uwe At 15:52 02.02.2003 -0800, you wrote: Hi Uwe, I haven't looked at the patch, but I am wondering if the nsapi sapi module creates variables for php that conform to the cgi spec. Can you try the following url against a phpinfo(); script: http://localhost/info.php/test/path?query=string You should get: PATH_INFO=/test/path PATH_TRANSLATED=/your_web_document_root/test/path QUERY_STRING=query=string SCRIPT_NAME=/info.php PHP_SELF=/info.php If you do not, then the sapi module is not conformant to cgi spec, and still needs some work. Shane Uwe Schindler wrote: I submit a patch for the NSAPI SAPI module and hope that it fixes a lot of problems I have (and others as seen in the bug database). As a lot of variables which are needed by a lot of PHP scripts which use $_SERVER[...] are not transferred correctly to the PHP script that runs in iPlanet Webserver (4 or 6). An example are the Host and X-Forwarded headers. This is so, because the transferred variables are static in the SAPI module. The new nsapi.c file now transfers _ALL_ variables from rc-rq-headers to php_register_variable(HTTP_+headername_uppercase, ...). Also missing variables like SERVER_SOFTWARE are added. A lot of customers complain about memory leaks in this module. I hope they are also fixed by freeing the by nsapi allocated strings (the return value of session_dns and http_uri2url). The patch should work with Netscape/iPlanet Servers from version 3 on (I used no newer API calls). If you are interested I could eventually create a patch for supporting the virtual servers in SunONE/iPlanet Web Server 6, because some vars only get the default-hostname not the real virtual server name (for example $_SERVER[SERVER_URL] which is often used in scripts to refer together with $_SERVER[PHP_SELF]). But this mut be done with #ifdefs because some new functions are in the nsapi since version 6. A good fix would be also to map $_SERVER[SERVER_URL] to http://$SERVER[HTTP_HOST];, because in iPlanet-Servers the Host variable is everytime available (if not in original HTTP-headers it is defined to be the default hostname). Greetings, Uwe - Uwe Schindler Addr 1: Bamberger Str. 24a, D-96049 Bamberg Addr 2: Drausnickstr. 153, D-91052 Erlangen http://www.thetaphi.de - http:///www.schindlers-software.de eMails: [EMAIL PROTECTED] (private); [EMAIL PROTECTED] (company) Tel./Fax: +49 700 PCLATEIN (+49 700 72528346) Schindlers Software - Home of Schindlers PC-LATEIN 3.10 DIE Software zum Lateinlernen! - Uwe Schindler Addr 1: Bamberger Str. 24a, D-96049 Bamberg Addr 2: Drausnickstr. 153, D-91052 Erlangen http://www.thetaphi.de - http:///www.schindlers-software.de eMails: [EMAIL PROTECTED] (private); [EMAIL PROTECTED] (company) Tel./Fax: +49 700 PCLATEIN (+49 700 72528346) Schindlers Software - Home of Schindlers PC-LATEIN 3.10 DIE Software zum Lateinlernen! -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Using CLI as a shell
There is a difference between interactive mode and this idea. The idea was to execute every single line. So if you type 'echo Hello\n; and press enter Hello should be displayed. i like this idea, so i no longer have to type echo Hello on my bash prompt :) At least with this (presumably) Python style shell you could use readline to prevent you typing echo Hello twice (as opposed to current php -a). :) -- Richard Heyes -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DEV] Using CLI as a shell
There is a difference between interactive mode and this idea. The idea was to execute every single line. So if you type 'echo Hello\n; and press enter Hello should be displayed. i like this idea, so i no longer have to type echo Hello on my bash prompt :) At least with this (presumably) Python style shell you could use readline to prevent you typing echo Hello twice (as opposed to current php -a). :) The Command Shell program in Recipe 20.9 of the PHP Cookbook uses readline() to implement a PHP shell-style prompt, where each line is executed as you type it. It also uses readline_completion_function() to provide tab-completion for function names. You can download it in the archive of code from the book at: -- http://examples.oreilly.com/phpckbk/ -dave -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] RE: zend_API.c
Hey, I think the discussion you guys are having is much broader than just mysqli. We should probably come up with a general approach which we will use consistently for PHP 5. I suggest we move this discussion to the PHP 5 dev list and try and come up with a good solution. Obviously we will keep the functional support for all extensions like PHP 4. The only question is, if and how we support an OO paradigm. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] sapi/nsapi/nsapi.c
I worked this afternon on rewriting a lot of things in the module which now gives the php script almost the same variables like the apache sapi module (as provided). For comparison: same request on two different servers, one with apache other with iplanet: iplanet: _GET[huhu] haha _SERVER[QUERY_STRING] huhu=haha _SERVER[REQUEST_LINE] GET /test.php/testpfad?huhu=haha HTTP/1.1 _SERVER[REQUEST_METHOD] GET _SERVER[PHP_SELF] /test.php/testpfad _SERVER[SERVER_PROTOCOL] HTTP/1.1 _SERVER[HTTP_ACCEPT] */* _SERVER[HTTP_ACCEPT_LANGUAGE] de _SERVER[HTTP_ACCEPT_ENCODING] gzip, deflate _SERVER[HTTP_USER_AGENT] Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461) _SERVER[HTTP_HOST] edvs0.awi-bremerhaven.de _SERVER[HTTP_CONNECTION] Keep-Alive _SERVER[PATH_INFO] /testpfad _SERVER[SCRIPT_FILENAME] /pangaea/webserver/docs/test.php _SERVER[REMOTE_ADDR] 217.81.211.4 _SERVER[REMOTE_HOST] 217.81.211.4 _SERVER[SERVER_PORT] 80 _SERVER[SERVER_NAME] edvs0.awi-bremerhaven.de _SERVER[SERVER_URL] http://edvs0.awi-bremerhaven.de _SERVER[SERVER_SOFTWARE] iPlanet-WebServer-Enterprise/6.0 _SERVER[HTTPS] OFF _SERVER[GATEWAY_INTERFACE] CGI/1.1 _SERVER[DOCUMENT_ROOT] /pangaea/webserver/docs _SERVER[PATH_TRANSLATED] /pangaea/webserver/docs/testpfad _SERVER[REQUEST_URI] /test.php/testpfad?huhu=haha _SERVER[SCRIPT_NAME] /test.php apache: _GET[huhu] haha _SERVER[DOCUMENT_ROOT] /data/web4u/html _SERVER[HTTP_ACCEPT] */* _SERVER[HTTP_ACCEPT_ENCODING] gzip, deflate _SERVER[HTTP_ACCEPT_LANGUAGE] de _SERVER[HTTP_CONNECTION] Keep-Alive _SERVER[HTTP_HOST] www.web4u.cz _SERVER[HTTP_USER_AGENT] Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461) _SERVER[PATH] /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin _SERVER[REMOTE_ADDR] 217.81.211.4 _SERVER[REMOTE_PORT] 58578 _SERVER[SCRIPT_FILENAME] /data/web4u/html/phpinfo.php4 _SERVER[SERVER_ADDR] 194.228.111.51 _SERVER[SERVER_ADMIN] [EMAIL PROTECTED] _SERVER[SERVER_NAME] www.web4u.cz _SERVER[SERVER_PORT] 80 _SERVER[SERVER_SIGNATURE] ADDRESSApache/1.3.27 Server at www.web4u.cz Port 80/ADDRESS _SERVER[SERVER_SOFTWARE] Apache/1.3.27 (Unix) PHP/4.2.3 (LD+WD4 patch) PHP/3.0.18 (CZ 0.33) (LD+FU+WD2 patch) _SERVER[GATEWAY_INTERFACE] CGI/1.1 _SERVER[SERVER_PROTOCOL] HTTP/1.1 _SERVER[REQUEST_METHOD] GET _SERVER[QUERY_STRING] huhu=haha _SERVER[REQUEST_URI] /phpinfo.php4/testpfad?huhu=haha _SERVER[SCRIPT_NAME] /phpinfo.php4 _SERVER[PATH_INFO] /testpfad _SERVER[PATH_TRANSLATED] /data/web4u/html/testpfad _SERVER[PHP_SELF] /phpinfo.php4/testpfad In the original module were also errors in the variables PATH_TRANSLATED (contained the full path, same as PHP_SELF) and SCRIPT_NAME. Also one open issue is, as I see in your mailing list archive, DOCUMENT_ROOT: It works with my modification even with virtual servers. If I can do any further improvements let me know it. I have some experience with NSAPI so I could help to make the module always up-to-date when new servers of iPlanet/SUN came on the market. With this new file the memory leaks (webserver eats up memory during afew days running) are also disappeared (all by NSAPI allocated strings are freed). Uwe P.S.: I have attached the finished nsapi.c file (in complete) because a patch has almost the same size :) The patch I send yesterday was not fully correct. At 11:14 03.02.2003 -0800, Shane Caraveo wrote: Excelent, The CGI vars are correct. One less sapi module to deal with :) Shane Uwe Schindler wrote: The variables you explain are surely there. But a lot of scripts depend on other headers, which the client sent. The SAPI module only creates Variables for a subset of them (HTTP_USER_AGENT). But not for all like the other SAPI modules. So with this patch you get for example the missing HTTP_HOST-Header (HTTP/1.1) because the patch creates for every variable in the request a HTTP_XXX-Variable. So you can see all headers the client have sent. This is the way the other SAPI modules (APACHE) and the normal CGI environment works. Without it about 50% of the currently available PHP scripts do not run correctly. You can try it with: http://www.emarcon.net/test.php which runs the patched Version. Yo will see all headers sent by your client not only the ones explained below and HTTP_USER_AGENT and HTTP_ACCEPT_* Greetings from Germany, Uwe At 15:52 02.02.2003 -0800, you wrote: Hi Uwe, I haven't looked at the patch, but I am wondering if the nsapi sapi module creates variables for php that conform to the cgi spec. Can you try the following url against a phpinfo(); script: http://localhost/info.php/test/path?query=string You should get: PATH_INFO=/test/path PATH_TRANSLATED=/your_web_document_root/test/path QUERY_STRING=query=string SCRIPT_NAME=/info.php PHP_SELF=/info.php If you do not, then the sapi module is not conformant to cgi spec, and still needs some work. Shane Uwe Schindler wrote: I submit a patch for the NSAPI SAPI module and hope that it fixes a lot of problems I have (and others as seen in
[PHP-DEV] OO in PHP5 (was zend_API.c on php-dev)
Hrmfpsd, while commiting a new functions the parameter parsing API i appearently brought up a discussion about the meaning of life and stuff :) As asked by Andi i'm bringing the discussion to php5-dev with a short summary: andrei's point: extensions should stick to either functional or oo API PEAR wrappers can be provided my point: extensions should expose both APIs (if desired) can be done by aliasing functions to class methods - no duplicate c code when called as function - print warning when called as method - throw exception What do you guys think of this ? regards, Harald Radi -- nme - we can heal you http://www.nme.at Ortner Radi Schwenk GnbR Tumpenweg 528 5084 Grossgmain, Salzburg Austria -Original Message- From: Andi Gutmans [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 9:10 PM To: Harald Radi; 'Andrei Zmievski' Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] RE: zend_API.c Hey, I think the discussion you guys are having is much broader than just mysqli. We should probably come up with a general approach which we will use consistently for PHP 5. I suggest we move this discussion to the PHP 5 dev list and try and come up with a good solution. Obviously we will keep the functional support for all extensions like PHP 4. The only question is, if and how we support an OO paradigm. Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] PHP 5 mailing list
To all concerned, I would like to request that yet again the PHP5 mailing list be made public and no longer kept private. Given that comments in the past few hours have centered around the existence of the mailing list, it seems rather absurd to continue the secrecy notion. To those who will say it is open for joining, I submit to you the following considerations. First there is no mention of said mailing list existing on the mailing-list tab of the PHP main web site. Second there is still no publicly viewable record of what has transpired on the mailing list (which means the 'read the archives' comment is futile). I for one find it really annoying to find changes to PHP being done without discussion. Only later to find through an IRC channel what was done and why. --- Dan KalowskyI'll walk a thousand miles just http://www.deadmime.org/~dankto slip this skin. [EMAIL PROTECTED]- Streets of Philadelphia, [EMAIL PROTECTED]Bruce Springsteen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 5 mailing list
At 03:22 PM 2/3/2003 -0500, Dan Kalowsky wrote: To all concerned, I would like to request that yet again the PHP5 mailing list be made public and no longer kept private. Given that comments in the past few hours have centered around the existence of the mailing list, it seems rather absurd to continue the secrecy notion. To those who will say it is open for joining, I submit to you the following considerations. First there is no mention of said mailing list existing on the mailing-list tab of the PHP main web site. Second there is still no publicly viewable record of what has transpired on the mailing list (which means the 'read the archives' comment is futile). I for one find it really annoying to find changes to PHP being done without discussion. Only later to find through an IRC channel what was done and why. As far as I know the mailing list is open for anyone to subscribe (it is moderated). I think a new archive was created which starts about a week ago but I'm not sure where it can be accessed. I am very happy that the mailing-list tab on the PHP main web site doesn't include it yet. I'd prefer only people who are active in the developer's community (i.e. php-dev, php-qa) to be part it. The last thing we need is to have the whole PHP users community on it. We won't get anything done and that was the whole reason to keep things small. Andi P.S.-I don't think your negative tone was called for. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] OO in PHP5 (was zend_API.c on php-dev)
On Monday, February 3, 2003, at 03:20 PM, Harald Radi wrote: Hrmfpsd, while commiting a new functions the parameter parsing API i appearently brought up a discussion about the meaning of life and stuff :) As asked by Andi i'm bringing the discussion to php5-dev with a short summary: andrei's point: extensions should stick to either functional or oo API PEAR wrappers can be provided my point: extensions should expose both APIs (if desired) can be done by aliasing functions to class methods - no duplicate c code when called as function - print warning when called as method - throw exception What do you guys think of this ? I like your method. I've implemented it for a coupe extensions (except for the exception vs. error thing), and I found it to be quite manageable and very little work. regards, Harald Radi -- nme - we can heal you http://www.nme.at Ortner Radi Schwenk GnbR Tumpenweg 528 5084 Grossgmain, Salzburg Austria -Original Message- From: Andi Gutmans [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 9:10 PM To: Harald Radi; 'Andrei Zmievski' Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DEV] RE: zend_API.c Hey, I think the discussion you guys are having is much broader than just mysqli. We should probably come up with a general approach which we will use consistently for PHP 5. I suggest we move this discussion to the PHP 5 dev list and try and come up with a good solution. Obviously we will keep the functional support for all extensions like PHP 4. The only question is, if and how we support an OO paradigm. Andi -- 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] OO in PHP5 (was zend_API.c on php-dev)
On Mon, 2003-02-03 at 15:41, George Schlossnagle wrote: On Monday, February 3, 2003, at 03:20 PM, Harald Radi wrote: Hrmfpsd, while commiting a new functions the parameter parsing API i appearently brought up a discussion about the meaning of life and stuff :) As asked by Andi i'm bringing the discussion to php5-dev with a short summary: andrei's point: extensions should stick to either functional or oo API PEAR wrappers can be provided my point: extensions should expose both APIs (if desired) can be done by aliasing functions to class methods - no duplicate c code when called as function - print warning when called as method - throw exception What do you guys think of this ? I like your method. I've implemented it for a coupe extensions (except for the exception vs. error thing), and I found it to be quite manageable and very little work. Needless to say (it was implemented in adt quite awhile ago), I think this is the better way. In any event, I don't see the downside to adding this api: Whomever wants to use it can take advantage of it, those who think its stupid, don't need to use it. -Sterling -- Programming today is a race between software engineers stirring to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning. - Unknown -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Bug # 13551, bcmath scale:: when to apply
Andi, Nicos assigned this bug to you a month ago, but since I've seen no activity (and it's entirely possible you didn't know he'd assigned it) I went ahead and took a crack at it. Would you care to give me the go ahead to commit/close for you? ...or tell me to mind my own bugs? :) Patches against PHP_4_3 and HEAD can be found at: http://frankenbox.alphaweb.net/test/php_4_3.bcmath.diff.txt and http://frankenbox.alphaweb.net/test/HEAD.bcmath.diff.txt The idea being to automagically determine the scale of the input numbers so that they are not truncated prior to the op. Then, once the op has been performed, reduce the scale to whatever was requested. The result-n_scale = scale; line might look a little dangerous, but since it only comes after lines which create 'result' with a scale of *at minimum* 'scale' it means that 'result-n_scale' will always be = 'scale' and hence assigning it to 'scale' will always result in a reduction (or no change at all) and bc_num2str won't go looking in undefined sections of the bc_num val. -Pollita P.S. - This one's for you sniper ;) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Register Shutdown Function for Apache
Here is an updated patch which copies a few of the methods from main/main.c::php_request_shutdown to sapi/apache/sapi_apache.c::apache_php_module_main. This has flushed both the headers and output buffers in my two test scripts. Now I need to figure out a way to make sure these don't get called in main/main.c::php_request_shutdown on Apache systems. Any pointers on this? Is there a handy #define that I can use if configure is called --with-apxs? Joseph P.S. The two test scripts are: ?PHP header('Location: http://www.mi-corporation.com'); exit(); ? and ?PHP ob_begin(); phpinfo(); ? -Original Message- From: Brian Moon [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 5:50 PM To: [EMAIL PROTECTED]; Joseph Tate Cc: Php-Dev List; PHP Group Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache Give me a patch and I will tell you. ;) Brian Moon dealnews.com - Original Message - From: Zeev Suraski [EMAIL PROTECTED] To: Joseph Tate [EMAIL PROTECTED] Cc: Brian Moon [EMAIL PROTECTED]; Php-Dev List [EMAIL PROTECTED]; PHP Group [EMAIL PROTECTED] Sent: Tuesday, January 28, 2003 4:03 PM Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache | At 19:54 28/01/2003, Joseph Tate wrote: | Then, could we add a sapi_flush()/ob_flush() call at the end of | apache_php_module_main after calling the normal register_shutdown_functions? | | Yeah, something along these lines. | | What else might have problems? | | Might is a powerful word :) | | Zeev | | | -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php ? php4/ext/mysql/.libs ? php4/main/.main.c.swp ? php4/sapi/apache/.sapi_apache.c.swp Index: php4/ext/standard/basic_functions.c === RCS file: /repository/php4/ext/standard/basic_functions.c,v retrieving revision 1.543.2.4 diff -u -r1.543.2.4 basic_functions.c --- php4/ext/standard/basic_functions.c 20 Dec 2002 16:37:44 - 1.543.2.4 +++ php4/ext/standard/basic_functions.c 3 Feb 2003 21:32:05 - @@ -1121,6 +1121,7 @@ } #endif BG(user_shutdown_function_names) = NULL; + BG(user_apache_shutdown_function_names) = NULL; #if HAVE_CRYPT PHP_RINIT(crypt) (INIT_FUNC_ARGS_PASSTHRU); @@ -2085,32 +2086,28 @@ } } -void php_call_shutdown_functions(void) +PHPAPI void php_call_shutdown_functions(HashTable ** names) { TSRMLS_FETCH(); - if (BG(user_shutdown_function_names)) + if (*names){ zend_try { - zend_hash_apply(BG(user_shutdown_function_names), (apply_func_t) user_shutdown_function_call TSRMLS_CC); + zend_hash_apply(*names, (apply_func_t) +user_shutdown_function_call TSRMLS_CC); memcpy(EG(bailout), orig_bailout, sizeof(jmp_buf)); - zend_hash_destroy(BG(user_shutdown_function_names)); - efree(BG(user_shutdown_function_names)); + zend_hash_destroy(*names); + efree(*names); + *names = NULL; } - zend_end_try(); + zend_end_try(); + } } -/* {{{ proto void register_shutdown_function(string function_name) - Register a user-level function to be called on request termination */ -PHP_FUNCTION(register_shutdown_function) +PHPAPI void register_shutdown_function_entry(HashTable ** names, int ht, zval * +return_value) { php_shutdown_function_entry shutdown_function_entry; int i; - shutdown_function_entry.arg_count = ZEND_NUM_ARGS(); - - if (shutdown_function_entry.arg_count 1) { - WRONG_PARAM_COUNT; - } + shutdown_function_entry.arg_count = (ht); shutdown_function_entry.arguments = (pval **) emalloc(sizeof(pval *) *shutdown_function_entry.arg_count); @@ -2118,14 +2115,26 @@ RETURN_FALSE; } if (!BG(user_shutdown_function_names)) { - ALLOC_HASHTABLE(BG(user_shutdown_function_names)); - zend_hash_init(BG(user_shutdown_function_names), 0, NULL, (void (*)(void *)) user_shutdown_function_dtor, 0); + ALLOC_HASHTABLE(*names); + zend_hash_init(*names, 0, NULL, (void (*)(void *)) +user_shutdown_function_dtor, 0); } for (i = 0; i shutdown_function_entry.arg_count; i++) { shutdown_function_entry.arguments[i]-refcount++; } - zend_hash_next_index_insert(BG(user_shutdown_function_names), shutdown_function_entry, sizeof(php_shutdown_function_entry), NULL); + zend_hash_next_index_insert(*names, shutdown_function_entry, +sizeof(php_shutdown_function_entry), NULL); + RETURN_TRUE; +} + +/* {{{ proto void register_shutdown_function(string function_name) + Register a user-level function to be
Re: [PHP-DEV] Register Shutdown Function for Apache
Hmm, there is #define MOD_PHP4_H in sapi/apache/mod_php4.h. Not real descriptive, but seems to be unique to the Apache sapi. Brian Moon dealnews.com - Original Message - From: Joseph Tate [EMAIL PROTECTED] To: Brian Moon [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: Php-Dev List [EMAIL PROTECTED] Sent: Monday, February 03, 2003 3:45 PM Subject: Re: [PHP-DEV] Register Shutdown Function for Apache | Here is an updated patch which copies a few of the methods from | main/main.c::php_request_shutdown to | sapi/apache/sapi_apache.c::apache_php_module_main. This has flushed both | the headers and output buffers in my two test scripts. Now I need to figure | out a way to make sure these don't get called in | main/main.c::php_request_shutdown on Apache systems. Any pointers on this? | Is there a handy #define that I can use if configure is called --with-apxs? | | Joseph | | P.S. The two test scripts are: | | ?PHP | header('Location: http://www.mi-corporation.com'); | exit(); | ? | | and | | ?PHP | ob_begin(); | phpinfo(); | ? | | -Original Message- | From: Brian Moon [mailto:[EMAIL PROTECTED]] | Sent: Tuesday, January 28, 2003 5:50 PM | To: [EMAIL PROTECTED]; Joseph Tate | Cc: Php-Dev List; PHP Group | Subject: Re: [PHP-DEV] Re: Register Shutdown Function for Apache | | | Give me a patch and I will tell you. ;) | | Brian Moon | dealnews.com | | | - Original Message - | From: Zeev Suraski [EMAIL PROTECTED] | To: Joseph Tate [EMAIL PROTECTED] | Cc: Brian Moon [EMAIL PROTECTED]; Php-Dev List | [EMAIL PROTECTED]; PHP Group [EMAIL PROTECTED] | Sent: Tuesday, January 28, 2003 4:03 PM | Subject: RE: [PHP-DEV] Re: Register Shutdown Function for Apache | | | | At 19:54 28/01/2003, Joseph Tate wrote: | | Then, could we add a sapi_flush()/ob_flush() call at the end of | | apache_php_module_main after calling the normal | register_shutdown_functions? | | | | Yeah, something along these lines. | | | | What else might have problems? | | | | Might is a powerful word :) | | | | Zeev | | | | | | | | | -- | 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] Re: OO in PHP5 (was zend_API.c on php-dev)
andrei's point: extensions should stick to either functional or oo API PEAR wrappers can be provided my point: extensions should expose both APIs (if desired) can be done by aliasing functions to class methods - no duplicate c code when called as function - print warning when called as method - throw exception What do you guys think of this? I would argue that having two different methods to do the same thing only leads to increased complexity and confusion. Sure, some people like it one way and some people another, but having a standard way of doing things is, IMHO, better. Bye, Ivan -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP 5 mailing list
I am very happy that the mailing-list tab on the PHP main web site doesn't include it yet. I'd prefer only people who are active in the developer's community (i.e. php-dev, php-qa) to be part it. Was there ever a discussion of introducing a more formal organisation into the development process (I might have missed it, having actively followed php-dev for one year only)? Something along these lines: http://httpd.apache.org/dev/guidelines.html I think that a few rules would benefit the PHP community, and allow us to spend the resources we have more wisely. Bye, Ivan -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Another bugs.php.net question
What about posting a new bug report (Feature request) as a documentation problem? :-p -- Regards. M.CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com Hébergement de sites internets. Marcus Börger [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] The assigne bugs reminder mail does not contain links to the bug reports as normal mail from there do. Wouldn't it be nice if one could simply click on the bugs? marcus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] CVS Account Request: thetaphi
As I submitted a patch for the buggy NSAPI SAPI module I wish to work towards maintaining the NSAPI. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Bug # 13551, bcmath scale:: when to apply
Hi, Indeed I wasn't aware of this bug report. It seems as if your patch is fine although I could only look at it briefly. It does look strange that you need to initialize the resulting scale manually. I thought the BC functions are supposed to take care of returning the results as the right scale. In any case, it probably makes sense for you to go ahead and commit it. BTW, is php_str2num() only supposed to work on whole or decimal values? What about exponents? I think you're probably right but I just want to make sure you thought about it. Thanks, Andi At 01:51 PM 2/3/2003 -0800, Sara Golemon wrote: Andi, Nicos assigned this bug to you a month ago, but since I've seen no activity (and it's entirely possible you didn't know he'd assigned it) I went ahead and took a crack at it. Would you care to give me the go ahead to commit/close for you? ...or tell me to mind my own bugs? :) Patches against PHP_4_3 and HEAD can be found at: http://frankenbox.alphaweb.net/test/php_4_3.bcmath.diff.txt and http://frankenbox.alphaweb.net/test/HEAD.bcmath.diff.txt The idea being to automagically determine the scale of the input numbers so that they are not truncated prior to the op. Then, once the op has been performed, reduce the scale to whatever was requested. The result-n_scale = scale; line might look a little dangerous, but since it only comes after lines which create 'result' with a scale of *at minimum* 'scale' it means that 'result-n_scale' will always be = 'scale' and hence assigning it to 'scale' will always result in a reduction (or no change at all) and bc_num2str won't go looking in undefined sections of the bc_num val. -Pollita P.S. - This one's for you sniper ;) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] changed/new tests for Win32
I've changed some tests to reduce failed test count on Windows to 7 (latest php4-win32 snap): Bug #21131: fopen($filename, a+) has broken position [D:\work\php4\ext\standard\tests\file\bug21131.phpt] Various pow() tests [D:\work\php4\ext\standard\tests\math\pow.phpt] unserialize() floats with E notation (#18654) [D:\work\php4\ext\standard\tests\serialize\003.phpt] strtotime() function [D:\work\php4\ext\standard\tests\time\002-win32.phpt] Check for mktime with out-of-range parameters [D:\work\php4\ext\standard\tests\time\003.phpt] Testing register_shutdown_function() with timeout. (Bug: #21513) [D:\work\php4\tests\func\005a.phpt] Bug #21600 (assign by reference function call changes variable contents) [D:\work\php4\tests\lang\bug21600.phpt] In the attachched phpt.zip are some files named *.phpt (new tests) and *.diff (diff -u), directory structure is same as cvs. Please take a look at the files and commit (I've no dev karma). Regards, Kai phpt.zip Description: Zip compressed data -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] sending a hyperlink in an email
PHP newbie. I'm working on a flash piece that writes to a .php file that then sends the data to email address that was in the flash form. This all works. What I need to add is a hyperlink to this email that goes out. Not sure what syntax to write in the PHP file to do this. Help? tx, morgen -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] sending a hyperlink in an email
On Tue, 4 Feb 2003 01:04:18 -0800 Cassie Quillen [EMAIL PROTECTED] wrote: PHP newbie. I'm working on a flash piece that writes to a .php file that then sends the data to email address that was in the flash form. This all works. What I need to add is a hyperlink to this email that goes out. Not sure what syntax to write in the PHP file to do this. Help? Ask in [EMAIL PROTECTED] This mailinglist is for the developement _of_ PHP, not _with_ PHP. / Magnus -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php