Git Product home page Git Product logo

Comments (25)

cazzerson avatar cazzerson commented on July 30, 2024

Thanks for trying out Suma. This kind of feedback to extremely helpful as we continue to try to improve the Suma install process. Have you copied this index.php file somewhere else in your web directory, or are you accessing /var/www/app/Suma/service/web/index.php directly? I am able to reproduce this error by placing a redundant 'sumaserver' at the end of the URL (e.g. http://host/sumaserver/sumaserver), but this may not be the problem in this case. One issue that I noticed with your index.php file is the setBaseUrl() call. This should contain the base URL path to the index.php file (rather than the filesystem path). For example, if you copied this file to htdocs/sumaserver/index.php, the setBaseUrl() call should be:

  ->setBaseUrl('/sumaserver') // set the base url

from suma.

bassettsj avatar bassettsj commented on July 30, 2024

@cazzerson Wow what a quick response! Thank you!

We would like to use this tool here at Northeastern University Libraries as well. Unfortunately I was just told this morning to put it on the back burner for the time being but thank you so much for your help.

--Steven

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

Working w/ bassetts to get Suma up and working here at NU libraries. By making the suggested change within index.php, "setBaseUrl('/sumaserver') // set the base url"

The orginal error message went away. Only to be replace with a warning:

Warning: require_once(models/SessionModel.php): failed to open stream: No such file or directory in /var/www/app/Suma/service/controllers/AdminController.php on line 4

from suma.

cazzerson avatar cazzerson commented on July 30, 2024

Sorry, I missed another issue in the file included above. In this line:

ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . 'SUMA_SERVER_PATH');

(it should be line 7 or 8 of the service/web/index.php file), the string SUMA_SERVER_PATH should be replaced, in your case, with /var/www/app/Suma/service

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

Made the recommended changes to index.php

It got rid of "Warning: require_once(models/SessionModel.php): failed to open stream: No such file or directory in /var/www/app/Suma/service/controllers/AdminController.php on line 4"

But ...

Replaced it with "Warning: require_once(Zend/Loader.php): failed to open stream: No such file or directory in /var/www/app/Suma/service/web/index.php on line 11 "

I checked my include statement in php.ini (shown below):
; UNIX: "/path1:/path2"
include_path = ".:/php/includes:/usr/share/php/Zend"

The index.php now reflects your recommended changes:

setControllerDirectory('/var/www/app/Suma/service/controllers') ->setBaseUrl('/sumaserver') // set the base url ->throwExceptions(true); // Go $front->dispatch();

from suma.

cazzerson avatar cazzerson commented on July 30, 2024

OK, we're getting there. Could you look around in /usr/share/php/Zend and find the path to the Zend/Loader.php file? Depending on how ZF is installed, you may need a different path in your include_path. For example, mine is actually root path/Zend/library (instead of just /Zend).

By the way, the version of index.php you pasted still has the default SUMA_SERVER_PATH string on line 8ish.

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

No change in the warning.

There's only one file on the system named Loader.php. The path is as follows:

[root@libdev /]# find -name Loader.php
./usr/share/php/Zend/Loader.php

Also changed the SUMA_SERVER_PATH string on line 8 within my index.php file, the line now reads ...

// Set paths
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '/var/www/app/Suma/service');

Thank-you for your help.

from suma.

cazzerson avatar cazzerson commented on July 30, 2024

Thanks, this is helpful. It looks like there is an include_path issue for Zend. Looking at the include_path from your php.ini, the Zend path is included, but not the parent diretory. The Suma code assumes that Zend/Loader.php is in the search path, but what is being constructed instead is /usr/share/php/Zend/Zend/Loader.php. There are a few options:

  1. Add /usr/share/php on to the include_path in php.ini
  2. Add the following line to the service/web/index.php for Suma before the other ini_set line:
ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . '/usr/share/php');
  1. If you aren't currently using Zend Framework anywhere else, you could move it somewhere else in the search path (e.g. /php/includes).

The second option would probably be the easiest way to test this, and then you could make the php.ini change if it works.

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

Yes! We have login web page and upon logon can see a menu selection.

But, another Zend error msg:

Fatal error: Uncaught exception 'Zend_Exception' with message 'File "Zend/Db/Adapter/Pdo/Mysql.php" does not exist or class "Zend_Db_Adapter_Pdo_Mysql" was not found in the file' in /usr/share/php/Zend/Loader.php:87 Stack trace: #0 /usr/share/php/Zend/Db.php(263): Zend_Loader::loadClass('Zend_Db_Adapter...') #1 /var/www/app/Suma/service/config/Globals.php(30): Zend_Db::factory('Pdo_Mysql', Array) #2 /var/www/app/Suma/service/models/LocationModel.php(216): Globals::getDBConn() #3 /var/www/app/Suma/service/controllers/AdminController.php(272): LocationModel::getLocTreeRoots() #4 /usr/share/php/Zend/Controller/Action.php(516): AdminController->locationsAction() #5 /usr/share/php/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('locationsAction') #6 /usr/share/php/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #7 /var/www/app/Suma/service/web/index.php(26): Zend_Controller_Front->dispatch() in /usr/share/php/Zend/Loader.php on line 87

Did a search for Mysql.php. Not found anywhere on the machine.

from suma.

cazzerson avatar cazzerson commented on July 30, 2024

This is strange. Did you install this version of Zend Framework 1 recently? If you look at the ZF1 mirror, it should be there:

https://github.com/breerly/zf1/tree/master/library/Zend/Db/Adapter/Pdo

If you compare /usr/share/php/Zend to the ZF1 repository above, does it look like there are a lot of files missing?

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

I did a YUM install for Zend Framework and it looks like I also need to install the php-ZendFramework-Db-Adapter-Pdo-Mysql package as well.

from suma.

cazzerson avatar cazzerson commented on July 30, 2024

Ah, that's good to know. I think in our next development cycle we will package Zend Framework with Suma.

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

Getting close. I get the Suma Administrative Tools login page, which works. I get menu page but none the links work except for the "Direct JSON Import" link. That brings up 'Enter JSON in textarea below and click "Submit". '
and an input box.

All the other links bring a blank page. No errors, warnings, nothing.

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

Oh, I installed the php-ZendFramework-Db-Adapter-Pdo-Mysql package and can find the Mysql.php file .

from suma.

cazzerson avatar cazzerson commented on July 30, 2024

Could you take a look at the Suma log file? If it doesn't exist, you'll need to point to a path that is writable by the web server in Suma/service/config/config.ini.

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

In the sumaserver.log:

2013-01-24T15:10:59-05:00 ERR (3): ADMIN fetch initiatives error: File "Zend/Db/Adapter/Pdo/Mysql.php" does not exist or class "Zend_Db_Adapter_Pdo_Mysql" was not found in the file

Yet, when I do a find, it's there.
[root@libdev /]# find -name Mysql.php
./usr/share/php/Zend/Db/Adapter/Pdo/Mysql.php

[root@libdev Pdo]# ls -l Mysql.php
-rw-r--r--. 1 root root 9323 Jan 5 2012 Mysql.php

from suma.

cazzerson avatar cazzerson commented on July 30, 2024

It looks like that log line is from 3:10pm--is it possible that it was written before you added the PDO package? if you check the log again after trying to view one of the broken admin tools, are there any new entries?

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

Good point. I've logged in several times since and there's only one entry. I just tried it again, still only one entry.

from suma.

cazzerson avatar cazzerson commented on July 30, 2024

I suspect that there may be a problem related to database access, since every admin view except the JSON input queries the database on load, but I'm having trouble recreating this exact problem (where no exceptions are displayed). I just sent you an email.

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

Just a snippet from the mysqld.log file

130110 14:10:03 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
130110 14:10:03 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
130110 14:10:03 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure

Not sure if this is related to the Suma installation. Recognize anything?

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

In response to:
would you mind replacing the two error statements at the top of the sumaserver/index.php file with these lines?
error_reporting(E_ALL);
ini_set("display_errors", 1);

After doing so, I get this when I click on the links:

Fatal error: Cannot redeclare class Zend_Log_Filter_Abstract in /usr/share/php/Zend/Log/Filter/Abstract.php on line 38

On a different note. Your specs call for ZendFramework 1.11 I'm using version 1.12.1. Does this matter? Do you know ZendFramework 2 will work?

Karl

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

We're getting a different error msg:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'sumaproduser'@'localhost' for table 'location'' in /usr/share/php/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 /usr/share/php/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) #1 /usr/share/php/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array) #2 /usr/share/php/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array) #3 /usr/share/php/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Select), Array) #4 /usr/share/php/Zend/Db/Select.php(686): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Select)) #5 /var/www/app/Suma/service/models/LocationModel.php(228): Zend_Db_Select->query() #6 /var/www/app/Suma/service/controllers/AdminController.php(272): LocationModel::getLocTreeRoots() #7 /usr/share/php/Zend/Controller/Action.php(513): AdminController->locationsAction() #8 /usr/share/php/Zend/Controller/Di in /usr/share/php/Zend/Db/Statement/Pdo.php on line 234

It hints at a database access issue. Going to try granting all rights to the database user and see what happens.

from suma.

cazzerson avatar cazzerson commented on July 30, 2024

Zend Framework 2 won't work, but 1.12.1. should be fine. Out offline communications indicate that this was fixed with a fresh Zend Framework install along with updated database permissions.

from suma.

KarlYee avatar KarlYee commented on July 30, 2024

Jason. We have Suma up and running, SumaServer, Suma Client, and the analytics! Thank-you to you and your team for the generous, expert help. We couldn't have done it without you.

from suma.

cazzerson avatar cazzerson commented on July 30, 2024

It's our pleasure. Keep us posted and, of course, all suggestions and pull requests are welcome.

from suma.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.