We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8261
    • 19 Posts
    Can I force modx to use mysql_pconnect?

    I see something in /extenders/dbapi.mysql.class.inc.php about choosing pconnect or connect.

    Or where can I add mysql_close function to terminate the mysql connection?
    • Quote from: dvdbdgr at Mar 30, 2008, 09:57 PM

      Can I force modx to use mysql_pconnect?

      I see something in /extenders/dbapi.mysql.class.inc.php about choosing pconnect or connect.

      Or where can I add mysql_close function to terminate the mysql connection?
      At the moment, there are a lot of connection points in MODx. Changing this would require some fairly significant hacking, and in my experience, persistent connections and PHP are pretty pointless. The connection is released when the request is completed, so there is no need for mysql_close().

      I’m curious, what is it you are trying to achieve?
        • 8261
        • 19 Posts
        Quote from: OpenGeek at Mar 31, 2008, 05:38 PM


        At the moment, there are a lot of connection points in MODx. Changing this would require some fairly significant hacking, and in my experience, persistent connections and PHP are pretty pointless. The connection is released when the request is completed, so there is no need for mysql_close().

        I’m curious, what is it you are trying to achieve?

        Thanks for your info on pconnect being useless, I guess I never understood it.

        As it turns out the open connections were actually from another application. So Modx and mysql_connect are not an issue here.

        The achievement is to make the site faster.