Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mahara ePortfolios: Beginner's Guide

You're reading from   Mahara ePortfolios: Beginner's Guide Create your own ePortfolio and communities of interest within an educational and professional organization with this book and ebook

Arrow left icon
Product type Paperback
Published in Jul 2012
Publisher Packt
ISBN-13 9781849517768
Length 328 pages
Edition 1st Edition
Tools
Concepts
Arrow right icon
Toc

Table of Contents (16) Chapters Close

Mahara ePortfolios Beginner's Guide
Credits
About the Authors
About the Reviewers
1. www.PacktPub.com
2. Preface
1. What can Mahara do for you? FREE CHAPTER 2. Getting Started with Mahara 3. Create and Collect Content 4. Organize and Showcase your Portfolio 5. Share and Network in Groups 6. Course Groups and Other Roles in Mahara 7. Mahara Extensions Mahara Implementation Pre-Planner Installing Mahara Pop quiz — Answers

Time for action — creating the config.php file


Now, you have to hold Mahara's hand by letting it know how it can access the database and how to find the dataroot. To do this, you use an important file called config.php:

  1. 1. In the htdocs folder of your Mahara site, you will find a file called config-dist.php. Use the nano command in your terminal to start editing the config-dist.php file:

    nano config-dist.php
    
    

    Note

    Other Linux people use much more sophisticated text editors such as Vim (http://www.vim.org/) and emacs (http://www.gnu.org/software/emacs/). We are simple folk and are perfectly happy with nano — http://www.nano-editor.org/.

  2. 2. Now, you will see the file open on the command line. Use the down arrow key on your keyboard to scroll down the page until you get to a section called database connection details. In the following example, the user is using MySQL5 rather than postgreSQL. Fill in the information so that it matches the details you used to set up your own database including your own database name (dbname), database user (dbuser), and database password (dbpass):

  3. 3. Next, continue scrolling down the file until you reach a line that starts with $cfg->dataroot. Here, you must fill in the full path from the server root directory to the data directory that you created earlier in this chapter.

  4. 4. Now, have a look further down the file, you should see an option to add an e-mail contact. This e-mail address gets displayed if a form is suspected of being spam as a place of contact for those who stumble upon this. Fill in a relevant e-mail address.

  5. 5. Finally, you should add a password salt to your config file. This is a text string that helps to make user authentication more secure. Add a line similar to the following, but containing your own secret phrase:

    $cfg->passwordsaltmain= 'your secret phrase here';
    
    
  6. 6. Congratulations, you've now finished editing the configuration file. Save it by pressing Ctrl + X on your keyboard (still within the nano editor). When asked, if you would like to rename the file, type Y for yes and name the file config.php. This will also save the file.

What just happened?

What you just did was very important. You let Mahara know where the database is and the user and password needed to access it. You also let it know the location of the dataroot directory as well as set a password salt.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime