Re: [PHP-DEV] [PATCH] imagesavealpha()

2003-02-20 Thread Tal Peer
On Thu, 20 Feb 2003, Jukka Holappa wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hi,
 
 I have reported at http://bugs.php.net/?id=22323 that it's impossible to
 actually create png images that are partially transparent. I needed that
 feature yesterday so I have created a patch (attached - mailer mangles
 patches) for this.
 
 This patch introduces another function imagesavealpha($im,$bool) that
 can be used to enable or disable (default) saving alpha information in
 imagepng() etc. functions.
 
 Without this function, there is currently no way to do that.

Patch looks ok to my untrained eye, though you should probably use 
zend_parse_parameters instead of zend_get_parameters (see other extensions 
for examples).

 
 I'm not 100% sure, if this function is defined in correct ifdefs
 regarding bundled vs. not, but I guess this should be about right.
 
 There's no special testcase, it Works For Me (tm) and is 99% copied from
 imagealphablending(). It really shouldn't contain any bugs :)
 
 When included, this patch closes bug #22323. Of course it needs
 documentation too, but I'm not the right person to write that with my
 lousy English.
 
 - - Jukka
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.2.1 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iD8DBQE+VTfrYYWM2XTSwX0RAt+3AJoDu5jDoeM3qfVG6FhzPaDtlH6cNwCfYmwz
 FvpjoNP+Qu/7s6N3bc1Iz/U=
 =9mR9
 -END PGP SIGNATURE-
 

--
Tal Peer
[EMAIL PROTECTED]

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Bug #21279 Karma request (Windows Bug)

2003-02-05 Thread Tal Peer
You really don't need karma to commit a patch of few lines. Just send a 
unified diff and someone with dufficient karma will commit it.

Tal

Ernani Joppert Pontes Martins wrote:
OK, I will change the Style of the comments

But that's not the point.

The point is that I need CVS Karma to commit it and I don't have.

When I get it then I will make the unified diff and send to the list...

TIA,

Ernani





Joseph Tate [EMAIL PROTECTED] escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...


You need to use C style /*comments*/.

Also, send a unified diff.  Do this by running cvs diff -u files you
modified.

Joseph



-Original Message-
From: Ernani Joppert Pontes Martins [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 10:05 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DEV] Bug #21279 Karma request (Windows Bug)


Hi Rasmus,

A Few months ago I was willing to help in bug fixes and bcompiler
development

I solved the bug #21279 and now I need karma to commit my changes there

I debbuged the file with the help of Manuel Lemos and I found the bug.

Here is the diff:

1615:  // Z_STRVAL_P(tmp) = empty_string;
1616:  ZVAL_NULL(tmp);

1626:  // Z_STRVAL_P(tmp) = empty_string;
1627:  ZVAL_NULL(tmp);

TIA and HTH,

Ernani



--
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] Bug #5975 request

2003-02-04 Thread Tal Peer
Patch looks ok. Just be sure to use zend_parse_parameters instead of 
zend_get_parameters and zend_bool instead of an integer (just grep 
ext/standard/* for zend_parse_parameters for examples).

Tal

Keyser Soze wrote:
Sending in plain text:


- cut
here 


? patch.diff
? ext/standard/file_new.c
? ext/standard/string_new.c
Index: ext/standard/file.c
===
RCS file: /repository/php4/ext/standard/file.c,v
retrieving revision 1.296
diff -u -r1.296 file.c
--- ext/standard/file.c 21 Jan 2003 14:53:17 - 1.296
+++ ext/standard/file.c 4 Feb 2003 19:21:43 -
@@ -1470,7 +1470,7 @@
  }

  /* strlen() can be used here since we are doing it on the return of an
fgets() anyway */
- php_strip_tags(buf, strlen(buf), stream-fgetss_state, allowed_tags,
allowed_tags_len);
+ php_strip_tags(buf, strlen(buf), stream-fgetss_state, allowed_tags,
allowed_tags_len,0);

  RETURN_STRING(buf, 0);
 }
Index: ext/standard/php_string.h
===
RCS file: /repository/php4/ext/standard/php_string.h,v
retrieving revision 1.69
diff -u -r1.69 php_string.h
--- ext/standard/php_string.h 30 Jan 2003 05:00:40 - 1.69
+++ ext/standard/php_string.h 4 Feb 2003 19:21:43 -
@@ -127,7 +127,7 @@
 PHPAPI char *php_str_to_str(char *haystack, int length, char *needle,
   int needle_len, char *str, int str_len, int *_new_length);
 PHPAPI char *php_trim(char *c, int len, char *what, int what_len, zval
*return_value, int mode TSRMLS_DC);
-PHPAPI void php_strip_tags(char *rbuf, int len, int *state, char *allow,
int allow_len);
+PHPAPI void php_strip_tags(char *rbuf, int len, int *state, char *allow,
int allow_len,int disallow);
 PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int
to_len, pval *result);
 PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value);
 PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int
limit);
Index: ext/standard/string.c
===
RCS file: /repository/php4/ext/standard/string.c,v
retrieving revision 1.353
diff -u -r1.353 string.c
--- ext/standard/string.c 30 Jan 2003 20:09:19 - 1.353
+++ ext/standard/string.c 4 Feb 2003 19:21:43 -
@@ -3248,9 +3248,10 @@
 PHP_FUNCTION(strip_tags)
 {
  char *buf;
- zval **str, **allow=NULL;
+ zval **str, **allow=NULL, **disa=NULL;
  char *allowed_tags=NULL;
  int allowed_tags_len=0;
+ int disallow=0;

  switch (ZEND_NUM_ARGS()) {
   case 1:
@@ -3266,13 +3267,24 @@
allowed_tags = Z_STRVAL_PP(allow);
allowed_tags_len = Z_STRLEN_PP(allow);
break;
+  case 3:
+   if (zend_get_parameters_ex(3, str, allow, disa) == FAILURE) {
+RETURN_FALSE;
+   }
+   convert_to_string_ex(allow);
+   allowed_tags = Z_STRVAL_PP(allow);
+   allowed_tags_len = Z_STRLEN_PP(allow);
+   convert_to_boolean_ex(disa);
+   disallow = Z_BVAL_PP(disa);
+   break;
+
   default:
WRONG_PARAM_COUNT;
break;
  }
  convert_to_string_ex(str);
  buf = estrndup(Z_STRVAL_PP(str), Z_STRLEN_PP(str));
- php_strip_tags(buf, Z_STRLEN_PP(str), NULL, allowed_tags,
allowed_tags_len);
+ php_strip_tags(buf, Z_STRLEN_PP(str), NULL, allowed_tags,
allowed_tags_len,disallow);
  RETURN_STRING(buf, 0);
 }
 /* }}} */
@@ -3507,7 +3519,7 @@
  swm: Added ability to strip ?xml tags without assuming it PHP
  code.
 */
-PHPAPI void php_strip_tags(char *rbuf, int len, int *stateptr, char *allow,
int allow_len)
+PHPAPI void php_strip_tags(char *rbuf, int len, int *stateptr, char *allow,
int allow_len,int disallow)
 {
  char *tbuf, *buf, *p, *tp, *rp, c, lc;
  int br, i=0, depth=0;
@@ -3586,10 +3598,19 @@
   if (allow) {
*(tp++) = '';
*tp='\0';
+   if(disallow) {
+
+   if (!php_tag_find(tbuf, tp-tbuf, allow)) {
+memcpy(rp, tbuf, tp-tbuf);
+rp += tp-tbuf;
+   }
+   } else {
+
if (php_tag_find(tbuf, tp-tbuf, allow)) {
 memcpy(rp, tbuf, tp-tbuf);
 rp += tp-tbuf;
}
+   }
tp = tbuf;
   }
   break;







--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Moving extensions to PECL

2003-01-12 Thread Tal Peer
Hello,
In my opinion, one of the goals of PHP5 is to reduce the codebase size 
by moving most of the extensions to PECL.
We should start doing this sometime in the near future, if we want PHP5 
released this year. Currently, there are few problems with the handling 
of PECL extensions in the PEAR installer, the biggest is the lack of 
solution for precompiled dlls for Windows and some more problems in pear 
installer under win32.

I propose to start moving extensions ASAP to PECL in order to get the 
right momentum for fixing the bugs in PEAR installer and finding a 
solution for the precompiled dlls. I really don't mind starting with 
fribidi, which I am maintaining :)


Tal


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] Warning in wrong parameter

2002-12-24 Thread Tal Peer
This is totally bogus, your error_reporting setting should be E_ALL, not 
ALL.

michel 'ziobudda' morelli wrote:
Hi, I have installed php 4.2.1 and error_reporting = ALL.

I write a function called foo() that accept only 1 parameter. 

Now if I write:

?
$result = foo(bar);
?

All is ok.

If I write:

?
$result = foo(bar,bar2);
?

All is ok, but for me that is not OK because my function foo() accept
only 1 parameters and no 2 o 3 or more. Is there any possibility that
PHP return me a warning with the message (e.g.) Warning parameter
number for [function name] in [page.php] line [line number] ???

Tnx in advance. And sorry for this stupid question and for my bad
english.

Happy all.
--
 Ti desidero, voglio trascinarti a letto, piegarti, farti sudare,
prenderti da farti incendiare il corpo... 
Ti aspetto: Tua, Influenza.
--
Michel ZioBudda Morelli   [EMAIL PROTECTED]

ICQ UIN: 58351764   PR of Linux in Italy
http://www.ziobudda.net http://www.phpdev.it




--
Tal Peer
[EMAIL PROTECTED]


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] ZE2 question

2002-11-28 Thread Tal Peer
Derick Rethans wrote:

On Thu, 28 Nov 2002, Marcus Börger wrote:



This is may be a nice token name, but i do not understand it.

When trying to execute: $c-parent::function()
I receive: Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM in 
/usr/src/ph


It means ::. See also:
http://www.php.net/manual/en/tokens.php



And I still think it should be nekudatayim ;)


Derick




--
Tal Peer
[EMAIL PROTECTED]


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Redirect on Error (not localisation)

2002-11-26 Thread Tal Peer
John Coggeshall wrote:

Unless told otherwise, I'm already planning on making a few changes and
committing.

John



Please don't.
As far as i can see, no decision was made.

for the record, i'm against this..





-Original Message-
From: Ivan Ristic [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, November 26, 2002 2:50 PM
To: [EMAIL PROTECTED]
Cc: 'James Aylett'; 'PHP Developers Mailing List'
Subject: [PHP-DEV] Redirect on Error (not localisation)




Anyway... So what of my actual patch we were discussing at
some point? I never got a real answer as to if it would be
suitable to commit.


  I have changed the subject of the message in an effort to
  separate the discussion on the Redirect on Fatal Error feature
  (the subject of this email) from the localisation discussion.

  ...

  As a reminder, we are discussing a patch that will redirect
  the user to another page when a fatal or a parse error occurs
  (parse errors can be caught with lint, fatal can't). The
  redirection will allow developers to:

  * Show a decent page to the user (instead of letting them
see a blank or incomplete page)

  * Send a message to themselves that something
strange has happened (allowing them to react quickly, instead
of having to install log watch software for notification
purposes (and many people cannot do that as they do not
have control over the servers))

  As far as I am aware, there is not a single reason not to
  have this feature. Some people seem not to like it, but that
  is fine; with no performance or stability risks, if you don't
  want to use the feature - you won't be affected.

  On the other hand, I will be extremely happy to have it under
  my belt as yet another tool I can use to make my software
  run better.

  Please don't tell me that I wouldn't need this feature if
  I programmed perfectly. Errors happen all the time, no matter
  what you do trying to prevent them.


Bye,
Ivan




--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php









--
Tal Peer
[EMAIL PROTECTED]


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] CyberMut and SPPLUS

2002-11-07 Thread Tal Peer
Pierre-Alain Joye wrote:

On Thu, 7 Nov 2002 15:35:55 +0100
[EMAIL PROTECTED] wrote:



Okay, nice. Who can gimme enough karma to commit this new ext?



I repeat the rules, right here to avoid cross posting again:
1. Show the sources
2. PEAR members will vote (a min. of 6 votes)
3. If your package has been approved, ask for a cvs account using the
standart way, commit and apply CS (or the reverse)



spplus would be the best name.



Follow CS please.



PECL extensions should follow the PHP CS, not PEAR CS.


pa





--
Tal Peer
[EMAIL PROTECTED]


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] #19771 - patch

2002-10-18 Thread Tal Peer
hello,
this patch tries to fix the performance issues described in bug #19771.
i cannot benchmark this at the moment, so if anyone can, please do.
the patch is available at http://tal.madcode.org/file.c.patch

and thanks to wez :)

Tal


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Is this a bad thing to do? (Unix permissions)

2002-10-17 Thread Tal Peer

Gwydion Elderwyn wrote:

As part of my new site I have created a php-driven guestbook.  The guestbook
entries are stored in a file called guestbook.txt.

I found that in order to get the script to write to the file, I had to set
the directory permissions for the guestbook directory and the guestbook.txt
file to -rw-rw-rw-   ... is that a bad thing to do?  Does it expose me to
any hacking problems?  If so, what should I have done?

Bear in mind I'm using a 3rd-party host and I work in Windows, so please
don't blind me with science ;)

Thanks,
Gwydion



  

This quiestion should go to [EMAIL PROTECTED]
This list is intended for developing PHP itself, not applications 
written using it.

Tal



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] phpinfo() - removing ascii art

2002-09-27 Thread Tal Peer
Yasuo Ohgaki wrote:

I would like to remove ascii art from text version
of phpinfo(). We shouldn't add things that do not
work well. i.e. back slash has many interpretations.

Elaborate on this, please.


Any comments?

--
Yasuo Ohgaki


  





-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] 4.3.0

2002-09-26 Thread Tal Peer

Andrei Zmievski wrote:

All,

Once the critical bugs are fixed, I intend to branch the tree in
preparation for 4.3.0 cycle. The remaining critical bugs are:

   [15025] Copy of array is affected by reference
   [19292] random error: open_basedir restriction in effect. File is in
   wrong directory

(c) Bugstah for the nice output of the list ;)


Please make an effort to handle these as soon as possible.

-Andrei   http://www.gravitonic.com/

Later in this talk, I intend to define
 the universe and give three examples. -- Larry Wall

  





-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Test

2002-09-21 Thread Tal Peer

This is a test mail, do ignore it.


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] user notes

2002-09-21 Thread Tal Peer

knight wrote:

if (Is there any way to have the chm search over the manual content and
automatically apply it to the PHP manual pages?){
echo perfect
}else {

-is there any way to have to manual pages appear first and then have the
note pages appear?

-we should have some sort of way to directly show the content of the manual
form the notes. do you know what I mean? weather this is a button the brings
you to the manual page or a button that loads the content of the manual
pages in an iframe or even a re-direct that automatically loads the
corresponding manual page automatically and scrolls down to the user notes.

personally, I would do the later if this else is executed.
}

Brendan



  

This should be directed to [EMAIL PROTECTED]



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] PECL compilation

2002-08-19 Thread Tal Peer

You could also use the latest version of the PEAR installer, of course.

-Tal

 Original Message 
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Dan Helfman [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-DEV] PECL compilation
Date: Mon, 19 Aug 2002 13:01:20 -0700 (PDT)

 run phpize in the extension's dir
 
 On 19 Aug 2002, Dan Helfman wrote:
 
  Perhaps I just haven't looked hard enough, but I can't find any
  information on how PECL software is supposed to be compiled (in CVS).
  Most PECL packages just have a config.m4 and a Makefile.in, but no
  configure.in, build.sh, etc. I'm adding a new PECL package and would
  like it to play nicely with the rest of the repository. Any help would
  be much appreciated.
 
  --
  Dan Helfman
  Software Engineer, TrustCommerce
  (626) 744-7700 x813
  [EMAIL PROTECTED]
  http://www.trustcommerce.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 Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] CVS Account Request: tensimy

2002-07-30 Thread Tal Peer

RREalllyyy?

-Tal

 Original Message 
From: Park Young Tae [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: [PHP-DEV] CVS Account Request: tensimy
Date: 30 Jul 2002 04:30:05 -

 ^^;
 
 -- 
 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] The PHP Platform

2002-04-12 Thread Tal Peer

From you message, it seems like PEAR is finished. PEAR is hardly a beta and 
IMHO will never be 'finished'.


Tal

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] [patch] to string.c

2002-03-24 Thread Tal Peer

Hello,
I madde this patch for bug #11244 (http://bugs.php.net/bug.php?id=11244).
Note: i'm not sure about the '/' and '\\' cases.


Index: string.c
===
RCS file: /repository/php4/ext/standard/string.c,v
retrieving revision 1.266
diff -u -r1.266 string.c
--- string.c20 Mar 2002 14:38:11 -  1.266
+++ string.c24 Mar 2002 18:13:23 -
 -2849,6 +2849,30 
case ')':
*target = '(';
break;
+   case '[':
+   *target = ']';
+   break;
+   case ']':
+   *target = '[';
+   break;
+   case '{':
+   *target = '}';
+   break;
+   case '}':
+   *target = '{';
+   break;
+   case '':
+   *target = '';
+   break;
+   case '':
+   *target = '';
+   break;
+   case '\\':
+   *target = '/';
+   break;
+   case '/':
+   *target = '\\';
+   break;
default:
break;
}


_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] [patch] to string.c

2002-03-24 Thread Tal Peer

Explanation:

There are some characters that are considered as English in ASCII but needs 
to be reversed when converting from logical Hebrew  to visual Hebrew. The 
only characters that the original function support are ( and ). I added 
support for [,],{,}, and .

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] CVS Account Request: tal

2002-02-08 Thread Tal Peer

I want to help translating the PHP doc into Henbrew (phpdoc).

-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php