Forum

Error accessing /tao/Main/login

Hi, I've performed an install on a managed hosting.
The installer worked smooth, and now the index.php in the root doesn't launch the installer no more but redirects to /tao/Main/login
Is there is something required in config? The /tao/Main folder is not present in my installation.
Thanks,

Comments

  • I would need more information from your logs but I suspect it may be related to the DB issue you reported. Make sure your user has grant all on the database and reinstall

  • Ok! Thanks! I'm sure the user (is the only user of the DB) has all the required grants, and this is the structure created, looks correct?

  • Where I can find the logs?

  • These are the paths in generis.conf.php

    paths

    define('ROOT_PATH','/web/htdocs/training..it/home/');
    define('ROOT_URL','http://training..it/');

  • Maybe the issue is that I've copied all the content in the root instead of /tao folder?

  • Turned on the debug, and created a /tao/logs folder (but seems is not writable)
    This is the result now:

    The page you requested generated an unexpected error on this server.

    Verify the address you entered in your web browser is valid.
    If you are sure that the address is correct but this page is still displayed contact your TAO administrator.
    TAO Home
    Debug Message
    There is no existing directory at "/var/www/html/tao/logs" and its not buildable: Permission denied
    Stack Trace

    0 /web/htdocs/training..it/home/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(98): Monolog\Handler\StreamHandler->createDir()

    1 /web/htdocs/training..it/home/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\StreamHandler->write(Array)

    2 /web/htdocs/training..it/home/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler->handle(Array)

    3 /web/htdocs/training..it/home/vendor/monolog/monolog/src/Monolog/Logger.php(609): Monolog\Logger->addRecord(100, 'Invoking oat\ta...', Array)

    4 /web/htdocs/training..it/home/generis/common/oatbox/log/logger/TaoMonolog.php(60): Monolog\Logger->log(100, 'Invoking oat\ta...', Array)

    5 /web/htdocs/training..it/home/generis/common/oatbox/log/LoggerService.php(77): oat\oatbox\log\logger\TaoMonolog->log('debug', 'Invoking oat\ta...', Array)

    6 /web/htdocs/training..it/home/vendor/psr/log/Psr/Log/LoggerTrait.php(127): oat\oatbox\log\LoggerService->log('debug', 'Invoking oat\ta...', Array)

    7 /web/htdocs/training..it/home/generis/common/oatbox/log/LoggerAwareTrait.php(110): oat\oatbox\log\LoggerService->debug('Invoking oat\ta...', Array)

    8 /web/htdocs/training..it/home/tao/models/classes/routing/ActionEnforcer.php(155): oat\tao\model\routing\ActionEnforcer->logDebug('Invoking oat\ta...', Array)

    9 /web/htdocs/training..it/home/tao/models/classes/routing/TaoFrontController.php(86): oat\tao\model\routing\ActionEnforcer->execute()

    10 /web/htdocs/training..it/home/tao/models/classes/mvc/Bootstrap.php(332): oat\tao\model\routing\TaoFrontController->legacy(Object(common_http_Request))

    11 /web/htdocs/training..it/home/tao/models/classes/mvc/Bootstrap.php(172): oat\tao\model\mvc\Bootstrap->mvc()

    12 /web/htdocs/training..it/home/tao/models/classes/mvc/Bootstrap.php(234): oat\tao\model\mvc\Bootstrap->dispatchHttp()

    13 /web/htdocs/training..it/home/index.php(31): oat\tao\model\mvc\Bootstrap->dispatch()

    14

  • Performed a fresh new install on another environment, using the same DB, but copyng all the install files on the /tao folder, and got the same issue. Screenshot is from the install finish.

  • I would need more information from your logs but I suspect it may be related to the DB issue you reported. Make sure your user has grant all on the database and reinstall

  • Thanks amy, as I wrote in the other thread, this is commercial hosting, and I have access to 5 db preconfigured on the host. I access these db with only one user, that has got all the grants on the specified db. This is the db structure I can see in the db after the installation process. On the other db (number _1) there is the previous installation. I suspect I'm missing something on the server side, seems that the classes are not interpreted and correctly executed.

  • I noticed that at least a prerequisite is missing here: the required version for MySql is 5.7 and the version on my hosting is 5.6.44-86.0-log
    I will try to install on another hosting.

  • This is the edit I did on the class.installator.php file

            // If the database already exists, drop all tables
            //if ($dbCreator->dbExists($dbName)) {
    
                try {
                    //If the target Sgbd is mysql select the database after creating it
                    if ($installData['db_driver'] == 'pdo_mysql'){
                        $dbCreator->setDatabase($installData['db_name']);
                    }
                    $dbCreator->cleanDb($dbName);
    
                } catch (Exception $e){
                    $this->log('i', 'Problem cleaning db will try to erase the whole db: '.$e->getMessage());
                    try {
                    $dbCreator->destroyTaoDatabase($dbName);
                    } catch (Exception $e){
                        $this->log('i', 'isssue during db cleaning : ' . $e->getMessage());
                    }
                }
                $this->log('i', "Dropped all tables", 'INSTALL');
            //}
            // Else create it
            //else {
            //try {
    
            //      $dbCreator->createDatabase($installData['db_name']);
            //      $this->log('i', "Created database ".$installData['db_name'], 'INSTALL');
            //  } catch (Exception $e){
            //      throw new tao_install_utils_Exception('Unable to create the database, make sure that '.$installData['db_user'].' is granted to create databases. Otherwise create the database with your super user and give to  '.$installData['db_user'].' the right to use it.');
            //  }
    
                //If the target Sgbd is mysql select the database after creating it
            //  if ($installData['db_driver'] == 'pdo_mysql'){
            //      $dbCreator->setDatabase($installData['db_name']);
            //  }
    
            //}
    
  • Performed a fresh new install on another hosting, and worked.
    Using the non edited file; so the install checks if the db exists (and exists) using an account that has rights to create and see dbs on host. This is the main issue. If I have an hosting that allows db users only on specific db and not on the host I cannot install.
    Maybe I will have to perform some manual change in config?

  • You should have a database and a user with full permissions on that database. If you do not have access to create it your hosting company should be able to.

  • I have a user that has full access to a db. But this user doesn't allow show of all the db on the host, because is a shared host. That's the issue. And I can't ask the hosting to give me such a superuser.

  • Also, the data structure that was built on the db in the working instance is the same for the non working instance. So I think the DB is correctly filled. Is just some additional setting...

  • I don't know why, but something changed and now I have an error in the db step of the installation wizard, when i use an empty db. While seems that everything is working when I use an existing tao db from a previous install trial.

  • Look into the installation steps... you will notice that using localhost doesn't works, and also using a db Sql1250562_3 that is not existant. Using an already filled db, Sql1250562_2 seems working, but at the end of installation wizard, I have another issue. Page not found.



  • edited October 11

    Really I cannot understand why I have this different behaviour between different hosting.

  • Maybe is something related to the absolute path:

    paths

    define('ROOT_PATH','/web/htdocs/training.gruppodaman.it/home/');
    define('ROOT_URL','http://training.gruppodaman.it/');

    I'm not sure the ROOT_PATH is correct, I think is autofilled by installation wizard.

    If I change to

    paths

    define('ROOT_PATH','/web/htdocs/training.gruppodaman.it/');

    I have an error on the main page:

    Fatal error: Uncaught common_ext_ManifestNotFoundException 'Extension Manifest not found for extension 'tao'.' in /web/htdocs/training.gruppodaman.it/home/generis/common/ext/class.Extension.php(380) #0 /web/htdocs/training.gruppodaman.it/home/generis/common/ext/class.Extension.php(448): common_ext_Extension->getManifest() #1 /web/htdocs/training.gruppodaman.it/home/generis/common/ext/class.ExtensionsManager.php(201): common_ext_Extension->load() #2 /web/htdocs/training.gruppodaman.it/home/tao/models/classes/mvc/Bootstrap.php(290): common_ext_ExtensionsManager->getExtensionById('tao') #3 /web/htdocs/training.gruppodaman.it/home/tao/models/classes/mvc/Bootstrap.php(268): oat\tao\model\mvc\Bootstrap->configureSessionHandler() #4 /web/htdocs/training.gruppodaman.it/home/tao/models/classes/mvc/Bootstrap.php(151): oat\tao\model\mvc\Bootstrap->session() #5 /web/htdocs/training.gruppodaman.it/home/index.php(30): oat\tao\model\mvc\Bootstrap->start() #6 {main} thrown in /web/htdocs/training.gruppodaman.it/home/generis/common/ext/class.Extension.php on line 380

  • The document root is correct, as seen from phpinfo

    CONTEXT_DOCUMENT_ROOT /web/htdocs/training.gruppodaman.it/home/

  • Just adding server logs while opening the main page after the installation

    Fri, 11 Oct 2019 10:27:31 GMT [error] [client 93.145.201.242] - training.gruppodaman.it - AH01215: #0 /web/htdocs/training.gruppodaman.it/home/generis/common/ext/class.Extension.php(448): common_ext_Extension->getManifest(): /web/htdocs/training.gruppodaman.it/home/index.php
    Fri, 11 Oct 2019 10:27:31 GMT [error] [client 93.145.201.242] - training.gruppodaman.it - AH01215: #1 /web/htdocs/training.gruppodaman.it/home/generis/common/ext/class.ExtensionsManager.php(201): common_ext_Extension->load(): /web/htdocs/training.gruppodaman.it/home/index.php
    Fri, 11 Oct 2019 10:27:31 GMT [error] [client 93.145.201.242] - training.gruppodaman.it - AH01215: #2 /web/htdocs/training.gruppodaman.it/home/tao/models/classes/mvc/Bootstrap.php(290): common_ext_ExtensionsManager->getExtensionById('tao'): /web/htdocs/training.gruppodaman.it/home/index.php
    Fri, 11 Oct 2019 10:27:31 GMT [error] [client 93.145.201.242] - training.gruppodaman.it - AH01215: #3 /web/htdocs/training.gruppodaman.it/home/tao/models/classes/mvc/Bootstrap.php(268): oat\tao\model\mvc\Bootstrap->configureSessionHandler(): /web/htdocs/training.gruppodaman.it/home/index.php
    Fri, 11 Oct 2019 10:27:31 GMT [error] [client 93.145.201.242] - training.gruppodaman.it - AH01215: #4 /web/htdocs/training.gruppodaman.it/home/tao/models/classes/mvc/Bootstrap.php(151): oat\tao\model\mvc\Bootstrap->session(): /web/htdocs/training.gruppodaman.it/home/index.php
    Fri, 11 Oct 2019 10:27:31 GMT [error] [client 93.145.201.242] - training.gruppodaman.it - AH01215: #5 /web/htdocs/training.gruppodaman.it/home/index.php(30): oat\tao\model\mvc\Bootstrap->start(): /web/htdocs/training.gruppodaman.it/home/index.php
    Fri, 11 Oct 2019 10:27:31 GMT [error] [client 93.145.201.242] - training.gruppodaman.it - AH01215: #6 {main}: /web/htdocs/training.gruppodaman.it/home/index.php
    Fri, 11 Oct 2019 10:27:31 GMT [error] [client 93.145.201.242] - training.gruppodaman.it - AH01215: thrown in /web/htdocs/training.gruppodaman.it/home/generis/common/ext/class.Extension.php on line 380: /web/htdocs/training.gruppodaman.it/home/index.php

  • edited October 11

    I really don't know what to try again.

  • You should have a database and a user with full permissions on that database. If you do not have access to create it your hosting company should be able to.

  • It's not a matter of "user having full permissions on that database" the installer class is performing a check to see if the specified db is already existant, and this is done through a SHOW database on the MySql engine. So I need a user that has SHOW databases grant on the whole instance, not on a single DB. And this is not always achievable in the most of hosting environments. Thanks. I will try monday on another hosting ;)

  • Your hosting company should be able to assist you, unfortunately I do not know their systems or configuration. It could be localhost is blocked or even that the database is hosted on another server.

Sign In or Register to comment.

We use cookies on our website to support technical features that enhance your user experience. Cookie Policy Privacy Policy

×