Saludos a todos los foreros del web.
Les cuento, me tengo un lío porque pos no se que hacer, ya se me cerró el foco.
Tengo el siguiente código:
Código PHP:
<?php
/*------------------------------------------------------------------------
# author Oscar Ruíz
# copyright Copyright © 2011 servicioswebcr.com. All rights reserved.
# @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Website http://www.servicioswebcr.com
-------------------------------------------------------------------------*/
/*INCLUIR ARCHIVOS A COMPRIMIR*/
$files = array(
'jquery.min.js',
'bootstrap.js',
'countdown.js',
'jquery-ui.min.js',
'jquery.fittext.js'
);
$modified = 0;
/*FIN INCLUIR ARCHIVOS A COMPRIMIR*/
foreach($files as $file) {
$age = filemtime($file);
if($age > $modified) {
$modified = $age;
}
}
$offset = 60 * 60 * 24 * 7; // Memoria caché para una semana
header ('Expires: ' . gmdate ("D, d M Y H:i:s", time() + $offset) . ' GMT');
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $modified) {
header("HTTP/1.0 304 Not Modified");
header ('Cache-Control:');
} else {
header ('Cache-Control: max-age=' . $offset);
header ('Content-type: text/javascript; charset=UTF-8');
header ('Pragma:');
header ("Last-Modified: ".gmdate("D, d M Y H:i:s", $modified )." GMT");
function compress($buffer) {
/* eliminar los comentarios */
$buffer = preg_replace("/((?:\/\*(?:[^*]|(?:\*+[^*\/]))*\*+\/)|(?:\/\/.*))/", "", $buffer);
/* eliminar tabulaciones, espacios, saltos de línea, etc. */
$buffer = str_replace(array("\r\n","\r","\t","\n",' ',' ',' '), '', $buffer);
/* eliminar otros espacios antes / después ) */
$buffer = preg_replace(array('(( )+\))','(\)( )+)'), ')', $buffer);
return $buffer;
}
ob_start('ob_gzhandler');
foreach($files as $file) {
if(strpos(basename($file),'.min.')===false) { //comprimir archivos que no se minified
ob_start("compress");
include($file);
ob_end_flush();
} else {
include($file);
}
}
ob_end_flush();
}
?>
Cita:
Por favor si alguien me puede ayudar a ver que rayos esta pasando.Wed Apr 24 04:05:14 2013] [notice] Parent: child process exited with status 255 -- Restarting.
[Wed Apr 24 04:05:14 2013] [notice] Apache/2.2.22 (Win32) PHP/5.4.3 configured -- resuming normal operations
[Wed Apr 24 04:05:14 2013] [notice] Server built: May 13 2012 13:32:42
[Wed Apr 24 04:05:14 2013] [notice] Parent: Created child process 8012
[Wed Apr 24 04:05:14 2013] [notice] Child 8012: Child process is running
[Wed Apr 24 04:05:14 2013] [notice] Child 8012: Acquired the start mutex.
[Wed Apr 24 04:05:14 2013] [notice] Child 8012: Starting 64 worker threads.
[Wed Apr 24 04:05:14 2013] [notice] Child 8012: Starting thread to listen on port 80.
[Wed Apr 24 04:05:14 2013] [notice] Child 8012: Starting thread to listen on port 80.
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP Warning: Cannot modify header information - headers already sent by (output started at D:\\Template\\js\\template.js.php:3) in D:\\Template\\js\\template.js.php on line 30
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\Template\\js\\template.js.php:0
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP 2. header() D:\\Template\\js\\template.js.php:30
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP Warning: Cannot modify header information - headers already sent by (output started at D:\\Template\\js\\template.js.php:3) in D:\\Template\\js\\template.js.php on line 32
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\Template\\js\\template.js.php:0
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP 2. header() D:\\Template\\js\\template.js.php:32
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP Warning: Cannot modify header information - headers already sent by (output started at D:\\Template\\js\\template.js.php:3) in D:\\Template\\js\\template.js.php on line 38
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\Template\\js\\template.js.php:0
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP 2. header() D:\\Template\\js\\template.js.php:38
[Wed Apr 24 04:05:14 2013] [notice] Parent: child process exited with status 255 -- Restarting.
[Wed Apr 24 04:05:14 2013] [notice] Apache/2.2.22 (Win32) PHP/5.4.3 configured -- resuming normal operations
[Wed Apr 24 04:05:14 2013] [notice] Server built: May 13 2012 13:32:42
[Wed Apr 24 04:05:14 2013] [notice] Parent: Created child process 3604
[Wed Apr 24 04:05:14 2013] [notice] Child 3604: Child process is running
[Wed Apr 24 04:05:14 2013] [notice] Child 3604: Acquired the start mutex.
[Wed Apr 24 04:05:14 2013] [notice] Child 3604: Starting 64 worker threads.
[Wed Apr 24 04:05:14 2013] [notice] Child 3604: Starting thread to listen on port 80.
[Wed Apr 24 04:05:14 2013] [notice] Child 3604: Starting thread to listen on port 80.
[Wed Apr 24 04:05:14 2013] [notice] Apache/2.2.22 (Win32) PHP/5.4.3 configured -- resuming normal operations
[Wed Apr 24 04:05:14 2013] [notice] Server built: May 13 2012 13:32:42
[Wed Apr 24 04:05:14 2013] [notice] Parent: Created child process 8012
[Wed Apr 24 04:05:14 2013] [notice] Child 8012: Child process is running
[Wed Apr 24 04:05:14 2013] [notice] Child 8012: Acquired the start mutex.
[Wed Apr 24 04:05:14 2013] [notice] Child 8012: Starting 64 worker threads.
[Wed Apr 24 04:05:14 2013] [notice] Child 8012: Starting thread to listen on port 80.
[Wed Apr 24 04:05:14 2013] [notice] Child 8012: Starting thread to listen on port 80.
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP Warning: Cannot modify header information - headers already sent by (output started at D:\\Template\\js\\template.js.php:3) in D:\\Template\\js\\template.js.php on line 30
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\Template\\js\\template.js.php:0
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP 2. header() D:\\Template\\js\\template.js.php:30
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP Warning: Cannot modify header information - headers already sent by (output started at D:\\Template\\js\\template.js.php:3) in D:\\Template\\js\\template.js.php on line 32
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\Template\\js\\template.js.php:0
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP 2. header() D:\\Template\\js\\template.js.php:32
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP Warning: Cannot modify header information - headers already sent by (output started at D:\\Template\\js\\template.js.php:3) in D:\\Template\\js\\template.js.php on line 38
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP Stack trace:
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP 1. {main}() D:\\Template\\js\\template.js.php:0
[Wed Apr 24 04:05:14 2013] [error] [client 127.0.0.1] PHP 2. header() D:\\Template\\js\\template.js.php:38
[Wed Apr 24 04:05:14 2013] [notice] Parent: child process exited with status 255 -- Restarting.
[Wed Apr 24 04:05:14 2013] [notice] Apache/2.2.22 (Win32) PHP/5.4.3 configured -- resuming normal operations
[Wed Apr 24 04:05:14 2013] [notice] Server built: May 13 2012 13:32:42
[Wed Apr 24 04:05:14 2013] [notice] Parent: Created child process 3604
[Wed Apr 24 04:05:14 2013] [notice] Child 3604: Child process is running
[Wed Apr 24 04:05:14 2013] [notice] Child 3604: Acquired the start mutex.
[Wed Apr 24 04:05:14 2013] [notice] Child 3604: Starting 64 worker threads.
[Wed Apr 24 04:05:14 2013] [notice] Child 3604: Starting thread to listen on port 80.
[Wed Apr 24 04:05:14 2013] [notice] Child 3604: Starting thread to listen on port 80.
Gracias de antemano a todos mi gente.
Saludos