[PHP-DEV] PHP Source Code Help
I am trying to debug my custom TCP stack which is running under Linux OS. Do to some bug in my stack or missing feature I am getting error following from php. failed to open stream Which I have traced to file: php-4.4.7/main/streams.c and function: _php_stream_open_wrapper_ex stream = wrapper->wops->stream_opener(wrapper, path_to_open, mode, options ^ REPORT_ERRORS, opened_path, context STREAMS_REL_CC TSRMLS_CC); Error condition occurs when stream is assigned NULL from wrapper->wops->stream_opener call (see above line). I need some help figuring out which function is call by pointer wrapper->wops->stream_opener. I tried putting debug statements in some functions which are called on pointers (based on different ops (read / write / flush operations, etc.), so far I have not hit a function pointed by wrapper->wops->stream_opener. Also, if there is any documentation for understanding php source code. Thanks Usman P.S. I know 4.4.7 is old php, but by system is setup with this version for debugging TCP stack (for some reason) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] __call_static() Magic Method
Jani Taskinen schrieb: > As long as you MFH, I don't mind. Yeah, I would love to have this in PHP_5_2, too. :) -- Sebastian Bergmann http://sebastian-bergmann.de/ GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP ICU project announcement
On Saturday 14 July 2007, Stanislav Malyshev wrote: > > So now there's going to be a PHP-ICU extension for PHP 5 and PHP 6, > > and PHP 6 will have ICU built-in to such an extent that it's backwards > > compatible with PHP 5? > > Both extensions would be (are being) written in such a way that code > that worked on PHP 5 would work on PHP 6, with regard to the extension. > Of course, particular code still could fail for some other reason, not > related to the ICU extension. I.e. if you call collator_sort($foo, > $bar), collator_sort being ICU extension function, it would mean the > same in PHP 5 and PHP 6. > > > And what in the world would you do with PHP-ICU extension in PHP 6? > > I mean, unless you've type-casted a string to binary or whatever, it's > > already ICU, no?... > > I think you are confusing UTF-16 and ICU. ICU is a huge library of > Unicode text functions, which so far weren't supported in PHP except for > some collation support. There's a lot of functions to add there. UTF-16 > is just a way to represent text in bits (and ICU uses it, and so does > PHP 6). The extension would expose a part of ICU functionality to PHP > users - such as collators, formatters, resources, etc. So (from another character-set-intricacy-challenged individual), would ICU it be analogous to the DOM functions for manipulating XML-like structures? (The methods parentNode(), childNodes(), appendNode(), etc. are all supposed to mean the same thing in every language.) -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] __call_static() Magic Method
Sara Golemon kirjoitti: Attached is a patch which exports an internals hook in zend_class_entry for fetching function pointers similar to the object hook get_method() available to instance methods. This patch also exports a userspace hook __call_static() which operates in the fashion of the current __call() magic method, but for static calls. Wez called for some functionality like this a few weeks ago for a COM wrapper (or something similar), and I noticed there was actually a comment in the engine about how this should eventually be done anyway... Usage example: class foo { public static function __call_static($fname, $args) { echo "foo::{$fname}() called staticly with ", count($args), " parameters\n"; } } foo::randomMethod(1,2,3); I considered setting get_static_method to zend_std_get_static_method() by default (avoiding the if set check during runtime), but all the other hoooks follow this pattern so I went with consistency. If noone comments to the negative, I'll commit next friday (7/20)... As long as you MFH, I don't mind. --Jani -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] [PATCH] Converting accesses to refcount and is_ref to macros
David Wang kirjoitti: This patch is a simple, albeit widespread change that converts access to zval.refcount, zval.is_ref, _object_store.refcount to macros. There is no functional change to the code, but this will make it easier to implement a garbage collector in the future. Was there some particular reason to remove those ()'s around the macros? (usually they're there for a reason :) --Jani -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] FW: Simple Namespace Proposal
Hi, as only being a general lurker on this list, I remember when Namespaces came up the first time, there were some technical problems (or just syntactical sugar ones?) with the "::" operator also being used as a Namespace separate additional being a class separator. How has this been handled or are there some caveats to watch for? thank you, - Markus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] FW: Simple Namespace Proposal
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, as only being a general lurker on this list, I remmeber when Namespaces came up the first time, there were some technical problems (or just syntactical sugar ones?) with the "::" operator also being used as a namespace separate additional being a class separator. How has this been handled or are there some caveats to watch for? thank you, - - Markus -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGmG1/1nS0RcInK9ARAlMBAJ9ixpfVZ4GZQF8u0Lgd+HJall9pLgCgo9gA ogZkPQ+mgJcDxESEYGizkYs= =9OAV -END PGP SIGNATURE- -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP ICU project announcement
So now there's going to be a PHP-ICU extension for PHP 5 and PHP 6, and PHP 6 will have ICU built-in to such an extent that it's backwards compatible with PHP 5? Both extensions would be (are being) written in such a way that code that worked on PHP 5 would work on PHP 6, with regard to the extension. Of course, particular code still could fail for some other reason, not related to the ICU extension. I.e. if you call collator_sort($foo, $bar), collator_sort being ICU extension function, it would mean the same in PHP 5 and PHP 6. And what in the world would you do with PHP-ICU extension in PHP 6? I mean, unless you've type-casted a string to binary or whatever, it's already ICU, no?... I think you are confusing UTF-16 and ICU. ICU is a huge library of Unicode text functions, which so far weren't supported in PHP except for some collation support. There's a lot of functions to add there. UTF-16 is just a way to represent text in bits (and ICU uses it, and so does PHP 6). The extension would expose a part of ICU functionality to PHP users - such as collators, formatters, resources, etc. HTH, -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP ICU project announcement
On Fri, July 13, 2007 2:35 pm, Stanislav Malyshev wrote: > We have started a project to make it easier to support international > markets using PHP. A number of internationalization functions from IBM > ICU will be made available in PHP as an extension. I realize that my natural state is the state of confusing, but... Hunh? So now there's going to be a PHP-ICU extension for PHP 5 and PHP 6, and PHP 6 will have ICU built-in to such an extent that it's backwards compatible with PHP 5? And what in the world would you do with PHP-ICU extension in PHP 6? I mean, unless you've type-casted a string to binary or whatever, it's already ICU, no?... So then you'd by typecasting a string to binary so you can use ICU to make it Unicode, rather than just leaving it as Unicode in the first place? I think one of your first documentation issues is going to be explaining how this co-exists, replaces, or has zero effect on PHP 6 built-in Unicode :-) Hopefully I'm not just being ignorant, though that's entirely possible with this Unicode stuff... :-) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] __call_static() Magic Method
Attached is a patch which exports an internals hook in zend_class_entry for fetching function pointers similar to the object hook get_method() available to instance methods. This patch also exports a userspace hook __call_static() which operates in the fashion of the current __call() magic method, but for static calls. Wez called for some functionality like this a few weeks ago for a COM wrapper (or something similar), and I noticed there was actually a comment in the engine about how this should eventually be done anyway... Usage example: class foo { public static function __call_static($fname, $args) { echo "foo::{$fname}() called staticly with ", count($args), " parameters\n"; } } foo::randomMethod(1,2,3); I considered setting get_static_method to zend_std_get_static_method() by default (avoiding the if set check during runtime), but all the other hoooks follow this pattern so I went with consistency. If noone comments to the negative, I'll commit next friday (7/20)... -Sara Index: Zend/zend.h === RCS file: /repository/ZendEngine2/zend.h,v retrieving revision 1.334 diff -u -p -r1.334 zend.h --- Zend/zend.h 26 Apr 2007 19:08:24 - 1.334 +++ Zend/zend.h 14 Jul 2007 00:42:05 - @@ -378,6 +378,7 @@ struct _zend_class_entry { union _zend_function *__unset; union _zend_function *__isset; union _zend_function *__call; + union _zend_function *__call_static; union _zend_function *__tostring; union _zend_function *serialize_func; union _zend_function *unserialize_func; @@ -388,6 +389,7 @@ struct _zend_class_entry { zend_object_value (*create_object)(zend_class_entry *class_type TSRMLS_DC); zend_object_iterator *(*get_iterator)(zend_class_entry *ce, zval *object, int by_ref TSRMLS_DC); int (*interface_gets_implemented)(zend_class_entry *iface, zend_class_entry *class_type TSRMLS_DC); /* a class implements this interface */ + union _zend_function *(*get_static_method)(zend_class_entry *ce, zstr method, int method_len TSRMLS_DC); /* serializer callbacks */ int (*serialize)(zval *object, int *type, zstr *buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC); Index: Zend/zend_API.c === RCS file: /repository/ZendEngine2/zend_API.c,v retrieving revision 1.439 diff -u -p -r1.439 zend_API.c --- Zend/zend_API.c 13 Jul 2007 23:51:51 - 1.439 +++ Zend/zend_API.c 14 Jul 2007 00:42:05 - @@ -2026,6 +2026,9 @@ ZEND_API void zend_check_magic_method_im } else if (lcname_len == sizeof(ZEND_CALL_FUNC_NAME) - 1 && ZEND_U_EQUAL(utype, lcname, lcname_len, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1) && fptr->common.num_args != 2) { zend_error(error_type, "Method %v::%s() must take exactly 2 arguments", ce->name, ZEND_CALL_FUNC_NAME); + } else if (lcname_len == sizeof(ZEND_CALL_STATIC_FUNC_NAME) - 1 && + ZEND_U_EQUAL(utype, lcname, lcname_len, ZEND_CALL_STATIC_FUNC_NAME, sizeof(ZEND_CALL_STATIC_FUNC_NAME)-1) && fptr->common.num_args != 2) { + zend_error(error_type, "Method %v::%s() must take exactly 2 arguments", ce->name, ZEND_CALL_STATIC_FUNC_NAME); } else if (lcname_len == sizeof(ZEND_TOSTRING_FUNC_NAME) - 1 && ZEND_U_EQUAL(utype, lcname, lcname_len, ZEND_TOSTRING_FUNC_NAME, sizeof(ZEND_TOSTRING_FUNC_NAME)-1) && fptr->common.num_args != 0) { zend_error(error_type, "Method %v::%s() cannot take arguments", ce->name, ZEND_TOSTRING_FUNC_NAME); @@ -2043,7 +2046,7 @@ ZEND_API int zend_register_functions(zen int count=0, unload=0; HashTable *target_function_table = function_table; int error_type; - zend_function *ctor = NULL, *dtor = NULL, *clone = NULL, *__get = NULL, *__set = NULL, *__unset = NULL, *__isset = NULL, *__call = NULL, *__tostring = NULL; + zend_function *ctor = NULL, *dtor = NULL, *clone = NULL, *__get = NULL, *__set = NULL, *__unset = NULL, *__isset = NULL, *__call = NULL, *__call_static = NULL, *__tostring = NULL; char *lowercase_name; int fname_len; zstr lc_class_name = NULL_ZSTR; @@ -2186,6 +2189,8 @@ ZEND_API int zend_register_functions(zen clone = reg_function; } else if ((fname_len == sizeof(ZEND_CALL_FUNC_NAME)-1) && !memcmp(lowercase_name, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME))) { __call = reg_function; + } else if ((fname_len == sizeof(ZEND_CALL_STATIC_FUNC_NAME)-1) && !memcmp(lowercase_name, ZEND_CALL_STATIC_FUNC_NAME, sizeof(ZEND_CALL_STATIC_FUNC_NAME))) { + __call_static = reg_function; } else if ((fname_len == sizeof(ZEND_TOSTRING_FUNC_
[PHP-DEV] [PATCH] Converting accesses to refcount and is_ref to macros
This patch is a simple, albeit widespread change that converts access to zval.refcount, zval.is_ref, _object_store.refcount to macros. There is no functional change to the code, but this will make it easier to implement a garbage collector in the future. This patch was too large to attach to the e-mail message. It is available at: http://web.pdx.edu/~way/macropatch.diff.txt Yiduo (David) Wang -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] RIP PHP 4?
No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.10.2/894 - Release Date: 7/10/2007 5:44 PM -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] PHP6 & Native SQLite3
No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.476 / Virus Database: 269.10.2/894 - Release Date: 7/10/2007 5:44 PM -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] PHP ICU project announcement
Hi all! We have started a project to make it easier to support international markets using PHP. A number of internationalization functions from IBM ICU will be made available in PHP as an extension. This project targets both PHP 5 and PHP 6. The goal is to support the most useful i18n services on both, while ensuring that any code running in PHP 5 using these functions would work the same in PHP 6. The PHP 6 implementation may provide additional functionality. The demand for internationalization services is large and is needed today, so we decided to support them in PHP 5 and provide one common solution that will also work going forward. There will be no PHP 4 support in the project. The base for the extension is the ICU library (http://www.icu-project.org/) already used by PHP 6, and the intent is to follow the ICU model, so that people having experience working with ICU in either C/C++ or Java could easily use the PHP API. The extension is composed of mostly independent functionality modules, each of which would implement one of the functionalities below. The APIs support both procedural and object-oriented notation (internally referring to the same APIs). In PHP 5, the extension assumes all incoming and outgoing strings are in UTF-8 encoding. The scope of the extension was defined as follows: - Collation (http://www.icu-project.org/apiref/icu4c/ucol_8h.html) - Number formatting (http://www.icu-project.org/apiref/icu4c/unum_8h.html) - Date/time formatting (http://www.icu-project.org/apiref/icu4c/udat_8h.html) - Locales (http://www.icu-project.org/apiref/icu4c/uloc_8h.html) - Calendars (http://www.icu-project.org/apiref/icu4c/ucal_8h.html) - International domain names (http://www.icu-project.org/apiref/icu4c/uidna_8h.html) - Message formatting (http://www.icu-project.org/apiref/icu4c/umsg_8h.html) - Resource bundles (http://www.icu-project.org/apiref/icu4c/ures_8h.html) We have initial implementations of collation and number formatting APIs for PHP 5, which will be publicly available soon. PHP 6 implementation and other APIs will follow. The project code will be available through PECL. The project is supported by LiveNation, Yahoo! and Zend Technologies. We welcome all feedback about the project - especially suggestions about what functionality is needed and comments about existing implementation. We intend to discuss it on the PHP Internationalization list - [EMAIL PROTECTED] We welcome you to join the list and participate in the discussion. We will publish API descriptions for existing functions on the i18n list in a couple of days, to start the things rolling. Regards, PHP-ICU team -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Mid-term Update for Cycle Collector (Google Summer of Code Project)
I haven't heard of that before... Is it some sort of compiler optimization setting? Could you recommend to me some reference that would describe how this can be done? It might help a lot. http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html look for __builtin_expect. See also EXPECTED and UNEXPECTED in zend_alloc.c -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Memory streams
On Fri, Jul 13, 2007 at 16:02:40 +0300, Adrian Drumea wrote: > Hello, > > I'm new to this list, so I aplogize if this is not the place to > post this message. > > I was using today the getimagesize() function which takes a file > name. I was trying to take the size of an image decoded using > base64_decode from a string. So I have my decoded data in $data. > Now to apply getimagesize() I need a file, so I saved $data to > a temporary file and everything worked. I then tried to avoid > the temporary file by using i/o streams, but I didn't manage to > do this. > > Correct me if I am wrong, but from what I see there is no way > to create a memory stream using php://memory and also attach > a unique key to it. If that would be possible, I could create > a memory stream with a unique key, write the data into it and > then pass this memory stream name to the getimagesize() function. > > In this way, all functions requiring a file could be used on > a memory buffer. You could implement your own stream with stream_wrapper_register(), and then use URLs like "mycustomstream://12345678", and your stream implementation could then extract the "12345678" part to use as a key, for example. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Memory streams
On Fri, 13 Jul 2007, Adrian Drumea wrote: > I'm new to this list, so I aplogize if this is not the place to > post this message. It fits the php-general list better perhaps. > In this way, all functions requiring a file could be used on a memory > buffer. You mean like this: http://no.php.net/manual/en/wrappers.data.php ? regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Memory streams
Hello, I'm new to this list, so I aplogize if this is not the place to post this message. I was using today the getimagesize() function which takes a file name. I was trying to take the size of an image decoded using base64_decode from a string. So I have my decoded data in $data. Now to apply getimagesize() I need a file, so I saved $data to a temporary file and everything worked. I then tried to avoid the temporary file by using i/o streams, but I didn't manage to do this. Correct me if I am wrong, but from what I see there is no way to create a memory stream using php://memory and also attach a unique key to it. If that would be possible, I could create a memory stream with a unique key, write the data into it and then pass this memory stream name to the getimagesize() function. In this way, all functions requiring a file could be used on a memory buffer. Adrian Drumea -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] RIP PHP 4?
Do that on some other list please. --Jani On Fri, 2007-07-13 at 12:44 +0200, Marco wrote: > Hi All > > Now the announcement is on php.net should we start looking for volunteers to > help increase the amount of knowledge available for developers looking at > upgrading their code to PHP 5? Should I start a new thread to look for > volunteers? I for one am happy to help write some documentation in a wiki or > the like that can make the transition easier. > > Thoughts? > > Regards > > Marco -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] RIP PHP 4?
Hi All Now the announcement is on php.net should we start looking for volunteers to help increase the amount of knowledge available for developers looking at upgrading their code to PHP 5? Should I start a new thread to look for volunteers? I for one am happy to help write some documentation in a wiki or the like that can make the transition easier. Thoughts? Regards Marco
Re: [PHP-DEV] RIP PHP 4?
On Fri, 13 Jul 2007 11:43:57 +0200, Sebastian Mendel <[EMAIL PROTECTED]> wrote: > chris# wrote: >> Sebastian Mendel <[EMAIL PROTECTED]> wrote: >>> chris# wrote: I think that same analogy applies to both versions of PHP - one > version is more suitable for one thing (your choice(s) here), and vise-a-versa. > Or; while PHP5 allows you to manifest functionality, PHP4 allows you to > tack it on. >>> i don't think so ... PHP 5 is always the better choice ... cause PHP 4 >>> development has stopped and support will end and you will get no more >>> security update after 2008-08-08(?) >> >> Does that somehow make it any less the language it is already? > > yes, cause the reason why PHP 4 is still out there is that some > applications > require PHP 4 and will not run on PHP 5 - so doing a PHP 4 only > application > or not fixing this application to run on PHP 5 hurts the whole community! > > cause PHP core developers need to maintain PHP 4 > PHP developers need to maintain PHP 4 compatibility in their applications > > hurting the whole community is a very good reason to stop using PHP4 or > creating/not updating applications running only on them > > >> Your response seems confusing to me. > > i don't want to protract this discussion ... but > > it just make no sense to develop for PHP 4! > and there are really no reasons to do so! > > except the fact to maintain compatibility for old PHP 4 servers > > and exactly this it is what all this discussion is about, stop the > requirement for developers to keep PHP 4 compatibility. > > > the question is not what PHP 4 is good for - the question is is it really > required to keep it at all costs? Point well taken. Thank you very much for taking the time to respond. > > > -- > Sebastian Mendel > > www.sebastianmendel.de > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php / Service provided by hitOmeter.NET internet messaging! . -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Apache handler with Multiple PHP versions
On 7/12/07, chris# <[EMAIL PROTECTED]> wrote: On Thu, 12 Jul 2007 11:38:44 +0200, Tijnema <[EMAIL PROTECTED]> wrote: > Hello Richard, > > On 7/12/07, Richard Lynch <[EMAIL PROTECTED]> wrote: >> On Wed, July 11, 2007 6:13 pm, Tijnema wrote: >> > On 7/12/07, Jani Taskinen <[EMAIL PROTECTED]> wrote: >> >> A lot easier (and works already) is to install PHP as CGI/FastCGI >> >> (one version or all of them, one can be module of course) and define >> >> the >> >> required PHP version by the file suffix.. >> >> >> >> --Jani >> > >> > Hello Jani: >> > >> > I know this is possible, and I believe it is possible in Apache too >> > with some kind of hack? >> > But this still doesn't solve a lot of problems, but will generate a >> > lot more with portable code. Take a bulletin board for example, there >> > are a lot of files inside a board, and when you want to install that >> > on your host that has PHP5 for files with .php5, you need to rename a >> > hell lot of files to .php5, AND change code inside the .php5 files to >> > point to the renamed files. >> >> No, you add a config in httpd.conf or add to .htaccess a >> line like >> >> ForceType whatever/gets/you/to/php-5 >> > > 1) Did you ever see a shared host that has multiple versions > configured like this? > 2) This will end up to be confusing for the end user, as they will > need to create the .htaccess file (as most users don't have write > rights for httpd.conf) This is no more unusual that adding/eliminating directory access. Which is pretty common stuff for users on a hosting companies box. Extremely simple too. The hosting outfit will /surely/ indicate any changes they need to make to provide them with the /added/ functionality. Maybe even add an applet in the Cpanel for it. My host hasn't a single .htaccess file ;) (Using DirectAdmin..) Not really an excellent option for web hosters, but the easiest way I set up "alot" of php versions on my dev box (1 as apache module, all the rest cgi, of course) is using virtual hosts: every virtual host listens to either a different port or a different server name, eg: php4server.my.domain, and binds .php and .inc files to a different cgi app/php version. This way there is no need to rename files or keep multiple copies around, and it is pretty useful eg. for heavy unit testing: if the code does not work in a particular php version, add some hackish ifdef equivalent and you're done. Bye Gaetano
Re: [PHP-DEV] Re: SNAPS+SNAPSPecl different to Pecl4Win
On 12/07/07, Gaetano Giunta <[EMAIL PROTECTED]> wrote: I think I finally have something demoable, regarding the possibility of extending pecl4win to offer compiled dlls of the released version pf pecl packages, besides the compiled cvs version. The build process is almost ok: + two separate build environments (incl. pecl trees) are used: one for pecl cvs, one for packaged versions + after pulling via http the released packages from pecl.php.net, if file config.win32 is missing. it is pulled in from cvs. This brought total compiled dll count (for php 5.2.3) up to 38 (there are 3/4 config.w32 files that still need to be patched by hand, but you only have to do it once) + I still have to sort out some troubles in building single extensions... A modified version of the pecl4win site is available here: http://gggeek.altervista.org/sw/pecl4in/ Please note that all links on the pages are broken (no postgres support on that shared host, so I took snapshots of the actual php scripts), you can only access the pages via the main index. It is built on a very small, hand inserted data set, with the only purpose of testing php+sql code. There is a lot more info than before available, but I somehow have the feeling that the disposition is messy. Any suggestion for a better layout/infoset is welcome. Please note that: + page titles / table column headers have been reworked a bit, for greater consistency + the single ext.page layout has seen a column/row swap to accommodate many releases of the same extension + a link back to pecl has been added on the single extension page +++ there is a huge inconsistency between pecl and pecl4win: whereas the former uses the term PACKAGE, the latter uses EXTENSION. Maybe it would be a good idea to fix this? Bye Gaetano ps: I'm still polishing the code, but it is available to everybody who requests it... -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php http://gggeek.altervista.org/sw/pecl4win/ if you hadn't already guessed. -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!" -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] RIP PHP 4?
chris# wrote: > Sebastian Mendel <[EMAIL PROTECTED]> wrote: >> chris# wrote: >>> I think that same analogy applies to both versions of PHP - one version >>> is >>> more suitable for one thing (your choice(s) here), and vise-a-versa. Or; >>> while PHP5 allows you to manifest functionality, PHP4 allows you to tack >>> it on. >> i don't think so ... PHP 5 is always the better choice ... cause PHP 4 >> development has stopped and support will end and you will get no more >> security update after 2008-08-08(?) > > Does that somehow make it any less the language it is already? yes, cause the reason why PHP 4 is still out there is that some applications require PHP 4 and will not run on PHP 5 - so doing a PHP 4 only application or not fixing this application to run on PHP 5 hurts the whole community! cause PHP core developers need to maintain PHP 4 PHP developers need to maintain PHP 4 compatibility in their applications hurting the whole community is a very good reason to stop using PHP4 or creating/not updating applications running only on them > Your response seems confusing to me. i don't want to protract this discussion ... but it just make no sense to develop for PHP 4! and there are really no reasons to do so! except the fact to maintain compatibility for old PHP 4 servers and exactly this it is what all this discussion is about, stop the requirement for developers to keep PHP 4 compatibility. the question is not what PHP 4 is good for - the question is is it really required to keep it at all costs? -- Sebastian Mendel www.sebastianmendel.de -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] What is the use of "unicode.semantics" in PHP 6?
On Wed, 11 Jul 2007, Richard Quadling wrote: > On 11/07/07, Evert | Rooftop <[EMAIL PROTECTED]> wrote: > > Larry Garfield wrote: > > > > > > Top 10 by what metric? If I had to guess based on market share, I'd say > > > (unordered): > > > > > > Drupal > > > Squirrelmail > > > WordPress > > > phpMyAdmin > > > MediaWiki > > > Joomla > > > PHPBB > > > > > > > That will keep me busy =) > > Would it also be worth checking some of the frameworks too? Prado, eZ, > Zend? I did test things a couple of months ago for the eZ Components, and it didn't seem that bad. But now it's more "messy", but I didn't really check why. regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Mid-term Update for Cycle Collector (Google Summer of Code Project)
On Wed, 11 Jul 2007, David Wang wrote: > On the Graph test, maximum memory usage with unmodified PHP was 133.9 > MB with an execution time of 8 seconds. > On the Graph test, maximum memory usage with gc was 51.6 MB with an > execution time of 9 seconds. > On the Template test, maxmium memory usage with unmodified PHP was 1.5 > GB with an execution time of 30 seconds. > On the Template test, maxmium memory usage with gc was 67.3 MB with an > execution time of 1 minute. > On the whole suite of tests (which includes the Graph and Template > tests), execution time with unmodified PHP was 12:03. With cycle > collection, it was 12:43. > These tests were conducted on my dual core AMD X2 4400+ desktop with > ./configure --with-gd --with-jpeg-dir --with-zlib. As you can see, > there is the classic time vs. memory trade-off. My numbers are even slightly better (64bit Intel Core2 Duo @ 1.83Ghz). The 1000 template tests without GC: 1m35s with 1540Mb with GC:1m57s with 73Mb Derick -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php