Forums | Mahara Community

Developers /
Webservices install


anonymous profile picture
Deleted user
Posts: 5

13 November 2015, 7:56 PM

Hi all,

 

I have tried to install webservices from the dashboard, but I get an error that is linked to the tables already existing.

I had found a manual way of installing it first and did so, but now the dashboard tells me that it isn't installed and won't let me through the process to tick it off.

I have been upgrading the site from a pretty old version through to 15.10 and this is the last hurdle.

Does anyone have a solution, or put an "CREATE TABLE IF NOT EXISTS" into the install process

Kind Regards

Bevan

Aaron Wells's profile picture
Posts: 896

16 November 2015, 11:34 AM

Hi Bevan,

What version of Mahara were you upgrading from? I haven't been able to replicate this problem on my local machine, but I'd be interested in fixing it if we can pin down the specifics of how to make it happen.

In the meantime, for your specific site, I would recommend just manually deleting the tables that are used by the webservices plugin, which will let mahara reinstall it. You should be able to do that with these queries:

drop table oauth_server_token;
drop table oauth_server_nonce;
drop table oauth_server_registry;
drop table external_services_logs;
drop table external_services_users;
drop table external_tokens;
drop table external_services_functions;
drop table external_functions;
drop table external_services;
delete from auth_cron where plugin='webservice';
delete from auth_config where plugin='webservice';
delete from auth_event_subscription where plugin='webservice';
delete from auth_installed where name='webservice';

Once you've run those, the webservices plugin should be able to be installed smoothly, either alone at the dashboard or during site upgrade.

Cheers,

Aaron

anonymous profile picture
Deleted user
Posts: 5

24 November 2015, 8:02 PM

Hi Aaron,

Thanks for that. It didn't unfortunately work straight away but came in handy after about the 5th go at it.

I have another issue though as I upgraded from 15.04.4 to  15.10.0.

I get 

Cannot redeclare get_message_thread_mr() (previously declared in /home/mrjim/public_html/mahara15100/artefact/multirecipientnotification/lib/multirecipientnotification.php:48) in /home/mrjim/public_html/mahara15100/module/multirecipientnotification/lib/multirecipientnotification.php on line 48

Any ideas?

Cheers

anonymous profile picture
Deleted user
Posts: 5

24 November 2015, 8:19 PM

Hi again,

So I put a function_exists around the declarations and I got this error.

PHP Fatal error:  Cannot redeclare class ActivityTypeMultirecipientmessage in /home/mrjim/public_html/mahara15100/module/multirecipientnotification/notification/ActivityTypeMultirecipientmessage.php on line 0

 

Not sure what is going on. Any clues.

Aaron Wells's profile picture
Posts: 896

25 November 2015, 11:13 AM

Hi Bevan,

Did you upgrade by simply coping the new Mahara files over the old ones? If so, it sounds like you've got the same issue as here: https://mahara.org/interaction/forum/topic.php?id=7438&offset=0&limit=10#post29974

When I refactored the multirecipient plugin from an artefact to a module, I did not foresee that people would upgrade in that manner. But since you're the second person to report this issue, perhaps I'll add a step in the Mahara sanity checker to look for it.

The problem is that sometimes we need to remove files from Mahara. But if you simply copy over your old site, the old files don't get removed, and sometimes that can cause problems, like this.

The preferred way to upgrade Mahara (or any PHP application) from a ZIP file, is:

1) Make a copy of your existing Mahara web directory as a backup.

2) Delete everything from your Mahara web directory except your config.php and any custom plugins you may have installed.

3) Copy the new Mahara code into the now-mostly-empty web directory

Cheers,

Aaron

anonymous profile picture
Deleted user
Posts: 5

25 November 2015, 1:13 PM

Thank you so much.

That worked a treat. Crisis averted

6 results