4

I am trying to install moodle on my server. I did unpack moodle package in public html folder. This moodle folder has 755 access rights set.

Then I created moodledata folder in the same public_html folder and used 777 access right. Then I tried to run install, but I always get error: Data directory (/home/studentai/***/data) cannot be created by the installer.

But I created it manually. So where is the problem?

Sakib Arifin
  • 255
  • 2
  • 13
Shien
  • 107
  • 4
  • 12

6 Answers6

7

Moodledata should be above public_html in the folder structure and will throw an error if not. You should have an opportunity to manually enter the path to it as part of the installer process.

The path above has asterisks in it, which is definitely not good. Did you add these?

Also, the Moodledata directory should have more restrictive permissions than 777 on a shared server.

Matt Gibson
  • 14,616
  • 7
  • 47
  • 79
2

First you want change the xampp settings Run XAMPP Control Panel

  • open php.ini file ( Apache -> Config-> PHP(php.ini) )
  • change max_execution_time value from max_execution_time=30 to max_execution_time=600
  • uncomment ( remove semicolon ) xmlrpc extension from ;extension=php_xmlrpc.dll to extension=php_xmlrpc.dll
  • uncomment ( remove semicolon ) soap extension from ;extension=php_soap.dll to extension=php_soap.dll
  • uncomment ( remove semicolon ) intl extension from ;extension=php_intl.dll to extension=php_intl.dll
  • uncomment ( remove semicolon ) opcache.enable and change value to 1 from ;opcache.enable=0 to opcache.enable=1
  • add following string to end of file zend_extension = "C:\xampp\php\ext\php_opcache.dll"
  • save & close php.ini
  • start Apache

    - start Database

crate database using command

CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

CREATE USER 'moodle-owner'@'localhost'; CREATE USER 'moodle-owner'@'127.0.0.1'; CREATE USER 'moodle-owner'@'::1';

SET PASSWORD FOR 'moodle-owner'@'localhost' = PASSWORD('moodle123$%'); SET PASSWORD FOR 'moodle-owner'@'127.0.0.1' = PASSWORD('moodle123$%'); SET PASSWORD FOR 'moodle-owner'@'::1' = PASSWORD('moodle123$%');

GRANT ALL PRIVILEGES ON moodle.* TO 'moodle-owner'@'localhost' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON moodle.* TO 'moodle-owner'@'127.0.0.1' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON moodle.* TO 'moodle-owner'@'::1' WITH GRANT OPTION;


then install moodle 3.3.2+

0

I have had this problem in the past on a shared server where I only had access to the public_html folder. I got around this by manually creating the config.php file. This is not ideal, but sadly the only way I could get it to work.

  • You could have extracted moodle into a subdirectory, and used .htaccess to block access to a sibling sitedata. – Phil Lello Feb 01 '15 at 20:01
0

In my moodle installation I have public_html and moodledata both in domain root, both with 700 grant.

I think, it's correct.

Try it!

If don't, you need to edit the public_html\config.php:

$CFG->dataroot  = '/home/mydomain/moodledata';

moodle root

Y.N
  • 4,989
  • 7
  • 34
  • 61
0

Download moodle zip from moodle.org then place it in lamp/htdocs folder. and than write localhost/moodle in browser. Then follow the installation steps.

sanjay008
  • 31
  • 4
0

A quick solution was to change my hosting company. I opt for a hosting company that provides me with a control panel which has softaculous scripts. This is one click installers within your control panel. Moodle is one of them. So, instead of you doing it manually, it is installed automatically with one click. In other words, you only specify the path of your root directory and data folder and the server does the rest.

sanyassh
  • 8,100
  • 13
  • 36
  • 70
Dimpels
  • 1
  • 1