Hi All,
I could see php_output_activate(TSRMLS_C) getting called from
php_module_startup immedeately after php_output_startup.
Why is this needed? As each SAPI modules call
php_output_activate(TSRMLS_C) explicitly as a part of request startup.
Why am I concerned about this?
Ans:
No matter what behaviour PHP shows, I would find it bad coding if you place
default anywhere but at the bottom, simply because you might run into
unexpected behaviour in other versions of the PHP engine, which I assume
you're experiencing now. You could've seen this coming. When you write a
Coming from C (or Java), I find the new behaviour a little strange. If you
use default to match invalid conditions, putting it at the beginning of a
switch doesn't seem to be poor practice to me (putting it in the middle
would be pretty ugly though). IMO, stating what happens to bogus values
On Thu, 7 Oct 2004, Andi Gutmans wrote:
Guys, maybe we can calm down this attachment cleaner a bit. It's becoming
really annoying. It's only in the past few months where it is overly
aggressive.
Not true, it never allowed anything else then text/plain, and that is a
Good Thing(tm).
Derick
Benj Carson wrote:
Coming from C (or Java), I find the new behaviour a little strange. If you
I fully agree. Although I wouldn't have used the word 'little' here :-)
use default to match invalid conditions, putting it at the beginning of a
switch doesn't seem to be poor practice to me (putting
Well, you convinced me (no need to get all physical with me tho ;)). If this
is how C acts (which I did not know), then I prefer it to work like this
too. I always assumed (which is bad, I know) the default case worked like a
catch all, which catches anything that crosses its path, and therefor
Hi Andi,
It might be documented but it has not always been working like this. I
have some code that I have not touched for over 2 years, and It has workd
with both PHP4 and PHP5 versions (even PHP5-1-0-dev from Aug 19 2004
17:03:39 ). After upgrading to PHP5 CVS-HEAD it stopped working.
I have
I would like to know if some guy of the PHP Group has taken a look at this
thread.
Although it has been stated that one of the main motivations its fulfilled
with mod_rewrite; it's not clear that mod_rewrite would help with the second
motivation; and I think this tiny patch is slightly faster than
Frank M. Kromann [EMAIL PROTECTED] writes:
It might be documented but it has not always been working like this. I
have some code that I have not touched for over 2 years, and It has workd
with both PHP4 and PHP5 versions (even PHP5-1-0-dev from Aug 19 2004
17:03:39 ). After upgrading to PHP5
Andi,
from the feedback it is obvious that the engine supported
defaults at places other than the bottom.
In all switch-supporting languages I know, it is possible to
do this:
switch ($expr) {
default:
/* handle everything EXCEPT foo and bar */
/*
I will look into the reason this seems to have changed.
However, I can assure you that from day 1 this was not supposed to work
and was documented as such for years already (since the days of PHP 3). If
it worked at some point then it was by chance!
Andi
At 05:31 PM 10/8/2004 +0200, Sascha
Hello,
Ergh. I also hope that it can easily be restored to work the way
it did, even if that was undocumented. The thought of looking
through ~ 5,000 php scripts before our upgrade is a bit overwhelming
:)
--
Best regards,
Jasonmailto:[EMAIL PROTECTED]
Andi Gutmans wrote:
However, I can assure you that from day 1 this was not supposed to work
and was documented as such for years already (since the days of PHP 3).
If it worked at some point then it was by chance!
This would be a good time to accept the defacto standard, redefine
switch() in
Slightly OT, but while we are on the subject of switch not being
C-ish, how about making it so that continue inside a switch block
behaves the way it does in C?
This C code snippet:
while (1) {
printf(top\n);
switch (1) {
case 1:
continue;
}
At 09:01 AM 10/8/2004 +0200, Derick Rethans wrote:
On Thu, 7 Oct 2004, Andi Gutmans wrote:
Guys, maybe we can calm down this attachment cleaner a bit. It's becoming
really annoying. It's only in the past few months where it is overly
aggressive.
Not true, it never allowed anything else then
I don't think we should do anything about it. From day 1 we treated
switch() like a loop as far as break/continue is concerned, mainly because
we wanted break/continue to be consistent. You might find this odd but you
actually have more power in PHP than in C as you can break out or continue
Fixed.
At 12:00 PM 10/8/2004 -0400, Jason Garber wrote:
Hello,
Ergh. I also hope that it can easily be restored to work the way
it did, even if that was undocumented. The thought of looking
through ~ 5,000 php scripts before our upgrade is a bit overwhelming
:)
--
Best regards,
Jason
Wez Furlong wrote:
What, if anything, should we do about this?
two letters: 'BC' :(
--
Hartmut Holzgraefe [EMAIL PROTECTED]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Quick patch to add a function openssl_csr_subject() that allows you to
see the subject of a CSR. Uses the same CSR handling routines as
openssl_csr_sign() etc, so it can take a string in PEM format, a file,
whatever.
Prototype: string openssl_csr_subject(mixed csr)
Sample return value:
I apologize - it helps when I actually attach the patch.
--- ext/openssl/php_openssl.h.orig 2004-10-08 15:32:52.0 -0400
+++ ext/openssl/php_openssl.h 2004-10-07 17:40:13.0 -0400
@@ -78,6 +78,7 @@
PHP_FUNCTION(openssl_csr_export);
PHP_FUNCTION(openssl_csr_export_to_file);
Thanks Andi,
It works for me.
- Frank
Fixed.
At 12:00 PM 10/8/2004 -0400, Jason Garber wrote:
Hello,
Ergh. I also hope that it can easily be restored to work the way
it did, even if that was undocumented. The thought of looking
through ~ 5,000 php scripts before our
Two or three comments:
- You leak the dynamically allocated buffer returned by X509_NAME_oneline()
- X509_NAME_oneline() man page says that its use is discouraged in
favour of smarter functions. Is there a possibility that someone will
need that functionality?
- if you can solve/answer both of
22 matches
Mail list logo