Re: [PHP-DEV] Sugestion: Most common errors....(Session Management)
At 05:06 02/10/2002 -0300, you wrote: Yes I know that you can't send headers to the browser when you've already sent some other stuffs, but ASP users have strange feeling that this is weird. php.ini : Output buffering = On what is wrong with this? Can't we implement some procedure that checks if Cookies and session commands were specified in the wrong way and automatically fix this for the ASP wrong programmers? the overhead on this would be *huge*. You're talking about parsing a script, editing it and then re-parsing it. The only way which this could be done without impacting on performance would be to enable it only when ASP style open/close tags were used, but even then, this'll have an effect on speed for some users. This procedure should minimize most common problems to bring PHP as the most Strong server side scripting language used in the entire internet. I'm still failing to see what's bad/wrong about turning on output buffering. I am not a ASP fan, I had this problems while I was trying to bring more people to PHP and quit to implement Microsoft ASP solutions. try doing image manipulation in asp, then you'll have a fairly solid reason ;) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Sugestion: Most common errors....(Session Management)
Hi Gareth, I do not know about performance impacts Lke I've said, that is just an idea for ASP guys to see the PHP Power. If it impacts on performance, let them know But this will be problem of them, just let them know that if send this session when it is already sent, the performance will get lower. Just my 2 cents. Best Regards, Ernani Gareth Ardron [EMAIL PROTECTED] escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... At 05:06 02/10/2002 -0300, you wrote: Yes I know that you can't send headers to the browser when you've already sent some other stuffs, but ASP users have strange feeling that this is weird. php.ini : Output buffering = On what is wrong with this? Can't we implement some procedure that checks if Cookies and session commands were specified in the wrong way and automatically fix this for the ASP wrong programmers? the overhead on this would be *huge*. You're talking about parsing a script, editing it and then re-parsing it. The only way which this could be done without impacting on performance would be to enable it only when ASP style open/close tags were used, but even then, this'll have an effect on speed for some users. This procedure should minimize most common problems to bring PHP as the most Strong server side scripting language used in the entire internet. I'm still failing to see what's bad/wrong about turning on output buffering. I am not a ASP fan, I had this problems while I was trying to bring more people to PHP and quit to implement Microsoft ASP solutions. try doing image manipulation in asp, then you'll have a fairly solid reason ;) -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Sugestion: Most common errors....(Session Management)
Le Mercredi 2 Octobre 2002 10:06, Ernani Joppert Pontes Martins a écrit : Yes I know that you can't send headers to the browser when you've already sent some other stuffs, but ASP users have strange feeling that this is weird. That's not a PHP problem, but deals with headers and page standardization. ASP users should deal with standards. Can't we implement some procedure that checks if Cookies and session commands were specified in the wrong way and automatically fix this for the ASP wrong programmers? If we found some cookies and session parameters on the entire script, can php intend to send this values to the browser w/o send that warning message ? Sounds like you did not RTFM (Read This Fine Manual) in PHP docs. If you want those cookies and other header stuff be transparently manipulated, you can: 1) Enable output buffering in PHP.INI 2) Use direct output buffering functions as discussed in Output Control Functions in PHP manual. When using output buffering, the whole body is buffered and cached while headers are set. This is the straight answer to your problem. But, when you don't want to buffer the page, you have to deal by yourself with headers, as no buffering is sending right away whatever is printed to the browser. This procedure should minimize most common problems to bring PHP as the most Strong server side scripting language used in the entire internet. I am not a ASP fan, I had this problems while I was trying to bring more people to PHP and quit to implement Microsoft ASP solutions. As stated above, this procedure exists, and is there for quite some time now. Maybe the biggest problem is developpers not wanting RTFM and imagining PHP should be ASP and have the same syntax, the same bugs and [add whatever you want]. This is quite the wrong way of thinking, exactly as if you asked C to be syntaxically equivalent to Basic. DJ Anubis. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Sugestion: Most common errors....(Session Management)
At 05:36 02/10/2002 -0300, you wrote: Hi Gareth, I do not know about performance impacts well, if you're talking about talking a script, reading it- editing it - parsing - executing, it stands to reason that this'll have more overhead than just parse - execute and so performance will suffer. Like I say, this is why there is the option to turn on something like what you're proposing in the php.ini file, but it's not enabled by default as it does have a performance hit. Lke I've said, that is just an idea for ASP guys to see the PHP Power. If it impacts on performance, let them know But this will be problem of them, just let them know that if send this session when it is already sent, the performance will get lower. but this is why there is the output buffering option in the php.ini fileit does exactly what you're asking - it just doesn't assume that the programmer is an ASP guy, as most php programmers arn't. In all seriousness, check out the output buffering option. It's there for a reason -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] Sugestion: Most common errors....(Session Management)
That's right. I did not RTFM. I did not knew about this php.ini directive. Like I've said, I was used to understand php procedure to handle sessions. But some of ASP programmers was / is not... Sorry to bring some lose of time. []'s Ernani Dj Anubis [EMAIL PROTECTED] escreveu na mensagem [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Le Mercredi 2 Octobre 2002 10:06, Ernani Joppert Pontes Martins a écrit : Yes I know that you can't send headers to the browser when you've already sent some other stuffs, but ASP users have strange feeling that this is weird. That's not a PHP problem, but deals with headers and page standardization. ASP users should deal with standards. Can't we implement some procedure that checks if Cookies and session commands were specified in the wrong way and automatically fix this for the ASP wrong programmers? If we found some cookies and session parameters on the entire script, can php intend to send this values to the browser w/o send that warning message ? Sounds like you did not RTFM (Read This Fine Manual) in PHP docs. If you want those cookies and other header stuff be transparently manipulated, you can: 1) Enable output buffering in PHP.INI 2) Use direct output buffering functions as discussed in Output Control Functions in PHP manual. When using output buffering, the whole body is buffered and cached while headers are set. This is the straight answer to your problem. But, when you don't want to buffer the page, you have to deal by yourself with headers, as no buffering is sending right away whatever is printed to the browser. This procedure should minimize most common problems to bring PHP as the most Strong server side scripting language used in the entire internet. I am not a ASP fan, I had this problems while I was trying to bring more people to PHP and quit to implement Microsoft ASP solutions. As stated above, this procedure exists, and is there for quite some time now. Maybe the biggest problem is developpers not wanting RTFM and imagining PHP should be ASP and have the same syntax, the same bugs and [add whatever you want]. This is quite the wrong way of thinking, exactly as if you asked C to be syntaxically equivalent to Basic. DJ Anubis. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php