midasplatform / Midas

Girder https://github.com/girder/girder is a more modern, better supported application than Midas Server. Look at Girder before using Midas Server. Midas Server is an open-source application that enables the rapid creation of tailored, web-enabled data storage
https://web.archive.org/web/20200929102106/www.midasplatform.org/
Apache License 2.0
17 stars 9 forks source link

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

Closed GallantFox closed 7 years ago

GallantFox commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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