Re: [PHP-DEV] Re: Bug? Raw POST data in PHP 5.2.2, take two

2007-05-07 Thread Unknown W. Brackets
Really? I've used this pseudonym for years and years, dozens and dozens of places. I've got a patch checked into Mozilla using it. I've communicated with other developers in a wide variety of places... I cannot recall anyone saying it was rude of me to use such a name. In fact, most people

Re: [PHP-DEV] Re: Bug? Raw POST data in PHP 5.2.2, take two

2007-05-06 Thread Unknown W. Brackets
Sorry, I apologize. Although you were curt I should not have been so in reply. I used to manage development of a reasonably popular open source project, and if one of our developers had ever said something like that, it would have greatly annoyed me. You never really lose that. Although I

Re: [PHP-DEV] Re: Bug? Raw POST data in PHP 5.2.2, take two

2007-05-06 Thread Unknown W. Brackets
ommitted a fix a few hours ago which should fix the problem. Feel free to test a current snapshot. johannes On Sun, 2007-05-06 at 11:34 -0700, Unknown W. Brackets wrote: It sounds like you have register_globals off, which is a good thing imho. You are trying $HTTP_RAW_POST_DATA but my recolle

[PHP-DEV] Re: Bug? Raw POST data in PHP 5.2.2, take two

2007-05-06 Thread Unknown W. Brackets
It sounds like you have register_globals off, which is a good thing imho. You are trying $HTTP_RAW_POST_DATA but my recollection tells me it is $_SERVER['HTTP_RAW_POST_DATA']. Does the latter work? Anyway, reading from php://input is more correct and doesn't depend on PHP settings as much, a

[PHP-DEV] Re: HTTP caching

2007-04-17 Thread Unknown W. Brackets
For what it's worth, this would be very nice. I always use my own custom HTTP handling for this reason (and related reasons, such as keep-alive.) However, it's also very complicated; the cached data has to be managed, has to be stored somewhere... and at what point do you add cookie manageme

[PHP-DEV] Re: _FILES

2007-02-11 Thread Unknown W. Brackets
I've always assumed it was for security. Imagine something like: Realistically, if you tried to access the value as a string, you would get "Array" either way. But I still wouldn't want users to be able to "pollute" $_FILES for people who were assuming a non-array upload. The way it is no

[PHP-DEV] Re: Suggestion: global variables being accessed in local scope

2007-02-11 Thread Unknown W. Brackets
Question. Given this code: function foo() { $bar = 1; } $bar = 5; foo(); echo $bar; What should happen? You seem to be saying that "1" should be output. Clearly this would not be backwards compatible, and would most likely break code. -[Unknown] Original Message

[PHP-DEV] Re: Problems with 301 redirects

2006-11-03 Thread Unknown W. Brackets
Shouldn't you use... header('HTTP/1.0 301 Moved Permanently'); header('Location: http://...'); That is what I've always used and it's worked for me. Additionally, the method you have suggested does not work for me. -[Unknown] Original Message Someone on the php-general l

Re: [PHP-DEV] Acceptable Seg Faults?

2006-09-12 Thread Unknown W. Brackets
Is it at all possible to determine in a cross-platform way: 1. The current stack position (e.g. SP, except on all architectures.) 2. The maximum stack size. I realize this is a naive question, but given the above - worst-case, an option (like memory_limit) could be added which tracks recursion

Re: [PHP-DEV] Re: Upload progress

2006-08-11 Thread Unknown W. Brackets
Using PHP 5.1.x (I don't remember which exact version) I tested opening php://input (since I want to stream it anyway) the other day - and that did work. I think I may have had display_errors off on that box, though, so I may have missed this warning you mention. -[Unknown] Origina

[PHP-DEV] Re: Upload progress

2006-08-11 Thread Unknown W. Brackets
What about Transfer-Encoding, as mentioned in another post? I didn't think PHP provides that one. -[Unknown] Original Message I believe you could use $_SERVER/$_ENV['CONTENT_LENGTH'] in CGI, I don't know about the IIS ISAPI module though. Arpad -- PHP Internals - PHP Ru

Re: [PHP-DEV] Fatal errors

2006-08-10 Thread Unknown W. Brackets
In the past, many softwares have used an error handler function to provide the following cases: 1. Log the error in a more complicated way than PHP does by default. 2. Send off an email, if necessary, or communicate with another service. 3. Show a generic (e.g. a 500) error message to the client

Re: [PHP-DEV] Upload progress

2006-08-09 Thread Unknown W. Brackets
Fair enough. I was under the (now obviously wrong) impression that setting post_max_size to 0 wouldn't let me get to the post data. But that's still setting you dependent on it being Apache. I would need (if I were to add this feature to any of my software) to write this in code that can run

Re: [PHP-DEV] Upload progress

2006-08-09 Thread Unknown W. Brackets
I had thought that was only for extensions; is there something in the userspace too (without writing/installing an extension)? Thanks, -[Unknown] Original Message The patch to support this is in PHP 5.2 CVS now. Unknown W. Brackets wrote: How is that? You can't ge

Re: [PHP-DEV] Upload progress

2006-08-09 Thread Unknown W. Brackets
How is that? You can't get any feedback from PHP (except, now, by installing/writing an extension) about how far along the upload is - no matter how much JavaScript you use. And the browser won't tell you. Some people have scanned the /tmp directory for possible PHP uploads, but this obvious

Re: [PHP-DEV] Supporting version specific INI files as well as SAPI specific INI files.

2006-08-09 Thread Unknown W. Brackets
Perhaps the searching could be controlled by a compile-time setting? On in the Windows binary builds, but it is much more trivial these days to compile your own. Yet, my question is this: how often will PHPRC and the registry be set for CGI, and neither have ini files? That seems pretty unli

[PHP-DEV] Re: __set() / __get() : limitation and/or unintentional behavoiur?

2006-03-31 Thread Unknown W. Brackets
The __set() method is called when a property of a class is set, __get() when a property is retrieved. An array is simple a way of listing things; the array itself is a piece of data. When you set a key in that array, you are not setting the array. It may help to think of it like this: $t =

Re: [PHP-DEV] FastCGI unix sockets support patch

2006-03-23 Thread Unknown W. Brackets
Wouldn't you typically use a full (absolute) path to a unix socket? And, is it not so that hostnames should not contain /'s or <'s, etc? (I'm not sure what other path separators are used on platforms PHP supports, but I'm pretty sure they all use funky characters.) Assuming these cases are tru

Re: [PHP-DEV] is_int/is_numeric possible bug

2005-11-29 Thread Unknown W. Brackets
If you're having that problem that a request variable is being reported as an integer, I suggest using var_dump(). That function will tell you the type and contents of a variable. For example: $bool = true; $int = 1; $float = 1.0; $str = 'abc'; $array = array(); var_dump($bool, $int, $float,

[PHP-DEV] Re: Globals unavailable, require oddity

2005-10-13 Thread Unknown W. Brackets
If you include a file within a function, that file will be loaded in that function's scope. Example: The same happens if b.class.php is included within a function (or class member, etc.) and includes a.inc.php, as in your example (I am presuming.) If this is the problem, I suggest simply a

[PHP-DEV] Re: 'include' Considered Harmful

2005-06-24 Thread Unknown W. Brackets
Why not simply disable allow_url_fopen on your server or servers? With it set off, you get these errors: Warning: main() [function.main]: URL file-access is disabled in the server configuration in .../test.php on line 3 Warning: main(http://www.google.com/) [function.main]: failed to open s