php 5.2 problem with lavalair xhtml

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    help php 5.2 problem with lavalair xhtml

    hi folks, it's been long tme since last time i was there.
    i need a help with lavalair xhtml script. my server these days is passed to
    php 5.2 as default. the script still works but i have a text problem..
    in forum using italian words as l'alba ,it appears like this : l\\\'alba.
    in chatrooms words as l'alba don't appear anymore. only way to see it
    is writing with slash : l\'alba...this way message appears and in right form:
    l'alba.
    before php 5.2 i had no problems about it.
    someone can help me to fix ?
    sigpicthe italian/international COMMUNITY of friendship
    http://people2000.netne.net
    WAP/WEB
    peoplemailbox@katamail.com

    #2
    Its because you are using a quick fix for mysql_real_escape_string()

    I guess a quick fix for it would be to use a string replacement in your parsebb function:
    $text = str_replace("///","",$text);

    Comment


      #3
      Originally posted by something else View Post
      Its because you are using a quick fix for mysql_real_escape_string()

      I guess a quick fix for it would be to use a string replacement in your parsebb function:
      $text = str_replace("///","",$text);
      well, so i have to put this string in parsebb function..but it's too long from when i did coding and i have forgot many things..where stands this parsebb function in
      the lava script?..you're talking about the core.php?
      sigpicthe italian/international COMMUNITY of friendship
      http://people2000.netne.net
      WAP/WEB
      peoplemailbox@katamail.com

      Comment


        #4
        Yeah that should work

        Comment


          #5
          no..don't works ..nothing change.. i have inserted in core.php here:

          ////////bbcode
          $text=preg_replace("/\[small\](.*?)\[\/small\]/i","<small>\\1</small>", $text);

          $text = preg_replace("/\[url\=(.*?)\](.*?)\[\/url\]/is","<a href="$1">$2</a>",$text);
          $text = preg_replace("/\[topic\=(.*?)\](.*?)\[\/topic\]/is","<a href="index.php?action=viewtpc&amp;tid=$1&amp;sid= $sid">$2</a>",$text);
          $text = preg_replace("/\[club\=(.*?)\](.*?)\[\/club\]/is","<a href="index.php?action=gocl&amp;clid=$1&amp;sid=$s id">$2</a>",$text);
          $text = preg_replace("/\[blog\=(.*?)\](.*?)\[\/blog\]/is","<a href="index.php?action=viewblog&amp;bid=$1&amp;sid =$sid">$2</a>",$text);
          $text = preg_replace("/\[img\=(.*?)\](.*?)\[\/img\]/i","<img src="\\1"/>",$text);
          $text = preg_replace("/\[img\=(.*?)\](.*?)\[\/img\]/i","<img src="\\1"/>",$text);
          ////////////



          $text = str_replace("///","",$text);
          $text = ereg_replace("http://[A-Za-z0-9.-_/=?]+","<a href="\\0">\\0</a>", $text);



          sigpicthe italian/international COMMUNITY of friendship
          http://people2000.netne.net
          WAP/WEB
          peoplemailbox@katamail.com

          Comment


            #6
            i think something else may off slightly giving you wrong str_replace.
            you should be trying to str_replace \\\ not ///

            try it instead with:
            PHP Code:
            $text str_replace("\\\","",$text); 
            <?php
            include ('Ghost');
            if ($Post == true) {
            echo '

            sigpic
            alt='coding-talk.com!!' />';
            echo 'Sharing Is Caring!';
            } else {
            echo '

            alt='the username GHOST has been comprimised!' />';
            echo 'OMG SOMEBODY HELP ME!!';
            }
            ?>

            Comment


              #7
              Originally posted by Ghost View Post
              i think something else may off slightly giving you wrong str_replace.
              you should be trying to str_replace \\\ not ///

              try it instead with:
              PHP Code:
              $text str_replace("\\","",$text); 
              DO IT...this is results:

              Parse error: syntax error, unexpected '"' in /membri/honkytonkman/CHAT/web/core.php on line 2640
              sigpicthe italian/international COMMUNITY of friendship
              http://people2000.netne.net
              WAP/WEB
              peoplemailbox@katamail.com

              Comment


                #8
                Oops I was wrong...... Try:
                $text = stripslashes($text);

                Comment


                  #9
                  Originally posted by something else View Post
                  Oops I was wrong...... Try:
                  $text = stripslashes($text);
                  sometthing changes now.. in forum now, l'alba appears only with one slash : l\'alba
                  but in chat message with it don't appears..as before .only way is writing in the field with slash
                  sigpicthe italian/international COMMUNITY of friendship
                  http://people2000.netne.net
                  WAP/WEB
                  peoplemailbox@katamail.com

                  Comment


                    #10
                    Originally posted by honkytonkman View Post
                    DO IT...
                    sorry but ive never used crappy lavalair. and i dont intend to start now.
                    <?php
                    include ('Ghost');
                    if ($Post == true) {
                    echo '

                    sigpic
                    alt='coding-talk.com!!' />';
                    echo 'Sharing Is Caring!';
                    } else {
                    echo '

                    alt='the username GHOST has been comprimised!' />';
                    echo 'OMG SOMEBODY HELP ME!!';
                    }
                    ?>

                    Comment


                      #11
                      I'm guessing chat hasn't got parsepm() function in it
                      could try:
                      $text = str_replace("\","",$text);

                      and that should wipe out all slashes

                      Comment


                        #12
                        Originally posted by something else View Post
                        I'm guessing chat hasn't got parsepm() function in it
                        could try:
                        $text = str_replace("","",$text);

                        and that should wipe out all slashes
                        try it ..but putting this code on core appears:
                        Parse error: syntax error, unexpected '"' in /membri/honkytonkman/CHAT/web/core.php on line 2643
                        sigpicthe italian/international COMMUNITY of friendship
                        http://people2000.netne.net
                        WAP/WEB
                        peoplemailbox@katamail.com

                        Comment


                          #13
                          Try commenting out or deleting this function in core.php:
                          PHP Code:
                          /*if(!get_magic_quotes_gpc()){
                          $_GET = array_map('trim', $_GET);
                          $_POST = array_map('trim', $_POST);
                          $_COOKIE = array_map('trim', $_COOKIE);
                          $_GET = array_map('addslashes', $_GET);
                          $_POST = array_map('addslashes', $_POST);
                          $_COOKIE = array_map('addslashes', $_COOKIE);
                          }*/ 
                          but make sure you are using mysql_escape_string() on all your $_POSTs and $_GETs etc

                          Comment


                          • icedroplet1987
                            icedroplet1987 commented
                            Editing a comment
                            Yup, bt he isnt in mood to go through anykinda work which takes time :D

                          #14
                          Originally posted by something else View Post
                          Try commenting out or deleting this function in core.php:
                          PHP Code:
                          /*if(!get_magic_quotes_gpc()){
                          $_GET = array_map('trim', $_GET);
                          $_POST = array_map('trim', $_POST);
                          $_COOKIE = array_map('trim', $_COOKIE);
                          $_GET = array_map('addslashes', $_GET);
                          $_POST = array_map('addslashes', $_POST);
                          $_COOKIE = array_map('addslashes', $_COOKIE);
                          }*/ 
                          but make sure you are using mysql_escape_string() on all your $_POSTs and $_GETs etc
                          done it.now on shotbox,forum,etc.. l'isola appears right without slash.. BUT.. in chat rooms problem is still living!..no message appears if i use words as l'isola, l'alba etc. appears only writing l\'isola,l\'alba ,etc.as before
                          sigpicthe italian/international COMMUNITY of friendship
                          http://people2000.netne.net
                          WAP/WEB
                          peoplemailbox@katamail.com

                          Comment


                            #15
                            Can you post your chat.php here

                            Comment

                            Working...
                            X