Install stopped after creating config.php file

Install stopped after creating config.php file

by Frank Lister -
Number of replies: 7

Hello All,

I downloaded the latest and greatest Moodle version off the website and have been learning a lot about Solaris, Ubuntu, MyPhp, MySQL, and everything in between.

I have MySQL running on my Solaris 11 server and I can login into the MySQL database from my Ubuntu 14.04 web server (Moodle web files and folders).

I also have a mounted folder on the Solaris server for the Moodle Data. I can read and write from the Ubuntu machine to the mount.

I have been following the "Tutorial: How to install Moodle on Ubuntu 14.04 lts(2015)" video on YouTube. I got to the part to copy and create the /var/www/html/moodle.config.php file and then restarted Apache. Apache throws up this error:

"sudo service apache2 restart
 * Restarting web server apache2                                               

[Mon Aug 31 19:45:03.097661 2015] [alias:warn] [pid 24978] AH00671: The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
"

And going back the web page install to refresh the web page I get this error:


?php // Moodle configuration file unset($CFG); global $CFG; $CFG = new stdClass(); $CFG->dbtype = 'mysqli'; $CFG->dblibrary = 'native'; $CFG->dbhost = '10.0.x.x'; $CFG->dbname = 'xxxxxxxxx'; $CFG->dbuser = 'user'; $CFG->dbpass = '*********'; $CFG->prefix = 'mdl_'; $CFG->dboptions = array ( 'dbpersist' => 0, 'dbport' => '', 'dbsocket' => '', ); $CFG->wwwroot = 'http://my.website.net; $CFG->dataroot = '/mnt/moodledata'; $CFG->admin = 'admin'; $CFG->directorypermissions = 0777; require_once(dirname(__FILE__) . '/lib/setup.php'); // There is no php closing tag in this file, // it is intentional because it prevents trailing whitespace problems!


Thank you all for the help and support from the Moodle community smile

Average of ratings: -
In reply to Frank Lister

Re: Install stopped after creating config.php file

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Frank

You wrote:
> I got to the part to copy and create the /var/www/html/moodle.config.php ...

Is that a typo? Expected /var/www/html/moodle/config.php.

I don't know the video. Have you checked the docs, https://docs.moodle.org/en/Step-by-step_Installation_Guide_for_Ubuntu, for example?
In reply to Visvanath Ratnaweera

Re: Install stopped after creating config.php file

by Frank Lister -

Good Morning Visvanath,

Yes, that was a typo.

You are correct it is /var/www/html/moodle/config.php


smile

In reply to Frank Lister

Re: Install stopped after creating config.php file

by Brian Lockwood -

Did you copy the suggested config.php contents into your config.php?

In reply to Brian Lockwood

Re: Install stopped after creating config.php file

by Frank Lister -

Hello Brian,

Yes I did. That is when it all went to foo bar.

Actually, by removing the config.php file, I get to start all over with the online setup process where you set your Moodle directories and database location and password then it recreates the data that you cut & paste into the config.php file.

I have redone this process three times and get the same results each time.


On my web server (Ubuntu 14.04) I have MySQL and PhP installed.

On my file server (Solaris 11) I have installed MySQL on a VM.

I am wondering if PhP is not finding the MySQL db on the file server?

From the CLI on the web server I can open/create/delete objects within the db on the file server.

I can RWX to the mount on the web server (Moodle Data Files located on a share from the file server).


I do not understand the errors that I'm getting or why sad


Thanks for the help smile

In reply to Frank Lister

Re: Install stopped after creating config.php file

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

You have a configuration issue. The question is, Where?

Start with the two Apache errors:
1. Create a simple index.html in the moodle directory and visit your Moodle site. As a safety measure move the index.php there to a safe place. You should get the HTML displayed.

2. Once that works, get the PHP info displayed: https://docs.moodle.org/en/PHP#Displaying_phpinfo_in_Moodle. Go through it checking the values of important parameters.

P.S. When you repeat the installation procedure by deleting the config.php, you cleaned the moodledata directory completely and dropped/recreated the database, right?
In reply to Frank Lister

Re: Install stopped after creating config.php file

by Brian Lockwood -

I wonder if the solaris server is not listening on the correct port because of a firewall.

Can you do telnet <ip of mysql server> 3306 from the moodle server? Assuming 3306 is the port mysql is listening on?

In reply to Brian Lockwood

Re: Install stopped after creating config.php file

by Brian Lockwood -

Cancel that, sorry, I see you can see the mysql server from the moodle server in you post above.

I would look in the mysql error log and see if there is an error there.

When you query the mysql server on the file server from the web server, are you using the same account as the moodle server is expecting to use?

Also, when you query the mysql server from the webserver are you using mysql client on the webserver? In other words, you arent sshing in from the webserver and then using the mysql server?