Results 1 to 4 of 4

Thread: Two connections to same database from single domain

  1. #1
    Join Date
    Jan 2007

    Two connections to same database from single domain

    I have a CMS website built with codeigniter. In that site i have a blogging section which is using WordPress

    codeigniter connects to MySQL using its class and WordPress connects using its class

    site is hosted in shared hosting with godaddy.

    connection to database breaks in between browsing sometimes WordPress connects to database and sometimes the codeigniter, but using phpmyadmin i can always connect.

    i contacted the server people and they said its not their problem since i am able to connect using phpmyadmin

    can somebody share some information on the same.


  2. #2
    Join Date
    Apr 2010
    is one or both using a persistant connection but each is using different login details?


    Actually thinking about it
    Seems likely that each one is over writting the others classes. Say they construct the class then store the object in a session thats being over ridden? Or only establish a persistant connection on construct.

    The issue is definately not with SQL.


  3. #3
    Join Date
    Aug 2004
    Unless you are somehow invoking WordPress from within your CI application (or vice versa), it should not matter. If either or both are using persistent connections via mysql_pconnect(), I would recommend changing them to use the regular, non-persistent mysql_connect(), as persistent connections have a tendency to eat up DB processes instead of the expected saving of processes, unless everything about your application and DB environment and configuration is just so.
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  4. #4
    Join Date
    Jan 2007
    Thanks NogDog and Belrick

    it worked fine

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center