Re: [PHP-DEV] Funny message
On Tue, 4 Jun 2002, Michael Stolovitzsky wrote: Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM in [...] With all due respect to Hebrew humour, am I the only one who thinks that the above line is confusing to non-Israeli? ;) Hey, I am a transplanted Canadian Danish Latin Eskimo living in California and even I know that this obviously means double-colon... Still the error message sucks, even if you substitute any other token in place of the double colon. There is no context given (listing the line in question and placing a ^ below the current position would be of great help), and sometimes there are even general parse errors messages, no reason given at all. This seems to need a bit of work, I believe. Kristian -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Funny message
Hi, I've seen quite a few bug reports (read: feature requests) for that. It just needs volunteers :-) - Markus On Tue, Jun 04, 2002 at 10:00:09AM +0200, Kristian Koehntopp wrote : On Tue, 4 Jun 2002, Michael Stolovitzsky wrote: Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM in [...] With all due respect to Hebrew humour, am I the only one who thinks that the above line is confusing to non-Israeli? ;) Hey, I am a transplanted Canadian Danish Latin Eskimo living in California and even I know that this obviously means double-colon... Still the error message sucks, even if you substitute any other token in place of the double colon. There is no context given (listing the line in question and placing a ^ below the current position would be of great help), and sometimes there are even general parse errors messages, no reason given at all. This seems to need a bit of work, I believe. -- GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc Did I help you?http://guru.josefine.at/wish_en Konnte ich helfen? http://guru.josefine.at/wish_de -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Funny message
hmf - Original Message - From: Kristian Koehntopp [EMAIL PROTECTED] To: Rasmus Lerdorf [EMAIL PROTECTED]; Michael Stolovitzsky [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, June 04, 2002 10:00 AM Subject: Re: [PHP-DEV] Funny message On Tue, 4 Jun 2002, Michael Stolovitzsky wrote: Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM in [...] With all due respect to Hebrew humour, am I the only one who thinks that the above line is confusing to non-Israeli? ;) Hey, I am a transplanted Canadian Danish Latin Eskimo living in California and even I know that this obviously means double-colon... Still the error message sucks, even if you substitute any other token in place of the double colon. There is no context given (listing the line in question and placing a ^ below the current position would be of great help), and sometimes there are even general parse errors messages, no reason given at all. This seems to need a bit of work, I believe. Kristian -- 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] PHP's vision
Am Montag, 3. Juni 2002 18:11 schrieb Sebastian Bergmann: Zeev Suraski wrote: Hmm, because he's bigger? :) I can live with that :) Peace through superior firepower? That's a trademarked american concept at the moment, I think. Kristian -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Apache 2 support
So, does this mean that Apache 2 support for PHP is not fully stable? In any case, my question on what to build is not answered. - Venkat Justin Erenkrantz [EMAIL PROTECTED] 04/06/2002 11:17:02 On Mon, Jun 03, 2002 at 10:06:42PM -0600, Venkat Raghavan wrote: Hi. I'm trying to build the PHP interface to Apache 2 (still mod_php, I guess). I see an apache2 directory that is empty and an apache2filter directory. The Readme in the latter says that it exploits the layered I/O support in Apache 2.0. Do I need to just build the latter or am I missing something? Please enlighten. You probably have an out-of-date CVS copy as the apache2 directory seems to have been deleted. apache2filter takes advantage of the layered I/O support, but not as much as it really should. The code does make some poor assumptions (i.e. everything is a FILE bucket on output, etc.). Unless Cliff or Aaron beat me to it, once I get the httpd-2.0 filtering stuff straightened out, I may take a pass at cleaning up the apache2filter to be more like how the core httpd-2.0 modules are implemented. -- justin -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP's vision
Kristian Koehntopp wrote: Peace through superior firepower? That's a trademarked american concept at the moment, I think. Pax Americana replaced Pax Romana a while ago :) -- 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
[PHP-DEV] Quality of this list
Hello all, No offence, but whatever happened to the technical level on this list? Last two weeks i posted 2 serious stories on the list, one about some difficulties i had when building an extension and one about a possible problem in the memory limit code of the Zend engine, but nobody seems to care. Yet discussions like 'PHP's vision' seem to get enough attention, which is a discussion that IMHO should really be held on php-evangelism. I thought my questions would make the most sense on php-dev, but if i'm wrong it would have been nice if someone told me so. It's not just my development-related questions on this list that go unanswered. I don't want to bitch about too much, but as a lurker and occasional question-asker on this list its just something i noticed lately. With regards, Hans Rakers -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Quality of this list
On Tue, 4 Jun 2002, Hans Rakers wrote: Hello all, No offence, but whatever happened to the technical level on this list? Last two weeks i posted 2 serious stories on the list, one about some difficulties i had when building an extension and one about a possible problem in the memory limit code of the Zend engine, but nobody seems to care. I do care, but as have no clue how it works I don't respond to it. A point is that not many people have a clue what magic the Zend engine is doing :) (And I thought that your question related to the build system was answered) Yet discussions like 'PHP's vision' seem to get enough attention, which is a discussion that IMHO should really be held on php-evangelism. I thought my questions would make the most sense on php-dev, but if i'm wrong it would have been nice if someone told me so. It's not just my development-related questions on this list that go unanswered. Amen, those discussions are not only useless, but drain energy too. But it's Open Source development :) Derick --- Did I help you? http://www.jdimedia.nl/derick/link.php?url=giftlist Frequent ranting: http://www.jdimedia.nl/derick/ --- PHP: Scripting the Web - [EMAIL PROTECTED] All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net --- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP's vision
At 12:34 PM 6/4/2002, Sebastian Bergmann wrote: Kristian Koehntopp wrote: Peace through superior firepower? That's a trademarked american concept at the moment, I think. Pax Americana replaced Pax Romana a while ago :) 'cept there's no pax... -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] ANN: QA Evangelism Call to Arms @ LinuxTag
For all of you who are interested in the way evangelism (marketing) and QA are going, or should be going, i'm going to be holding 2 meetings to lay stake and discuss the future and direction of the following PHP sub projects: php-evangelism and php-qa. The purpose of these meetings is for people to present their ideas about each, and then discussion resulting in a Roadmap (if necessary) stating our objectives, and starting on making it happen :) Everyone is invited, although time, specific venue and date aren't as yet arranged, if you send me an email with your contact details (cell phone would be usefull) or call me on +44 7968 349990 from tomorrow (wed) onwards, i'll let you know where we're going to be. See you there! -- james -- James Cox :: [EMAIL PROTECTED] :: Landonize It! http://landonize.it/ Was I helpful? http://www.amazon.co.uk/exec/obidos/wishlist/23IVGHQ61RJGO/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Error with pspell
Check your php.ini for 'magic_quotes_' directives and turn them off. --Jani On Tue, 4 Jun 2002, Magnus M wrote: No, I'm not adding slashes, but somewhere something adding slashes. I'm using a form with some fields, lets call one of the XYZ and it's those that I want to be spellchecked. So i send them to a function I've made for spellchecking $_POST['XYZ'].. Now if $_POST['XYZ'] = I'm having some problems with PSPELL it will complain that I\'m is wrongly spelled and it should be I'm. I'm using CVS of PHP and Apache 2.. Magnus On Mon, 03 Jun 2002 15:56:46 -0700 Vlad Krupin [EMAIL PROTECTED] wrote: Actually, I did not understand your original email, I guess. Sorry. If you check a word with a ' character in it, php will pass it unchanged to the pspell library. No backslashes inserted. If you are getting a backslash inserted there, please check your code and see what you are passing to pspell. You might be adding slashes somewhere before you call the function. I can not reproduce your problem. No, it wouldn't be good to 'trick' php by stripping slashes off the argument, as you suggest. Vlad Magnus M@gnus wrote: Ok.. But can't this be overruled somehow in the extension to trick pspell to think it's just I've instead of I\'ve? On Mon, 03 Jun 2002 12:24:16 -0700 Vlad Krupin [EMAIL PROTECTED] wrote: I believe you would have to complain to Kevin Atkinson about that (author of pspell), but I think he has a good reason for doing it the way he did, so chances are it won't change. Anyway, not a PHP problem, AFAICS. Vlad Magnus M@ wrote: Hi! I wrote a function that will spellcheck $var. My problem is that if $var contain ' it will report that it's wronly spelled like this: Possible spelling for I\'ve : I've Ive... Regards Magnus Määttä -- -- Vlad Krupin Software Engineer echospace.com -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- -- Vlad Krupin Software Engineer echospace.com -- 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] domxml patch
can someone apply this patch to cvs for me. it fixes the problem reported in bug # 17560 i think i have solved the attachment problems, let me know if people still cant get my attachments. xmlKeepBlanksDefault default is 1 if not set. once set it remains at the new value until changed. the patch just resets it to its previous value before the formatting. bug is only reproduceable when running php as a mod. thanks rob Index: php_domxml.c === RCS file: /repository/php4/ext/domxml/php_domxml.c,v retrieving revision 1.161 diff -u -r1.161 php_domxml.c --- php_domxml.c31 May 2002 06:14:29 - 1.161 +++ php_domxml.c4 Jun 2002 12:55:47 - -3238,19 +3238,20 xmlDoc *docp; xmlChar *mem; int format = 0; - int size; + int size, keepblanks; int encoding_len = 0; char *encoding; DOMXML_PARAM_THREE(docp, id, le_domxmldocp, |ls, format, encoding, encoding_len); if (format) { - xmlKeepBlanksDefault(0); + keepblanks = xmlKeepBlanksDefault(0); if (encoding_len) { xmlDocDumpFormatMemoryEnc(docp, mem, size, encoding, format); } else { xmlDocDumpFormatMemory(docp, mem, size, format); } + xmlKeepBlanksDefault(keepblanks); } else { if (encoding_len) { xmlDocDumpMemoryEnc(docp, mem, size, encoding); -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Apache 2 support
On Tue, Jun 04, 2002 at 03:11:40AM -0600, Venkat Raghavan wrote: So, does this mean that Apache 2 support for PHP is not fully stable? In any case, my question on what to build is not answered. You should use the --with-apxs2 flag to configure to build the apache2filter sapi module in PHP. This will install the DSO module in your apache directory and add a LoadModule directive, but will not enable PHP on your site (the rest of the instructions are in that same README file). If by stable you mean that the code is not in a state of flux, then it has been stable for the last few weeks. The apache2filter still has yet to prove itself in production, but more of a concern at this point are 3rd party libraries and other extensions that may not be entirely threadsafe or reentrant. Let us know how it goes. -aaron -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP's vision
John Lim Wrote: Hi, I like the PHP language the way it is with some exceptions. Private members and methods are essential from a security view-point, and perhaps application variables, but that's about it. My main problem with PHP's direction is that it seems stuck at the low-end of the corporate world. Let me explain. I'm developing extranets with PHP and occasionally I get a checklist of required features from a customer. Features such as: - clustering, Beowulf for process clustering, LVS for performance clustering. - management of server farms, There are many good beowulf tools for this. - transparent fail-over, LVS - load balancing LVS - application deployment without restarting server Beowulf tools. - advanced queueing Queuing of what? - database connection pooling PHP has an amount of this with persistent connections. I believe that many of these features should probably not be part of the language, or are already available as separate libraries or can be implemented without modifying PHP, as Smarty has proved with templates. However there is no one central resource that explains where you can find the knowledge or source code to implement this. Is there any company addressing all these issues. Let me know! For example, one spec I had to comply for a recent proposal was - NO SINGLE POINT OF FAILURE. I looked at msession and I asked myself, does it provide support for a backup session server on failover? Reading the docs, I think not. Of course a database-backed session handler can provide failover support, but where can I get proven tested code that I know is reliable without having to write it myself? The No single point of failure mantra is very over-rated and, well, impossible. There is *always* a single point of failure somewhere. Even if you have two geographically separate installations with different power companies, and different ISPs, chances are, somewhere, you will be carried by some common backbone. The No single point of falure only works in closed systems like aircraft, satilites, and spaceships. Data centers and internet providers always have exposure because quality of service is beyond the control of the IT manager, it is an open system. It does not matter *who* you are, you will have a failure in your system. You must evaluate your risk tollerance, first understanding that 100% no risk is an impossibility. Once people accept that risk is unavoidable, they are ready to estimate what they can take. If you don't mind a probabilty of an hour downtime a year, you can build a datacenter much more cheaply than if you can't accept the probability of 10 minutes downtime. You have to, however, accept that *no* downtime is not an option. I am not a fan of 100% fully redundant systems. I think the expense of such systems are rarely justified, and unless you have REALLY done the work to understand what all your points of failure are, you are wasting your time and money. I remember a company dictating fully redundent systems, two alteon load balancers, a small cluseter of PHP servers, etc. The ISP was not redundant, so they still had a failure. The liklihood of a failure at the ISP was more than the likelihood of equipment failure. They spent a lot of money that they did not need to spend and created a false sense of security. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP's vision
[EMAIL PROTECTED] wrote in message I am not a fan of 100% fully redundant systems. I think the expense of such systems are rarely justified, and unless you have REALLY done the work to understand what all your points of failure are, you are wasting your time and money. Hello mlwmohawk, If the customer wants fully redundant systems, i'm not going to object. It may make sense to them, and it probably helps pay the rent better. Whether they have the willpower to achieve actual 99.95% uptime after we complete a project by maintaining NASA standards of maintainence depends on the customer. I have noticed that many ISP's that boast 99.95% uptime levels do not measure time that httpd is up, but the time the hardware is up :-). So its how you define uptime and redundancy... John. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP's vision
[EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... John Lim Wrote: Hi, - advanced queueing Queuing of what? Say you are Amazon or some similar company and has a fancy cluster for order processing. As orders come in, the cluster cannot handle the peak load, so we need to queue the orders using some such technology until the cluster can process them. These queues are actually mini-databases as they often support saving to disk, replication, commit-rollback etc. without the overhead of relational databases (though you can implement it with relational db technology). Hope that helps clarify things and doesn't get me as much flak as my discussion of private members :-) Regards, John -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Re: Funny message
Michael Stolovitzsky [EMAIL PROTECTED] skrev i en meddelelse [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM in [...] Come on... This needs to be fixed... It looks like Hebrew... I have to agree :) oh and Rasmus, I'm danish to, and I didn't know it ment double-colon.. Maybe thats just me :) -- Tom Sommer E-Mail: webmaster(a)tsn.dk Web: http://www.tsn.dk -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP's vision
Ilia A. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... John, If your authentication class holds the passwords inside wouldn't running the 'strings' utility on the file reveal all the passwords even if the php script is Zend Encoded? Ilia Hi Ilia, Don't know, but it sure looks like encrypted mud. This isn't a.out you know. Perhaps we should ask Zeev or Andi :-) On June 3, 2002 04:44 am, John Lim wrote: Hi Sebastian, Unfortunately some people are paranoid about security. We might not want people to fiddle around with the internals of a class, for example an authentication class which holds the passwords of users. Even if the whole web site is Zend Encoded, doing a var_dump on $GLOBALS will reveal a lot about .the site. Regards, John Sebastian Bergmann [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... John Lim wrote: Private members and methods are essential from a security view-point, Why? They solve social issues between developers. and perhaps application variables, but that's about it. SRM adds Application Variables to the PHP Platform. -- 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] PHP's vision
Hi Ilia, Don't know, but it sure looks like encrypted mud. This isn't a.out you know. Perhaps we should ask Zeev or Andi :-) That could very well be the case, but anyone who can compile php/zend with debugging symbols and has a debuger like gdb or ddd will be able to easily grab the passwords to simply running the encoded script no? Ilia -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Quality of this list
Was one of the questions about AG(allocated_memory)? Are you sure it's not initialized in zend_alloc.c? I see an initialization there. Andi At 11:45 AM 6/4/2002 +0200, Hans Rakers wrote: Hello all, No offence, but whatever happened to the technical level on this list? Last two weeks i posted 2 serious stories on the list, one about some difficulties i had when building an extension and one about a possible problem in the memory limit code of the Zend engine, but nobody seems to care. Yet discussions like 'PHP's vision' seem to get enough attention, which is a discussion that IMHO should really be held on php-evangelism. I thought my questions would make the most sense on php-dev, but if i'm wrong it would have been nice if someone told me so. It's not just my development-related questions on this list that go unanswered. I don't want to bitch about too much, but as a lurker and occasional question-asker on this list its just something i noticed lately. With regards, Hans Rakers -- 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] [PATCH] preg_match(_all) support for capturing offsets
Hi Andrei, all: In a previous patch (http://news.php.net/article.php?group=php.devarticle=84281), support was added to preg_split for capturing offsets along with matches. The attached patch adds similar support to preg_match and preg_match_all via a new PREG_MATCH_OFFSET_CAPTURE flag. The code handles capturing offsets for both subpattern matches and whole pattern matches, using the previously-added add_offset_pair helper function. The flag is a new fourth (and optional) parameter for preg_match, and are or'd into the existing 'order' parameter for preg_match_all, above PREG_SET_ORDER and PREG_PATTERN_ORDER. The patch below is diffed against the CVS head - humbly sumbitted for application, rejection, suggestions, or extensive flaming. :) Thanks in advance, - Dave [EMAIL PROTECTED] --- ext/pcre/php_pcre.c.origTue Jun 4 13:02:50 2002 +++ ext/pcre/php_pcre.c Tue Jun 4 13:12:10 2002 @@ -35,7 +35,9 @@ #define PREG_PATTERN_ORDER 0 #define PREG_SET_ORDER 1 -#definePREG_SPLIT_NO_EMPTY (10) +#define PREG_MATCH_OFFSET_CAPTURE (12) + +#define PREG_SPLIT_NO_EMPTY(10) #define PREG_SPLIT_DELIM_CAPTURE (11) #define PREG_SPLIT_OFFSET_CAPTURE (12) @@ -99,6 +101,7 @@ REGISTER_LONG_CONSTANT(PREG_PATTERN_ORDER, PREG_PATTERN_ORDER, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(PREG_SET_ORDER, PREG_SET_ORDER, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT(PREG_MATCH_OFFSET_CAPTURE, PREG_MATCH_OFFSET_CAPTURE, +CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(PREG_SPLIT_NO_EMPTY, PREG_SPLIT_NO_EMPTY, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(PREG_SPLIT_DELIM_CAPTURE, PREG_SPLIT_DELIM_CAPTURE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(PREG_SPLIT_OFFSET_CAPTURE, PREG_SPLIT_OFFSET_CAPTURE, CONST_CS | CONST_PERSISTENT); @@ -310,6 +313,24 @@ } /* }}} */ +/* {{{ add_offset_pair + */ +static inline void add_offset_pair(zval *result, char *str, int len, int offset) +{ + zval *match_pair; + + ALLOC_ZVAL(match_pair); + array_init(match_pair); + INIT_PZVAL(match_pair); + + /* Add (match, offset) to the return value */ + add_next_index_stringl(match_pair, str, len, 1); + add_next_index_long(match_pair, offset); + + zend_hash_next_index_insert(Z_ARRVAL_P(result), match_pair, sizeof(zval *), +NULL); +} +/* }}} */ + /* {{{ php_pcre_match */ static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) @@ -335,6 +356,7 @@ int matched; /* Has anything matched */ int i; int subpats_order_val = 0; /* Integer value of subpats_order */ + int offset_capture = 0;/* If offsets should +be captured */ int g_notempty = 0;/* If the match should not be empty */ const char **stringlist;/* Used to hold list of subpatterns */ char*match; /* The current match */ @@ -363,11 +385,17 @@ /* Make sure subpats_order is a number */ convert_to_long_ex(subpats_order); - subpats_order_val = Z_LVAL_PP(subpats_order); - if (subpats_order_val PREG_PATTERN_ORDER || - subpats_order_val PREG_SET_ORDER) { - zend_error(E_WARNING, Wrong value for parameter 4 in call to preg_match_all()); - } +offset_capture = (Z_LVAL_PP(subpats_order) PREG_MATCH_OFFSET_CAPTURE); + + if (global) { + subpats_order_val = (Z_LVAL_PP(subpats_order) 1UL); + + if ((subpats_order_val PREG_PATTERN_ORDER) || + (subpats_order_val PREG_SET_ORDER)) { + zend_error(E_WARNING, Wrong value for parameter 4 +in call to preg_match_all()); + } +} + break; default: @@ -442,8 +470,13 @@ if (subpats_order_val == PREG_PATTERN_ORDER) { /* For each subpattern, insert it into the appropriate array. */ for (i = 0; i count; i++) { - add_next_index_stringl(match_sets[i], (char *)stringlist[i], - offsets[(i1)+1] - offsets[i1], 1); + if (offset_capture) { +
Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /ext/gd config.m4
Should be fixed now. (read: Works fine here :) --Jani On Tue, 4 Jun 2002, Sebastian Bergmann wrote: Jani Taskinen wrote: sniper Mon Jun 3 21:13:01 2002 EDT Modified files: /php4/ext/gdconfig.m4 Log: - Made the bundled libgd actually work. Fixed bug: #17244 sb@wopr-mobile:/usr/src/php4 make /bin/sh libtool --silent --mode=compile gcc -DHAVE_LIBPNG -DHAVE_LIBFREETYPE -Ie xt/gd/ -I/usr/src/php4/ext/gd/ -DPHP_ATOM_INC -I/usr/src/php4/include -I/usr/src /php4/main -I/usr/src/php4 -I/usr/local/apache2/include -I/usr/src/php4/Zend -I/ usr/src/php4/ext/gd/libgd -I/usr/include/freetype2/freetype -I/usr/local/mysql/i nclude/mysql -I/usr/local/srm/include -I/usr/src/php4/ext/xml/expat -D_REENTRAN T -I/usr/src/php4/TSRM -g -O2 -pthread -DZTS -prefer-pic -c /usr/src/php4/ext/g d/libgd/gdft.c -o ext/gd/libgd/gdft.lo /usr/src/php4/ext/gd/libgd/gdft.c:43: freetype/ftglyph.h: No such file or direct ory make: *** [ext/gd/libgd/gdft.lo] Error 1 With '--with-gd' instead of '--with-gd=php' it builds. -- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Snapshots not build correctly..
The source snapshots don't have the bison/flex generated files anymore..why is that? --Jani -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] newbie writing extensions
All right, I finally started coding :) First of all, I must say I read the documentation, just in case you want to bash me on that.. I have questions about memory allocation, and documentation. 1) The documentation on writing extensions is not very extensive. It tells you what is a zval, how to create one, how to get parameters, how to return parameters, and that's basically all. If you want to use the strength of the Zend engine to store stuff in hash so you can retrieve it later, you're doomed. Things like zend_list_insert, add_property_resource, zend_list_addref, are either not documented or just mentionned, without examples. The Appendix E of the documentation is totally obsolete, it references old functions that have been deprecated since PHP 4. Also, the manual, chapter 41 (Where to go from there) says take time to study the header files and some modules [...] and the MySQL module [..]. The mysql module is one of the most complicated module! And reading the header files doesn't help, there is not a single comment there. I see macros, functions, that sound interesting, but I have no idea of what they do, how to call them, what memory they allocate, what are the pros and cons of using them, should I use them, etc.. 2) By reading the excellent modules 'ming' and 'domxml', I was able to understand how to create an object, give it elements, assign methods to the object, and make an instance of that object from my php test script, call its methods, and get returned values (woohoo!). However, i'm not sure about memory allocation, especially when it comes to adding stuff in the hash tables. This is kind of obscure, and not documented. What should I read to get more information about this? I'm planning to use the -DDEBUG option to check if everything is okay, but a document explaining those functions would be great. PS: for those interested, the extension is a PHP equivalent of the JEnscribe object for Java. It allows access to Enscribe files on a Himalaya system (ex Tandem Computer, ex Compaq, now HP...). Fab.
Re: [PHP-DEV] Snapshots not build correctly..
Is someone checking this?? Jim? I'd do it myself, but I don't have access there.. --Jani On Tue, 4 Jun 2002, Jani Taskinen wrote: The source snapshots don't have the bison/flex generated files anymore..why is that? --Jani -- -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] openssl_pkcs7_encrypt and 3des
I noticed in the documentation on openssl_pkcs7_encrypt that it only uses RC2-40. I'd like to modify it to use 3DES and was wondering if anyone has already done that, and if not, where should I modify the code to enable that encoding by default? I noticed in the php 4.2.1/ext/openssl/openssl.c source that cipher = EVP_rc2_40_cbc() and that PKCS7_encrypt() uses the cipher value. Is it as simple as changing the cipher value to equal the appropriate value like 3des()? If so, what should cipher = ? I'm not a hardcore programmer, but would like to know how to scope the work to someone else than can do the work if I can't. Thanks -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] ZEND_FETCH_RESOURCE mystery
Hello, i'm trying to use ZEND_FETCH_RESOURCE so I can use macros instead of other stuff, but i can't figure out how to use it. I have the following php code: $blah = new Blah(); $blah-doSomething(); When Blah() is called, I want to create a structure and store it as a resource: typedef struct { int zoo; long blurb; } blah_struct; blah_struct *blah; I register my resource: ZEND_REGISTER_RESOURCE(result_returned, blah, le_blahresource); In doSomething I want to get my resource back, so I try to do: ZEND_FETCH_RESOURCE(blah, blah_struct *, , blah, le_blahresource); This 3rd parameter is a mystery. I checked other modules, and they pass a zval taken from user input, but in my case, I don't have user input, I just want to get my structure back. What am I supposed to pass as the 3rd parameter?? I tried passing a reference to the Blah() object, but that didn't work. I found a workaround, using zend_list_insert and zend_list_find, but I guess I should be able to use ZEND_REGISTER and ZEND_FETCH, no? Fab.
Re: [PHP-DEV] ZEND_FETCH_RESOURCE mystery
Hi, On Tue, Jun 04, 2002 at 10:21:09PM -0400, fabwash wrote : i'm trying to use ZEND_FETCH_RESOURCE so I can use macros instead of other stuff, but i can't figure out how to use it. I have the following php code: $blah = new Blah(); $blah-doSomething(); When Blah() is called, I want to create a structure and store it as a resource: typedef struct { int zoo; long blurb; } blah_struct; blah_struct *blah; I register my resource: ZEND_REGISTER_RESOURCE(result_returned, blah, le_blahresource); In doSomething I want to get my resource back, so I try to do: ZEND_FETCH_RESOURCE(blah, blah_struct *, , blah, le_blahresource); is supposed to be a zval** of IS_RESOURCE which contains the rsrc_id to fetch from the resource list. This 3rd parameter is a mystery. I checked other modules, and they pass a zval taken from user input, but in my case, I don't have user input, I just want to get my structure back. What am I supposed to pass as the 3rd parameter?? I tried passing a reference to the Blah() object, but that didn't work. I found a workaround, using zend_list_insert and zend_list_find, but I guess I should be able to use ZEND_REGISTER and ZEND_FETCH, no? zend_list_find is ok, but you have to store the rsrc_id somewhere. Take a look at ext/domxml which which stores resources within objects ( php_dom_set_object() ). - Markus -- GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc Did I help you?http://guru.josefine.at/wish_en Konnte ich helfen? http://guru.josefine.at/wish_de -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Bug #17538 proc_close() doesn't return exit value of process
Hi, I logged Bug #17538 proc_close() doesn't return exit value of process a little while a ago, full details are at http://bugs.php.net/bug.php?id=17538 obviously, but the short summary is that proc_close() doesn't return the exit value of the process, like it's meant to. The bug I logged has an example script and stuff. Anyway, I needed a fix soon, so I've had a poke around in the PHP source myself, and I have basically got pretty close to a fix. I deliberated for a little bit about whether I should try and make a patch, or log more info on the bug, but I decided that posting to the list was best, because I don't have a magic wand fix, rather some *very* relevant info that a PHP developer will be able to use to create a proper fix. Ok, so, all the problems I found are in ext/standard/exec.c (CVS version of course). This is the offending code: # if HAVE_SYS_WAIT int wstatus; pid_t child, wait_pid; child = (pid_t)rsrc-ptr; do { wait_pid = waitpid(child, wstatus, 0); } while (wait_pid == -1 errno = EINTR); if (wait_pid == -1) FG(pclose_ret) = -1; else FG(pclose_ret) = wstatus; # else FG(pclose_ret) = -1; # endif Firstly, the gdb was showing me that code inside here wasn't getting executed (waitpid() wasn't getting run). It turns out that there is no HAVE_SYS_WAIT in php_config.h, but there is a HAVE_SYS_WAIT_H. I imagine that perhaps it should be HAVE_SYS_WAIT_H? Anyway, that was what was causing the code not to be run. So, for the purposes of my experimentation, I just deleted the # if # else and # endif lines (and the FG() line between else and endif) so that the code could run, since clearly this is the code that sets pclose_ret, which is in turn the number returned by proc_close(). That was the first problem. I'm sure someone more knowledgeable about the PHP source will know if it's actually meant to be HAVE_SYS_WAIT_H, or something else. So, with that removed, I tried to compile, and the } while (wait_pid == -1 errno = EINTR); line gave me an invalid lvalue in assignment compiler error. Changing to errno == EINTR fixed that, but I'm not sure if it's meant to be == or not, or what's meant to be happening. But, I took a punt at ==, and it compiled. Then, I tried running some programs through proc_open() and proc_close(), but php was mangling the return values. The line: FG(pclose_ret) = wstatus; should be FG(pclose_ret) = WEXITSTATUS(wstatus); see man waitpid for details, basically wstatus contains more than just the exit code, and WEXITSTATUS() returns the relevant exit status number. So, I compiled again, and it worked! I ended up with: int wstatus; pid_t child, wait_pid; child = (pid_t)rsrc-ptr; do { wait_pid = waitpid(child, wstatus, 0); } while (wait_pid == -1 errno == EINTR); if (wait_pid == -1) FG(pclose_ret) = -1; else FG(pclose_ret) = WEXITSTATUS(wstatus); Now, it would be great if a PHP developer could apply this, or something along these lines, to the source tree to make proc_close() work (and close my bug!). As I say, I'm no PHP developer, nor even a particularly good C programmer, so there may well be other things to consider when applying a fix that I've missed, but this worked for me :) Thanks, KimS -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] Patch-tastic!
In case you've missed it, I have been putting up unofficial patches for PHP on my website. The latest one changes some operators. See the website for more details. Cheers, -Andrei http://www.gravitonic.com/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Patch-tastic!
On Tue, Jun 04, 2002 at 10:44:17PM -0500, Andrei Zmievski wrote: In case you've missed it, I have been putting up unofficial patches for PHP on my website. The latest one changes some operators. See the website for more details. Is there a reason why you don't just post them here? -aaron -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Snapshots not build correctly..
At 11:35 PM 6/4/2002 +0300, Jani Taskinen wrote: The source snapshots don't have the bison/flex generated files anymore..why is that? genfiles was broken but I fixed it in HEAD. Is this still not the case? Andi -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP's vision
Dan Kalowsky [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wed, 5 Jun 2002, John Lim wrote: Say you are Amazon or some similar company and has a fancy cluster for order processing. As orders come in, the cluster cannot handle the peak load, so we need to queue the orders using some such technology until the cluster can process them. These queues are actually mini-databases as they often support saving to disk, replication, commit-rollback etc. without the overhead of relational databases (though you can implement it with relational db technology). Maybe I'm misunderstanding this, but this queing idea seems rather silly. If the cluster is unable to handle the load, how do you expect your webserver to write a temp database? This kind of idea would have to be handled/implemented at a switch or router level I'd think, and thats REALLY not where PHP is :) If the cluster cannot handle the load, then the queues will just get longer and longer. It's interesting that mlwmohawk asked about this because msession is a lightweight session handler without rdbms overhead. Similarly queuing is used instead of a real database for the same reasons - lightweight without rdbms overhead so it scales better. So if the cluster would fail talking to a real rdbms, it will work and scale better using queuing, a more light-weight technology (no need for indexes, joins, etc - just push and pop). I have a reference here which is not the exactly the same as the above one I gave, but you should get the idea: http://www-3.ibm.com/e-business/doc/content/casestudy/43886.html --- Dan Kalowsky The record shows, I took the blows. http://www.deadmime.org/~dank And did it my way. [EMAIL PROTECTED] - My Way, Frank Sinatra [EMAIL PROTECTED] -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] PHP's vision
Ilia A. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Ilia, Don't know, but it sure looks like encrypted mud. This isn't a.out you know. Perhaps we should ask Zeev or Andi :-) That could very well be the case, but anyone who can compile php/zend with debugging symbols and has a debuger like gdb or ddd will be able to easily grab the passwords to simply running the encoded script no? Ilia I agree. I wish that all the movie and music moguls who want to enforce legislation on multimedia encryption would understand this too. Regards, John -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Patch-tastic!
Andrei Zmievski wrote: The latest one changes some operators. Nice, but why not overload + for strings to do the concatenation? -- 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