Ver Mensaje Individual
  #17 (permalink)  
Antiguo 09/11/2011, 22:58
Avatar de Triby
Triby
Mod on free time
 
Fecha de Ingreso: agosto-2008
Ubicación: $MX->Gto['León'];
Mensajes: 10.106
Antigüedad: 15 años, 8 meses
Puntos: 2237
Respuesta: A que no encuentras el error ;)

Que pasa si la salida previa es mayor a 4096 bytes (valor por default)?

Cita:
Iniciado por php.ini para PHP v5.3.8
; Output buffering is a mechanism for controlling how much output data
; (excluding headers and cookies) PHP should keep internally before pushing that
; data to the client. If your application's output exceeds this setting, PHP
; will send that data in chunks of roughly the size you specify.

; Turning on this setting and managing its maximum buffer size can yield some
; interesting side-effects depending on your application and web server.
; You may be able to send headers and cookies after you've already sent output
; through print or echo.
You also may see performance benefits if your server is
; emitting less packets due to buffered output versus PHP streaming the output
; as it gets it. On production servers, 4096 bytes is a good setting for performance
; reasons.
; Note: Output buffering can also be controlled via Output Buffering Control
; functions.
; Possible Values:
; On = Enabled and buffer is unlimited. (Use with caution)
; Off = Disabled
; Integer = Enables the buffer and sets its maximum size in bytes.
; Note: This directive is hardcoded to Off for the CLI SAPI
; Default Value: Off
; Development Value: 4096
; Production Value: 4096
; http://php.net/output-buffering
output_buffering = On
De que se puede hacer, por supuesto que se puede, sin embargo, creo que es preferible manipular la salida correctamente que estar contando o dependiendo de la cantidad de bytes que se enviaron para que las cosas funcionen. Y, aun con esta configuracion, seria mucho mas confiable usando ob_* porque uno mismo tiene el control y, de todos modos... sigue sin gustarme la idea.

P.D.: emprear, apuesto a que tu HTML improvisado no llega a los 4kb antes de crear las cookies y el original de HyQnet si sobrepasa ese limite.

P.D.2: Para salir de dudas copie el codigo de emprear, lo pegue en Notepad++ y son solo 2022 bytes, incluyendo el PHP.
__________________
- León, Guanajuato
- GV-Foto

Última edición por Triby; 09/11/2011 a las 23:04