Reports all blank OJS 2.4.5

Using 2.4.5, site was hacked last year and most stuff got wiped out.

Reports are all blank now? No idea why

I get these emails, which I guess have something to do with it, but it’s gibberish to me

[2018-04-11 01:45:58] [Notice] Task process started.

[2018-04-11 01:46:06] [Notice] File
/home/canadi16/files/usageStats/processing/usage_events_20180410.log was
processed and archived.

[2018-04-11 01:46:06] [Notice] Task process stopped.

Hi @sherrikeller,

Do you know how your install was hacked? Check to make sure that your files_dir (configured in config.inc.php) is outside of your web root or protected from direct access with a .htaccess file or similar.

Check your PHP error log for details when you encounter a blank page.

Regards,
Alec Smecher
Public Knowledge Project Team

Yeah, someone uploaded a phtml file or something. The files folder had an .htaccess file in it, but it didn’t stop it from happening. The files folder is outside of the web root now.

Pages aren’t blank, but the downloaded .csv files are. I have no idea where the error log is.

Hi @sherrikeller,

Users will still be able to upload malicious .phtml files, but with .htaccess protection or the files_dir moved out of the web root, they won’t be able to execute them and thus they’ll be useless. If you continue to see .phtml uploads, don’t worry, it doesn’t mean your site has been hacked.

Did you see anything in the PHP error log?

Regards,
Alec Smecher
Public Knowledge Project Team

I don’t know where the log is

Hi @sherrikeller,

Check the FAQ area of the forum for information on finding the PHP error log.

Regards,
Alec Smecher
Public Knowledge Project Team

Found what I think is the error log in my cpanel. There’s 143 errors since 1 pm. Is there anything in particular I should be looking for?

Hi @sherrikeller,

You’re looking for any errors that correspond to the request that tried to generate the report. One way of narrowing it down is to trigger the error (e.g. by generating the report), then looking immediately at the log to see what new messages appeared.

You may have numerous warnings – these are usually cosmetic and can generally be ignored – but you’ll be looking in particular for anything with the word “Error” in it.

Regards,
Alec Smecher
Public Knowledge Project Team

Error doesn’t appear. It’s all just missing files—some apple-touch-icon-152x152.png thing

Hi @sherrikeller,

I’m not sure you’re looking at the right error log – that might be your Apache error log, or your Apache access log, which might be separate from your PHP error log. Do you see any PHP messages in it? If not, it’s probably the wrong file.

Regards,
Alec Smecher
Public Knowledge Project Team

Yeah I probably am, because why would anything ever make sense. I don’t see any php in the file, but i also don’t see any other error files and have no idea where to start looking.

Hi @sherrikeller,

It’s hard for me to give specific advice because every server is a little different – it’s probably something you’d have to ask your host about. If it’s a commercial service provider, they probably have a knowledge base with this kind of thing documented in it.

Regards,
Alec Smecher
Public Knowledge Project Team

I know, I’m just grumpy because OJS has been nothing but a nightmare for me since I’ve started using it. Thanks for your help.

Found the error file. It’s just in the public_html folder, but it’s 527mb, so it’s going to take a while to open.

I have a lot of this:

Message: WARNING: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.

¯_(ツ)_/¯

Hi @sherrikeller,

You can set the time zone in your php.ini (or equivalent, again depending on your host’s requirements).

In OJS 3.x you can set this also in your config.inc.php configuration file, but not in OJS 2.x, unfortunately.

Running OJS will require some familiarity with web server administration – you’re running a website, and there’s no way around it, unfortunately. I understand it can be frustrating to wrestle with this, but keep in mind that you’re using free software and getting help from the community in doing it. If you can describe where you’re getting stuck, often someone here can help you with it.

Frankly your OJS is quite old, but I suspect adding a prospective upgrade to your plate would not relieve your frustrations. OJS 3.x is a much more modern application.

Regards,
Alec Smecher
Public Knowledge Project Team

Ok, I think I have fixed the timezone issue. From what I can see in the error log, the timezone issue seems to be the only thing that’s wrong.

Is there a way to clean this error log? Maybe trim it by a couple hundred mb?

Hi @sherrikeller,

Normally the server will be set up to clean / rotate log files on a regular basis. It’s the job of a general server tool that manages most or all of the log files. There are a lot of reasons that might not be happening, depending on how your server is set up – but it’s another area where you’ll probably have to check with your server administrator.

Regards,
Alec Smecher
Public Knowledge Project Team

Is there any way to get the stats reports working now?

Hi @sherrikeller,

I’d still like to establish first that there aren’t any PHP error messages. Now that you’ve decreased the number of warnings cluttering up the log file, try generating a report or two and then immediately look at the log file to see if anything relevant appeared.

Regards,
Alec Smecher
Public Knowledge Project Team