Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Alexander Valyalkin
On Thu, 10 Jun 2004 00:50:46 +1200, Jevon Wright [EMAIL PROTECTED] wrote: ?php echo Stripslashes test: ; ini_set('magic_quotes_sybase', 0); $s = 'c:\\windows\\system32'; $s1 = '\\'; if ($s == stripslashes($s) $s1 == stripslashes($s1)) echo OK\n; else echo FAILED\n; ? 'c:\\windows\\system32'

Re: [PHP-DEV] Re: Confusing pointers in PHP 4 and 5

2004-06-10 Thread Derick Rethans
Hey, put this in thedocs somewhere? regards, Derick On Wed, 9 Jun 2004, Sara Golemon wrote: That's true. What I left out of my explanation (in order to keep it simple) is that when you copy a variable, a new label is created to point to the same zval, and the zval's refcount is incrmented

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Rasmus Lerdorf
Uh, what are you guys talking about? That test case is bogus. $s = 'c:\\windows\\system32'; This means that the base string we are working with is c:\windows\system32 here before any sort of stripslashes. If you then call stripslashes() on that, it will strip these slashes! That's exactly

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Alexander Valyalkin
On Wed, 9 Jun 2004 15:56:10 +0400, Antony Dovgal [EMAIL PROTECTED] wrote: If you think it's wrong - prove it. There are quite detailed reasons why those bugs were considered to be bogus. I'm ok if you're going to improve stripslashes() efficiency and/or to make it just faster, this could be

[PHP-DEV] Re: output buffering callback limitation

2004-06-10 Thread Taco van den Broek
Okin okin wrote: Hi, I'm having trouble with output buffering limitation and the output_callback function of ob_start. look at this script : ?php function ob_perso_handler($buffer) { ob_start(); echo 'foo'; $buffer .= ob_get_contents(); ob_end_clean();

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Antony Dovgal
On Thu, 10 Jun 2004 10:50:09 +0300 Alexander Valyalkin [EMAIL PROTECTED] wrote: On Wed, 9 Jun 2004 15:56:10 +0400, Antony Dovgal [EMAIL PROTECTED] wrote: If you think it's wrong - prove it. There are quite detailed reasons why those bugs were considered to be bogus. I'm ok if

[PHP-DEV] Re: output buffering callback limitation

2004-06-10 Thread Andre Cerqueira
maybe php.general would be more appropriate im not a developer, but i think this feature doesnt make sense hehe i think ob display handlers are not supposed to output things directly, they just return them to the function that will output it at your first snip, you could/should do: ?php function

[PHP-DEV] Re: Bouncer Test

2004-06-10 Thread Lester Caine
Aidan Lister wrote: Thanks Peter, I'm not sure what went on then - I got all the bouncer replies from php-install (sent the list to systems for removal), but the message appeared on this list, not php-install. Anyway, apologies for the spam. Aidan - I have to post this here as any attempt to send

Re: [PHP-DEV] Re: Bouncer Test

2004-06-10 Thread Derick Rethans
On Thu, 10 Jun 2004, Lester Caine wrote: How long will it be before all of the auto-responders are cleared up on php-install, I've just had 15 odd messages triggered my answering post there. Is there someone responsible for managing that list? I'd offer, but while I can't get in via eMail

[PHP-DEV] Maybe a bit on the side...cgi.rfc2616_headers

2004-06-10 Thread Erik Knudsen
Hi! Hope I'm only slightly out of topic with this post... The PHP problem described here: http://bugs.php.net/bug.php?id=9852 ...is a problem with using PHP.EXE as cgi (not isapi) with IIS and html frames. I'm experiencing the same problem in a cgi/html-frames/IIS based application I'm

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Andre Cerqueira
The 2 first bugs where really bogus, but imho the last one did make sense. If stripslashes does Un-quote string quoted with addslashes(), how addslashes would come up with: c:\windows\system32 from: c:windowssystem32 ? Maybe its to late for a change, now that most people are used to this

Re: [PHP-DEV] date('w') return type

2004-06-10 Thread Hartmut Holzgraefe
dharana wrote: I know I can just cast to int, but is it ok to return an string for things that can only be numbers? The date() and strftime() functions are expected to always return strings, no matter what the format string looks like. The same holds true for sprintf(), you wouldn't expect

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Alexander Valyalkin
On Thu, 10 Jun 2004 00:47:09 -0700 (PDT), Rasmus Lerdorf [EMAIL PROTECTED] wrote: Uh, what are you guys talking about? That test case is bogus. $s = 'c:\\windows\\system32'; This means that the base string we are working with is c:\windows\system32 here before any sort of stripslashes. If

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Alexander Valyalkin
On Wed, 9 Jun 2004 14:20:01 +0200, Moshe Doron [EMAIL PROTECTED] wrote: in addition, i want to remind that when magic mode is on, this function been used by each script to manipulate the $_REQUEST vars so playing with this peace of code have 1. big codes breaking potential. 2. big security

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Alexander Valyalkin
On Thu, 10 Jun 2004 11:56:26 +0400, Antony Dovgal [EMAIL PROTECTED] wrote: Ok, my version of stripslashes() is faster, clearer, works correctly with old tests and solves mentioned bugs. Are you still doubt? Try to compare the old (current) code to new one. Faster is ok, but you'd better read

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Derick Rethans
On Thu, 10 Jun 2004, Alexander Valyalkin wrote: On Thu, 10 Jun 2004 11:56:26 +0400, Antony Dovgal [EMAIL PROTECTED] wrote: Ok, my version of stripslashes() is faster, clearer, works correctly with old tests and solves mentioned bugs. Are you still doubt? Try to compare the old

Re: [PHP-DEV] date('w') return type

2004-06-10 Thread dharana
I think I just smoked something illegal before posting that question. The brain damage seems to be gone, sorry for the spam. It just did made sense at that moment. Hartmut Holzgraefe wrote: dharana wrote: I know I can just cast to int, but is it ok to return an string for things that can only

RE: [PHP-DEV] Enabling OpenSSL with Windows Binaries

2004-06-10 Thread Wez Furlong
The problem is linkage; for some reason, someone (in group@ ?) decided that they didn't want to link the php core to openssl in the windows builds, and in php 4.3 you can't use ssl:// or https:// unless it is statically linked. PHP 5 can handle this dynamically. Search the bug db; this has been

[PHP-DEV] Adding optional argument to snmp_get / walk

2004-06-10 Thread Anders Karlsson (X:et)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi guys, I've done some small work to add support for specifying wheter to use snmp version 1 or 2c in snmp_get and snmp_walk. It's an optional argument that is defaulted to version 1 ( for not wrecking any code that is using snmp_get or walk ).

Re: [PHP-DEV] Re: Bouncer Test

2004-06-10 Thread Aidan Lister
Strange, sent it after our conversation on IRC. I'll post it here. - Hi systems, Here is a bunch of emails I'm sent every time I post to php-install. The list of addresses to be removed is below. [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL

[PHP-DEV] strip_tags() discussion

2004-06-10 Thread Alexander Valyalkin
What sense of the [allowable_tags] parameter in strip_tags()? According docs, You can use the optional second parameter to specify tags which should not be stripped. Ok. Suppose, I have a PHP-guestbook and use strip_tags() to filter all tags, excepting b,i,u in users' messages. Then a cool-hacker

Re: [PHP-DEV] Re: Bouncer Test

2004-06-10 Thread Derick Rethans
On Thu, 10 Jun 2004, Aidan Lister wrote: It's entirely likely I've made a mistake somewhere in that list, you're welcome to perform your own tests. They're gone, thanks for providing spam-bait to those address ;-) Derick -- PHP Internals - PHP Runtime Development Mailing List To

[PHP-DEV] Re: strip_tags() discussion

2004-06-10 Thread Christian Schneider
Alexander Valyalkin wrote: What sense of the [allowable_tags] parameter in strip_tags()? According docs, You can use the optional second parameter to specify tags which should not be stripped. strip_tags alone is indeed not enough to make sure the input is safe to display inside your web page.

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Rasmus Lerdorf
On Thu, 10 Jun 2004, Andre Cerqueira wrote: The 2 first bugs where really bogus, but imho the last one did make sense. If stripslashes does Un-quote string quoted with addslashes(), how addslashes would come up with: c:\windows\system32 from: c:windowssystem32 It can't! How would

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Stefan Esser
Hi, this is not directly releated. I looked into addslashes yesterday and thought that it would be much better to scan the string 2 times. The first time to find out how much extra bytes one needs, and the second time to do the actual replacing. So we do not need to allocate and oversized

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Rasmus Lerdorf
On Thu, 10 Jun 2004, Stefan Esser wrote: this is not directly releated. I looked into addslashes yesterday and thought that it would be much better to scan the string 2 times. The first time to find out how much extra bytes one needs, and the second time to do the actual replacing. So we do

Re: [PHP-DEV] Enabling OpenSSL with Windows Binaries

2004-06-10 Thread Dietrich Ayala
it's in the comments of the manual, but not in the actual manual text. *why* won't it be fixed in 4.3? Wez Furlong wrote: The problem is linkage; for some reason, someone (in group@ ?) decided that they didn't want to link the php core to openssl in the windows builds, and in php 4.3 you can't use

[PHP-DEV] the new version of strip_tag()

2004-06-10 Thread Alexander Valyalkin
On Thu, 10 Jun 2004 16:33:13 +0300, Alexander Valyalkin [EMAIL PROTECTED] wrote: Today I wrote the new version of strip_tags(). Yes, it is not ideal, but it is much better than current version. Below is my complete version of strip_tags() with testcases. You can add / change any testcases and

[PHP-DEV] CVS Account Request: justinpatrin

2004-06-10 Thread Justin Patrin
My reason is actually to submit to a PEAR module I have just been added as a developer to. DB_DataObject_FormBuilder. I have talked to Markus Wolff (the package lead) and he's ok with my commiting to CVS for this package. The username listed below is my PEAR username. -- PHP Internals - PHP

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Andre Cerqueira
But the manual doesn't say that it *only* removes slashes added by addslashes. Returns a string with backslashes stripped off. (\' becomes ' and so on.) Double backslashes (\\) are made into a single backslash (\). Yes, it doesn't *say*, but i think anyone could see that implied if one didn't

Re: [PHP-DEV] stripslashes() improvements

2004-06-10 Thread Rasmus Lerdorf
On Thu, 10 Jun 2004, Andre Cerqueira wrote: But the manual doesn't say that it *only* removes slashes added by addslashes. Returns a string with backslashes stripped off. (\' becomes ' and so on.) Double backslashes (\\) are made into a single backslash (\). Yes, it doesn't *say*,

[PHP-DEV] Re: the new version of strip_tag()

2004-06-10 Thread Christian Schneider
Alexander Valyalkin wrote: Today I wrote the new version of strip_tags(). It looks like you're very eager to contribute to PHP and write code very quickly. On the other hand I think the focus of people on this list right now is a bit different from what you're trying to do: Fix bugs in PHP 4

Re: [PHP-DEV] Re: the new version of strip_tag()

2004-06-10 Thread George Schlossnagle
On Jun 10, 2004, at 5:42 PM, Christian Schneider wrote: Alexander Valyalkin wrote: Today I wrote the new version of strip_tags(). It looks like you're very eager to contribute to PHP and write code very quickly. On the other hand I think the focus of people on this list right now is a bit

[PHP-DEV] Minor bugs in ext/mysql and ext/mysqli (patches attached)

2004-06-10 Thread Gavin
- Original Message - From: George Schlossnagle [EMAIL PROTECTED] very quickly. On the other hand I think the focus of people on this list right now is a bit different from what you're trying to do: Fix bugs in PHP 4 and get PHP 5 out of the door. On that note, I'd like to submit

Re: [PHP-DEV] Re: Bouncer Test

2004-06-10 Thread Lester Caine
Derick It's entirely likely I've made a mistake somewhere in that list, you're welcome to perform your own tests. They're gone, thanks for providing spam-bait to those address ;-) Any chance [EMAIL PROTECTED] could be barred on php.install Copies of RE: CST156916512ID - Fax Message Received out