Directly modifying the config file

Hello guys,
Last week our journal management system was mistakenly deleted but we have still have the database.
Now for the website, I’ve downloaded a fresh copy and need to know if I directly change the config file and add all the details of the previous website and do not install the system, Will it work?
helpp!!

You will need not only the database and the source code, but also the files that were uploaded to the system. Submission files would be uploaded to your files_dir, as was set in your config.inc.php. Public files would be uploaded to your public_files_dir, as per your former config.inc.php. Do you have these directories from a backup?

If you put the database and uploaded files back into place, and if you reconfigure the config.inc.php to point to the database and file locations, the only remaining consideration is to ensure that the source files either match the application version you were previously running, or that you run the upgrade script if you’ve downloaded a newer version of the source code.

Yes we have all the files too luckily. Okay I’ll give it a try and then see if it works. Thanks

@ctgraham I’m getting the error database connection failed after I manually modified the config file.

This typically indicates that the username and password in the config.inc.php settings doesn’t have access to the database in the config.inc.php settings. Are you otherwise able to access the database with the same credentials (e.g. via phpmyadmin or Mysql Workbench, or a similar tool)?

Yes I’m able to access it otherwise

What specifically does the database connection error say?

When I go to the url, it loads the page and then shows only " database connection failed". From where can I check the log files btw?

The location of the PHP error log will depend on your particular configuration. It is often a part of the webserver error log. Check with your system administrator or hosting support for the exact location.

Hi all,

Have a look at: How do I find my PHP error log?

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hey @ctgraham, I recovered my website successfully, every thing was working fine, I logged in fine. Then after few days I got a complain that users are unable to login.I check and when ever I’m clicking any button on the website, it is giving this error "contact form temporarily unavailable ".
Kindly help me out with this it’s very urgent

That doesn’t sound like an OJS error to me. Can you link to a public URL for the site?

http://journals.iobmresearch.com
This is the url of the journal. The urls in the forms( login, search etc) are also accessible but the buttons are not working strangely.

This is something outside of OJS. It is either at the webserver level, or at a proxy in front of the webserver. It appears to be causing a 503 error on any HTTP POST sent to your server.

This forum for Joomla suggests there may be unwanted directives in your .htaccess files:
https://forum.joomla.org/viewtopic.php?t=963569

@ctgraham this could be the issue, I’ll check it. One more thing, the ojs copy we had before was 2.4.6.5 and since it is not available for download anymore, I used 2.4.6 copy and I installed it, not upgraded the database. Can this be causing the issues?

Do you mean that the original version was 2.4.5, but you installed 2.4.6 instead? There isn’t a release for 2.4.6-5.

A version discrepancy would not cause the database connection errors or the HTTP POST errors.

Running a new version of the code with an older version of the database could cause other errors, however. Always be sure to run the database upgrade script immediately after upgrading the application version.

Thanks alooot :slight_smile: I’ll contact our hosting provider. I think they can help since .htaccess has no unwanted directives.