Jump to content

alexville

Members
  • Posts

    71
  • Joined

  • Last visited

    Never

Posts posted by alexville

  1. Not an expert but any unbalanced assignment that goes "something=," is generally asking for trouble.

     

    Here's my own line, try using it:

     

    url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

     

    And if it's still a problem, just comment the line out with a semicolon at the front.  It only matters anyway if you're using session IDs but not using cookies.

     

    Thank you,

    Well I tried what you suggested and I still receive the same error as before. And the weridest part is when I try to put quotes around the a=href,area=href,frame=src,input=src,form=fakeentry part like you suggested it totally makes every PHP page on my website Error 500. Even commenting out that line makes every page Error 500! This is insane :C

  2. Hello,

     

    I'm so mad at PHP right now... I'm trying to run a php shell file from SSH but when I run it I get thrown this error from PHP:

     

    root@server1 [/home/alexvill/www/3.0/socketchat]# ./socketShell.php
    PHP:  Error parsing /usr/local/lib/php.ini on line 811
    

     

    On line 811 of that php.ini file this is what occurs:

     

    url_rewriter.tags = a=href,area=href,frame=src,input=src,form=,fieldset=

     

    I have no idea what is wrong with this line. I have added quotes to it and that causes my whole site to get 500 errors.

     

    If anyone can help me out I would be so grateful!

     

    Here are the lines before that and after:

     ; session.use_trans_sid: (ini file field description not available)
    session.use_trans_sid = 0
    
    ; url_rewriter.tags: (ini file field description not available)
    url_rewriter.tags = a=href,area=href,frame=src,input=src,form=,fieldset=
    
    ; sybase.allow_persistent: (ini file field description not available)
    sybase.allow_persistent = On
    

     

     

     

     

     

  3. Probably a simple thing to fix, but I have forgotten how to fix this problem.

     

    Here is my code:

    $query = "INSERT INTO $table (user_id, chat_data, chat_message) VALUES ('$uniqid','$date','$output')";

     

    When the text in the $output variable includes a quote ( ' or " ) the query fails.

     

    What can I do to fix this problem?

     

    Thanks Freaks!  ;D

  4. IT should work ;-)

     

    Thanks for the reply, but it doesn't work.

     

    What I want is to have a bar that stays on the bottom of the visitors browser window, even if they scroll down the page. So That it is always in view. I dont want to use frames for this, but is it possible?

  5. Im not sure if this would be HTML or CSS, but im trying to get a bar on the bottom of my visitor's web browser when they visit my site, and so that it stays there when they scroll the page, much like on Facebook's chat.

     

    Anyone know how to do this?

  6. One more thing, how would I check if the result was empty, and instead say it was 0 views?

     

    Okay,

     

    It works when the person has more than 0 views, but when they have no views it just shows up as this: Your games have received views all together!

     

    The number zero doesnt show up where it should be between received and views.

     

    $a = mysql_query("SELECT SUM(`views`) FROM games WHERE uploader = '$session->username'");

    $views = 0;

    if (mysql_num_rows($a) > 0) {

        $views = mysql_fetch_array($a);

        $views = $views[0];

    }

     

     

    echo "Your games have received <strong>$views</strong> views all together!";

     

  7. Hey guys,

     

    I want to make a rating system for my game site, and what I have in mind is using a php system where a user and submit a number from 1 to 10 and then it is inserted into a "ratings" table with a reference to the game's page id. But what do I do to show the average rating once the data is in the table?

     

    Do I have to get all the ratings for a single game and average them out some how to get a rating? Can someone help?

  8. I'm trying to make a php page, that will create html tables of 4 cols and 17 rows per page.

     

    The data that will fill the cells will be from my games database which links to a game page and has titles and etc per mysql row.

     

    I just dont know how to make the links to the games pages fill up each of the cells! And then when I need a next page what do I do?

     

    Thanks in advance,

    Alex

  9. Here is my code that contains the ini_set:

     

     function startSession(){
          global $database;  //The database connection
    ini_set("session.cookie_domain",substr($_SERVER[HTTP_HOST],3));
          session_start();   //Tell PHP to start the session
    
          /* Determine if user is logged in */
          $this->logged_in = $this->checkLogin();
    
          /**
           * Set guest value to users not logged in, and update
           * active guests table accordingly.
           */
          if(!$this->logged_in){
             $this->username = $_SESSION['username'] = GUEST_NAME;
             $this->userlevel = GUEST_LEVEL;
             $database->addActiveGuest($_SERVER['REMOTE_ADDR'], $this->time);
          }
          /* Update users last active timestamp */
          else{
             $database->addActiveUser($this->username, $this->time);
          }
          
          /* Remove inactive visitors from database */
          $database->removeInactiveUsers();
          $database->removeInactiveGuests();
          
          /* Set referrer page */
          if(isset($_SESSION['url'])){
             $this->referrer = $_SESSION['url'];
          }else{
             $this->referrer = "/";
          }
    
          /* Set current url */
          $this->url = $_SESSION['url'] = $_SERVER['PHP_SELF'];
       }

     

    And here is the error I get if you dont already know what it says:

     

    Warning: ini_set() has been disabled for security reasons in /home/alexvill/public_html/games/include/session.php on line 46
    
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/alexvill/public_html/games/include/session.php:46) in /home/alexvill/public_html/games/include/session.php on line 47

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.