file overwritten/missed accidentally

I didn’t install and set OJS earlier, I am new to development in OJS and was trying to enable REST API for one of our journals. According to the documentation, I had to write api_secret_key in file. But I was in the wrong folder, where this file didn’t exist, so I created one. This newly created file was all empty except it contained only one line for api_secret_key. Upon identifying the correct folder and assuming that there would be no file in the actual folder too, I just moved the newly created file, into the actual folder and probably, that incorrect file did overwrite the actual file, that is where the problem starts.

The first error I encountered was a webpage showeing errors demanding something like username, password, and confirm password, the page was different from the one which is shown at the start of the installation of OJS but this page seemed similar, it contained some unnoted errors and words like installation. I am not able to reproduce that exact problem again. Next, I tried copying from the same folder to see if it works and copying from another working ojs website. But the URL at https://ourdomainname/JOURNAL ABBREVATION still gives HTTP error 500 internal server error.

Now first of all I want help regarding how to get the journal up again.
Next, if I copy the contents of in, it shows a screen to install the OJS again. Can I re-install and keep all data from my previously ongoing journal? Is it possible that there can be any other cause that 500 internal servers are shown there, I tried valid database credentials from another of our journals and also set a previous ojs-files directory outside the folder in which OJS is installed, but there is still the HTTP 500 error. And lastly, how can I pinpoint the error, are there any logs of OJS itself or where to see for server logs?

Hi @Muhammad_Abdullah_Na,

You should be able to restore your journal to working by copying to and editing the configuration file to add the relevant information. Make sure to un-comment any lines you need to take effect (commented lines begin with a ;) and set Installed to On when you’re ready.

You’ll probably lose your API key salt and secret fields; this will mean existing authorization keys, API tokens, etc. will no longer work. But that shouldn’t be a huge impact.

If you see a 500 error, it’ll be logged in your PHP error log; the details on where to find that depend on your PHP configuration.

Alec Smecher
Public Knowledge Project Team

1 Like

Thank you @asmecher for your consideration, I have been able to resolve the issue by correctly identifying the gaps in my file.

1 Like

This topic was automatically closed after 9 days. New replies are no longer allowed.