Shared Hosting Omeka Issue with exec()

Hi:

I have installed Omeka for the Historical Society I volunteer for, on our Web Host using Softaculous. Everything worked perfectly until I tried to upload documents (JPEGS / PDFs), an error then displayed. I talked to our Web hosting company, and they said that although they support ImageMagick, "it is important to note that the use of ImageMagick needs to be implemented in a site’s code utilizing either the "Imagick" or "MagicWand" PHP plugins, as shell_exec() is disabled on our shared hosting for security reasons".

They said the error code indicates there is an issue with implementing 'exec()'.

I looked on the forum and found this information (http://omeka.org/forums/topic/error-when-attempting-to-re-index-omeka-203):

Your problem is this:
exec() has been disabled for security reasons. Your server has disabled the exec function that Omeka uses to spawn background processes.
If you can't enable exec, you can switch Omeka to not use background processes in config.ini, but everything will happen in the scope of a single web request, so you may run into timeout problems.
jobs.dispatcher.longRunning = "Omeka_Job_Dispatcher_Adapter_Synchronous"

John Flatness (Omeka Dev Team) wrote this reply.

I wanted to ask two questions; 1. If this change was made, would timeout problems only occur with large file uploads, or could it occur with any upload? 2. How do I make this change? Where is this coding?

I am going to ask some technical advice from a friend as I don’t have the technical knowledge to deal with this area, but just wanted to ask here for some more background information in the meantime.

Thanks,

Jason

Most likely it would be with large uploads, or with a slow connection.

The file to edit to make those changes is application/config/config.ini

Patrick:

Thanks for your reply, I was away over the weekend and have only just had a chance to look at the forum.

I have spoken to a tech at work about this and am confident I can access this file and understand I can edit the PHP file using Notepad. I do have a further question:

What code in the file do I replace? Do I look for 'exec()' in the file or 'upload'?

Where do I put the following code John detailed (jobs.dispatcher.longRunning = "Omeka_Job_Dispatcher_Adapter_Synchronous)?

Once I know what code to replace, I should be ready to go.

Thanks,

Jason

The job dispatcher change won't solve this problem, unfortunately. The ImageMagick code is currently hardcoded to be executed with shell_exec in older versions, and with proc_open in current versions.

Is your host saying that they have the Imagick PHP extension available? Omeka doesn't currently support that, but knowing that there are hosts which provide Imagick (and that block process execution) gives us important information about whether it's worth it to provide Imagick support as an option.

John:

I don't know, I'll ask the host and post up the reply here.

From your reply, there is basically no way around this issue then, correct? Basically I would need to change Web hosts to successfully implement an instance of Omeka?

I have added the "Dropbox' plugin to Omeka, can this plugin be used to get around this problem? I can upload files to the directory okay using FTP. Can I link metadata records with files uploaded with Dropbox, or will this problem prevent this?

Thanks,

Jason

Just received the following information from our Web hosting company:

The Imagick PHP extension is installed on the server. With the current installed version being imagick 3.0.1.

Thanks,

Jason