These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

phpBB 3.2 EVE SSO / ESI extension [beta]

Author
Snitch Ashor
Republic Military School
Minmatar Republic
#21 - 2017-03-19 19:51:15 UTC  |  Edited by: Snitch Ashor
Felicity Stihl wrote:

To anwser my own post:
Found two issues,
1. had to explictly set the php variable "register_globals" to off
2. had to install php-curl (which is not mentioned as a requirement anywhere)

Seems to work now, except for the fact that when I log in, I get a error complaning about "INSECURE_REDIRECT".. (things still work if I refresh)


Thanks a lot.

Indeed php5.5+ with curl is a requirement for the API client library, added that to the opening post and readme.
I'm abit confused about the other part since register_globals = OFF should be default since php 4.x and phpBB itself should complain if its on...


The INSECURE_REDIRECT, is that a phpBB error message and when does it appear?

I uploaded a version 1.0.1 (Download Link in the opening post) which should fix the problem about databases not being created on install.

@Felicity Stihl could you try this commit that should fix your insecure redirect warnings.
Felicity Stihl
Bittervet's retirement home
#22 - 2017-03-20 18:18:42 UTC  |  Edited by: Felicity Stihl
Snitch Ashor wrote:
Felicity Stihl wrote:

To anwser my own post:
Found two issues,
1. had to explictly set the php variable "register_globals" to off
2. had to install php-curl (which is not mentioned as a requirement anywhere)

Seems to work now, except for the fact that when I log in, I get a error complaning about "INSECURE_REDIRECT".. (things still work if I refresh)


Thanks a lot.

Indeed php5.5+ with curl is a requirement for the API client library, added that to the opening post and readme.
I'm abit confused about the other part since register_globals = OFF should be default since php 4.x and phpBB itself should complain if its on...


The INSECURE_REDIRECT, is that a phpBB error message and when does it appear?

I uploaded a version 1.0.1 (Download Link in the opening post) which should fix the problem about databases not being created on install.

@Felicity Stihl could you try this commit that should fix your insecure redirect warnings.


It's a PHPbb error, and it occures right after you select your character on ccp:s site and hits submit.

Your newest commit seemes to have fixed that issue.

I did however notice an odd thing with the original build, I have phpbb's timeouts set to several days, but the user session will time out within less than an hour, and require relogging, is that by design, and/or can I change the timeouts somewhere , or is this something that the new commit may have fixed ? (Just applied it, so I'll know within a few hours)
EDIT: Seems like the timeout issues are fixed, my sessions even persisted between reboots...
EDIT2: Scratch that, times out after an hour..
Snitch Ashor
Republic Military School
Minmatar Republic
#23 - 2017-03-20 23:04:22 UTC
Yeah I know about the persistent login problem, its on the todo list. Right now I try to use phpbbs builtin remember me function, but it still fails most of the time, need to do some diggin there.
Milo Caman
Anshar Incorporated
#24 - 2017-03-21 16:42:34 UTC  |  Edited by: Milo Caman
Run into a new issue: I'm trying to enable another extension (specifically the phpbb google analytics package) and when I have Auth EVE SSO enabled, my session is cleared and I'm booted back to the forum index with the following message:

Access to the Administration Control Panel is not allowed as you do not have administrative permissions.


I can happily log back in and use the rest of the ACP after this. The issue only seems to occur on the 'Customise' tab when enabling new ones. Any ideas?

EDIT: It also appears to do the same when I hit 'Details' on each extension.

EDIT 2: Bizarrely I was able to enable extensions when I switched browsers. This might not actually be related to the SSO extension? Will investigate further.

EDIT 3: Definitely not related to the plugin, my bad!
Paic Aishai
Les mecs pas chiants
#25 - 2017-03-22 22:32:05 UTC  |  Edited by: Paic Aishai
Small issue here too : it seems that when the EveSSO auth method is selected, some part of the board (home page, like "who is online" , statistics ; few strings in UCP/ACP ; ...) are not in the default board language.
When I switched back to Db auth method everything was ok.

I also tried to reinstall the language but it did not change anything. Can it may come from the extension ?
Snitch Ashor
Republic Military School
Minmatar Republic
#26 - 2017-03-23 13:10:18 UTC
Paic Aishai wrote:
Small issue here too : it seems that when the EveSSO auth method is selected, some part of the board (home page, like "who is online" , statistics ; few strings in UCP/ACP ; ...) are not in the default board language.
When I switched back to Db auth method everything was ok.

I also tried to reinstall the language but it did not change anything. Can it may come from the extension ?


Definetly a bug of the extension thanks, should be fixed in v1.0.2.

Btw. the mod is not yet translated but programmed in a way so it should be easy to translate. If someone is in the mood to do a translation, let me know, its only about 30 lines of text, mostly related to the ACP. In phpBB, mods will always fallback to english if the right translation is not available, but this only works if english is not deinstalled.

Bests,
Snitch
Snitch Ashor
Republic Military School
Minmatar Republic
#27 - 2017-03-23 13:15:45 UTC
Felicity Stihl wrote:
I did however notice an odd thing with the original build, I have phpbb's timeouts set to several days, but the user session will time out within less than an hour, and require relogging, is that by design, and/or can I change the timeouts somewhere , or is this something that the new commit may have fixed ? (Just applied it, so I'll know within a few hours)
EDIT: Seems like the timeout issues are fixed, my sessions even persisted between reboots...
EDIT2: Scratch that, times out after an hour..


I tried a lot of things regarding this but I'm still not entirely sure why logouts sometimes occur after an hour and most of the time (at least for me) not in days. I posted some more details here:

https://bitbucket.org/snitchashor/php-ext-authevesso/issues/1/user-sessions-timing-out-inconsistently
Paic Aishai
Les mecs pas chiants
#28 - 2017-03-23 18:09:25 UTC
Snitch Ashor wrote:
Paic Aishai wrote:
Small issue here too : it seems that when the EveSSO auth method is selected, some part of the board (home page, like "who is online" , statistics ; few strings in UCP/ACP ; ...) are not in the default board language.
When I switched back to Db auth method everything was ok.

I also tried to reinstall the language but it did not change anything. Can it may come from the extension ?


Definetly a bug of the extension thanks, should be fixed in v1.0.2.

Btw. the mod is not yet translated but programmed in a way so it should be easy to translate. If someone is in the mood to do a translation, let me know, its only about 30 lines of text, mostly related to the ACP. In phpBB, mods will always fallback to english if the right translation is not available, but this only works if english is not deinstalled.

Bests,
Snitch


Updated to v1.0.2a, all good. Thanks for the quick fix man !
Snitch Ashor
Republic Military School
Minmatar Republic
#29 - 2017-03-24 13:41:40 UTC  |  Edited by: Snitch Ashor
Paic Aishai wrote:

Updated to v1.0.2a, all good. Thanks for the quick fix man !


Thats also what I thought but 1.0.2 breaks a part of the ACP, fixed here: 1.0.3a In this one language and ACP should be working.

Also anyone running 1.0.0 and having issues with logouts occuring very often, please update and let me know if it got better.
Pohwaran
SMTOWN.
The Jove Empire
#30 - 2017-03-24 21:12:44 UTC  |  Edited by: Pohwaran
Hey,

I installed everything like said, had a few problems with the callback url but got that sorted. Now I'm stuck at "Error: Invalid auth state." The DB is set to evesso, I made sure of that. Any help would be appreciated.
Thanks.

Edit - I fixed it turns out it was something to do with the way the database was set up. I was using MySQL with the extension, when my web host didn't use the extenion, change the database type, reinstalled the forum + the EVE SSO and it works like a charm
Snitch Ashor
Republic Military School
Minmatar Republic
#31 - 2017-03-25 15:45:45 UTC
Pohwaran wrote:
Hey,

I installed everything like said, had a few problems with the callback url but got that sorted. Now I'm stuck at "Error: Invalid auth state." The DB is set to evesso, I made sure of that. Any help would be appreciated.
Thanks.

Edit - I fixed it turns out it was something to do with the way the database was set up. I was using MySQL with the extension, when my web host didn't use the extenion, change the database type, reinstalled the forum + the EVE SSO and it works like a charm


Glad it works now. Could you tell me what you changed to get around the database issue?
Pohwaran
SMTOWN.
The Jove Empire
#32 - 2017-03-25 19:09:17 UTC
Snitch Ashor wrote:
Pohwaran wrote:
Hey,

I installed everything like said, had a few problems with the callback url but got that sorted. Now I'm stuck at "Error: Invalid auth state." The DB is set to evesso, I made sure of that. Any help would be appreciated.
Thanks.

Edit - I fixed it turns out it was something to do with the way the database was set up. I was using MySQL with the extension, when my web host didn't use the extenion, change the database type, reinstalled the forum + the EVE SSO and it works like a charm


Glad it works now. Could you tell me what you changed to get around the database issue?


It goes back all the way back to the core installation of the forum itself, on the second page after setting up an admin user it asks for the database, I was installing the forum with MySQL with MySQLi Extension as the database type, using this type of database the Evesso would spit the error of invalid auth state. I then went and reinstalled the whole forum under the normal MySQL database, installed the plugin again and it worked like it should, and has been working fine since I fixed the database type.

Overall it's a great plugin, can't wait to see what else you add to it.
Snitch Ashor
Republic Military School
Minmatar Republic
#33 - 2017-03-26 20:43:00 UTC
Pohwaran wrote:

It goes back all the way back to the core installation of the forum itself, on the second page after setting up an admin user it asks for the database, I was installing the forum with MySQL with MySQLi Extension as the database type, using this type of database the Evesso would spit the error of invalid auth state. I then went and reinstalled the whole forum under the normal MySQL database, installed the plugin again and it worked like it should, and has been working fine since I fixed the database type.

Overall it's a great plugin, can't wait to see what else you add to it.


I have to admit this should not be the case and Mysqli should be used. I will try to reproduce that error. As for features, somebody already requested to see corp and alliance next to peoples names, I think thats a nice gimmick.
Snitch Ashor
Republic Military School
Minmatar Republic
#34 - 2017-03-30 10:07:48 UTC
Updated version (1.0.6a). Lots of changes and a russian translation (thanks to Jintaro Keo). Disable the mod during the update and purge cache afterwards. I also added the general update procedure to the opening post.
Milo Caman
Anshar Incorporated
#35 - 2017-03-31 10:04:19 UTC  |  Edited by: Milo Caman
When attempting to update, I'm getting the following message when trying to re-enable the extension:


General Error
SQL ERROR [ mysqli ]

Duplicate column name 'user_refreshToken' [1060]

SQL

ALTER TABLE `phpbb_users` ADD COLUMN `user_refreshToken` varchar(255) NULL

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 999
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 1061
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 1269
CALL: phpbb\db\tools\tools->_sql_run_sql()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 549
CALL: phpbb\db\tools\tools->sql_column_add()

FILE: (not given by php)
LINE: (not given by php)
CALL: phpbb\db\tools\tools->perform_schema_changes()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 711
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 658
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 400
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 288
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->update_do()

FILE: [ROOT]/phpbb/extension/base.php
LINE: 78
CALL: phpbb\db\migrator->update()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 185
CALL: phpbb\extension\base->enable_step()

FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 197
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: acp_extensions->main()

FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()


Any ideas?


EDIT:

Attempts to install the latest version on a completely fresh install of phpbb yields the following when trying to enable the extension:

General Error
SQL ERROR [ mysqli ]

All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead [1171]

SQL

CREATE TABLE phpbb_authevesso_membership ( characterID bigint(20) NULL, corporationID bigint(20) NULL, corporationName varchar(100) NULL, allianceID bigint(20) NULL, allianceName varchar(100) NULL, PRIMARY KEY (characterID) ) CHARACTER SET `utf8` COLLATE `utf8_bin`;

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 999
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 1061
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 444
CALL: phpbb\db\tools\tools->_sql_run_sql()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 489
CALL: phpbb\db\tools\tools->sql_create_table()

FILE: (not given by php)
LINE: (not given by php)
CALL: phpbb\db\tools\tools->perform_schema_changes()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 711
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 658
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 400
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 288
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->update_do()

FILE: [ROOT]/phpbb/extension/base.php
LINE: 78
CALL: phpbb\db\migrator->update()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 185
CALL: phpbb\extension\base->enable_step()

FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 197
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: acp_extensions->main()

FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()
Snitch Ashor
Republic Military School
Minmatar Republic
#36 - 2017-03-31 19:24:01 UTC
Milo Caman wrote:
When attempting to update, I'm getting the following message when trying to re-enable the extension:


General Error
SQL ERROR [ mysqli ]

Duplicate column name 'user_refreshToken' [1060]

SQL

ALTER TABLE `phpbb_users` ADD COLUMN `user_refreshToken` varchar(255) NULL

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 999
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 1061
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 1269
CALL: phpbb\db\tools\tools->_sql_run_sql()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 549
CALL: phpbb\db\tools\tools->sql_column_add()

FILE: (not given by php)
LINE: (not given by php)
CALL: phpbb\db\tools\tools->perform_schema_changes()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 711
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 658
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 400
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 288
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->update_do()

FILE: [ROOT]/phpbb/extension/base.php
LINE: 78
CALL: phpbb\db\migrator->update()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 185
CALL: phpbb\extension\base->enable_step()

FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 197
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: acp_extensions->main()

FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()


Any ideas?


EDIT:

Attempts to install the latest version on a completely fresh install of phpbb yields the following when trying to enable the extension:

General Error
SQL ERROR [ mysqli ]

All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead [1171]

SQL

CREATE TABLE phpbb_authevesso_membership ( characterID bigint(20) NULL, corporationID bigint(20) NULL, corporationName varchar(100) NULL, allianceID bigint(20) NULL, allianceName varchar(100) NULL, PRIMARY KEY (characterID) ) CHARACTER SET `utf8` COLLATE `utf8_bin`;

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 999
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 1061
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 444
CALL: phpbb\db\tools\tools->_sql_run_sql()

FILE: [ROOT]/phpbb/db/tools/tools.php
LINE: 489
CALL: phpbb\db\tools\tools->sql_create_table()

FILE: (not given by php)
LINE: (not given by php)
CALL: phpbb\db\tools\tools->perform_schema_changes()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 711
CALL: call_user_func_array()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 658
CALL: phpbb\db\migrator->run_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 400
CALL: phpbb\db\migrator->process_data_step()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 288
CALL: phpbb\db\migrator->try_apply()

FILE: [ROOT]/phpbb/db/migrator.php
LINE: 241
CALL: phpbb\db\migrator->update_do()

FILE: [ROOT]/phpbb/extension/base.php
LINE: 78
CALL: phpbb\db\migrator->update()

FILE: [ROOT]/phpbb/extension/manager.php
LINE: 185
CALL: phpbb\extension\base->enable_step()

FILE: [ROOT]/includes/acp/acp_extensions.php
LINE: 197
CALL: phpbb\extension\manager->enable_step()

FILE: [ROOT]/includes/functions_module.php
LINE: 676
CALL: acp_extensions->main()

FILE: [ROOT]/adm/index.php
LINE: 82
CALL: p_master->load_active()


Should be fixed in this one: https://bitbucket.org/snitchashor/php-ext-authevesso/get/42c27894557b.zip

Any chance you can tell me your mysql version?
Milo Caman
Anshar Incorporated
#37 - 2017-03-31 19:48:12 UTC  |  Edited by: Milo Caman
It's now throwing the error about the duplicate column again.

I'm running on mysql Ver 14.14 Distrib 5.7.17, for Linux (x86_64). Hope this helps?

EDIT: Purged the cache and it's now throwing this at me:


SQL ERROR [ mysqli ]

All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead [1171]

SQL

CREATE TABLE phpbb_authevesso_membership ( characterID bigint(20) NULL, corporationID bigint(20) NULL, corporationName varchar(100) NULL, allianceID bigint(20) NULL, allianceName varchar(100) NULL, PRIMARY KEY (characterID) ) CHARACTER SET `utf8` COLLATE `utf8_bin`;


Looks like it might just be tripping up on the next line down in version_104.php?
Snitch Ashor
Republic Military School
Minmatar Republic
#38 - 2017-03-31 20:02:29 UTC
Milo Caman wrote:
It's now throwing the error about the duplicate column again.

I'm running on mysql Ver 14.14 Distrib 5.7.17, for Linux (x86_64). Hope this helps?


Can you delete the columns? I think i got the migrations right now, but with previous versions this might be an issue. Also clearing the extensions data should remove the columns
Milo Caman
Anshar Incorporated
#39 - 2017-03-31 20:08:12 UTC
Attempting to delete the data (which resulted in a timeout) got me back to the 'duplicate column name' error. Going to try restoring a backup and going from there.
Snitch Ashor
Republic Military School
Minmatar Republic
#40 - 2017-03-31 20:14:03 UTC  |  Edited by: Snitch Ashor
https://bitbucket.org/snitchashor/php-ext-authevesso/get/44c15b1fc830.zip should fix it...

This fix should only be required for mysql >= 5.6 for all others v1.0.6a should be fine