Foros del Web » Programando para Internet » PHP »

PHP OO Error Con firmas en PHP

Estas en el tema de Error Con firmas en PHP en el foro de PHP en Foros del Web. Buenas con todos, tengo un problema con mi firma en php... no se en que estoy haciendo mal o que linea estaria fallando... el php ...
  #1 (permalink)  
Antiguo 19/12/2010, 11:27
 
Fecha de Ingreso: mayo-2010
Mensajes: 215
Antigüedad: 13 años, 11 meses
Puntos: 4
Pregunta Error Con firmas en PHP

Buenas con todos, tengo un problema con mi firma en php... no se en que estoy haciendo mal o que linea estaria fallando...

el php es este

Código PHP:
<?php
function Conectarse(){
    
    if (!(
$link=mysql_connect("127.0.0.1","root","valladares"))){
    echo 
'error user o pass incorrectos';
    exit();
    }

    if (!
mysql_select_db("gbwc",$link)){
    echo 
'base de datos no existe';
    exit();
    }

return 
$link;

}

Conectarse();

function 
clean_variable($var=NULL,$r=NULL) {
$newvar = @preg_replace('/[^a-zA-Z0-9\_]/'''$var);
if (!
preg_match('/^[a-zA-Z0-9\_\s]*$/i',stripslashes($var))) {
    if (
$r != NULL) {  return true; } else { return $newvar; }
    
writelog("$var"'VARIABLE_ERROR'); 
 } 
    if (
$r == NULL) {  return $newvar; }

}

// Cambia esto x tus variables
$nickname=clean_variable($_GET['nick']);

$qmnews = @mysql_query("SELECT game.NickName AS NickName, game.Guild AS Guild, game.GuildRank AS GuildRank, game.MemberCount AS MemberCount, game.TotalGrade AS TotalGrade, game.TotalRank AS TotalRank, game.CountryGrade AS CountryGrade, game.Country AS Country, game.CountryRank AS CountryRank, user.Gender AS Gender, game.Id AS Id FROM game, user where game.NickName='$nickname' limit 1");

if(
$r = @mysql_fetch_array($qmnews)){

$IDjuego $r["NickName"];
$clan $r["Guild"];
$puestoclan "".$r['GuildRank']."/".$r['MemberCount']."";
$imgLVLmundial imagecreatefromgif("../ranks/rank_".$r['TotalGrade'].".gif");
$puestomundial $r["TotalRank"];
$imgLVLNacional imagecreatefromgif("../ranks/rank_".$r['CountryGrade'].".gif");
$imgpais imagecreatefrompng("../flags/".$r['Country'].".png");
$puestoPais $r["CountryRank"];

if(
$r['Gender']==1){
$imgfondo='Girl.jpg';
}
if(
$r['Gender']==0){
$imgfondo='Boy.jpg';
}


// cabezera para el navegador 
header('Content-type: image/png');

// variables de color de texto, tamaño, fuente e imagen d fondo
$background imagecreatefromjpeg("$imgfondo");
$black imagecolorallocate($background000);
$tamanio 9;
$fuente 'ft60.ttf';


// insertando las imagenes
//imagecopymerge($background, imagen, x, y, zomx, zomy, largo, alto, transparencia);
imagecopymerge($background$imgLVLmundial9570002515100);
imagecopymerge($background$imgLVLNacional10689002515100);
imagecopymerge($background$imgpais15010002515100);

// Escribiendo en la imagen
imagettftext($background$tamanio08247$black$fuente$IDjuego);
imagettftext($background$tamanio04760$black$fuente$clan);
imagettftext($background$tamanio019560$black$fuente$puestoclan);
imagettftext($background$tamanio020081$black$fuente$puestomundial);
imagettftext($background$tamanio020199$black$fuente$puestoPais);

// mostrar la imagen
imagepng($background);

// borrar la imagen del cache
imagedestroy($background);

}else{
?>
    <script type="text/javascript">alert('Error: Copia bien la URL de tu firma');</script>
    <meta HTTP-EQUIV="Refresh" CONTENT="0; URL=<?="http://".$_SERVER['HTTP_HOST']?>?op=firmas">
<?
}
?>

ahora el .htacess es

Código PHP:
Options +FollowSymLinks
RewriteEngine On

Options 
-MultiViews
Options All 
-Indexes


Directoryindex index2
.php

RewriteRule 
^index.asp index2.php [L
ahora e revisado todo.. y pes estan todas las tablas en mi base de datos y la conexion es correcta para que no genere dicho error.


supuestamente la firma se convoca asi :
http://localhost/firmas/?nick=TESTNICK

la carpeta de firmas esta en www/firmas/ el error que me genera es el siguiente :




e revisado esas lineas y todo esta correcto.. podrian ayudarme porfavor
  #2 (permalink)  
Antiguo 19/12/2010, 13:15
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: Error Con firmas en PHP

quiza el código este bien, pero los mensajes de error te estan diciendo la verdad... no ignores su significado, que ahí esta la solución...
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.

Etiquetas: firma
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 05:37.