Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Midas 3.4.2 Unable to connect. In UtilityComponent.php, line: 393 #266

Closed
GallantFox opened this issue Mar 22, 2017 · 2 comments
Closed

Comments

@GallantFox
Copy link

I've been trying to set up a Midas server on localhost to use the module https://github.com/midasplatform/rodent.

I get up to installation step 2 and get the following error:
An error occurred
The system has encountered the following error:
Unable to connect.
In /var/www/html/midas/core/controllers/components/UtilityComponent.php, line: 393
At 03:23:03 2017-03-22

The code block reads:

public static function run_sql_from_file($db, $sqlfile)
{
    $db->getConnection();
    $sql = '';
    $lines = file($sqlfile);
    foreach ($lines as $line) {
        if (trim($line) != '' && substr(trim($line), 0, 2) != '--' && substr($line, 0, 1) != '#'
        ) {
            $sql .= $line;
        }
    }
    $queries = explode(';', $sql);
    foreach ($queries as $query) {
        try {
            $db->query($query);
        } catch (Zend_Exception $exception) {
            if (trim($query) != '') {
                throw new Zend_Exception('Unable to connect.');
            }
        }
    }
    return true;
}

I'm pretty sure I have mysql set up correctly, so I don't know why it's unable to run an SQL script.

One possibility is that I changed one of the dependencies in composer.json (phpcheckstyle/phpcheckstyle V0.14.1 to V0.14.3) since it no longer exists, but I don't think that's the problem here?

Any help would be much appreciated. The server is to be accessed by myself only (automated segmentation of mouse brain MRI scans), so I'm open to alternatives, and security is not an issue.

@mgrauer
Copy link
Contributor

mgrauer commented Mar 22, 2017

Hi @GallantFox , the rodent imaging plugin is no longer supported, and Midas is generally on the way out, soon to be deprecated. If you have data management needs, I'd recommend you try out Girder.

It sounds like you are more interested in doing rodent imaging though. The rodent image processing tools are still around with some limited documentation, though they too are unmaintained at this point.

https://www.med.unc.edu/psych/research/niral/download/software-pages/makeatlasscripts-rodent

@GallantFox
Copy link
Author

@mgrauer Thanks, that seems to be exactly what I'm looking for :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants