My plugin fails importing classes of my own

Hello,

I use OJS 2.4.8 for my work.

I have written a plugin to import data formatted in a specific way.
My plugin works well on my laptop but fails when I put it on a restricted server.

On both machines, I can select my plugin, accessing to the main page.
Then I specify a file to import, click import.
And then the server’s OJS redirects me to:

ojs/index.php/cag-test/manager/importexport/plugin/CagImportPlugin/import

Actually, shell_exec function is not allowed on it.

Tracking the php error log, I found the following log:
ojs2 has produced an error\n Message: WARNING: assert() [function.assert]: Assertion failed\n In file: hostname/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php\n At line: 241

Can’t we write our own plugin for safed servers?

Thomas

I doubt the issue would be a shell_exec() restriction unless your plugin is using shell_exec().

The comment surrounding the error in question seems to make it seem that something is failing a plugin sanity check on the server:

This is an ImportExportPlugin subclass installed in the importexport folder, correct? Not a GenericPlugin subclass?

Hello ctgraham,

Thanks for answering me.

I found what was messing. The server’s PHP version isn’t the same as my laptop’s. I was using the usort function which is not available on the server.

The answer was found with the help of echoes.

This was actually a syntax error, though.

Problem solved