Foros del Web » Programando para Internet » PHP »

Esto es rarisimo!!!

Estas en el tema de Esto es rarisimo!!! en el foro de PHP en Foros del Web. Tengo una aplicacion en php, y me dispongo a cambiar el logo de muestra por el mio ok?? pues eso me meto con el ftp ...
  #1 (permalink)  
Antiguo 30/01/2004, 04:06
 
Fecha de Ingreso: enero-2004
Mensajes: 68
Antigüedad: 20 años, 3 meses
Puntos: 0
Esto es rarisimo!!!

Tengo una aplicacion en php, y me dispongo a cambiar el logo de muestra por el mio ok?? pues eso me meto con el ftp y borro el *.gif y subo el otro *.gif exactamente con el mismo nombre, pues bien entro en mi aplicación y sorpresa!! todabia sale el logo de antes, como puede ser¿?? e puesto el raton sobre la imagen y en propiedades e comprobado la ruta y coincide, luego e seguido probando, y lo ke e echo es borrar el gif no e puesto ni el mio ni el de muestra, y sorpresa!! aun sin el archibo sigue apareciendo, y tecleando la ruta en el navegador igual..



KE KOÑOOOO PASAAAAA!!!!!!!



tiene algo que ver este *txt

makethumb.txt

<?
/************************************************** *************************
* Copyright: Copyright 2003 http://www.brooky.com
*
************************************************** *************************/

// CONFIGURATION FOR THUMBNAILS

// FOR GD VERSION 1.6 (default) SET $gd_version=1;
// FOR GD VERSION 2.0+ FOR IMPROVED THUMBNAILS SET $gd_version=2;
// IF YOU DO NOT HAVE GD SET $gd_version=0;

$gd_version=1;

// HOW CAN I TELL WHAT VERSION I RUN?
// Login to admin and click server environment off the main menu.
// If you have GD you will see a table entitled GD and the
// version number will be displayed there. :o)


// END THUMBNAILS CONFIG

// ************************************************** ***********************
class thumbnail
{
var $img;

function thumbnail($imgfile)
{
//detect image format
$this->img["format"]=ereg_replace(".*\.(.*)$","\\1",$imgfile);
$this->img["format"]=strtoupper($this->img["format"]);
if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") {
//JPEG
$this->img["format"]="JPEG";
$this->img["src"] = ImageCreateFromJPEG ($imgfile);
} elseif ($this->img["format"]=="PNG") {
//PNG
$this->img["format"]="PNG";
$this->img["src"] = ImageCreateFromPNG ($imgfile);
} else {
//DEFAULT
echo "Not Supported File! Thumbnails can only be made from .jpg and .png images!";
exit();
}
@$this->img["lebar"] = imagesx($this->img["src"]);
@$this->img["tinggi"] = imagesy($this->img["src"]);
//default quality jpeg
$this->img["quality"]=75;
}

function size_auto($size=100)
{
//size
if ($this->img["lebar"]>=$this->img["tinggi"]) {
$this->img["lebar_thumb"]=$size;
@$this->img["tinggi_thumb"] = ($this->img["lebar_thumb"]/$this->img["lebar"])*$this->img["tinggi"];
} else {
$this->img["tinggi_thumb"]=$size;
@$this->img["lebar_thumb"] = ($this->img["tinggi_thumb"]/$this->img["tinggi"])*$this->img["lebar"];
}
}

function jpeg_quality($quality=75)
{
//jpeg quality
$this->img["quality"]=$quality;
}



function show($gd_version)
{

@Header("Content-Type: image/".$this->img["format"]);
if($gd_version==2)
{
$this->img["des"] = imagecreatetruecolor($this->img["lebar_thumb"],$this->img["tinggi_thumb"]);
@imagecopyresampled ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"],$this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"]);
}
if($gd_version==1)
{
$this->img["des"] = imagecreate($this->img["lebar_thumb"],$this->img["tinggi_thumb"]);
@imagecopyresized ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"],$this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"]);
}
if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") {
//JPEG
imageJPEG($this->img["des"],"",$this->img["quality"]);
} elseif ($this->img["format"]=="PNG") {
//PNG
imagePNG($this->img["des"]);
}
}

function save($save="",$gd_version)
{

if($gd_version==2)
{
$this->img["des"] = imagecreatetruecolor($this->img["lebar_thumb"],$this->img["tinggi_thumb"]);
@imagecopyresampled ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"], $this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"]);
}
if($gd_version==1)
{
$this->img["des"] = imagecreate($this->img["lebar_thumb"],$this->img["tinggi_thumb"]);
@imagecopyresized ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"], $this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"]);
}
if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") {
//JPEG
imageJPEG($this->img["des"],"$save",$this->img["quality"]);
} elseif ($this->img["format"]=="PNG") {
//PNG
imagePNG($this->img["des"],"$save");
}
}
}
// ************************************************** ***********************
?>













SALUDOS
  #2 (permalink)  
Antiguo 30/01/2004, 05:49
Ex Colaborador
 
Fecha de Ingreso: junio-2002
Mensajes: 9.091
Antigüedad: 21 años, 10 meses
Puntos: 16
Hola,

Posiblemente estes accediendo a internet mediante un proxy-cache. Uno de los mas famosos es el de timofonica que afecta a los usuarios que se conectan mediante ADSL. Prueba a forzar la peticion al servidor con un control+F5 (en el internet explorer).

Si quieres saber si la imagen se ha subido, tambien puedes hacer una prueba rapida con http://tudominio.com/dri_imagen/imagen.gif?1234 . Es decir, la URL de tu imagen mas un pseudoparametro. Esto hace que el proxy-cache piense que es un fichero distinto o que genera distinto contenido dinamico. Si con esto ves tu nueva imagen, no tienes porque preocuparte. Solo es cuestion de tiempo (unos minutos, una hora) en que se actualice el contenido en el proxy-cache (mejor dicho, que caduque el contenido de su cache). Ademas, es un problema de la conexion entre el cliente y el servidor. Otro usuario que se conecte con otra conexion que no use proxycache, estara viendo la nueva.

El problema es cuando tu conexion no usa el proxycache y por tanto ves la imagen nueva. Y te llama el cliente muy cabreado porque el sigue viendo la imagen antigua

Saludos.

PD: Por cierto, o no te entendido bien, o el script ese que pones no tiene que ver con la imagen que comentas (dices que intentas acceder directamente al fichero).
__________________
Josemi

Aprendiz de mucho, maestro de poco.
  #3 (permalink)  
Antiguo 30/01/2004, 05:58
Avatar de Antonito  
Fecha de Ingreso: noviembre-2001
Ubicación: en la red
Mensajes: 446
Antigüedad: 22 años, 5 meses
Puntos: 3
por la cache de guarrofonica no es, no? has probado a poner la direccion y al final ??? :

lerele.com/imagen.gif???

Y otra puede ser por que la imagen se llam en otro sitio, lo mejor es buscar en texto (p.j. e Dreamweber) el nombre de la imagen y sustituirla... :)

saludos.
__________________
Pancho - Consultor de usabilidad
  #4 (permalink)  
Antiguo 30/01/2004, 20:26
 
Fecha de Ingreso: enero-2004
Mensajes: 68
Antigüedad: 20 años, 3 meses
Puntos: 0
Exactamente, era por el proxy, e intalado el proxycache y sin problemas..

SALUDOS
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 12:59.