Database Access

Does CumulusClips use mySQLi or PDO for its database accesses - when I looked at the code I couldn't find any reference to either of the database access methods that PHP still supports?


  • Thanks - I couldn't find any reference to that in the copy I downloaded. I'll take another look.
  • Downloaded again. Still looks to have the following code in the install process:

    try {

    // Connect to user's database server
    $dbc = @mysql_connect ($hostname, $username, $password);
    if (!$dbc) throw new Exception ("Unable to connect to the database server with the credentials you provided. Please verify they're correct and try again.");

    // Select user's database for operation
    $select = @mysql_select_db ($name, $dbc);
    if (!$select) throw new Exception ("Unable to use database you specified. Please verify the name is correct and that you have access to it.");

    // Perform install queries
    foreach ($install_queries as $query) {
    $query = str_replace ('{DB_PREFIX}', $prefix, str_replace ("\n", '', ($query)));
    $result = @mysql_query ($query);
    if (!$result) throw new Exception ("Unable to execute queries. Please verify you have write access to the database.");

    That doesn't look like PDO to me.

    Obviously the above code will not run as it is no longer valid PHP so how does the install process work?
  • edited February 2016
    Ah, good point. I brought this up to our engineering team. They added this as a "Will Fix" item which will be included in our next release 2.3.2 next week.

    As a side note, this only appears in the installer, which removes itself completely once installation is complete.

    You have the option to install manually, in the event you're using a server with a PHP version greater than 5.5 which no longer supports mysql_* functions. If you would like us to assist you with a manual install please let me know. We don't have a guide for manual install because this has never come up.

    Thanks for bringing this up!
  • I am not in a hurry for this so I'll wait for the next version.
  • @Damian, I wouldn't mind a manual install guide, I seem to be running into the same problem and I've tried with both php5.6 and 7.0 on Ubuntu.

    Or is there maybe a fixed dev-version I can try? I don't mind betas...
  • Well, I solved it for me, replaced all mysql* calls with the new mysqli ones. But the @ in front makes finding the problem really hard, I had nothing in my logs. :(
This discussion has been closed.