Deprecated: mysql_connect(): di VPS

Discussion in 'Desain Web dan Programming' started by ALVonChen, 19 Feb 2016.

Thread Status:
Not open for further replies.
  1. ALVonChen

    ALVonChen Poster 2.0

    Messages:
    116
    Likes Received:
    17
    Trophy Points:
    18
    mau nanya, kenapa ya kalau di VPS sy pake webuzo hampir semua script sy ada tulisan =

    Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in blablablabla

    tapi kalau di shared hosting cpanel biasa gak ada tulisan kayak gitu di headernya.
    cara fix innya gimana ya ? gak ngaruh ke fungsi script sih cuma bikin jelek aja
     
  2. mustafaramadhan

    mustafaramadhan Hosting Guru

    Messages:
    3,237
    Likes Received:
    857
    Trophy Points:
    113
    Itu karena anda pakai php 5.4+ dimana mysql_connect sudah di-deprecated. DI php 7.0 malah sudah ditiadakan fungsi ini. Ganti pakai mysqli_connect.
     
  3. antmediahost

    antmediahost Apprentice 1.0

    Messages:
    262
    Likes Received:
    41
    Trophy Points:
    28
  4. Mylo Sepz

    Mylo Sepz Apprentice 2.0

    Messages:
    532
    Likes Received:
    59
    Trophy Points:
    28
    pake mysqli kalo pebih aman pake PDO untuk ke databasenya. saya lebih seneng pake PDO soalnya lumayan aman
     
  5. arieonline

    arieonline Expert 1.0

    Messages:
    885
    Likes Received:
    127
    Trophy Points:
    43
    solusi ada 3
    1. downgrade aja ke 5.2 atau 5.3
    2. update skrip anda agar pake mysqli or PDO
    3. error reporting set agar deprecated ga muncul
     
    masiqbal likes this.
  6. masiqbal

    masiqbal Expert 2.0

    Messages:
    863
    Likes Received:
    249
    Trophy Points:
    43
    seperti yng disampaikan @arieonline , disable aja deprecated error reporting nya. Gak perlu ribet ganti script atau downgrade PHP.
     
  7. cyberhostservice

    cyberhostservice Expert 1.0

    Messages:
    652
    Likes Received:
    128
    Trophy Points:
    43
    Menyimak trus belajar lalu praktek kan :D
     
  8. pluto01

    pluto01 Hosting Guru Web Hosting

    Messages:
    3,657
    Likes Received:
    755
    Trophy Points:
    113
    Kl menurut saya :
    1. update skrip ke mysqli or PDO, solusi yg sangat disarankan,
    2. downgrade aja ke 5.2 atau 5.3, solusi kedua, karena dgn alasan mempertimbangkan "kedepannya"
    3. error reporting set agar deprecated ga muncul, kl menurut saya ini hanya "solusi" sementara saja, dan bukan solusi untuk fix permanent karena jika hanya disbaled error reportingnya itu kan hanya tdk menampilkan saja yach, tp log nya tetap bertambah terus kan ?
     
Thread Status:
Not open for further replies.

Share This Page

Loading...