Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> Instalacja Moodle, problem z konfiguracja pliku config.php
anzelm
post 11.03.2016, 08:41:21
Post #1





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 31.10.2008

Ostrzeżenie: (0%)
-----


Witam.
Bardzo proszę o pomoc. Instaluje moodle pod Fedora. Pod koniec instalacji otrzymuje komunikat:

Warning: require_once(./lib/setup.php): failed to open stream: No such file or directory in /opt/lampp/hatdocs/moodle/config.php on line 26
Fatal error: require_once(): Failed opening required'./lib/setup.php' (include_path='.:') in /opt/lampp/hatdocs/moodle/config.php on line 26

Plik setup.php istnieje w katalogu /lib

A o to konfiguracja pliku config.php
-----------------------
<?php

unset ($CFG);

global $CFG;

$CFG = new stdClass();

$CFG->dbtype = 'mariadb';

$CFG->dblibrary = 'native';

$CFG->dbhost = 'localhost';

$CFG->dbname = 'moodle';

$CFG->dbuser = 'user1';

$CFG->dbpass = 'password';

$CFG->prefix = 'mdl_';

$CFG->dboptions = array (

'dbpersist' => 0,

'dbport' => ",

'dbsocket' => ",

);

$CFG->wwwroot = 'http//localhost/moodle';

$CFG->dataroot = '/opt/lampp/moodledata';

$CFG->sdmin = 'admin';

$CFG->directorypermissions = 0777;

require_once(dirname('_FILE_') . '/lib/setup.php');


Czy ktoś mógłby mi pomóc i wskazać gdzie mam błąd?
Pozdrawiam i dziękuję
Go to the top of the page
+Quote Post
Pyton_000
post 11.03.2016, 09:31:44
Post #2





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


jest w /opt/lampp/hatdocs/moodle/lib/setup.php ?
Go to the top of the page
+Quote Post
anzelm
post 11.03.2016, 10:24:38
Post #3





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 31.10.2008

Ostrzeżenie: (0%)
-----


w /opt/lampp/htdocs/moodle/lib jest plik setup.php
Go to the top of the page
+Quote Post
viking
post 11.03.2016, 10:27:19
Post #4





Grupa: Zarejestrowani
Postów: 6 378
Pomógł: 1116
Dołączył: 30.08.2006

Ostrzeżenie: (0%)
-----


To jak z tą ścieżką? Raz podajesz hatdocs, innym razem htdocs (to akurat standard).


--------------------
Go to the top of the page
+Quote Post
anzelm
post 11.03.2016, 12:12:15
Post #5





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 31.10.2008

Ostrzeżenie: (0%)
-----


oczywiście pomyłka.
Jest htdocs
Go to the top of the page
+Quote Post
Pyton_000
post 11.03.2016, 12:23:38
Post #6





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


to jakim cudem w logasz masz "hatdocs" wink.gif
Go to the top of the page
+Quote Post
kapslokk
post 11.03.2016, 12:30:19
Post #7





Grupa: Zarejestrowani
Postów: 965
Pomógł: 285
Dołączył: 19.06.2015
Skąd: Warszawa

Ostrzeżenie: (0%)
-----


Może je przepisywał? biggrin.gif
Go to the top of the page
+Quote Post
Pyton_000
post 11.03.2016, 12:41:58
Post #8





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


Nie strasz mnie smile.gif
Go to the top of the page
+Quote Post
anzelm
post 11.03.2016, 12:56:38
Post #9





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 31.10.2008

Ostrzeżenie: (0%)
-----


Uwaga!!
Przepisywałem ale nie bedę się rozwodził dlaczego tak musiałem postąpić.
Nawet nie zauważyłem że zrobiłem literówkę. Wpisując ścieżki pod Linuxem jakoś mi się to nie przytrafia.
Rozumiem że Panowie nie chcecie Tworzyć nowego tematu pod nazwą "czemu nie wyciął i wkleił" wink.gif
Zatem kontynuując mam problem z takimi Warningami.
Jeśli macie Panowie jakąś poradę to poproszę.
Pozdrawiam
Go to the top of the page
+Quote Post
Pyton_000
post 11.03.2016, 13:02:18
Post #10





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

Ostrzeżenie: (0%)
-----


wywal ' z "'_FILE_'"
Go to the top of the page
+Quote Post
anzelm
post 11.03.2016, 13:25:53
Post #11





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 31.10.2008

Ostrzeżenie: (0%)
-----


Aktualnie po poprawce w config.php jest:
require_once(dirname(_FILE_) . '/lib/setup.php');

A tak pokazuje:

Notice: Use of undefined constant _FILE_-assumed'_FILE_'in /opt/lampp/htdocs/moodle/config.php on line 26
Warning: require_once(./lib/setup.php): failed to open stream: No suchfile or directory in /opt/lampp/htdocs/moodle/config.php on line 26
Fatal error: require_once(): Failed opening required './lib/setup.php' (include_path='.:') in /opt/lampp/htdocs/moodle/config.php on line 26
Go to the top of the page
+Quote Post
nospor
post 11.03.2016, 13:36:09
Post #12





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




Nie _FILE_
A: __FILE__


--------------------

"Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista
"Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer

Go to the top of the page
+Quote Post
anzelm
post 11.03.2016, 13:45:04
Post #13





Grupa: Zarejestrowani
Postów: 13
Pomógł: 0
Dołączył: 31.10.2008

Ostrzeżenie: (0%)
-----


Dzięki...o to chodziło.
Pozdrawiam
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 19.06.2025 - 15:57