PROBLEM CONFIG. PHP I SUPPOSE

PROBLEM CONFIG. PHP I SUPPOSE

by Juan Martinez -
Number of replies: 11

Hello everyone,

I install easyphp7.1 so that suppose to mean that I dont have to install mysql because it into the program easyphp then inside the path C:\Archivos de programa\EasyPHP1-7\www\moodle I extract all the file of moodle. Inside of moodle I rename config-dist as  config.php and edit with this info

$CFG->dbtype = 'mysql';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'root';
$CFG->dbpass = '';
$CFG->dbpersist = true;
$CFG->prefix = 'mdl_';
$CFG->wwwroot = 'http://localhost/moodle'; // Use una dirección externa si la conoce.
$CFG->dirroot = 'C:\Archivos de programa\EasyPHP1-7\www\moodle';
$CFG->dataroot = 'C:\moodledata';

But when I try link to http://localhost/moodle/ appear the following errors

Warning: main(config.php): failed to open stream: No such file or directory in c:\archivos de programa\easyphp1-7\www\moodle\index.php on line 4

Fatal error: main(): Failed opening required 'config.php' (include_path='.;C:\Archivos de programa\EasyPHP1-7\php\pear\') in c:\archivos de programa\easyphp1-7\www\moodle\index.php on line 4

As finally i tried link to http://localhost/moodle/admin/ but i got this error

You need to create a config.php.
See the
installation instructions.

Please guide me to do the correct things.

Thanks for all,

Average of ratings: -
In reply to Juan Martinez

Re: PROBLEM CONFIG. PHP I SUPPOSE

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Windows oftens hides the file extensions ... your config.php is probably actually called config.php.txt, or config.php.doc ...
In reply to Martin Dougiamas

Re: PROBLEM CONFIG. PHP I SUPPOSE

by Juan Martinez -

Thanks for your quickly response. I rename again and save as with same name "config.php" and look inside properties the name was correct so you have another response.Also, if a pass this trouble i might need your advise for futher installation step. 

In reply to Juan Martinez

Re: PROBLEM CONFIG. PHP I SUPPOSE

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
The other thing is that the file must be in the main moodle directory (in the same directory as config-dist.php).  Can you please attach your config.php to your next posting?
In reply to Juan Martinez

Re: PROBLEM CONFIG. PHP I SUPPOSE

by Juan Martinez -

I solve the problem i didnt see that i had other file cofig.php so eliminate one of them.But appears other message in  the link http://localhost/moodle/

$CFG->dbtype = 'mysql'; $CFG->dbhost = 'localhost'; $CFG->dbname = 'moodle'; $CFG->dbuser = 'root'; $CFG->dbpass = ''; $CFG->dbpersist = true; $CFG->prefix = 'mdl_'; $CFG->wwwroot = 'http://localhost/moodle'; // Use una dirección externa si la conoce. $CFG->dirroot = 'C:\Archivos de programa\EasyPHP1-7\www\moodle'; $CFG->dataroot = 'C:\moodledata';
Fatal error: Call to undefined function: get_string() in c:\archivos de programa\easyphp1-7\www\moodle\mod\resource\lib.php on line 12

And in the link http://localhost/moodle/admin/

$CFG->dbtype = 'mysql'; $CFG->dbhost = 'localhost'; $CFG->dbname = 'moodle'; $CFG->dbuser = 'root'; $CFG->dbpass = ''; $CFG->dbpersist = true; $CFG->prefix = 'mdl_'; $CFG->wwwroot = 'http://localhost/moodle'; // Use una dirección externa si la conoce. $CFG->dirroot = 'C:\Archivos de programa\EasyPHP1-7\www\moodle'; $CFG->dataroot = 'C:\moodledata';
Fatal error: Call to undefined function: check_php_version() in c:\archivos de programa\easyphp1-7\www\moodle\admin\index.php on line 15 

Perhaps the errors are relationate.

In reply to Juan Martinez

Re: PROBLEM CONFIG. PHP I SUPPOSE

by David Delgado -
If you just look at the FAQ in http://moodle.org/ and look for get_string() , you will find the answer:

--------------------------------------------------------------
Question: My pages show fatal errors such as : call to undefined function: get_string()

Last edition: Sunday, October 26th, 2003, 05:52

Answer:
If you see errors like:

Parse error: parse error, unexpected T_VARIABLE in c:program fileseasyphpwwwmoodleconfig.php on line 94
Fatal error: Call to undefined function: get_string() in c:program fileseasyphpwwwmoodlemodresourcelib.php on line 11

then it's likely you have left out a semi-colon or ending quote from a line in config.php (previous to line 94).

Another reason could be that you have opened config.php in a program like Word to edit it, and saved it as a HTML web page, instead of a proper text file.
----------------------------------------------------------------

I can add one thing: just do make sure that you do not have any spaces or blank lines after the end of the config.php, that is: "?>" That could produce many errors also. Tell us if this works for you.
In reply to David Delgado

Re: PROBLEM CONFIG. PHP I SUPPOSE

by Juan Martinez -
i attached the file config.php please help with the errors and i would like to know where it was
In reply to Juan Martinez

Re: PROBLEM CONFIG. PHP I SUPPOSE

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
That code needs to have PHP tags around it.

<?php

?>
In reply to Martin Dougiamas

Re: PROBLEM CONFIG. PHP I SUPPOSE

by Juan Martinez -

Sorry Martin for be so dummy but you could please send me the file with the correct sentences because i  puts the tags in the first line <?php  and ends line ?>
 but nothing happens. Please help me. Also, if you can go at chat room for help to discuss my problem i will appreciate. Thanks.

P.D.

I send again the config.php modified.

In reply to Juan Martinez

Re: PROBLEM CONFIG. PHP I SUPPOSE

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
That one looks fine ... what errors are you seeing now?
In reply to Martin Dougiamas

Re: PROBLEM CONFIG. PHP I SUPPOSE

by Juan Martinez -

In the link http://localhost/moodle/ i got this message.

Fatal error: Call to undefined function: get_string() in c:\archivos de programa\easyphp1-7\www\moodle\mod\resource\lib.php on line 12

I attach you this file lib.php in case that you request me.

Also, my icq # is 297-031-904

Thanks for all, martin

In reply to Juan Martinez

Re: PROBLEM CONFIG. PHP I SUPPOSE

by Juan Martinez -

Martin, any news about about it. Also,  Somebody told me with file config-dist only do i have to do its chage the name as config.php and a few sentences in the file like moodledata and kind of its.