Exec PHP plugin error message

Hi All,

I’m new to OJS, and have limited web-dev and coding knowledge, so any help with this inquiry is greatly appreciated.

I am currently in the process of installing OJS (v. OJS 3.1.2) for a small journal that I help manage on behalf of the International Commission for the History of Meteorology. (https://meteohistory.org/ojs/index.php/journal/index)

I am having issues installing plug-ins – in particular the Quick Submit plug-in so that I can quickly upload the 10 years or so of back issues that we have in PDF format. (I don’t know enough to be able to go the XML route I’m afraid).

When I try to install Quick Submit through the plug-in library, or any other plug in such as the Hypothes.is one I get an error message which reads:

“exec PHP function has been disabled on your server”

I have worked with my web host, who has enabled the exec function and checked that all of my other PHP settings are as required for the Quick Submit plug-in.

I’ve tried uploading the tar.gz file, for Quick Submit, and get the same error message (attached)

I’ve also joined GitHub and searched the PKP forums, but can’t seem to find the info I require.

Have you come across this error before, and do you know how I can rectify it?

Any help greatly appreciated.
Thanks,
Alexexec PHP function - 2

Hi @AlexHall,

If you’re still getting the message The "exec" PHP function has been disabled on your server, then I don’t think your sysadmin has correctly enabled it. You can see the line of code that generates this message:

if (in_array('exec', explode(',', ini_get('disable_functions'))))
    throw new Exception('The "exec" PHP function has been disabled on your server. Contact your system adminstrator to enable it.');

You can try this line in your own PHP test script to confirm outside of the OJS environment. (If the site uses a persistent PHP process pool, e.g. FPM, FastCGI or mod_php, then the sysadmin may have forgotten to restart that to cause the settings change to take effect.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thanks for your reply - I went back to our sysadmin with this information - their response is below. It amounts to the Exec PHP has definitely been disabled. I’ve also tried their suggestion of switching off the Mod Security as they suggest, but to no avail.

Are there any plugin requirements that I might have overlooked? Or do you have any other ideas as to what might be causing this error message.

Thanks for your help with this,
Alex

"Thank you for providing the follow-up details from the developer and we have reviewed the information provided. We have gone through the PHP settings to make sure that the EXEC function is enabled and working properly on the server just in case and can confirm this is still working when testing. We have helped by uploading a simple test to confirm this feature is working which can be seen from the page: http://meteohistory.org/exectest.php .

While we can confirm the EXEC function is setup and working, we can also understand that the plugin isn’t working either and could be due to maybe a different version of PHP needing to be enabled or maybe some other requirement missing. See if you can find a list of the plugin requirements from the developer as one of these could be missing and leading to the error message instead. Another possibility is that the plugin may not be coded using proper coding methods and blocked from Wordpress or the server due to this. Within your cPanel there is an icon for ‘Mod Security’ under the security heading and you can click on this to find a slider to switch this on / off. You can try to set this to off and run the plugin again to see if this will work and can easily re-enable this again later if you need to."

Hi @AlexHall,

I’m confused; your post says…

…the Exec PHP has definitely been disabled.

…but also…

we can confirm the EXEC function is setup and working

Was the first a typo?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Apologies - that was my typo (& limited knowledge showing there) - as per the copied text from our web host the Exec function is definitely enabled.

Any other ideas for troubleshooting greatly appreciated.

We still have a few other areas and outstanding issues to sort in setting up the site, so it may well be that we have to pay PKP or someone else for some web-dev time to help us get this over the line.

Thanks,
Alex

Hi @AlexHall,

Can you check your disable_functions configuration option in your phpinfo output? (Make sure to check the phpinfo output in a web-based script, not via the command-line, or you might get misleading results.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Thanks again - this is what our web host said in reply:

Neither of these two suggestions apply as they were already covered by our previous responses. The list of disabled functions doesn’t list the exec within the PHP info content http://meteohistory.org/phpinfo as this is easy to test and we had setup a test site at http://meteohistory.org/exectest.php on your server to confirm the exec function is used as the website / scripting level. As mentioned before as both the PHP settings confirm and an actual test script also confirms, the exec function is running and not the issue.

No worries if this isn’t helping to move the issue any further forward towards a solution. If you have any further suggestions, they’re welcome but if not I am going to try and see if I can get some budget together to pay someone to help get our journal platform up and running properly.

Do the PKP Team offer such consultancy? It would be good to know that our limited funds are going back into supporting such a great project.

Thanks,
Alex

Hi @AlexHall,

Yes, PKP does offer hosting – see PKP Publishing Services. (This helps support the team that builds the software.)

It does look like the exec function is enabled, and I can confirm from the phpinfo page that exec does not appear in disable_functions. Are you sure you’re still receiving the exact same message (The "exec" PHP function has been disabled...)? I’m not sure how you can still be receiving this.

Regards,
Alec Smecher
Public Knowledge Project Team