+ Reply to Thread
Results 1 to 4 of 4

Thread: what is wong with this??

  1. #1
    welard is offline x10Hosting Member welard is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    34

    what is wong with this??

    <code><?php
    $macropage="docrime.php?c={$_GET['c']}";
    include "globals.php";
    if($ir['jail'] or $ir['hospital']) { die("This page cannot be accessed while in jail or hospital."); }
    $_GET['c']=abs((int) $_GET['c']);
    if(!$_GET['c'])
    {
    print "Invalid crime";
    }
    else
    {
    $q=mysql_query("SELECT * FROM crimes WHERE crimeID={$_GET['c']}",$c);
    $r=mysql_fetch_array($q);
    if($ir['brave'] < $r['crimeBRAVE'])
    {
    print "You do not have enough Brave to perform this crime.";
    }
    else
    {
    $ec="\$sucrate=".str_replace(array("LEVEL","CRIMEX P","EXP","WILL","IQ"), array($ir['level'], $ir['crimexp'], $ir['exp'], $ir['will'], $ir['IQ']),$r['crimePERCFORM']).";";
    eval($ec);
    print $r['crimeITEXT'];
    $ir['brave']-=$r['crimeBRAVE'];
    mysql_query("UPDATE users SET brave={$ir['brave']} WHERE userid=$userid",$c);
    if(rand(1,100) <= $sucrate)
    {
    print str_replace("{money}",$r['crimeSUCCESSMUNY'],$r['crimeSTEXT']);
    $ir['money']+=$r['crimeSUCCESSMUNY'];
    $ir['crystals']+=$r['crimeSUCCESSCRYS'];
    $ir['exp']+=(int) ($r['crimeSUCCESSMUNY']/;
    mysql_query("UPDATE users SET money={$ir['money']}, crystals={$ir['crystals']}, exp={$ir['exp']},crimexp=crimexp+{$r['crimeXP']} WHERE userid=$userid",$c);
    if($r['crimeSUCCESSITEM'])
    {
    item_add($userid, $r['crimeSUCCESSITEM'], 1);
    }
    }
    else
    {
    if(rand(1, 2) == 1)
    {
    print $r['crimeFTEXT'];
    }
    else
    {
    print $r['crimeJTEXT'];
    $db->query("UPDATE `users` SET `jail` = '$r[crimeJAILTIME]', `jail_reason` = '$r[crimeJREASON]' WHERE `userid` = '$userid'");
    }
    }

    print "<br /><a href='docrime.php?c={$_GET['c']}'>Try Again</a><br />
    <a href='criminal.php'>Crimes</a>";
    }
    }


    $h->endpage();
    ?></code>


    and this is what i get!!!


    Fatal error: SUHOSIN - Use of eval is forbidden by configuration in /home/welard/public_html/docrime.php(21) : eval()'d code on line 21

  2. #2
    Lurien is offline x10Hosting Member Lurien is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    31

    Re: what is wong with this??

    *hasnot read the whole post*
    I've seen a lot of people asking about errors of that kind and they are all answered with something reffered to:
    "Have you checked that your php level is high enough?"
    Just a suggestion
    On the other hand I've got no idea what reputation is for :3

    If you find my answers to be of help to you thank me by giving me a (Upper right of the any of my posts)

    Si lo que posteo te resulta de utilidad agradecemelo dandome , nada mas clickea ahi en la parte superior derecha de mi post

  3. #3
    welard is offline x10Hosting Member welard is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    34

    Re: what is wong with this??

    how do u meen ??



    and i get this in cpanel error log


    [Fri Nov 2 17:28:04 2007] [error] [client me] File does not exist: /home/welard/public_html/navybar.png
    ALERT - use of eval is forbidden by configuration (attacker 'me', file '/home/welard/public_html/docrime.php', line 21)


    how am i a attcker i am trying to run my code i have ugraded the php to intermidiat and still nothing
    Last edited by welard; 11-02-2007 at 05:47 PM.

  4. #4
    naim4u's Avatar
    naim4u is offline x10Hosting Member naim4u is an unknown quantity at this point
    Join Date
    Sep 2007
    Posts
    51

    Re: what is wong with this??

    hii,
    the code you have written is right.
    but your php hosting version didnot enable: eval() function.
    you would have heared many functiona like mail() ,etc.

    eval() is also one of the function in php.upgrade or ask your hosting admin to enable eval() function.
    then your code works.

    bye.. i wish you for your success
    Naim,
    naim@naimonline.net.ms
    www.naimonline.net.ms
    Last edited by naim4u; 11-03-2007 at 12:06 PM. Reason: speeling error plz forgive me

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers