Skip to content

Copy to clipboard not working in IE 11 and SysPass 1.2.0.13 #276

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

Closed
davidpsc opened this issue Sep 17, 2016 · 50 comments
Closed

Copy to clipboard not working in IE 11 and SysPass 1.2.0.13 #276

davidpsc opened this issue Sep 17, 2016 · 50 comments

Comments

@davidpsc
Copy link

Here's another (small) issue I've found with SysPass 1.2.0.13: there are these great buttons when looking at a password to instantly copy either username or password to the clipboard. It works very well in Google Chrome (which I always use) but I tried the copy-to-clipboard function in IE 11 and it asked for clipboard permissions (which I granted) but nothing was copied. The clipboard still contained the content that I copied previously.

Can you please have a look at it? One of my colleagues always uses IE (for whatever reason...) and he sure would love to copy the password with just a button click. Maybe have a look at https://clipboardjs.com regarding the implementation - on this website it works for Chrome and IE.

Thank you!

@nuxsmin
Copy link
Owner

nuxsmin commented Sep 17, 2016

It's weird, because that JavaScript library is the same used in sysPass code.

Let me find out what is wrong.

@davidpsc
Copy link
Author

Yesterday I took a deeper look at the problem and compared the used versions of the JavaScript library and how it is used (compared working the example from the webpage with the implementation/usage in sysPass) - but I haven't found why it is not working in IE...

Thanks for trying to find out what is wrong and hopefully you have more luck - but you sure have a much deeper knowledge than I have, so I'm pretty sure that you'll find out what is wrong :)

@nuxsmin nuxsmin added this to the 1.2 milestone Sep 21, 2016
@nuxsmin nuxsmin self-assigned this Sep 21, 2016
@nuxsmin
Copy link
Owner

nuxsmin commented Jan 12, 2017

Can you give a try to the latest sysPass 2.0-beta release?

@davidpsc
Copy link
Author

davidpsc commented Jan 13, 2017 via email

@davidpsc
Copy link
Author

davidpsc commented Jan 31, 2017

Today I wanted to try the latest sysPass release (RC2) but unfortunately the upgrade of the database doesn't seem to happen.

I wanted to update from 1.2.0.13 to 2.0.0.17013001-RC2 and I get the following errors in the PHP error log:

[31-Jan-2017 13:58:54 Asia/Kuwait] Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'syspass2.plugins' doesn't exist
[31-Jan-2017 13:58:54 Asia/Kuwait] #0  SP\Storage\DB->prepareQueryData() called at [C:\syspass_path\inc\SP\Storage\DB.class.php:150]
...
[31-Jan-2017 13:58:54 Asia/Kuwait] Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'log_level' in 'field list'
[31-Jan-2017 13:58:54 Asia/Kuwait] #0  SP\Storage\DB->prepareQueryData() called at [C:\syspass_path\inc\SP\Storage\DB.class.php:150]
...
<stack trace, gets longer the more errors occur>
...
[31-Jan-2017 13:58:55 Asia/Kuwait] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 45 bytes) in C:\syspass_path\inc\SP\Storage\DB.class.php on line 252

Here's what I did:

  • downloaded the latest sysPass release
  • copied the database ("syspass" --> "syspass2")
  • modified sysPass user DB permissions (so sysPass has full access on "syspass2" as well)
  • expanded the archive on the server (new directory)
  • modified folder permissions (so that sysPass can read+write)
  • copied the contents from the old "config" directory to the new one
  • changed DB "syspass" in config file to "syspass2"
  • called the index.php in the new directory --> returns HTTP 500

I had a look at the wiki page regarding upgrading but there it says that this should happen automatically. What did I do wrong? Have I missed something?

@nuxsmin
Copy link
Owner

nuxsmin commented Jan 31, 2017

Hi!

It's weird because I've tested the upgrade process from 1.2 version without any issues. There haven't been database upgrades since 1.2.0.2 version and the upgrading process should have started.

Is there any XML file in the config directory?

@davidpsc
Copy link
Author

davidpsc commented Feb 3, 2017

Hi,
sorry for the delayed response, much work this week.

There is a config.xml which was automatically created. The file seems ok after a quick look at it. The only thing I noticed is this line:
<mailSecurity>Deaktiviert</mailSecurity>

I guess this entry shouldn't be translated? Should it say "disabled"?

Edit: I've just seen that this setting is also translated in the old config.php, so I guess this is OK
Edit2: Maybe it helps to post what tables I have now in 1.2.0.13:

  • accfiles
  • accgroups
  • acchistory
  • accounts
  • accusers
  • authtokens
  • categories
  • config
  • customers
  • customfieldsdata
  • customfieldsdef
  • log
  • usrdata
  • usrgroups
  • usrpassrecover
  • usrprofiles
  • usrtogroups

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 3, 2017

No worries :)

The tables are right, but I don't know why the upgrade process didn't take place, and that XML file means that an upgrade step was done.

Could you take a look to a version field in the config table?

@davidpsc
Copy link
Author

davidpsc commented Feb 3, 2017

The version entry in the config table shows 12013.

Should I delete the XML file, rename the config.php.old back to config.php and try it again?
I maybe should have said that on the first try I forgot to change the folder permissions of the syspass directory so the XML file wasn't created. I changed the permissions and tried it again - maybe there is some inconsistency because of that?

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 3, 2017

Regarding your last upgrade process, did you set the directory permissions and owner?

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 3, 2017

Are you pointing to index.php URL?

@davidpsc
Copy link
Author

davidpsc commented Feb 4, 2017

Yes, after the first try I had a look at the PHP error log and saw that the XML file couldn't be created. So I changed the permissions of the new syspass folder to give the webserver user write permissions. After that I tried it again and the XML file was created.
The permissions on the new directory are like the permissions on the old syspass directory (Owner: local admins groups, IUSR has modify permissions).
Note: I'm on Windows and using IIS 8 with PHP 5.6.

Regarding the URL: I first tried the upgrade calling http://servername/syspass_new/ but I have also tried calling http://servername/syspass_new/index.php

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 4, 2017

Sorry about "index.php", I was answering form the phone so I forget some data...

One question about the XML, is there any "upgradeKey" tag?

@davidpsc
Copy link
Author

davidpsc commented Feb 4, 2017

Yes, but it is empty:
<upgradeKey></upgradeKey>

@davidpsc
Copy link
Author

davidpsc commented Feb 4, 2017

I cleaned the PHP error log right now and called the URL again. The error about missing "plugins" table is gone but the error about "log_level" is still there:

[04-Feb-2017 13:46:40 Asia/Kuwait] Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'log_level' in 'field list'
[04-Feb-2017 13:46:40 Asia/Kuwait] #0  SP\Storage\DB->prepareQueryData() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:150]
#1  SP\Storage\DB->doQuery() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:347]
#2  SP\Storage\DB::getQuery() called at [C:\path_to_syspass\syspass_new\inc\SP\Log\Log.class.php:169]
#3  SP\Log\Log->writeLog() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:592]
#4  SP\Core\Init::wrLogoutInfo() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:690]
#5  SP\Core\Init::initSession() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:168]
#6  SP\Core\Init::start() called at [C:\path_to_syspass\syspass_new\inc\Base.php:108]
#7  require(C:\path_to_syspass\syspass_new\inc\Base.php) called at [C:\path_to_syspass\syspass_new\index.php:31]

Then this block is written again and again, but bigger (increases by three additional lines each block). This continues until the memory limit is reached.

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 4, 2017

Ok, if so the database check didn't take place.

Currently, I don't have a testing environment like yours, so the only way to get updated is by applying DB updates manually. This could be done by looking at the "inc/sql" directory, where there are several files that match with the sysPass version which requires an upgrade, so you would need to apply from 1316011001.

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 4, 2017

Worth to mention that I've set your DB version in my DB and the upgrade process started

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 4, 2017

Sorry, I will work partially, because there are auxiliary upgrades...

@davidpsc
Copy link
Author

davidpsc commented Feb 4, 2017

I've now done all SQL updates beginning with 1316011001 but there were some errors. Now there is no HTTP 500 anymore but a blank page.
The log says that some template files couldn't be found, e.g.: C:\path_to_syspass\syspass_new\inc\SP\inc\themes\material-blue\views\main\header.inc

This path is invalid because SP\inc should not be in the path. It should be C:\path_to_syspass\syspass_new\inc\themes\material-blue\views\main\header.inc

Is this path stored in the DB?

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 4, 2017

About the template, the file name is not stored anywhere, but the path is set in the "inc/Base.php" file.

I've made a updating script that performs DB upgrades like a normal upgrade...

https://gist.github.com/nuxsmin/950010a3ac12d2a723a1a9fa2d7e01f5

Please, try it out by placing it at the sysPass root dir and pointing your browser to it. Be aware that the XML config file is needed (in its own dir).

@davidpsc
Copy link
Author

davidpsc commented Feb 4, 2017

Ok, so I've deleted the new database and made a fresh copy, downloaded upgrade.php and put it in the root directory of the new syspass folder and called it via my brower. Result: HTTP 500
Log says: [04-Feb-2017 16:11:58 Asia/Kuwait] PHP Fatal error: Class 'phpmailer\PHPMailer' not found in C:\path_to_syspass\syspass_new\inc\SP\Log\Email.class.php on line 119

Edit: the config.xml file is still in the config dir

@davidpsc
Copy link
Author

davidpsc commented Feb 4, 2017

Oh, I just noticed that "version" (in the config table) now says "12013" and there is also a log entry which says that the DB upgrade was successful

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 4, 2017

Right, but the final step in the upgrade process is to send an email, so it wasn't performed because a missing class (not sen in the path).

Please comment out the line (with "//"):

Upgrade::doUpgrade(12013);

and rerun the script. It will save the right DB version.

@davidpsc
Copy link
Author

davidpsc commented Feb 4, 2017

I commented out the line but nothing changes. Still HTTP 500 and the same entry in the error log

Edit: now the version in the database says "2147483647"

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 4, 2017

That is the key!...."2147483647" is the max value for a 32 bit integer, but it should be "20017020401", so your system is not managing 64-bit integers...

You could update the config table by issuing:

UPDATE syspass.config SET config_value = '20017020401' where config_parameter = 'version';

BUT, the next upgrade will fail too.

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 4, 2017

The upgrade has already been done.

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 4, 2017

Now you can point to the "index.php" file

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 4, 2017

@davidpsc
Copy link
Author

davidpsc commented Feb 4, 2017

I've executed the query and called index.php but the error persists - I don't have the plugins table.
[04-Feb-2017 21:21:09 Asia/Kuwait] Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'syspass2.plugins' doesn't exist

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 4, 2017

Ok, let me think about how to solve the 32bit integer limit issue.

@davidpsc
Copy link
Author

davidpsc commented Feb 4, 2017

Could that be the issue? I can try to use the 64bit PHP version if this helps

@nuxsmin
Copy link
Owner

nuxsmin commented Feb 4, 2017

Sure, but are you running on a 64bit OS?

@davidpsc
Copy link
Author

davidpsc commented Feb 4, 2017

Jup, Windows Server 2012 R2 Standard 64bit

@davidpsc
Copy link
Author

davidpsc commented Feb 19, 2017

Hi and sorry for the delay...

Today I installed PHP 7.0.16 64bit version and downloaded version 2.0.0.17021601 of sysPass.
Further steps:

  • removed contents of old sysPass test directory and put the contents of the new downloaded version in
  • put config.php into config directory from sysPass version 1.2.0.13
  • removed database copy and created a new one (also named "syspass2")
  • modified config.php: changed dbName to "syspass2"
  • called http://localhost/syspass_new/index.php and got error HTTP 500...

The PHP error log says the following:

[19-Feb-2017 12:25:41 Europe/Belgrade] Action: Actualizar Configuración -- Description: -- Details: Parámetro : account_count
Parámetro : account_link
Parámetro : checkupdates
Parámetro : checknotices
Parámetro : dbhost
Parámetro : dbname
Parámetro : dbpass
Parámetro : dbuser
Parámetro : debug
Parámetro : demo_enabled
Parámetro : globalsearch
Parámetro : installed
Parámetro : maintenance
Parámetro : passwordsalt
Parámetro : session_timeout
Parámetro : sitelang
Parámetro : version
Parámetro : config_hash
Parámetro : proxy_enabled
Parámetro : resultsascards
Parámetro : sitetheme
Parámetro : account_passtoimage
Parámetro : files_allowed_exts
Parámetro : files_allowed_size
Parámetro : files_enabled
Parámetro : ldap_base
Parámetro : ldap_bindpass
Parámetro : ldap_binduser
Parámetro : ldap_enabled
Parámetro : ldap_group
Parámetro : ldap_server
Parámetro : ldap_ads
Parámetro : ldap_defaultgroup
Parámetro : ldap_defaultprofile
Parámetro : log_enabled
Parámetro : mailenabled
Parámetro : mail_enabled
Parámetro : mailfrom
Parámetro : mail_from
Parámetro : mail_port
Parámetro : mail_requestsenabled
Parámetro : mail_authenabled
Parámetro : mail_security
Parámetro : mailserver
Parámetro : mail_server
Parámetro : wiki_enabled
Parámetro : wiki_filter
Parámetro : wiki_searchurl
Versión : 20017021601
[19-Feb-2017 12:25:41 Europe/Belgrade] Action: Actualización -- Description: Actualización de versión realizada. -- Details: Versión : 20017021601
Tipo : config
[19-Feb-2017 12:25:41 Europe/Belgrade] Action: Enviar Email -- Description: Correo enviado -- Details: CC : [email protected]
[19-Feb-2017 12:25:41 Europe/Belgrade] PHP Warning: setlocale() expects parameter 1 to be integer, string given in C:\path_to_syspass\syspass_new\inc\SP\Core\Language.class.php on line 158
[19-Feb-2017 12:25:41 Europe/Belgrade] PHP Warning: setlocale() expects parameter 1 to be integer, string given in C:\path_to_syspass\syspass_new\inc\SP\Core\Language.class.php on line 158
[19-Feb-2017 12:25:41 Europe/Belgrade] Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'syspass2.plugins' doesn't exist
[19-Feb-2017 12:25:41 Europe/Belgrade] #0 SP\Storage\DB->prepareQueryData() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:150]
#1 SP\Storage\DB->doQuery() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:104]
#2 SP\Storage\DB::getResults() called at [C:\path_to_syspass\syspass_new\inc\SP\Mgmt\Plugins\Plugin.class.php:199]
#3 SP\Mgmt\Plugins\Plugin->getByName() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Plugin\PluginDataStore.class.php:65]
#4 SP\Core\Plugin\PluginDataStore::load() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Plugin\PluginUtil.class.php:98]
#5 SP\Core\Plugin\PluginUtil::loadPlugin() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:742]
#6 SP\Core\Init::loadPlugins() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:175]
#7 SP\Core\Init::start() called at [C:\path_to_syspass\syspass_new\inc\Base.php:107]
#8 require(C:\path_to_syspass\syspass_new\inc\Base.php) called at [C:\path_to_syspass\syspass_new\index.php:31]

[19-Feb-2017 12:25:41 Europe/Belgrade] Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'log_level' in 'field list'
[19-Feb-2017 12:25:41 Europe/Belgrade] #0 SP\Storage\DB->prepareQueryData() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:150]
#1 SP\Storage\DB->doQuery() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:347]
#2 SP\Storage\DB::getQuery() called at [C:\path_to_syspass\syspass_new\inc\SP\Log\Log.class.php:165]
#3 SP\Log\Log->writeLog() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:300]
#4 SP\Storage\DB::logDBException() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:112]
#5 SP\Storage\DB::getResults() called at [C:\path_to_syspass\syspass_new\inc\SP\Mgmt\Plugins\Plugin.class.php:199]
#6 SP\Mgmt\Plugins\Plugin->getByName() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Plugin\PluginDataStore.class.php:65]
#7 SP\Core\Plugin\PluginDataStore::load() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Plugin\PluginUtil.class.php:98]
#8 SP\Core\Plugin\PluginUtil::loadPlugin() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:742]
#9 SP\Core\Init::loadPlugins() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:175]
#10 SP\Core\Init::start() called at [C:\path_to_syspass\syspass_new\inc\Base.php:107]
#11 require(C:\path_to_syspass\syspass_new\inc\Base.php) called at [C:\path_to_syspass\syspass_new\index.php:31]

[ blocks repeating until memory limit is reached... ]

In the database the filed "version" in the "config" table still says: 12013

If I run a script which just contains "echo PHP_INT_MAX;" it returns now 9223372036854775807.

What else is there that I could try?

@davidpsc
Copy link
Author

davidpsc commented Mar 3, 2017

Is there anything else I could try regarding the update problem?

@nuxsmin
Copy link
Owner

nuxsmin commented Mar 3, 2017

Sorry, for the delay...

Could you try out with the latest release?. There have been many improvements on the upgrading process, so it should go fine this time.

nuxsmin added a commit that referenced this issue Mar 5, 2017
* [MOD] Improved version control. Related #276
@davidpsc
Copy link
Author

So, today I tried the release 2.1.1 (latest release) of sysPass and got a blank page after calling http://localhost/syspass_new/index.php

I now have used PHP 7.0.16 64bit NTS to avoid the max integer issue but the upgrade still doesn't work properly it seems.

This is the content of the syspass.log file which is created in the config directory:

2017-03-10 15:38:07 - Action: Update Configuration -- Description: -- Details: Parameter : account_count
Parameter : account_link
Parameter : checkupdates
Parameter : checknotices
Parameter : dbhost
Parameter : dbname
Parameter : dbpass
Parameter : dbuser
Parameter : debug
Parameter : demo_enabled
Parameter : globalsearch
Parameter : installed
Parameter : maintenance
Parameter : passwordsalt
Parameter : session_timeout
Parameter : sitelang
Parameter : version
Parameter : config_hash
Parameter : proxy_enabled
Parameter : resultsascards
Parameter : sitetheme
Parameter : account_passtoimage
Parameter : files_allowed_exts
Parameter : files_allowed_size
Parameter : files_enabled
Parameter : ldap_base
Parameter : ldap_bindpass
Parameter : ldap_binduser
Parameter : ldap_enabled
Parameter : ldap_group
Parameter : ldap_server
Parameter : ldap_ads
Parameter : ldap_defaultgroup
Parameter : ldap_defaultprofile
Parameter : log_enabled
Parameter : mailenabled
Parameter : mail_enabled
Parameter : mailfrom
Parameter : mail_from
Parameter : mail_port
Parameter : mail_requestsenabled
Parameter : mail_authenabled
Parameter : mail_security
Parameter : mailserver
Parameter : mail_server
Parameter : wiki_enabled
Parameter : wiki_filter
Parameter : wiki_searchurl
Version : 21117030601
2017-03-10 15:38:07 - Action: Update -- Description: Version updating done. -- Details: Version : 21117030601
Type : config
2017-03-10 15:38:07 - Action: Send Email -- Description: Email sent -- Details: CC : [email protected]
2017-03-10 15:38:07 - Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'syspass.plugins' doesn't exist
2017-03-10 15:38:07 - #0 SP\Storage\DB->prepareQueryData() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:150]
#1 SP\Storage\DB->doQuery() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:105]
#2 SP\Storage\DB::getResults() called at [C:\path_to_syspass\syspass_new\inc\SP\Mgmt\Plugins\Plugin.class.php:199]
#3 SP\Mgmt\Plugins\Plugin->getByName() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Plugin\PluginDataStore.class.php:65]
#4 SP\Core\Plugin\PluginDataStore::load() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Plugin\PluginUtil.class.php:98]
#5 SP\Core\Plugin\PluginUtil::loadPlugin() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:720]
#6 SP\Core\Init::loadPlugins() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:181]
#7 SP\Core\Init::start() called at [C:\path_to_syspass\syspass_new\inc\Base.php:118]
#8 require(C:\path_to_syspass\syspass_new\inc\Base.php) called at [C:\path_to_syspass\syspass_new\index.php:31]

2017-03-10 15:38:07 - Error en la consulta
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'syspass.plugins' doesn't exist (0)
Caller 1: SP\Storage\DB\logDBException
Caller 2: SP\Storage\DB\getResults
Caller 3: SP\Mgmt\Plugins\Plugin\getByName
Caller 4: SP\Core\Plugin\PluginDataStore\load
Caller 5: SP\Core\Plugin\PluginUtil\loadPlugin
Caller 6: SP\Core\Init\loadPlugins
Caller 7: SP\Core\Init\start
Caller 8: \require
2017-03-10 15:38:07 - SQL : 'SELECT plugin_id, plugin_name, plugin_data, BIN(plugin_enabled) AS plugin_enabled FROM plugins WHERE plugin_name = ? LIMIT 1'
2017-03-10 15:38:07 - Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'log_level' in 'field list'
2017-03-10 15:38:07 - #0 SP\Storage\DB->prepareQueryData() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:150]
#1 SP\Storage\DB->doQuery() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:341]
#2 SP\Storage\DB::getQuery() called at [C:\path_to_syspass\syspass_new\inc\SP\Log\Log.class.php:195]
#3 SP\Log\Log->writeLog() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:296]
#4 SP\Storage\DB::logDBException() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:113]
#5 SP\Storage\DB::getResults() called at [C:\path_to_syspass\syspass_new\inc\SP\Mgmt\Plugins\Plugin.class.php:199]
#6 SP\Mgmt\Plugins\Plugin->getByName() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Plugin\PluginDataStore.class.php:65]
#7 SP\Core\Plugin\PluginDataStore::load() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Plugin\PluginUtil.class.php:98]
#8 SP\Core\Plugin\PluginUtil::loadPlugin() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:720]
#9 SP\Core\Init::loadPlugins() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:181]
#10 SP\Core\Init::start() called at [C:\path_to_syspass\syspass_new\inc\Base.php:118]
#11 require(C:\path_to_syspass\syspass_new\inc\Base.php) called at [C:\path_to_syspass\syspass_new\index.php:31]

2017-03-10 15:38:07 - Error en la consulta
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'log_level' in 'field list' (0)
Caller 1: SP\Storage\DB\logDBException
Caller 2: SP\Storage\DB\getQuery
Caller 3: SP\Log\Log\writeLog
Caller 4: SP\Storage\DB\logDBException
Caller 5: SP\Storage\DB\getResults
Caller 6: SP\Mgmt\Plugins\Plugin\getByName
Caller 7: SP\Core\Plugin\PluginDataStore\load
Caller 8: SP\Core\Plugin\PluginUtil\loadPlugin
Caller 9: SP\Core\Init\loadPlugins
Caller 10: SP\Core\Init\start
Caller 11: \require
2017-03-10 15:38:07 - SQL : 'INSERT INTO log SET \n log_date = UNIX_TIMESTAMP(),\n log_login = ?,\n log_userId = ?,\n log_ipAddress = ?,\n log_action = ?,\n log_level = ?,\n log_description = ?'
2017-03-10 15:38:07 - Fehler bei der Abfrage
Caller 1: SP\Log\Log\writeLog
Caller 2: SP\Storage\DB\logDBException
Caller 3: SP\Storage\DB\getResults
Caller 4: SP\Mgmt\Plugins\Plugin\getByName
Caller 5: SP\Core\Plugin\PluginDataStore\load
Caller 6: SP\Core\Plugin\PluginUtil\loadPlugin
Caller 7: SP\Core\Init\loadPlugins
Caller 8: SP\Core\Init\start
Caller 9: \require
2017-03-10 15:38:07 - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'log_level' in 'field list'
2017-03-10 15:38:07 - Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'syspass.plugins' doesn't exist
2017-03-10 15:38:07 - #0 SP\Storage\DB->prepareQueryData() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:150]
#1 SP\Storage\DB->doQuery() called at [C:\path_to_syspass\syspass_new\inc\SP\Storage\DB.class.php:341]
#2 SP\Storage\DB::getQuery() called at [C:\path_to_syspass\syspass_new\inc\SP\Mgmt\Plugins\Plugin.class.php:61]
#3 SP\Mgmt\Plugins\Plugin->add() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Plugin\PluginDataStore.class.php:72]
#4 SP\Core\Plugin\PluginDataStore::load() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Plugin\PluginUtil.class.php:98]
#5 SP\Core\Plugin\PluginUtil::loadPlugin() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:720]
#6 SP\Core\Init::loadPlugins() called at [C:\path_to_syspass\syspass_new\inc\SP\Core\Init.class.php:181]
#7 SP\Core\Init::start() called at [C:\path_to_syspass\syspass_new\inc\Base.php:118]
#8 require(C:\path_to_syspass\syspass_new\inc\Base.php) called at [C:\path_to_syspass\syspass_new\index.php:31]

2017-03-10 15:38:07 - Error en la consulta
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'syspass.plugins' doesn't exist (0)
Caller 1: SP\Storage\DB\logDBException
Caller 2: SP\Storage\DB\getQuery
Caller 3: SP\Mgmt\Plugins\Plugin\add
Caller 4: SP\Core\Plugin\PluginDataStore\load
Caller 5: SP\Core\Plugin\PluginUtil\loadPlugin
Caller 6: SP\Core\Init\loadPlugins
Caller 7: SP\Core\Init\start
Caller 8: \require
2017-03-10 15:38:07 - SQL : 'INSERT INTO plugins SET plugin_name = ?, plugin_data = ?, plugin_enabled = ?'
2017-03-10 15:38:07 - Action: add -- Description: Fehler bei der Abfrage
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'syspass.plugins' doesn't exist (0) -- Details: SQL : 'INSERT INTO plugins SET plugin_name = ?, plugin_data = ?, plugin_enabled = ?'
2017-03-10 15:38:07 - Action: loadPlugin -- Description: No es posible cargar el plugin "Authenticator" -- Details:
2017-03-10 15:38:08 - Unmöglich die "C:\path_to_syspass\syspass_new\inc\SP\inc\themes\material-blue\views\main\header.inc" Vorlage zu ermitteln: main\header.inc
2017-03-10 15:38:08 - Unmöglich die "C:\path_to_syspass\syspass_new\inc\SP\inc\themes\material-blue\views\main\body-start.inc" Vorlage zu ermitteln: main\body-start.inc
2017-03-10 15:38:08 - Unmöglich die "C:\path_to_syspass\syspass_new\inc\SP\inc\themes\material-blue\views\main\login.inc" Vorlage zu ermitteln: main\login.inc
2017-03-10 15:38:08 - Unmöglich die "C:\path_to_syspass\syspass_new\inc\SP\inc\themes\material-blue\views\main\body-footer.inc" Vorlage zu ermitteln: main\body-footer.inc
2017-03-10 15:38:08 - Unmöglich die "C:\path_to_syspass\syspass_new\inc\SP\inc\themes\material-blue\views\main\body-end.inc" Vorlage zu ermitteln: main\body-end.inc
2017-03-10 15:38:08 - Vorlage enthält keine Dateien
Caller 1: SP\Controller\ControllerBase\view
Caller 2: SP\Controller\MainController\getLogin
Caller 3: SP\Core\Init\goLogin
Caller 4: SP\Core\Init\start
Caller 5: \require

Everything else (the procedure how I did the update) is the same as mentioned on 31 Jan in this ticket.

As I see there are currently a few issues:

  • The database "plugins" is not created
  • The new field "log_level" is not added in the "log" table
  • The template files are not found because the path is wrong

Before you ask: the DB user for syspass has all rights granted on the syspass database - so there should be no issue with creating new tables and modifying existing ones.

Any idea what still the issue could be? Is there another way to use my existing data with the new sysPass version (export/import)?

@nuxsmin
Copy link
Owner

nuxsmin commented Mar 10, 2017

With the latest release the version number issue should be fixed, because the upgrading process checks whether the OS supports big integers or not.

You can perform a normal upgrade, so no special script is needed.

@davidpsc
Copy link
Author

I did a normal upgrade - I didn't use the script. I just said that I now use PHP 7.0.16, initially to avoid the max integer problem but a PHP update is always good so I kept using this version.

I downloaded the latest release, expanded the contents in a new directory, modified the permissions, copied the old config.php, called http://localhost/syspass_new/index.php and got a blank page and the log file + config.xml created in the config directory. This is the normal, correct upgrading process isn't it?

@nuxsmin
Copy link
Owner

nuxsmin commented Mar 10, 2017

You're right, and it should display the upgrade page. One last question, is there any error in the webserver log?. You could also enable the debug mode in 'inc/Base.php' file.

Regards

@davidpsc
Copy link
Author

I've enabled debug mode now in 'inc/Base.php' but I don't see errors in the PHP error log (except the warnings that are written everytime I use sysPass (old version), something about wrong locale), it just tells me where the log file of sysPass was created.

With debug mode I see the following in the browser:

Notice: Use of undefined constant LC_MESSAGES - assumed 'LC_MESSAGES' in C:\path_to_syspass\syspass_new\inc\SP\Core\Language.class.php on line 161

Warning: setlocale() expects parameter 1 to be integer, string given in C:\path_to_syspass\syspass_new\inc\SP\Core\Language.class.php on line 161

Deprecated: Non-static method SP\Log\Email::getEmailFooter() should not be called statically in C:\path_to_syspass\syspass_new\inc\SP\Log\Email.class.php on line 73

Notice: Use of undefined constant LC_MESSAGES - assumed 'LC_MESSAGES' in C:\path_to_syspass\syspass_new\inc\SP\Core\Language.class.php on line 161

Warning: setlocale() expects parameter 1 to be integer, string given in C:\path_to_syspass\syspass_new\inc\SP\Core\Language.class.php on line 161

Notice: Use of undefined constant LC_MESSAGES - assumed 'LC_MESSAGES' in C:\path_to_syspass\syspass_new\inc\SP\Core\Language.class.php on line 161

Warning: setlocale() expects parameter 1 to be integer, string given in C:\path_to_syspass\syspass_new\inc\SP\Core\Language.class.php on line 161

The message PHP Warning: setlocale(): Invalid locale category name LC_MESSAGES, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME in C:\path_to_old_syspass_version\syspass\inc\Language.class.php on line 136 is always written with the old sysPass version but it didn't affect any functionality in the past.

Just to note: there is nothing changed in the database. I had a look at the config table and the version was not changed after calling index.php, also there is no new entry in the log table.

@nuxsmin
Copy link
Owner

nuxsmin commented Mar 10, 2017

Just for curiosity, what is the version number saved in the sysPass DB?

@davidpsc
Copy link
Author

12013

@nuxsmin
Copy link
Owner

nuxsmin commented Mar 10, 2017

Ummm, the wrong path could be the issue, because a blank page should never be displayed.

There is no other way to upgrade, because the database tables need to be updated for some changes, and your current data won't fit the required constraints.

Let me do some tests on a Windows environment like yours, it would be the only way to get it. I'll be back soon.

@davidpsc
Copy link
Author

Hi, how is the setup going? Could you test the upgrade procedure already?

@nuxsmin
Copy link
Owner

nuxsmin commented May 3, 2017

Hi,sorry for the late response, I missed your issue among others...

Unfortunately, I haven't tested it yet (so busy during this time). Let me some time to get it.

@davidpsc
Copy link
Author

davidpsc commented Jul 3, 2017

Hi, another few months passed now - have you found some time to test it yet?

@nuxsmin
Copy link
Owner

nuxsmin commented Jul 3, 2017

Hi,

I were installing an environment like yours, but some issues deploying the PHP modules made me give it up for a while, because I was a bit busy in that time (working & studying), so I'll give a try shortly.

Regards

@davidpsc
Copy link
Author

Hi, we're still waiting for a solution and would really like to upgrade to the latest sysPass version...

nuxsmin added a commit that referenced this issue Jul 31, 2017
@nuxsmin
Copy link
Owner

nuxsmin commented Jul 31, 2017

Hi, finally I've just got it working. The latest commit should fix the issue.

Please be aware the PHP config needed to get it:

captura_253
captura_254

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

No branches or pull requests

2 participants