Can't install plugin models

Can't install plugin models

by Renārs Garda -
Number of replies: 9

Hi, 
 What could be the problem, when I try to install any of plugins -
 
Debug info:
Error code: err_curl_exec
$a contents: Array
(
[url] => https://download.moodle.org/api/1.2/pluginfo.php?format=json&plugin=mod_attendance%402015040500
[errno] => 35
[error] => Unknown SSL protocol error in connection to download.moodle.org:443
)
Stack trace:
  • line 93 of \admin\tool\installaddon\classes\pluginfo_client.php: tool_installaddon_pluginfo_exception thrown
  • line 56 of \admin\tool\installaddon\classes\pluginfo_client.php: call to tool_installaddon_pluginfo_client->call_service()
  • line 302 of \admin\tool\installaddon\classes\installer.php: call to tool_installaddon_pluginfo_client->get_pluginfo()
  • line 43 of \admin\tool\installaddon\index.php: call to tool_installaddon_installer->handle_remote_request()

Thanks


Average of ratings: -
In reply to Renārs Garda

Re: Can't install plugin models

by Ken Task -
Picture of Particularly helpful Moodlers

Do you have the php curl extension installed?

If you were on linux, this would show if it were: php -m |grep curl

Also, https downloads at Moodle would prefer to talk to an https moodle server requesting to download a plugin.   If your server isn't running https there is a work-around provided.

See:

https://docs.moodle.org/24/en/SSL_certificate_for_moodle.org#Provide_the_CA_certificate_manually

While that URL says version 2.4 of Moodle same applies for all Moodles I've ever run ... 1.x through 3.2

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Atbilde: Re: Can't install plugin models

by Renārs Garda -

I have php curl extension enabled

I did copy the certificate to moodledata, but I am having the same problem + error

Debug info:
Error code: invalidsesskey
Stack trace:
  • line 463 of \lib\setuplib.php: moodle_exception thrown
  • line 85 of \lib\sessionlib.php: call to print_error()
  • line 58 of \admin\plugins.php: call to require_sesskey()

In reply to Renārs Garda

Re: Atbilde: Re: Can't install plugin models

by Ken Task -
Picture of Particularly helpful Moodlers

Well, according to debug, it's a session key thang.   Sessions, by default, are stored in moodledata/sessions/ .. they can and do change for admin level users ... have actually watched session files grow for admin users during that admin users session.

So ... this is a guess ... manually remove all files found in moodledata/sessions/  Do that in non-prime time cause as soon as you remove the files, all users will have to re-acquire/re-establish a session.

Am assuming the session key is related to the session files.   Think those session keys are cached/stored and are generated/re-generated  from time to time.

'spirit of sharing', Ken


In reply to Ken Task

Atbilde: Re: Atbilde: Re: Can't install plugin models

by Renārs Garda -

Didn't work.

As well when i go to hub section I get this error -

Deprecated: iconv_set_encoding(): Use of iconv.input_encoding is deprecated in C:\xampp\htdocs\lib\zend\Zend\XmlRpc\Client.php on line 260

Deprecated: iconv_set_encoding(): Use of iconv.output_encoding is deprecated in C:\xampp\htdocs\lib\zend\Zend\XmlRpc\Client.php on line 261

Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in C:\xampp\htdocs\lib\zend\Zend\XmlRpc\Client.php on line 262

Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in C:\xampp\htdocs\lib\zend\Zend\Validate\Hostname.php on line 514

Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in C:\xampp\htdocs\lib\zend\Zend\Validate\Hostname.php on line 610

Deprecated: iconv_set_encoding(): Use of iconv.input_encoding is deprecated in C:\xampp\htdocs\lib\zend\Zend\XmlRpc\Client.php on line 260

Deprecated: iconv_set_encoding(): Use of iconv.output_encoding is deprecated in C:\xampp\htdocs\lib\zend\Zend\XmlRpc\Client.php on line 261

Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in C:\xampp\htdocs\lib\zend\Zend\XmlRpc\Client.php on line 262

An error occurred when retrieving the hub listing from Moodle.org, please try again later. (Service Unavailable)


In reply to Renārs Garda

Re: Atbilde: Re: Atbilde: Re: Can't install plugin models

by Ken Task -
Picture of Particularly helpful Moodlers

Depreciated doesn't mean error ... but it does mean you might have reached a stage where your PHP might need upgrading.

Moodle version?  PHP version?

Check out:

https://docs.moodle.org/dev/Releases

for your moodle version and the release notes paying attention to any changes in requirements for minimal PHP compt.

Not a Windows person myself, but also see XAMPP ... that the packaged thang where one gets PHP, MySQL, Apache in one 'easy' installer?   Those things are usually not the flexible when it comes to needing an upgrade to one of the AMP stack.

Interesting to note, that in recent upgrades to sites and in checking the environment after those upgrades, see a notice, for the first time, that is making a recommendation the site run https.  And an issue with command line moosh in talking to Moodle for plugins ...

Maybe a Windows person would hop in here and assist ... I've taken this about as far as I can, being non-Windows person.

'spirit of sharing', Ken

In reply to Ken Task

Atbilde: Re: Atbilde: Re: Atbilde: Re: Can't install plugin models

by Renārs Garda -

Welll yes, not the newest version  - 2.8 and 5.6

And yes - that packaged thang where everything is one easy installer 

Thanks Ken !

In reply to Renārs Garda

Re: Atbilde: Re: Atbilde: Re: Atbilde: Re: Can't install plugin models

by Ken Task -
Picture of Particularly helpful Moodlers

2.8 Moodle
Bug fixes for general core bugs in 2.8.x ended 9 November 2015 (12 months).
Bug fixes for security issues in 2.8.x ended 9 May 2016 (18 months)

https://download.moodle.org/releases/legacy/ where 2.8 files can be downloaded, say
PHP 5.4.4 is minimum but it is a known fact that higher versions of PHP could create issues with older Moodle software.

Your PHP 5.6 is higher than what is required for 2.8.
Don't think the XAMP packages for Moodle has ever packaged a higher than needed version of PHP.   (could be wrong, don't use Windows)

But, that's the reason for those Depreciated warnings.

https://docs.moodle.org/28/en/Complete_install_packages_for_Windows

I can't think of a good reason that anyone would want to install a 2.8 ... cept to tinker with it.

Again ... I've taken this as far as I care to take it.  You'll have to wait for someone who uses Windows.

'spirit of sharing'. Ken


In reply to Ken Task

Atbilde: Re: Atbilde: Re: Atbilde: Re: Atbilde: Re: Can't install plugin models

by Renārs Garda -

Thanks.

Ok. I updated to 3.1

Still problem persist the same + when I go to hub section 

Version:1.0 StartHTML:000000218 EndHTML:000002584 StartFragment:000001570 EndFragment:000002552 StartSelection:000001570 EndSelection:000002552 SourceURL:/admin/registration/index.php

cURL request for "http://hubdirectory.moodle.org/local/hubdirectory/webservice/webservices.php?wstoken=publichubdirectory" failed, HTTP response code: HTTP/1.1 503 Service Unavailable
  • line 1354 of \lib\filelib.php: call to debugging()
  • line 95 of \webservice\xmlrpc\lib.php: call to download_file_content()
  • line 122 of \admin\registration\forms.php: call to webservice_xmlrpc_client->call()
  • line 204 of \lib\formslib.php: call to hub_selector_form->definition()
  • line 158 of \admin\registration\index.php: call to moodleform->__construct()

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\admin\registration\forms.php on line 130

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\admin\registration\forms.php on line 138