Installation on a shared hosting server

I am trying to install and the installation can't access my database.  I can't find information on how to install the database.  I have a Unix, MySql system through a shared hosting.  I couldn't find anything on the requirements.  All the installation information is vague.

Please let me know how to connect to the database.  It keeps trying to create a database that starts with dokeos_ but my database only allows databases that start with domainname_  

Any help would be appreciated.

Fletcher's picture

Connecting to your database

Hi Tamela,

Dokeos needs access to your MySQL databases through a login and a password. Ideally you run Dokeos on your onw dedicated server and you got full access to MySQL. This means you create as many databases as you want.

Second option : you create as many databases as you want, but your hosting provider imposes the use of a prefix. For instance all your databases need to start with "fletcher_". In this case type "fletcher_" in the prefix form field of Dokeos installation. And then add your login / password and check database connection. (There is a small bug : installation will NOT run if you DO NOT check connection).

Third option : you are on a mutualized server and are allowed only one or a few databases. In this case, you will have to run Dokeos in MONOBASE mode. This mode is not recommended as it does not fit with big volumes of data and important number of users. Moreover, it is very complex to upgrade from monobase to multibase. So I would recommend not to install Dokeos on a cheap shared web hosting server. Anyway, if you still want to proceed, type the prefix provided by your Web hosting company and type login/pass in Dokeos installation form field. Should work.

Here is an example on how to fill the form.

MySQL settings

 

Hi fletcher, Regarding the

Hi fletcher,

Regarding the second option - I have an account and my provider allows me to create as many databases as I want, but they begin with my login. I have tried many configurations in the installation, and after over an hour I gave up. I have created database dave_dokeos with one user dave_dokeos and password 12341234. Could you please confirm that the following credentials should be used in my case?

Database Host: dave_dokeos

Database Login: dave_dokeos  

Database Password: 12341234

MySQL database prefix: dave_

and then I click "check database connection" and "next" and this should work, right? Well, in my case it does not. Please advise.

Fletcher's picture

Database Host : localhost

Hi Dave,

I would not put things this way. I would type, in your case :

Database Host: localhost

Database Login: dave_dokeos  

Database Password: 12341234

MySQL database prefix: dave_dokeos (you can try with dave_ only if dave_dokeos does not do)

Let me know !

 

 

Database access error

Hi Fletcher!

 

In the old english forum there was a thread with a documented bug regarding database access.

Could you check it?

 

check trhred of old forum

Hi Albatroz,

Would be long to check in old forum. And Dokeos has evolved sincce then. The idea of this new forum is to start things from a clean ground and clarify things with qualified expertise. I will do my best to help or ask a member of the team help you. And I think this can be more profitable than comparing various versions of the same info in past messages.

Can you help me by describing your issue?

help me please ..

sincerely yours

i want to install dokeos on server 

i set the data as below : 

localhost

username    ***_dekoes

password

***_  as prefx

but  the errors showed . i have not seen  these error with any script yet !

Access denied for user '***_dokeos'@'localhost' to database 'dokeos_main'

another error   in  next try was as  below :

Access denied for user '****_dokeos'@'localhost' to database '**_dokeosdokeos_main'

and in other try showed error :

Error
MySQL error: 1044
Access denied for user '***_dokeos'@'localhost' to database 'dastyari_test_dokeos_connection'
 
 
 
 

 

 

 what is wrong

 

if any one can help me 

 

if want  to do private with  this request  please contact    adieh5@yahoo.com  for  dbsql data details.

 

thanks

Brandon's picture

MySQL error

As for MySQL errors, they are usually due to wrong login, password and/or prefix.

A good way to check this is to try and connect to your PhpMyAdmin. This is usually provided along with your shared hosting service. If you are stuck here, there is no use to go further with Dokeos. Fix MySQL access issues first.

PhpMyAdmin

I too have this problem. I

I too have this problem. I tried the advice of fletcher. Does not work anything. What to do.

Brandon, PhpMyAdmin works

Brandon, PhpMyAdmin works perfectly. What discourages me the most is the fact that I am being even unable to install Dokeos on a server that allows to create only databases with prefix, no matter what I put in the required fields. You say: Fix MySQL access issues first. There is no issue.

not benifit these expails . the error has not resolved

with all above  guides - the error is persistent   to now . what else we must do ?

 

MySQL error in shared hosting will be fixed in Dokeos 2.1.2

Correct. The error has now been indentified, however. A mix between username and database name. Only critical on shared hosting servers (where you have prefixes).

Will be fixed in Dokeos 2.1.2 to be released soon, aroundd end January 2012.

Thanks for insisting !

Same Problem

I got the same problem. I cant install dokeos because of this database error. Hope this  will be fix soon.

iflorespaz's picture

Installation on a shared hosting server was fixed

Hi everybody,

I did some changes on the installation script and some tests,

see attachment image.

I finished successfully the installation process on my shared hosting : http://dokeoslatino.net/lms/dokeos21/index.php

this fix will be included in the next release,

Fix issue : if you have hurry for fix this bug please follow these steps :

1. Open the file install/index.php and find this function "check_mysql_connection" please remove all this function and replace for this new :

          function check_mysql_connection()
          {
              
            if ($('#singleDb1').attr('checked')==false) {
               get_database_mode = 2;
            } else if($('#singleDb1').attr('checked')==true){
               get_database_mode = 1;
            }
              $.post("mysql-check.php",
                      {
                          connection_test : true,
                        database_host    : $("#dbHostForm").val(),
                        database_user    : $("#dbUsernameForm").val(),
                        database_pass    : $("#dbPassForm").val(),
                        database_prefix : $("#dbPrefixForm").val(),
                        database_mode   : get_database_mode,
                        main_database   : $("#dbNameForm").val()
                      },
                      function (data) {
                        // display the feedback data of the mysql check
                          $("#connection_feedback").html(data);

                        // if the feedback message contains a div with class confirmation-message then we may continue
                        // else the next button needs to be disabled
                        if (data.indexOf('class="warning-message-install"') > 1){
                            $("#submitbuttonstep4").removeAttr('disabled');
                        } else {
                            $("#submitbuttonstep4").attr('disabled','disabled');
                        }
                      }
                  );
          }

2. now open the file "main/install/mysql-check.php" and replace ALL content for this code :

<?php

/**
 * @todo get_error_message wordpress/wp-db.php
 */

require '../inc/lib/main_api.lib.php';
require '../lang/english/trad4all.inc.php';
require '../lang/english/install.inc.php';

$link = @mysql_connect($_POST['database_host'], $_POST['database_user'], $_POST['database_pass'], true);

if(!$link)
{
    echo '
            <div style="float:left;" class="quiz_content_actions">
                <div style="float:left;">
                <strong>MySQL error: '.mysql_errno().'</strong><br />
                '.mysql_error().'<br/>
                <strong>'.get_lang('Details').': '. get_lang('FailedConectionDatabase').'</strong><br />
                '.get_lang('IfStillTypingPleaseContinue').'
                </div>
            </div>';
    exit;
}

// This is used for install dokeos on private servers
if (isset($_POST['database_mode']) && $_POST['database_mode'] == 2) {

if(!@mysql_query('CREATE DATABASE '.addslashes($_POST['database_prefix']).'dokeos_database_connection_test', $link))
{
    echo '
            <div style="float:left;" class="quiz_content_actions">
                <div style="float:left;">
                <strong>MySQL error: '.mysql_errno().'</strong><br />
                '.mysql_error().'<br/>
                <strong>'.get_lang('Details').': '. get_lang('FailedConectionDatabase').'</strong><br />
                </div>
            </div>';
    exit;
}

@mysql_query('DROP DATABASE '.addslashes($_POST['database_prefix']).'dokeos_database_connection_test', $link);
echo '
        <div class="warning-message-install">
            <strong>'.get_lang('MysqlConnectionOk').'</strong><br />
            MySQL host info: '.mysql_get_host_info().'<br />
            MySQL server version: '.mysql_get_server_info().'<br />
            MySQL protocol version: '.mysql_get_proto_info().'
            <div style="clear:both;"></div>
        </div>
';
} else if (isset($_POST['database_mode']) && $_POST['database_mode'] == 1) { // This is used ofr setup DOKEOS LMS on shared hosting
  $main_database = $_POST['main_database'];
  $db_selected = mysql_select_db($main_database, $link);
  if ($db_selected) {
    echo '
            <div class="warning-message-install">
                <strong>'.get_lang('MysqlConnectionOk').'</strong><br />
                MySQL host info: '.mysql_get_host_info().'<br />
                MySQL server version: '.mysql_get_server_info().'<br />
                MySQL protocol version: '.mysql_get_proto_info().'
                <div style="clear:both;"></div>
            </div>';  
  } else {
    echo '
            <div style="float:left;" class="quiz_content_actions">
                <div style="float:left;">
                <strong>MySQL error: '.mysql_errno().'</strong><br />
                '.mysql_error().'<br/>
                <strong>'.get_lang('Details').': '. get_lang('FailedConectionDatabase').'</strong><br />
                </div>
            </div>';
    exit;
      
  }

}
?>
 

and that's all,

Thank you very much for report this bug!

Best regards,

Isaac flores

 

one way to go ahead from step4

in optional parameter

 

in optonal parameter  below must set to one user  and   not  several

this option  :  Use one or several DB for Dokeos  

  and all things will go well . good luck

a way to seting dbname and dbusername

 

in a folder   with name "install"  then  

a  file " index.php'

 

all the sttep 4 page og installation  are present there and you can write tyhem on that place .

Petrossi's picture

Step 4 how I solved the problem

1) Avoid to use a dp prefix

2) change in main/install/index.php (about line 475 or son on)

if (data.indexOf('class="warning-message-install"') < 1){

instead of >1

 

Still blocked at step 4

Hello,

 

I have an installation of dokeos 1.8.6.1 on my server.

I have a single database for this installation and it's working fine. Now I want to update it to Dokeos 2.1.1, the version I can download now from  the official website.

What I'm doing is overwriting my current directory (the 1.8.6.1) with the directory extracted from the archive and then going to http://myurl/main/install.

There I select the same language as I used (french but it shouldn't matter), and I can access step 2. It says that one dokeos install has been found but when I click update from 1.8.x I have to put the directory by hand. It says no install has been found. But I can continue and accept the licence and then reach step 4. That's where I'm stuck.

I'm provided the right parameters for my databases but if I check the connection with the database I see the page refreshing but nothing really happens and I can't click  the next button, nothing happens too.

If any of you have an idea of what could be wrong, help would be much  appreciated.

Thank you :)

Still get stuck

Still stuck at step 4.

Did all what you asked. Have started xampp , but stil get stuck.

Maybe i'm noob in this but then i need explaing step by step.

 

Help me pls :)

hi

hi i have the same thing with mysql and i dont know what to do  i hope to function your solutions i will try all of it thanks:) www.belvini.de/

 

This solution not work.

Hi,

after implemented this solution only reach to step 2, any idea?

In this case is a upgrade from 1.8.6 to 2.1.1 .

Regards

 

 

Internal Server error

I have installed dokeos 2.1.1. Install goes fine: All seems to function: Fantastic product btw and much better interface than any Ive used before.
 
After creating a new course, you click the link and get internal server error. i am on shared hosting but able to create databses with root login without issue. Works fine via localhost - Xammp. I don't know because gives this error .Help me to resolve this problem. Thank you

cant proceede form step 4 dokeos installation

Hi,

      i am receving this error on step 4 when i am trying to install it on server. link is http://portfolio.creatrixe.com/fbapp/Dokeos/

MySQL error: 1045
Access denied for user 'root'@'localhost' (using password: YES)
Details: The database connection has failed. This is generally due to the wrong user, the wrong password or the wrong database prefix being set above. Please review these settings and try again.
If still is typing please continue.
 
 
 
 
My phpadmin havent any password. any one please help me or tell me what i have to write in user, password and in other detail.
 
 

this fix didn't work, but this did

I was still getting the same error but then I used the magical abilities of Google Chrome (right click and "Inspect Element") and enabled the Next button and enabled and corrected any fields that were incorrect and it WORKED! :)

 

This would probably work in firefox as well.

upgrade from 2.1 to 2.2. not solved

Thank you Petrossi, your solution worked for me. I could successfully upgrade from 2.1. to 2.2, however I am still facing a stange problem I have been actually trying to solve without success for many days now:

Exersize (quiz) attempts, results and all related repoting is not recorder. 

I have a dedicated server, with XAMP meeting requirements (Php 3.3 and recommended  limits updated). Dokeos is installed on a subdomain (eg http://dokeos.mydomain.com/

I have tried many different settings, withouts success. I noted that there are different spellings "excercice - excercise" in php files, but someone else must have experienced problems if that was an issue.

So. what could be wrong? I would appreciate any help, because I am really frustrated and worried,