MySQL close connection call in famous CMSs?

Discussion in 'PHP' started by postcd, Jul 24, 2014.

  1. #1
    Hello,

    i listen it is goodif php script instrct to close mysql connection after its done.

    Is this practice still benefficial anyhow to limit paralel connections on server?

    If so, please do have common CMSs all includes this function?

    Wordpress
    Joomla
    vBulletin
    PHPBB

    if no, what i can add into the scripts while im noob in php, mysql?

    Thank you
     
    postcd, Jul 24, 2014 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Connections will be automatically closed at the end of the script, if they haven't been closed manually beforehand. It's not something you should usually worry about.
     
    nico_swd, Jul 24, 2014 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    What you should worry about, on the other hand, is what type of SQL handler you're using with PHP. mysql_ is definitely not recommended. PDO is recommended, although mysqli_ works more or less the same, and is still miles ahead of the original mysql_ implementation.
     
    PoPSiCLe, Jul 24, 2014 IP