Hi @luismurillo,
Unfortunately I cannot reproduce the error on OJS 3.1.1-4 and above.
The error says that here is not an object as expected but string. The most probable reason is that OJS cannot retrieve version.xml file. But in this case the method should fail 2 lines earlier.
Can you debud it more and just line above put: error_log(print_r($pluginVersion, true));
Then try to install plugin and check the logs? Normally (for e.g., Translator Plugin ) you should see there:
[14-Jun-2019 13:10:25 UTC] Version Object
(
[_data] => Array
(
[major] => 2
[minor] => 0
[revision] => 3
[build] => 1
[dateInstalled] => 2019-06-14 13:10:25
[current] => 1
[productType] => plugins.generic
[product] => translator
[productClassName] => TranslatorPlugin
[lazyLoad] => 1
[sitewide] => 1
)
[_hasLoadableAdapters] =>
[_metadataExtractionAdapters] => Array
(
)
[_extractionAdaptersLoaded] =>
[_metadataInjectionAdapters] => Array
(
)
[_injectionAdaptersLoaded] =>
)
sorry but i dont know here to put… error_log(print_r($pluginVersion, true));
I debug whit tail -f in the logg folder of my site
You should modify the file pointed in the error:
/home/ipao/public_html/lib/pkp/classes/plugins/PluginHelper.inc.php
Write
error_log(print_r($pluginVersion, true))
On the line just above that line that is pointed in the error (line 113).
This will print the content of the variable $pluginVersion into the logs. The content of that variable may help to debug further.
Hi, this is the new log with the line error_log(print_r($pruginVersion, true));
[root@s166-62-122-206 logs]# tail -f medicinaclinica_org.php.error.log
#4 /home/ipao/public_html/lib/pkp/classes/core/PKPApplication.inc.php(252): Dispatcher->dispatch(Object(Request))
#5 /home/ipao/public_html/index.php(67): PKPApplication->execute()
#6 {main}
thrown in /home/ipao/public_html/lib/pkp/classes/plugins/PluginHelper.inc.php on line 113
[14-Jun-2019 16:36:48 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 263
[14-Jun-2019 16:36:48 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 359
[14-Jun-2019 16:36:48 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[14-Jun-2019 16:36:48 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[14-Jun-2019 16:36:48 UTC] PHP Warning: Declaration of DRIVERDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /home/ipao/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[14-Jun-2019 16:36:48 UTC] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/ipao/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134
[14-Jun-2019 16:37:26 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 263
[14-Jun-2019 16:37:26 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 359
[14-Jun-2019 16:37:26 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[14-Jun-2019 16:37:26 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[14-Jun-2019 16:37:27 UTC] PHP Warning: Declaration of DRIVERDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /home/ipao/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[14-Jun-2019 16:37:27 UTC] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/ipao/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 134
[14-Jun-2019 16:37:28 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbObject has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 106
[14-Jun-2019 16:37:28 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbTable has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 205
[14-Jun-2019 16:37:28 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbIndex has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 613
[14-Jun-2019 16:37:28 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbData has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 774
[14-Jun-2019 16:37:28 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; dbQuerySet has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 959
[14-Jun-2019 16:37:28 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; adoSchema has a deprecated constructor in /home/ipao/public_html/lib/pkp/lib/adodb/adodb-xmlschema.inc.php on line 1217
[14-Jun-2019 16:37:28 UTC] PHP Warning: exec() has been disabled for security reasons in /home/ipao/public_html/lib/pkp/classes/plugins/PluginHelper.inc.php on line 67
[14-Jun-2019 16:37:28 UTC] PHP Fatal error: Uncaught Error: Call to a member function getProductType() on string in /home/ipao/public_html/lib/pkp/classes/plugins/PluginHelper.inc.php:113
Stack trace:
#0 /home/ipao/public_html/lib/pkp/controllers/grid/plugins/PluginGalleryGridHandler.inc.php(266): PluginHelper->installPlugin(NULL, ‘El m\xC3\xB3dulo que …’)
#1 /home/ipao/public_html/lib/pkp/classes/core/PKPRouter.inc.php(390): PluginGalleryGridHandler->installPlugin(Array, Object(Request))
#2 /home/ipao/public_html/lib/pkp/classes/core/PKPComponentRouter.inc.php(257): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array)
#3 /home/ipao/public_html/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPComponentRouter->route(Object(Request))
#4 /home/ipao/public_html/lib/pkp/classes/core/PKPApplication.inc.php(252): Dispatcher->dispatch(Object(Request))
#5 /home/ipao/public_html/index.php(67): PKPApplication->execute()
#6 {main}
thrown in /home/ipao/public_html/lib/pkp/classes/plugins/PluginHelper.inc.php on line 113
Hmm, I don’t see here any output from $pluginVersion…
Sorry, haven’t noticed this error earlier, this means that your hosting provider blocks exec() function that runs external program to unpack plugin’s archive.
See: https://stackoverflow.com/questions/16421725/warning-exec-has-been-disabled-for-security-reasons
Thank you, I think is working well now.
I can install plugins using Plugin Gallery
I am experiencing the same issue. Below is the error log. I am using the latest version of OJS.
[16-Aug-2019 00:19:08 UTC] PHP Warning: copy(https://github.com/pkp/coins/releases/download/v1.0.2-1/coins-v1.0.2-1.tar.gz): failed to open stream: no suitable wrapper could be found in /home/wskworg/public_html/jkw/lib/pkp/classes/file/FileManager.inc.php on line 162
[16-Aug-2019 00:19:08 UTC] ojs2: Incorrect MD5 checksum!
Hi @Ovande_Furtado,
It looks like your installation of PHP doesn’t have SSL support. See e.g. this StackOverflow discussion.
Regards,
Alec Smecher
Public Knowledge Project Team