Foros del Web » Programando para Internet » PHP »

Error PHP filemtime() y Cannot modify header information

Estas en el tema de Error PHP filemtime() y Cannot modify header information en el foro de PHP en Foros del Web. Hola, buenas, A ver si alguien me puede ayudar. Tengo un problema con mi blog de Wordpress.org y es que me aparecen dos errores de ...
  #1 (permalink)  
Antiguo 09/03/2011, 09:18
 
Fecha de Ingreso: marzo-2011
Mensajes: 2
Antigüedad: 13 años, 1 mes
Puntos: 0
Error PHP filemtime() y Cannot modify header information

Hola, buenas,
A ver si alguien me puede ayudar. Tengo un problema con mi blog de Wordpress.org y es que me aparecen dos errores de PHP seguidos que no sé como solucionarlos:

PHP Warning: filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for cache/669a0dbcaf077fb76cec13cb329f7260.png...

PHP Warning: Cannot modify header information - headers already sent by

Muchas gracias por adelantado.
Saludos
  #2 (permalink)  
Antiguo 09/03/2011, 09:20
Avatar de jotaincubus  
Fecha de Ingreso: mayo-2005
Ubicación: Medellin - Colombia
Mensajes: 1.797
Antigüedad: 18 años, 11 meses
Puntos: 394
Respuesta: Error PHP filemtime() y Cannot modify header information

sin ver el código no podemos ayudarte mucho... el segundo error es generado porque algo ya esta imprimiendo o haciendo algo antes de hacer la redirección a otra pagina.
__________________
Por que existe gente que no agradece después de que se le ha brindado tiempo y ayuda ???
  #3 (permalink)  
Antiguo 09/03/2011, 10:48
 
Fecha de Ingreso: marzo-2011
Mensajes: 2
Antigüedad: 13 años, 1 mes
Puntos: 0
Respuesta: Error PHP filemtime() y Cannot modify header information

Muchas gracias.

Te indico el código, espero hacerlo bien.
En el error PHP Warning, filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for cache/e3ec5a1544fdd3002a4687e7d3864fdf.png in /usr/home/
indica la línea 444 del código que es la siguiente:

function filemtime_compare($a, $b) {

return filemtime($a) - filemtime($b);

}


Respecto al error siguiente de PHP Warning: Cannot modify header information - headers already sent by (output started at /usr
Indica estas líneas del código

}

clearstatcache();
$fileSize = filesize ($cache_file);

// send headers then display image
header ('Content-Type: ' . $mime_type);
header ('Accept-Ranges: bytes');
header ('Last-Modified: ' . $gmdate_mod);
header ('Content-Length: ' . $fileSize);
header ('Cache-Control: max-age=9999, must-revalidate');
header ('Expires: ' . $gmdate_mod);

readfile ($cache_file);

die();

}

No sé si esto es suficiente. Muchas gracias de nuevo.
Saludos

Etiquetas: filmtime, header, information, warning
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 02:34.