Installation help

Cannot Find Icons and moodle images during and after installation.

 
 
Picture of Vishal Upadhayay
Cannot Find Icons and moodle images during and after installation.
 

Hi i am using moodle 2.3.1 and trying to play around with moodle installation.

Instead of using moodle script for creating moodledata and config.php file i have added my script wirtten in php which is more simpler and easy to understand.

My new script serves it purpose and everything going very fine, but only problem i am facing is that my images are not getting loaded during and after installation.

I tried all other moodle forums with the same problem but still not able to get any solution. I am trying to make it work on localhost so i dont have any support of Hosting providers.
Hope to see answer soon, thanks in advance.

With Regards

**eldoom**

Please check the image

 

 
Average of ratings: -
Picture of Howard Miller
Re: Cannot Find Icons and moodle images during and after installation.
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

I'm going to start with - there is a bug in your script.

As you don't tell us what it does, why you did it (simpler than what?) then it's very hard to help.

Check....

1. Does your script add a closing ?> to the end of the config.php file? If so, don't, delete it.

2. Switch on Debugging. Right click on one of the broken images and display it in a new tab or window. What happens?

 
Average of ratings: -
Picture of Vishal Upadhayay
Re: Cannot Find Icons and moodle images during and after installation.
 

Thanks for reply, Howard i tried both but still i am facing same issue.
I have created a simple script which will generate moodledata,config and database for moodle before userstarts the installation.

Moodle also does the same but my script is simple and sure it has some bugs. My code looks something like this 

<?php

//Creating database for moodle
$con=mysqli_connect("localhost","root","123456");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

// Create database
//$sql="CREATE DATABASE moodle11293 ";
//$sql="CREATE DATABASE d21 CHARACTER SET=utf8 COLLATE utf8_general_ci";
$sql="CREATE DATABASE moodle124567 COLLATE utf8_unicode_ci";
if (mysqli_query($con,$sql))
{
echo "Database my_db created successfully";
}
else
{
echo "Error creating database: " . mysqli_error($con);
}

//Creating moodledata folder
mkdir("../../moodledata");

//Creating configfile for moodle


$myFile = "config.php";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "
<?php

unset(\$CFG);
global \$CFG;
\$CFG = new stdClass();

 

\$CFG->dbtype = 'mysqli';
\$CFG->dblibrary = 'native';
\$CFG->dbhost = 'localhost';
\$CFG->dbname = 'moodle124567';
\$CFG->dbuser = 'root';
\$CFG->dbpass = '123456';
\$CFG->prefix = 'mdl_';
\$CFG->dboptions = array(
'dbpersist' => 0,
'dbsocket' => 0,

);

 

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


\$CFG->dataroot = dirname(__FILE__);


\$CFG->directorypermissions = 0777;


\$CFG->admin = 'admin';

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

 

 

";

fwrite($fh, $stringData);
fclose($fh);
echo 'file created succesfully';
header("Location: http://localhost/moodle");

//////////////////////////////////////////////////////

My config file looks something like this after creation

 

<?php

unset($CFG);
global $CFG;
$CFG = new stdClass();

 

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

);

$CFG->wwwroot = 'http://localhost/moodle';
$CFG->dataroot = 'D://softwares//moodle1//wamp//moodledata';


$CFG->directorypermissions = 0777;


$CFG->admin = 'admin';

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

Thanks in advance.

 

 

 

 
Average of ratings: -
Picture of Vishal Upadhayay
Re: Cannot Find Icons and moodle images during and after installation.
 

Finally after 4 days i found  the solution, the issues was that my config.php first line was empty. Stupid Errrorrrrrrrrrrrrrrrrrrrrrrs.!!!

 
Average of ratings: -