• 19-12-2012, 13:18:34
    #1
    Arkadaşlar ikitane sitemi güncelleyeyim dedim 1 sitemi sorunsuz güncelledim, diğer sitem hata verdi : ( biraz araştırdım SQL injection yemişsindir falan diyen bir ingilizce kaynakvar fakat ben güncellemeden sonra aldığım için ihtimal vermiyorum SQL injection yediğime.

    http://make.wordpress.org/core/2012/...-wpdb-prepare/ burada bahsediyor ama dediğim gibi ingilizce

    Hata kodu:
    Warning: Missing argument 2 for wpdb::prepare(), called in /home/------/public_html/wp-content/plugins/online-chat/online-chat-functions.php on line 109 and defined in /home/------/public_html/wp-includes/wp-db.php on line 990
    
    Warning: Missing argument 2 for wpdb::prepare(), called in /home/------/public_html/wp-content/plugins/online-chat/online-chat-functions.php on line 350 and defined in /home/------/public_html/wp-includes/wp-db.php on line 990
    konu hakkında bilgisi olan varsa çok sevinirim

    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 12:28:14 -->-> Daha önceki mesaj 10:54:13 --

    Konu Hakkında bir bilgisi olan yokmu arkadaşlar ???

    --R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 13:18:34 -->-> Daha önceki mesaj 12:28:14 --

    arkadaşlar sorunu çözdüm eğer başkalarıda bu hatayla karşılaşırsa çözümü,

    Anadizinde config.php açın içerisinde herhangi bir yere
    @ini_set('display_errors', 0);
    böylelikle hata gösterimlerini kapatıyoruz.
  • 26-12-2012, 14:17:27
    #2
    Üyeliği durduruldu
    Teşekkürler çözüm işe yarıyor
  • 26-12-2012, 17:06:54
    #3
    kendin pişir kendin ye gibi oldu ama güzel oldu...
  • 01-01-2013, 13:57:15
    #4
    hata gösterimlerini kapatmadan ziyade, o hatayı gidermek lazım aslında. Ağrı kesici gibi bir kod olmuş, ağrının sebebini bulup ortadan kaldırmak gerek.
  • 01-01-2013, 20:41:38
    #5
    sql injectionlara karşı kendi içinde bir koruma üretmek için wpdb class ın daki prepare kullanımı son 2 sürümde değişti, artık prepare en az 2 değişken ile çalışmaktadır. burdada ztn bana 2 girdi ver diye hata vermiş.
    şu anda sitenizeki
    public_html/wp-content/plugins/online-chat/online-chat-functions.php
    dosyasında 109 ve 350 inci satırlarda prepare sorguları mühtemelen eski kullanıma göre düzenlenmiştir. bu kullanım şu an için çalışır, çalışırken böyle hata mesajları da verir. fakat bir sonraki resmi güncelleme bu tür eski kullanımlar tamamen kalkacaktır. bilginize.
    sitenizin sağlıklı çalışması açısından en kısa zaman yukardaki dosya yolunda belirtilen eklentinizi güncellemeniz yada güncelletmeniz gerekir.
  • 02-01-2013, 00:41:00
    #6
    Açıkcası 3.5 wordpress baya bir sorunlu çıktı
  • 29-08-2013, 19:01:29
    #7
    aynı sorunu 3.6 da yaşıyorum.
    Şu kaynağı buldum bende.

    PHP Warning: Missing argument 2 for wpdb:repare()

    Hello plugin or theme author! You possibly found this post after searching the Internet for the error above: “PHP Warning: Missing argument 2 for wpdb:repare().”
    So, this is a new warning in 3.5. No sites are broken, everything is fine as before. But, this is indeed something you need to look at, because you may be exposing your users to a possible SQL injection vulnerability. Now that’s no fun!
    First, if you’re a user and you want to get rid of these errors, you should turn off the displaying of errors in PHP. There are many ways to do this, such as in php.ini, .htaccess, etc. For this, you can just put this in wp-config.php. (Note that hiding errors on production sites is good practice anyway.)

     @ini_set('display_errors', 0);
    If you’re a user, you can stop here. (If you need more help, please don’t comment here, try the helpful Support Forums.) Just be sure to send a link to this post to the developer of the theme or plugin referenced in the error.
    Now, developers: Here’s how $wpdb->prepare() is supposed to work:

    $wpdb->prepare( "SELECT * FROM table WHERE ID = %d AND name = %s", $id, $name );
    See how $id — an integer, presumably — was passed as the second argument? That corresponds to the first placeholder, %d. Then, $name (a string) was passed as the third argument, thus the second placeholder, %s. This makes sure your query is safe, and prevents something like little bobby tables. (Note: the comic is wrong, don’t sanitize — always prepare your queries.)
    The problem is, a number of people were calling $wpdb->prepare() with only one argument, like so:

     $wpdb->prepare( "SELECT COUNT(*) FROM table" );


    See, there’s no parameter (%d, %s, or for floats, %f) in this query. This happens to work fine, but the prepare call isn’t doing anything. You should instead the query directly, as there are no inputs.
    But here’s where the problem lies:

     $wpdb->prepare( "SELECT * FROM table WHERE id = $id" );


    See the problem? That query isn’t secure! You may think you are “preparing” this query, but you’re not — you’re passing $id directly into the query, unprepared. And this, right here, is why $wpdb->prepare() now issues a warning if it isn’t called with more than one argument. Because you can’t prepare a query without more than one argument. Here’s a correct example:

     $wpdb->prepare( "SELECT * FROM table WHERE id = %d", $id );
    This wasn’t a decision done lightly. We don’t like shoving PHP warnings into the faces of users and developers. But given the potential security risks, we wanted everyone to immediately look at how they are running queries. And, of course, always prepare them properly.

    For more: wpdb Codex reference, #22262, and [22429].