Getting a HTTP 500 error

Hello,

I have a serious problem with my OJS site. I’m getting a HTTP 500 error when trying to load the page. At first I though it was an error with PHP in the old server so I updated it to Windows Server 2012 and PHP seems to work fine. I’m new to OJS and I’m looking for possible explanations of this.

Hi @jonycodes,

A 500 error generally indicates that a more detailed error was logged in your web server’s error log. Check there for details.

Regards,
Alec Smecher
Public Knowledge Project Team

I checked the PHP errors log, and there’s nothing there. What other error log can I check? I’ve checked multiple log files in the event viewer and nothing. I’ve been reading some of the OJS documentation and the one I have it’s very old: 1.2.7, it looks like that one is not compatible with Windows Server 2012. Would you recommend updating to the newest OJS version?

Hold on I also got his error:

Failed to query the results of bpa xpath: Microsoft/Windows/WebServer:$reports$$latestreport$\Discovery.xml:$creationtime$. error: The system cannot find the file specified., last error: The system cannot find the path specified…

In the server manager log

Hi @jonycodes,

Can you check that version number again? I think that must be a typo; there is no OJS 1.2.7.

Regards,
Alec Smecher
Public Knowledge Project Team

Yea sorry, it’s 2.1.1

It’s 2.1.1 and I’m thinking of upgrading it to the latest version 2.4.7. However there are some files and templates in the current version that I need to save. In order to upgrade without changing the files I have to download the new OJS version and following the instructions on the docs/upgrade file? Or do I have to follow other steps?

Hi @jonycodes,

If you’ve made modifications, you’ll need to migrate them over to the new code. Typically I’d use a standard tool like diff to compare my installed version to the stock (old) version of OJS, review the patch file and discard anything extra like patch files, and then try applying it to the new codebase using patch.

Basically, you’d follow the “Full Package” upgrade instructions in docs/README, then merge your modifications in after upgrading. (Unless of course your modifications somehow affect the upgrade process, which is unlikely.)

OJS 2.1.1 is quite old and I wouldn’t be surprised if the problem you were encountering was due to the age of the code and some changes to the PHP language since that was current. Hopefully upgrading will fix it.

Regards,
Alec Smecher
Public Knowledge Project Team

I also got this error when trying to install

PHP Fatal error: Cannot redeclare class GenericPlugin in C:\inetpub\wwwroot\jgbc_fiu_edu\classes\plugins\GenericPlugin.inc.php on line 108

Okay, thank you. The OJS installation is meant for
UNIX system, What are the config settings I need to change for Windows
server 2012

Hi @jonycodes,

I’m not aware of any special consideration needed for Windows, if you have a working PHP and MySQL setup. You will need to set your file permissions using a different mechanism, but IIRC the installation instructions are fairly general.

PHP Fatal error: Cannot redeclare class GenericPlugin in C:\inetpub\wwwroot\jgbc_fiu_edu\classes\plugins\GenericPlugin.inc.php on line 108

Did you inadvertently mix code from your old installation in with the new version? If you have two copies of GenericPlugin.inc.php in your codebase, that would explain this error message.

Regards,
Alec Smecher
Public Knowledge Project Team

Yea it looks like that was the problem, but for some reason I still can’t get this to work. I downloaded the newest version ojs, when I try to load it from my browser it shows a blank screen. I don’t know what else to do at this point. I’ve tried a lot of things from reinstalling the server, updating it, I downloaded the latest version of SQL. I’m not sure what’s going on but the OJS software just doesn’t want to work. I really need help with this issue!

hmm I finally found the issue, I had to grand write access to the specific files in the installation. Thank you for your help.

Hi all,

I already got same problem (internal server error 500) when i access manager/plugin.
Try to replace your plugin folder with new plugin folder from new version OJS. you can download stable version in here: https://pkp.sfu.ca/ojs/ojs_download/

My problem is solved. Thanks

1 Like

what files was it?
did u give write acess and remove everything else?

I have a problem installing OJS. Download and install in cpnel file manager. I see OJS installation page on my web site. But not installed. HTTP ERROR 500. What can i do?

Hi @nou,

Same as above – check your PHP error log for details.

Regards,
Alec Smecher
Public Knowledge Project Team