Giter VIP home page Giter VIP logo

Comments (23)

nilsteampassnet avatar nilsteampassnet commented on July 19, 2024

You normally not have to do any custom script.

If it stops at step 2 that means that an error occurs in the database connection.

Have you checked this issue => #6

If you took the last zip from "master", you should have some warnings in step 2 if it fails? strange that you don't have nothing. You are using 2.1.2 ?

from teampass.

vx-github avatar vx-github commented on July 19, 2024

Ooops ... I created a test.php with some code (like here: http://www.tizag.com/mysqlTutorial/mysqlconnection.php) and I discovered I forgot to install the PHP MySQL library ... PEBKAC!

Great! Fixed that, but I am still at step 2, a error occurs on LAUNCH: Table misc do not exists!

Is it even possible to upgrade from cPassMan 1.82 ?

About your question: "You are using 2.1.2 ?"
I do not know, what does "master branch" mean? Is it like 'head' in CVS?

from teampass.

nilsteampassnet avatar nilsteampassnet commented on July 19, 2024

Rooh yes, this is a terrible mistake. I forgot to take into consideration 1.X upgrade.

So I've committed v2.1.3 that corrects that issue.
Please just download file /install/upgrade_ajax.php and relaunch upgrade

from teampass.

vx-github avatar vx-github commented on July 19, 2024

Thanks for your quick response!

I tried the new version op upgrade_ajax.php and it gets me to step 4. There I get the error: An error appears when inserting datas! and there is an red exclamation mark at the end of "Misc table will be populated with new values".

Forgot something?

from teampass.

nilsteampassnet avatar nilsteampassnet commented on July 19, 2024

Hum if this means that the script couldn't insert the data in this table.
It is really strange because the script first check if the data to be inserted exists. If not then it inserts the value and if yes, it updates it.
THe error you get means that the script didn't found the value but an error occured when trying to insert it ... strange.

Only one possibility, the table has a bad structure.
Can you just extract the structure of the table using phpmyadmin or similar?

Thanks

from teampass.

vx-github avatar vx-github commented on July 19, 2024

Yet another PEBKAC ... the table names in the MySQL dump I imported contained a prefix. I did not supply a prefix in the settings.php or in the upgrade form... my bad. Solved this by a search and replace in the MySQL dump.

After that, the upgrade went well, but when I log into TeamPass as the admin user, I get the message: Maintenance mode is activated. Users currently can not access TeamPass.

I searched a little bit, but do not know what causes the problem.

from teampass.

nilsteampassnet avatar nilsteampassnet commented on July 19, 2024

Please check in table Users that your admin account is set as admin

from teampass.

vx-github avatar vx-github commented on July 19, 2024

This is right, isn't it?

mysql> select login,admin from users where login='admin';
+-------+-------+                                        
| login | admin |                                        
+-------+-------+                                        
| admin |     1 |                                        
+-------+-------+                                        
1 row in set (0.00 sec)                                  

from teampass.

vx-github avatar vx-github commented on July 19, 2024

Little kick

I see more issues coming in, I guess you are busy. Still I hope you can give me some pointers to get on with this.

I can do some research, but you have to give me some keywords / pointers where to look for in the code. I don't have enough time to read all of the code.

from teampass.

vx-github avatar vx-github commented on July 19, 2024

Nils: please reply

from teampass.

nilsteampassnet avatar nilsteampassnet commented on July 19, 2024

Sorry ... I forgot to take a look to that topic.

So you still have this message even when using your admin account.

THis is really strange, this should only occurs if user is not admin
=> if ( isset($_SESSION['user_admin']) && $_SESSION['user_admin'] != 1 ){

Nevertheless please try to disable maintenance mode directly from DB.
Open table _misc and seach attribute "maintenance_mode". Put value to 0.

And retry.

If ok, I'll ask you some complementary tests. If nok, then we'll try something else.

from teampass.

vx-github avatar vx-github commented on July 19, 2024

For your information:

mysql> select * from misc where intitule="maintenance_mode";
+-------+------------------+--------+
| type  | intitule         | valeur |
+-------+------------------+--------+
| admin | maintenance_mode | 1      |
+-------+------------------+--------+
1 row in set (0.00 sec)

mysql> update misc set valeur='0' where intitule='maintenance_mode';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

It didn't help. The only difference is that the message "Maintenance mode is activated. Users currently can not access TeamPass." has gone away.

I'm ready to test some more.

from teampass.

vx-github avatar vx-github commented on July 19, 2024

I did some little research:

I compared the html source when I requested ./index.php?page=items with the source php files. It seems like home.php is always loaded.

The following tests get a 'false' in index.php:

line 364:
if (isset($_SESSION['validite_pw']) && $_SESSION['validite_pw'] == true && !empty($_GET['page'])) {

line 392:
else if (empty($_SESSION['user_id']) && isset($_GET['action']) && $_GET['action'] == "password_recovery") {

line 411:
else if (empty($_SESSION['user_id'])) {

And finally, I get home.php:

line 482:
}else {
//PAGE BY DEFAULT
include("home.php");
}

And this test always gets a 'true' in home.php:

line 29:
if ( empty($_SESSION['last_pw_change']) || $_SESSION['validite_pw'] == false ){

Got any clue what is going wrong here?

from teampass.

nilsteampassnet avatar nilsteampassnet commented on July 19, 2024

Can you try to delete all files, upload 2.1.3 and restart update.

from teampass.

vx-github avatar vx-github commented on July 19, 2024

I downloaded branch 2.1.3, deleted all files, placed 2.1.3 files and fired up the upgrade process -> upgrade went fine, but after login with "admin" I get the same results :(

Are values used in the test in my previous comment stored in the database? If yes, I can check them for wrong values ...

from teampass.

vx-github avatar vx-github commented on July 19, 2024

I did some more research.

I inserted an echo $_SESSION['validite_pw'] before line 363 and discovered that the var was empty (should it contain a value?). When I declared $_SESSION['validite_pw'] = true, most pages work. The items page show the folders but also a indeterminate progress bar that keeps 'loading'. A new problem I guess...

Any clue what could be the problem with $_SESSION['validite_pw'] ?

from teampass.

vx-github avatar vx-github commented on July 19, 2024

I forgot to mention: updates where done in index.php branch 2.1.3.

from teampass.

nilsteampassnet avatar nilsteampassnet commented on July 19, 2024

$_SESSION['validite_pw'] is only a constant permiting to identify if the user's session is not over.
If yes, then disconnect the user.
It will only get a value when user get connected.

I think more to a kind of error during the "identification of the user".
Do you use LDAP?

In file main.queries.php, line => IdentifyUserRights($data['groupes_visibles'],$_SESSION['groupes_interdits'],$data['admin'],$data['fonction_id'],false);

Can you do an echo of the several passed variables?

from teampass.

vx-github avatar vx-github commented on July 19, 2024

I don't use LDAP.

I will do the requested echo in the next week.

from teampass.

vx-github avatar vx-github commented on July 19, 2024

Please some hints what is the best location to insert the echo's. The string in main.queries.php you refer to is in the middle of a case statement where some of the vars are filled also. An echo before or after the string you mentioned results in the fact that I can't login anymore with any user.

Can you prefab main.queries.php (or any other file) with the echo's so I can replace it and test it?

from teampass.

nilsteampassnet avatar nilsteampassnet commented on July 19, 2024

Just before
IdentifyUserRights($data['groupes_visibles'],$_SESSION['groupes_interdits'],$data['admin'],$data['fonction_id'],false);

add
echo "1 => ".$data['groupes_visibles'];
echo " - 2 => ".$_SESSION['groupes_interdits'];
echo " - 3 => ".$data['admin'];
echo " - 4 => ".$data['fonction_id'];

from teampass.

vx-github avatar vx-github commented on July 19, 2024

Ok, will try. I tried something like it before, that was no success.

from teampass.

vx-github avatar vx-github commented on July 19, 2024

Sorry I've been busy and will be busy for a while. I will follow up ASAP!

from teampass.

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.