Error tras regenera...
 
Avisos
Vaciar todo

Error tras regenerar imagenes

6 Respuestas
3 Usuarios
0 Me gustas
1,492 Visitas
(@fontana-penna)
Respuestas: 17
Eminent Member
Topic starter
 

Hola, buenos dias;

Tras poner la marca de agua, he regenerado las imagenes y cuando he actualizado la página, me he encontrado con este error.

Fatal error: Uncaught --> Smarty: unable to write file /usr/home/fontanapenna.com/web/shop/cache/smarty/compile/7c/5b/b6/wrt5a929b551c4e07_81591709 <-- thrown in /usr/home/fontanapenna.com/web/shop/tools/smarty/sysplugins/smarty_internal_write_file.php on line 46

El php tiene este contenido

<?php
/**
* Smarty write file plugin
*
* @package Smarty
* @subpackage PluginsInternal
* @author Monte Ohrt
*/

/**
* Smarty Internal Write File Class
*
* @package Smarty
* @subpackage PluginsInternal
*/
class Smarty_Internal_Write_File
{
/**
* Writes file in a safe way to disk
*
* @param string $_filepath complete filepath
* @param string $_contents file content
* @param Smarty $smarty smarty instance
*
* @throws SmartyException
* @return boolean true
*/
public static function writeFile($_filepath, $_contents, Smarty $smarty)
{
$_error_reporting = error_reporting();
error_reporting($_error_reporting & ~E_NOTICE & ~E_WARNING);
if ($smarty->_file_perms !== null) {
$old_umask = umask(0);
}

$_dirpath = dirname($_filepath);
// if subdirs, create dir structure
if ($_dirpath !== '.' && !file_exists($_dirpath)) {
mkdir($_dirpath, $smarty->_dir_perms === null ? 0777 : $smarty->_dir_perms, true);
}

// write to tmp file, then move to overt file lock race condition
$_tmp_file = $_dirpath . DS . str_replace(array('.', ','), '_', uniqid('wrt', true));
if (!file_put_contents($_tmp_file, $_contents)) {
error_reporting($_error_reporting);
throw new SmartyException("unable to write file {$_tmp_file}");
}

/*
* Windows' rename() fails if the destination exists,
* Linux' rename() properly handles the overwrite.
* Simply unlink()ing a file might cause other processes
* currently reading that file to fail, but linux' rename()
* seems to be smart enough to handle that for us.
*/
if (Smarty::$_IS_WINDOWS) {
// remove original file
@unlink($_filepath);
// rename tmp file
$success = @rename($_tmp_file, $_filepath);
} else {
// rename tmp file
$success = @rename($_tmp_file, $_filepath);
if (!$success) {
// remove original file
@unlink($_filepath);
// rename tmp file
$success = @rename($_tmp_file, $_filepath);
}
}

if (!$success) {
error_reporting($_error_reporting);
throw new SmartyException("unable to write file {$_filepath}");
}

if ($smarty->_file_perms !== null) {
// set file permissions
chmod($_filepath, $smarty->_file_perms);
umask($old_umask);
}
error_reporting($_error_reporting);

return true;
}
}

¿Que puedo hacer?, ¿me podeis ayudar?

Muchas gracias

M

 
Respondido : 25/02/2018 11:29 am
(@fontana-penna)
Respuestas: 17
Eminent Member
Topic starter
 

He cambiado los permisos del directorio, subdirectorios y archivos cache a 777, pero sigo igual 🙁
Mi error seguramente ha sido no desactivar la cache normal y smarty.
De nuevo gracias.
M

 
Respondido : 25/02/2018 3:40 pm
Josraso
(@josraso)
Respuestas: 834
Prominent Member Moderator
 

Prueba a limpiar la cache, ve a parametros avanzados > Rendimiento y ahi dale al boton de limpiar cache, esta arriba a la derecha.


Telegram:@Josraso
Correo

 
Respondido : 25/02/2018 7:44 pm
(@fontana-penna)
Respuestas: 17
Eminent Member
Topic starter
 

Josraso wrote: Prueba a limpiar la cache, ve a parametros avanzados > Rendimiento y ahi dale al boton de limpiar cache, esta arriba a la derecha.

Gracias por la respuesta.
Lo que hice finalmente fue borrar el contenido de /cache/smarty/compile y /cache/smarty/cache y he podido entrar al panel de control.
Despues he desactivado la cache, regenerado las fotografías y he vuelto a limipar la chache desde donde me has indicado.
Saludos y de nuevo, gracias
M

 
Respondido : 25/02/2018 8:20 pm
(@lastapril)
Respuestas: 190
Estimable Member
 

Buenas, has vuelto a modificar los permisos que modificaste, deberias tener siempre 755 para carpetas y 644 para archivos,
Saludos

 
Respondido : 25/02/2018 11:25 pm
(@fontana-penna)
Respuestas: 17
Eminent Member
Topic starter
 

lastapril wrote: Buenas, has vuelto a modificar los permisos que modificaste, deberias tener siempre 755 para carpetas y 644 para archivos,
Saludos

Hola
Si, ya los volví a poner como estaban
Gracias
M

 
Respondido : 26/02/2018 11:05 am