Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site unreachable after IiiItems plugin activated #4

Closed
pguerr061703 opened this issue Jul 20, 2017 · 23 comments
Closed

Site unreachable after IiiItems plugin activated #4

pguerr061703 opened this issue Jul 20, 2017 · 23 comments

Comments

@pguerr061703
Copy link

pguerr061703 commented Jul 20, 2017

I installed this plugin to my Omeka site hosted a Linux virtual host, and as soon as I activated this Omeka plugin, the site became unreachable: (Blank page)..
I checked /var/log/httpd/error.log and getting quite a frew PHP Fatal errors.
Can someone please suggest how to resolve this.
I'm on a Redhat 6.9 virtual host running Omeka version 2.5. I tried to get this plugin to work on 2.4.1 and still get PHP fatal errors

[Mon Jul 17 11:57:46 2017] [notice] Digest: done
[Mon Jul 17 11:57:46 2017] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.4.45 configured -- resuming normal operations
[Mon Jul 17 12:00:09 2017] [error] [client 150.108.20.100] PHP Fatal error: Can't use function return value in write context in /var/www/html/omeka_casm/plugins/IiifItems/libraries/IiifItems/Integration/Items.php on line 311, referer: https://omekacasm.site.edu/admin/plugins
[Mon Jul 17 12:00:13 2017] [error] [client 150.108.20.100] PHP Fatal error: Can't use function return value in write context in /var/www/html/omeka_casm/plugins/IiifItems/libraries/IiifItems/Integration/Items.php on line 311, referer: https://omekacasm.site.edu/admin/plugins
[Mon Jul 17 12:00:16 2017] [error] [client 150.108.20.100] PHP Fatal error: Can't use function return value in write context in /var/www/html/omeka_casm/plugins/IiifItems/libraries/IiifItems/Integration/Items.php on line 311, referer: https://omekacasm.site.edu/admin/users/login

@dicksonlaw583
Copy link
Collaborator

@pguerr061703 Please try the fix-php54 branch and let me know if it unblocks your site.

Link: https://github.com/utlib/IiifItems/tree/fix-php54

@pguerr061703
Copy link
Author

pguerr061703 commented Jul 20, 2017

unzipped the fix-php54 in /var/www/html/omeka/plugins folder. Ensured its owned by apache:apache. Restarted HTTPD service and went to my Omeka site plugin page, the plugin says "This is not a invalid plugin". I am trying to get this iiif-toolkit-with-mirador plugin to work, but it keeps hanging my Omeka site
http://omeka.org/add-ons/plugins/iiif-toolkit-with-mirador/
See attached picture

@pguerr061703
Copy link
Author

image

@dicksonlaw583
Copy link
Collaborator

Please remove both plugins, then unzip the download from fix-php54 and rename the resulting directory to IiifItems.

@pguerr061703
Copy link
Author

The plugin is installed, but when I activate IIF Toolkit and click on the "Items" tab in Omeka, I get an error: Zend_Db_Statement_Mysqli_Exception Mysqli statement execute error : No data supplied for parameters in prepared statement
image

@dicksonlaw583
Copy link
Collaborator

dicksonlaw583 commented Jul 24, 2017

Can you copy-and-paste the error so that the part hidden by the scroll bar is visible?

Also, can you access individual items from Collections? If you can, can you access an item from there, go to its edit screen and check if there is an item type named "Annotation" there?

@pguerr061703
Copy link
Author

Below are the errors in its entirety. Yes I can access the Collections Tab, and I see Annotations(see pic below)

exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli statement execute error : No data supplied for parameters in prepared statement' in /var/www/html/omeka_medieval/application/libraries/Zend/Db/Statement/Mysqli.php:214
Stack trace:
#0 /var/www/html/omeka_medieval/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /var/www/html/omeka_medieval/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 [internal function]: Zend_Db_Adapter_Abstract->query(Object(Omeka_Db_Select), Array)
#3 /var/www/html/omeka_medieval/application/libraries/Omeka/Db.php(79): call_user_func_array(Array, Array)
#4 /var/www/html/omeka_medieval/application/libraries/Omeka/Db/Table.php(648): Omeka_Db->__call('query', Array)
#5 /var/www/html/omeka_medieval/application/libraries/Omeka/Db/Table.php(648): Omeka_Db->query(Object(Omeka_Db_Select), Array)
#6 /var/www/html/omeka_medieval/application/libraries/Omeka/Db/Table.php(281): Omeka_Db_Table->fetchObjects(Object(Omeka_Db_Select))
#7 [internal function]: Omeka_Db_Table->findBy(Array, 20, 1)
#8 /var/www/html/omeka_medieval/application/controllers/helpers/Db.php(59): call_user_func_array(Array, Array)
#9 /var/www/html/omeka_medieval/application/libraries/Omeka/Controller/AbstractActionController.php(128): Omeka_Controller_Action_Helper_Db->__call('findBy', Array)
#10 /var/www/html/omeka_medieval/application/libraries/Omeka/Controller/AbstractActionController.php(128): Omeka_Controller_Action_Helper_Db->findBy(Array, 20, 1)
#11 /var/www/html/omeka_medieval/application/controllers/ItemsController.php(183): Omeka_Controller_AbstractActionController->browseAction()
#12 /var/www/html/omeka_medieval/application/libraries/Zend/Controller/Action.php(516): ItemsController->browseAction()
#13 /var/www/html/omeka_medieval/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('browseAction')
#14 /var/www/html/omeka_medieval/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#15 /var/www/html/omeka_medieval/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#16 /var/www/html/omeka_medieval/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#17 /var/www/html/omeka_medieval/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#18 /var/www/html/omeka_medieval/admin/index.php(28): Omeka_Application->run()
#19 {main}

image

@pguerr061703
Copy link
Author

pguerr061703 commented Jul 24, 2017

Just an FYI, When I click on IIF Toolkit button and click on Status tab, I get a different error as well
image

@pguerr061703
Copy link
Author

image

exception 'Zend_Db_Statement_Mysqli_Exception' with message 'Mysqli prepare error: Table 'omeka_medieval.omk_iiif_items_job_statuses' doesn't exist' in /var/www/html/omeka_medieval/application/libraries/Zend/Db/Statement/Mysqli.php:77
Stack trace:
#0 /var/www/html/omeka_medieval/application/libraries/Zend/Db/Statement.php(115): Zend_Db_Statement_Mysqli->_prepare('SELECT * FROM o...')
#1 /var/www/html/omeka_medieval/application/libraries/Zend/Db/Adapter/Mysqli.php(388): Zend_Db_Statement->__construct(Object(Zend_Db_Adapter_Mysqli), 'SELECT * FROM o...')
#2 /var/www/html/omeka_medieval/application/libraries/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Adapter_Mysqli->prepare('SELECT * FROM o...')
#3 [internal function]: Zend_Db_Adapter_Abstract->query('SELECT * FROM o...', Array)
#4 /var/www/html/omeka_medieval/application/libraries/Omeka/Db.php(79): call_user_func_array(Array, Array)
#5 /var/www/html/omeka_medieval/application/libraries/Omeka/Db/Table.php(648): Omeka_Db->__call('query', Array)
#6 /var/www/html/omeka_medieval/application/libraries/Omeka/Db/Table.php(648): Omeka_Db->query('SELECT * FROM o...', Array)
#7 /var/www/html/omeka_medieval/plugins/IiifItems/controllers/ImportController.php(185): Omeka_Db_Table->fetchObjects('SELECT * FROM o...')
#8 /var/www/html/omeka_medieval/application/libraries/Zend/Controller/Action.php(516): IiifItems_ImportController->statusAction()
#9 /var/www/html/omeka_medieval/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('statusAction')
#10 /var/www/html/omeka_medieval/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#11 /var/www/html/omeka_medieval/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#12 /var/www/html/omeka_medieval/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#13 /var/www/html/omeka_medieval/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#14 /var/www/html/omeka_medieval/admin/index.php(28): Omeka_Application->run()
#15 {main}

@dicksonlaw583
Copy link
Collaborator

dicksonlaw583 commented Jul 24, 2017

It appears that the tables and entries added by the plugin are missing from your installation. Can you uninstall and then reinstall?

@pguerr061703
Copy link
Author

pguerr061703 commented Jul 24, 2017

I uninstalled IiifItems, removed the plugin, and copied the IiifItems-fix-php54.zip back to Omeka plugins folder, unzipped and renamed to IiifItems, changed owner and group to apache:apacheusers ...Now when I click install from Omeka interface, I get an another error:

image

Error in its ENTIRETY below:
exception 'RuntimeException' with message 'The configured PHP path () does not point to a PHP-CLI binary.' in /var/www/html/omeka_medieval/application/libraries/Omeka/Job/Process/Dispatcher.php:124
Stack trace:
#0 /var/www/html/omeka_medieval/application/libraries/Omeka/Job/Process/Dispatcher.php(93): Omeka_Job_Process_Dispatcher::_checkCliPath(NULL)
#1 /var/www/html/omeka_medieval/application/libraries/Omeka/Job/Process/Dispatcher.php(28): Omeka_Job_Process_Dispatcher::getPHPCliPath()
#2 /var/www/html/omeka_medieval/application/libraries/Omeka/Job/Dispatcher/Adapter/BackgroundProcess.php(31): Omeka_Job_Process_Dispatcher::startProcess('Omeka_Job_Proce...', Object(User), Array)
#3 /var/www/html/omeka_medieval/application/libraries/Omeka/Job/Dispatcher/Default.php(150): Omeka_Job_Dispatcher_Adapter_BackgroundProcess->send('{"className":"I...', Array)
#4 /var/www/html/omeka_medieval/plugins/IiifItems/libraries/IiifItems/Migration/0_0_1_6.php(38): Omeka_Job_Dispatcher_Default->sendLongRunning('IiifItems_Job_A...', Array)
#5 /var/www/html/omeka_medieval/plugins/IiifItems/libraries/IiifItems/Integration/System.php(75): IiifItems_Migration_0_0_1_6->up()
#6 /var/www/html/omeka_medieval/plugins/IiifItems/libraries/IiifItems/Integration/System.php(21): IiifItems_Integration_System->__addUuids()
#7 /var/www/html/omeka_medieval/plugins/IiifItems/IiifItemsPlugin.php(42): IiifItems_Integration_System->install()
#8 [internal function]: IiifItemsPlugin->hookInstall(Array)
#9 /var/www/html/omeka_medieval/application/libraries/Omeka/Plugin/Broker.php(145): call_user_func(Array, Array)
#10 /var/www/html/omeka_medieval/application/libraries/Omeka/Plugin/Installer.php(130): Omeka_Plugin_Broker->callHook('install', Array, Object(Plugin))
#11 /var/www/html/omeka_medieval/application/controllers/PluginsController.php(97): Omeka_Plugin_Installer->install(Object(Plugin))
#12 /var/www/html/omeka_medieval/application/libraries/Zend/Controller/Action.php(516): PluginsController->installAction()
#13 /var/www/html/omeka_medieval/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('installAction')
#14 /var/www/html/omeka_medieval/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#15 /var/www/html/omeka_medieval/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#16 /var/www/html/omeka_medieval/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#17 /var/www/html/omeka_medieval/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#18 /var/www/html/omeka_medieval/admin/index.php(28): Omeka_Application->run()
#19 {main}

@dicksonlaw583
Copy link
Collaborator

Please update the background.php.path key in your Omeka installation's application/config/config.ini file to match the actual path to your PHP binary. If you are on a shared host or institutional server, please consult an administrator for advice. All background-running jobs, including the plugin's installation routine and IIIF manifest importer, rely on this setting.

Here is a similar discussion from the old Omeka forums for another plugin, running on BlueHost: http://omeka.org/forums-legacy/topic/csv-import-plugin-not-working-on-shared-host

@pguerr061703
Copy link
Author

pguerr061703 commented Jul 24, 2017

I'm a little confused. What am I pointing this background.php.path path to? php or php-cli ? (see below)
[root@edl-myd01 config]# rpm -ql php-cli-5.4.45-12.el6.remi.x86_64
/usr/bin/phar
/usr/bin/phar.phar
/usr/bin/php
/usr/bin/php-cgi
/usr/bin/phpize
/usr/bin/zts-php
/usr/share/doc/php-cli-5.4.45
/usr/share/doc/php-cli-5.4.45/README
/usr/share/doc/php-cli-5.4.45/README.FastCGI
/usr/share/man/man1/phar.1.gz
/usr/share/man/man1/phar.phar.1.gz
/usr/share/man/man1/php-cgi.1.gz
/usr/share/man/man1/php.1.gz
/usr/share/man/man1/phpize.1.gz
/usr/share/man/man1/zts-php.1.gz
[root@edl-myd01 config]#

@dicksonlaw583
Copy link
Collaborator

Try pointing it at /usr/bin/php.

@pguerr061703
Copy link
Author

pguerr061703 commented Jul 24, 2017

That didn't work either. Somehow its complaining about php-cli, which I do not have

image

@dicksonlaw583
Copy link
Collaborator

Can you show the output of the following commands?

  • which php
  • php -v

@pguerr061703
Copy link
Author

pguerr061703 commented Jul 24, 2017

[root@edl-myd01 config]# which php
/usr/bin/php
[root@edl-myd01 config]# php -v
PHP 5.4.45 (cli) (built: Feb 18 2017 15:55:26)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
[root@edl-myd01 config]#

@dicksonlaw583
Copy link
Collaborator

What happens if you point it to your /usr/bin/php-cgi instead?

@pguerr061703
Copy link
Author

I honestly don't know what the problem is. Same result
image

@dicksonlaw583
Copy link
Collaborator

Change it back to /usr/bin/php for now. I'm running out of leads as well, but here are a few more things to try and find the cause:

  • Check for exec in disable_functions from phpinfo.
  • su into the apache user account and try running php -v from it.
  • Debug line 123 application/libraries/Omeka/Job/Process/Dispatcher.php and watch the value of variables representing the command and output.

These won't fix the problem on their own, but will give valuable insight into what might be wrong.

If the setup still doesn't work, I would recommend removing IIIF Toolkit for now and ask on forum.omeka.org for help setting up background jobs. Some batch-editing features of Omeka rely on dispatching background jobs, and they will likely trigger the same errors on your current setup even without the IIIF Toolkit plugin. You can retry installing the plugin later once jobs are setting off properly.

@pguerr061703
Copy link
Author

I suspect this plugin does not fully work or is supported on Omeka 2.4.1 or 2.5. I tried multiple times to uninstall on a different host, and I cannot.

image

After clicking Uninstall button
image

@dicksonlaw583
Copy link
Collaborator

I have just pushed up a more fault-tolerant uninstallation routine that recovers better from interrupted installations. Can you re-download the fix-php54 branch and try again?

@dicksonlaw583
Copy link
Collaborator

@pguerr061703

Were you able to uninstall the plugin? Your feedback would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants