OJS _ CSS not loading and unable to access administrator page

Hello everyone. Let me start by saying that i’m a newbie to OSJ.

I managed to install and setup OJS 3.1 in this domain (http://revistas.ponteditora.org). Everything was running smoothly, until i noticed OAI wasn’t working. After googling for a while, it seemed that i had to change disable_path_info to Off.

It fixed my issue with OAI, but the template is now ‘broken’. It seems as it is not loading the CSS files.
The administrator pages are also not working correctly.

Can anyone give a hand?

Thanks for your time reading this.

Luis Castro

Hi @ipsuey,

It’s much better to run your site with disable_path_info set to Off. I don’t see any issues with your site, though it also looks like disable_path_info is still set to On – but at a guess, try erasing cache/*.css to cause your CSS files to be regenerated once you’ve turned off disable_path_info.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello. Thank you for your reply.

I did try to set disable_path_info to Off, and clearing cache / deleting all *.css in the cache folder. But the template is all broken (you can check now at http://revistas.ponteditora.org).

For some reason it feels as if it can’t find the path to certain files due to this change in the URL.

My htaccess is as follows:

AddHandler application/x-httpd-php70 .php



Options +FollowSymLinks

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*)$ index.php/$1 [QSA,L]





Am i missing something?
Thanks again

Hi @ipsuey,

Are you able to try without any rewrite rules? OJS shouldn’t require them to run, and simplifying this aspect could help in troubleshooting.

Regards,
Alec Smecher
Public Knowledge Project Team

Yes, it runs the same without the rewrite rules (i wrote them after one of the many posts i saw similar to my issue).

I deleted them and only left :

AddHandler application/x-httpd-php70 .php

Also, here’s the error i’m getting in the browser console: http://ponteditora.org/ojs_error.jpg

Hi @ipsuey,

I think that 403 error isn’t coming from OJS – check to see whether your server is using mod_security. There’s a chance that it’s preventing OJS from receiving the request for the CSS. OJS isn’t incompatible with mod_security, but sometimes a mod_security rule that’s overly general can intervene where it shouldn’t.

The mod_security log, if you have access to it, should provide details.

Regards,
Alec Smecher
Public Knowledge Project Team

I don’t have access to mod_security in my hosting account. I did however tried adding this to htaccess:

<ifmodule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </ifmodule>

The problem persists. I could also try opening a ticket on my hosting asking for them to disable mod_security for this subdomain.

NOTE: when trying to access the files that are giving error, it keeps redirecting me to OJS index.

UPDATE: I did find MOD_SECURITY in my cpanel and turned off for this subdomain.

Problem persists.

There is something very weird going on in the server settings. You can not for example access images in the public folder: http://revistas.ponteditora.org/public/site/pageHeaderTitleImage_pt_PT.png
edit: the first visit to the image address redirected me to the site index page but when I click the link the second time, I can see the image.

But if i set disable_path_info to On , everything works just fine.
Regarding the server settings, this is a shared hosting account. I didn’t change anything besides disabling mod_security as suggested by asmecher and adding php version to the htaccess.

Any idea on what might be causing this?

I’ve finally found out what was the issue with my installation. You were right, everything was correct with my OJS installation, the issue was a .htaccess i had in my root folder, generated by wp security that pretty much locks everything up.

Everything seems to be working perfectly now, and OAI is also working.

Thank you both for your insights, i wouldn’t have thought of looking the other way without your help.

1 Like

Hi @ipsuey,

Well done! Glad you stuck with it.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello dear sirs,

I wasn’t sure if i should open a new Question for this, or keep this one going. Forgive me if i should have gone with the first option.

I’m looking for documentation or any kind of information regarding security measures that i should be taking to make my OJS installation secure and safe from harm.

Again, forgive me if this is the wrong thread to be asking this.
Thanks in advance.

Hi @ipsuey,

Check the “Recommended Configuration” area in docs/README.

Regards,
Alec Smecher
Public Knowledge Project Team

I did that, i’m just not sure about the folder permissions and files permissions?
Should i all folders set to 0755 ?
And files to 0644 ?

Hi @ipsuey,

Check the FAQ here for a entry on permissions; the specifics will depend on your server.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello;
To fully load Admininstrator page of OJS,you are suppossed to make sure your DNS server should be configured or get connect to internet.