[OJS 3.2.1-4] Error trying to disable a plugin

Hi,

I just updated the OJS version to 3.2.1-4, and activated some plugins and when trying to deactivate these I get the following error and the plugin does not deactivate:

PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, class 'PKPComponentRouter' does not have a method 'getRequestedPage' in /lib/pkp/classes/core/PKPRequest.inc.php on line 760, referer: http://xxxxxxx/index.php/ikala/management/settings/website

Also when trying to load the main page of the magazine it shows me the following:

 PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 266240 bytes) in /lib/pkp/classes/db/DAO.inc.php on line 87, referer: http://xxxxxxxxxx/index.php/index

Message is very clear.

Memory is exhausted. You need to modify your php.ini to extend your memory.

Cheers,
m.

Hi @marc,

I understand and know what the error is, what happens is that when modifying the memory_limit variable in the php.ini, the same error appears with different data. And also I see that you only checked the error of the php, but there is an error at the beginning and this does not allow me to disable any plugin.

PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, class 'PKPComponentRouter' does not have a method 'getRequestedPage' in /lib/pkp/classes/core/PKPRequest.inc.php on line 760, referer: /management/settings/website

First error is a warning, second is a real error… so this is why I ignored the warning.
Fix the error first (increase your memory limit) and post your log after this.

Cheers,
m.

Hi @marc,

For this version I have installed php 7.4 and it is showing me the following error:

PHP Parse error: syntax error, unexpected '/', expecting end of file in /lib/pkp/classes/validation/ValidatorFactory.inc.php on line 21
Slim Application Error:\nType: ParseError\nMessage: syntax error, unexpected '/', expecting end of file\nFile: /lib/pkp/classes/validation/ValidatorFactory.inc.php\nLine: 21\nTrace: #0 /lib/pkp/classes/services/PKPSiteService.inc.php(85): 

I will check the forum and github but at first glance I think it is a php version issue.
If I remember correctly OJS 3.2 is not php 7.4 ready and requires php 7.2 or higher.

Do you get the same error with php 7.3?

Regards,
m.

By the way, I missed the origin of this problem.
Did you removed all unofficial plugins?

One bug in a plugin can crash your whole system

Hi @marc,

I lower my php to 7.3 and it keeps showing me the same error. I also can’t upload a stylesheet to a journal because it shows me this:

 PHP Fatal error:  Uncaught RuntimeException: Unexpected data in output buffer. Maybe you have characters before an opening <?php tag? in /lib/pkp/lib/vendor/slim/slim/Slim/App.php:621\

 PHP Fatal error:  call_user_func_array() expects parameter 1 to be a valid callback, class 'APIRouter' does not have a method 'getRequestedPage' in /lib/pkp/classes/core/PKPRequest.inc.php on line 760, referer: /index.php/index/admin/settings

PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 266240 bytes) in /lib/pkp/classes/db/DAO.inc.php on line 87, referer: http://xxxxxxxxxx/index.php/index

This error refers to the debug_backtrace function call. Allowed memory size of 268435456 bytes exhausted may mean that the function is calling itself recursively, which causes a memory leak. What are your debug settings in the config? You should output errors in the log on the production machine.