MOODLE doesn't show style/theme/css when i install it in CPANEL

MOODLE doesn't show style/theme/css when i install it in CPANEL

by Rhaka Zurizki Putra -
Number of replies: 13

Hello, i want to ask about why my moodle doesn't show the style, only plain text and i install it in cpanel hosting.

The php version is 7.0

The moodle version is the latest version

I also attach the error code in this topic.

Thankyou guys , i hope i can get a solution

Attachment IMG_20190822_183019_834.jpg
Average of ratings: -
In reply to Rhaka Zurizki Putra

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Ken Task -
Picture of Particularly helpful Moodlers

Try purging caches.

https://yoursite/moodle/admin/purgecaches.php

Comment: 'using cPanel install' ... do you mean Softaculous or some other script that installs?  The community forums here, where you've posted, consist of moodle users ... many of whom do not use cPanel/Softac/other such script.  So if one has issues with installs and updates, first query should go to provider who is responsible for the scripts customers are set up to run. 

'SoS', Ken

In reply to Ken Task

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Rhaka Zurizki Putra -

Hi, thank you for your response. I've tried purging caches and its still doesnt show the style, i tried disabling slash argument also and it still doesnt work.

I've tried 3 methods to install moodle into the cpanel

1. Migrating my moodle directory from localhost to cpanel

2. Installing the moodle directly in cpanel using a fresh downloaded moodle directory

3. Installing the moodle using softacolous

And all the 3 methods still not showing the style of the moodle, and they also show the same error.

Regards,

Rhaka


In reply to Rhaka Zurizki Putra

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Ken Task -
Picture of Particularly helpful Moodlers

server: LiteSpeed

X-Powered-By: PHP/7.2.21

3.6.3 of Moodle ... or close to that.

What theme are you using?

Do you have a 'Terminal' icon in a section of your cPanel?

If so, access it ... should through you into your home directory.

Once there type the following command:

ls [PRESS ENTER KEY]

Do you see a public_html directory?  Do you see a 'moodledata' directory?

If you can find moodledata directory, go to it via cd /path/to/moodledata

pwd to make sure you are in moodledata ... then issue:

rm -fR cache [ENTER KEY]

rm -fR localcache [ENTER KEY]

Those 2 commands do the same thing purge caches php script is supposed to do only for sure.

No harm ... as moodle will rebuild those directories as site is used via GUI.

Could do same with cPanel file browser.

'SoS', Ken



In reply to Ken Task

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Rhaka Zurizki Putra -

Again, thanks for your response ken.

I'm Using a theme name: KLASS, but i already try changing the theme and it still doesnt solve the problem.

No, i dont have a terminal icon in the cpanel section, im trying to enable the terminal through WHM but, i dont have access to the WHM .

I remember trying to delete the cache and localcache inside the moodledata directory using the file manager(hoping it solve the problem), and it still doesnt solve the problem, but the cache and localcache is rebuilding again after i acccess the moodle site(so it doesnt do any harm). Any other solution ? 

Regards, 
Rhaka 

In reply to Rhaka Zurizki Putra

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Ken Task -
Picture of Particularly helpful Moodlers

Uhhh ... please see:

https://moodle.org/plugins/theme_klass

shows that theme compat up to moodle 3.2 and you are running at least 3.6.x  ... change the theme!!!

Uncaught error ... require is not a function is bad news.

require function is required to run a moodle ... period.

There are many php scripts in moodle code that have require statements
which must pass muster before the reminder of the script can execute.

The index.php file to which your errors are pointing ... has this
at the top:

if (!file_exists('./config.php')) {
    header('Location: install.php');
    die;
}

require_once('config.php');
require_once($CFG->dirroot .'/course/lib.php');
require_once($CFG->libdir .'/filelib.php');

So what are ownerships/permissions on config.php ... that file has to be
at least readable by the globe ... ie, everyone and anyone hitting
the site with a browser.  config.php also sets up locations ....
locations and other parameters for moodle to function.
$CFG->dirroot is found in config.php

Does your hosting have any additional protections for web services/apps?  Like mod_security or seLinux in enforcing mode ...

Also check your php settings ... assuming 'easy apache' ... and what extentions your php is loading.

'SoS', Ken

In reply to Ken Task

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Rhaka Zurizki Putra -

Hello, Ken.

I've changed the theme to CLEAN now and still doesnt solve, and im sorry, im really new to this cpanel hosting can you tell me how to check my php settings? thanks

I also check on the index.php and this existed:
if (!file_exists('./config.php')) {
    header('Location: install.php');
    die;
}

require_once('config.php');
require_once($CFG->dirroot .'/course/lib.php');
require_once($CFG->libdir .'/filelib.php');

I check the config.php and this is what it shown, im attaching the screenshot,

Regards, 
Rhaka



Attachment more moodle.PNG
In reply to Rhaka Zurizki Putra

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Ken Task -
Picture of Particularly helpful Moodlers

In your first posting url to your site showed

https://site/moodle/

In the screen shot of config.php wwwroot variable shows

https://site/moodlejentera

Is there a folder in public_html called moodle?

Is there a folder in public_html called moodlejentera?

So it looks like in your multiple attempts to install, we have multiple moodles.

It's OK to have two instances on one host, but **EACH** instance *MUST* have it's own database and it's own moodledata directory.

In the case of 2 instances the db name is handled by cPanel when creating a DB for a moodle.    The moodledata directory, however, has to match the site ...

config.php in /moodle/ probably has a path to moodledata

config.php in /moodlejentera/ *cannot* share the same moodledata directory ... it should have a moodle data directory of it's own ...

something like: moodlejenteradata.

So if you cleaned out or purged caches in one moodle data directory, that action does not clean out or purge caches in all sites.

'SoS', Ken

In reply to Ken Task

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Rhaka Zurizki Putra -
Hi ken, im sorry for the misunderstanding
So here it is.
Moodle : the migration directory that i migrate from localhost
Moodlejentera : the moodle that i installed from softacolous

Both have different path and database ofcourse, so it doesnt matter which the screenshot (my mistake on sending the different one from the first url). because it have the same problem and error code.

If you have any other solution, i'd be really grateful.
In reply to Rhaka Zurizki Putra

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Ken Task -
Picture of Particularly helpful Moodlers

Installed on same server:
owncloud
senayan
webmail
and a wordpress and a partial wordpress

/moodle/ using clean theme - a 3.6.3

I know the exact version because there is a moodle.zip file I can download
from your site.  No one should see any web servers document in raw format ... ie, files or folders.

/moodlejentera/ using boost theme - a 3.7.x

There is a directory /pancasolution.com/
which is by the same domain name from which you are trying to run the moodles.

Site Directories ... raw directories showing files/folders says
"Proudly Served by LiteSpeed Web Server at pancasolution.com Port 443"

The link it shows to LiteSpeed begets a can't connect.
http://www.litespeedtech.com/
And with https ... secure connection failed.

LiteSpeeds don't use .htaccess files do they?
How does that work on the WordPresses you have on the server?

Do you have cron jobs set up for both Moodle instances?

Debug turned on for both sites shows nothing?

How about LiteSpeeds error logs?   Do they give hint/clue?

Am really at end of suggestions ... I don't host where you host.  I don't run LiteSpeed.  I don't have access to configurations of your server, etc. etc.

So is there anyone with LiteSpeed that knows server config for moodles here in Moodle Forums?

If so ... feel free to jump in here! smile

'SoS', Ken


In reply to Rhaka Zurizki Putra

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Ken Task -
Picture of Particularly helpful Moodlers

Just thought of one other setting that should be different for each moodle instance you plan to run ... cookie prefix ..

Suggest naming them same as site:

moodle  ... cookie prefix moodle

moodlejentera ... cookie prefix moodlejentera

if you have a third instance of moodle, ditto ... or different cookie prefix.

Cookie prefix is found in

https://site/admin/settings.php?section=sessionhandling

which has this explanation:

"This setting customises the name of the cookie used for Moodle sessions. This is optional, and only useful to avoid cookies being confused when there is more than one copy of Moodle running within the same web site."

'SoS', Ken


In reply to Ken Task

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Rhaka Zurizki Putra -

Hi ken, 

Thanks for helping me with the problem, i'll try all the solution that u suggested later. For now , i just think the problem is not in the moodle, but in the cpanel, so i'll try contacting my friend who own the cpanel and ask him about the cpanel etc. Thanks again ken! 

Regards

Rhaka

In reply to Ken Task

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Rhaka Zurizki Putra -

hi ken.

I got a progress, i tried doing a purge all caches in the moodle site that i installed from softacolous and it shows the style, but not fully, and if i try to click on other site administration settings such as appearance and the others, it wont work, and when i reload the page, it goes back to the plain text only with no styles. here's the screenshot of it

Regards
Rhaka


Attachment moodle.PNG
In reply to Ken Task

Re: MOODLE doesn't show style/theme/css when i install it in CPANEL

by Rhaka Zurizki Putra -

hi ken.

I got a progress, i tried doing a purge all caches in the moodle site that i installed from softacolous and it shows the style, but not fully, and if i try to click on other site administration settings such as appearance and the others, it wont work, and when i reload the page, it goes back to the plain text only with no styles. here's the screenshot of it

Regards
Rhaka

Attachment moodle.PNG