Upload Moodle2.5+ to FTP

Upload Moodle2.5+ to FTP

by Saha Abu Bakar -
Number of replies: 16

Can somebody guide me....I have upload moodle to ftp and wana use my website to run the courses. I have already done editing the courses using localhost/moodle. 

Average of ratings: -
In reply to Saha Abu Bakar

Re: Upload Moodle2.5+ to FTP

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You'll need to give more information... this doesn't make any sense to me, sorry.

In reply to Howard Miller

Re: Upload Moodle2.5+ to FTP

by Saha Abu Bakar -

All Moodle  files are in my FTP already. How should I execute moodle from my FTP or website?

I tried executing Moodle from my website by keying the link below in the browser

http://unolabs.com/eHalal/X_Server/htdocs/Moodle/admin/index.php?lang=en

It shows 'Moodle 2.5 or later requires at least PHP 5.3.3 (currently using version 5.2.17).
Please upgrade your server software or install older Moodle version.'

Does this make any sense?

 

In reply to Saha Abu Bakar

Re: Upload Moodle2.5+ to FTP

by Petri Asikainen -

As error message says: You have to upgrade php  on your webserver. Or ask your hosting provider to upgrade it for you. You need at least version 5.3.3

In reply to Petri Asikainen

Re: Upload Moodle2.5+ to FTP

by Saha Abu Bakar -

Now I have uploaded php5.3.3 but still get the same error....please advice....thank you....

In reply to Saha Abu Bakar

Re: Upload Moodle2.5+ to FTP

by Saha Abu Bakar -

the webserver hosting has changed to php5.3.13...

now i get this msg 'Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.'

Please someone guide me.....thx

In reply to Saha Abu Bakar

Re: Upload Moodle2.5+ to FTP

by Jaswinder Singh -
Picture of Testers Picture of Translators

Hi Saha,

You need to first check your moodledata directory permissions and second check the moodledata directory specified in config.php and update it accordingly.

Hope it helps!

In reply to Jaswinder Singh

Re: Upload Moodle2.5+ to FTP

by Saha Abu Bakar -

This is the code:

$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost'; should I change it to mydomain?
$CFG->dbname = 'moodle';

$CFG->wwwroot = 'http://mydomain/X_Server';
$CFG->dataroot = 'C:\\X_Server\\htdocs\\moodledata'; should I change this to 'http://mydomain/X_Server/htdocs/moodledata'?
$CFG->admin = 'admin';

$CFG->directorypermissions = 0777; is this ok?

In reply to Saha Abu Bakar

Re: Upload Moodle2.5+ to FTP

by Luis de Vasconcelos -

Yes, change $CFG->dbhost to point to the name of the computer/server where your Moodle database is running.

Same applies to $CFG->wwwroot. It must point to the name of the computer that Moodle is running on.

$CFG->dataroot must be OUTSIDE of your web path. In other words, it must not be accessible over the web. If you can access http://mydomain/X_Server/htdocs/moodledata via your web browser then you're putting your site at risk.

In reply to Luis de Vasconcelos

Re: Upload Moodle2.5+ to FTP

by Saha Abu Bakar -

Now I got the error shows 'You don't have permission to access /eHalal/X_Server/ on this server.'

 

Here is config.php code:


$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'root';
$CFG->dbpass = '**saha**';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbsocket' => 0,
);

$CFG->wwwroot = 'http:/unilab.com/eLearn/X_Server';
$CFG->dataroot = 'http::\\C:\X_Server\\htdocs\\moodledata';
$CFG->admin = 'admin';

$CFG->directorypermissions = 0777;

What other steps do I need to do?

In reply to Saha Abu Bakar

Re: Upload Moodle2.5+ to FTP

by Saha Abu Bakar -

Sorry some mistake previous post.

Now I got the error shows 'You don't have permission to access /eLearn/X_Server/ on this server.'

 

Here is config.php code:


$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'root';
$CFG->dbpass = '**saha**';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbsocket' => 0,
);

$CFG->wwwroot = 'http:/unilab.com/eLearn/X_Server';
$CFG->dataroot = 'http::\\C:\X_Server\\htdocs\\moodledata';
$CFG->admin = 'admin';

$CFG->directorypermissions = 0777;

What other steps do I need to do?

In reply to Saha Abu Bakar

Re: Upload Moodle2.5+ to FTP

by John Andrewartha -

$CFG->dataroot = 'http::\\C:\X_Server\\htdocs\\moodledata';

This should be a absolute path not virtual, loose the http

In reply to John Andrewartha

Re: Upload Moodle2.5+ to FTP

by Saha Abu Bakar -

Hi John

I have loose the http so now it is :

$CFG->dataroot = 'C:\X_Server\\htdocs\\moodledata';

when i type on my browser http://unilab.com/eLearn/X_Server/htdocs/Moodle/install.php

the browser change

http://unolabs.com/eHalal/X_Server/htdocs/Moodle/admin/index.php?lang=en

same error appears 'Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.'

What do I do next? Thank you for guiding me.

In reply to Saha Abu Bakar

Re: Upload Moodle2.5+ to FTP

by John Andrewartha -

You now you need to make sure the dataroot directory is

a. Owned by the process running the web server

or

b. allow global (everyone/body) write access

Go with (a) it is the more secure way.  That should fix it.

If you are unsure on how to change MS permissions I can't help there, Google will be your friend.

In reply to Saha Abu Bakar

Re: Upload Moodle2.5+ to FTP

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Saha,

A few questions:

1. Which Moodle files are you trying to upload? Was it the standard Moodle Package?

2. On your server where you have FTPed the files to, does the folder "C:\X_Server\htdocs\moodledata" exisit?

3. What is the local path for your Moodle files on the server? Is it "C:\X_Server\htdocs\moodle"?

If you can answer these questions I may be able to help you a little bit more.

Jon

In reply to Jon Witts

Re: Upload Moodle2.5+ to FTP

by Saha Abu Bakar -

Hi Jon

1- Moodle latest 2.5

2- Yes Moodledata exists

3-  See the attached

 

Let em know if u need more info. Thank you.

In reply to Saha Abu Bakar

Re: Upload Moodle2.5+ to FTP

by Saha Abu Bakar -

When I type on the browser 'http://unolabs.com/eHalal'

error msg appears 'You don't have permission to access /eHalal/ on this server.'

Been changing wwwroot and dataroot with no success.

$CFG = new stdClass();

$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'root';
$CFG->dbpass = '**saha**';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbsocket' => 0,
);

$CFG->wwwroot = 'http:/unolabs.com/eHalal';
$CFG->dataroot = 'C:\unolabs.com\eHalal\X_Server\\htdocs\\moodle';
$CFG->admin = 'admin';

$CFG->directorypermissions = 0777;

 

When I type in the browser 'http://unolabs.com/eHalal/X_Server/htdocs/index.html'

The msg appears 'It works!'

 Help please....Thank you