Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Tom S. Posted November 21, 2018 Posted November 21, 2018 My IPS suite runs on app.mydomain.com I have a front site that runs on mydomain.com I'm trying to use SSO to validate if the user who is on mydomain.com is logged into IPS (app.mydomain.com). I'm using this code: /* Require the init.php file from the Community Suite root directory */ require '/path/to/suite/init.php'; /* Initiate the session to verify who this user is */ \IPS\Session\Front::i(); print_r(\IPS\Member::loggedIn()); But the print_r only shows stdClass Object ( [timezone] => Europe/London ) The front site has access to the IPS cookies as I am able to run this code echo $_COOKIE['ips4_IPSSessionFront']; And it displays the value. Also, I have checked and I am logged in when testing this. Any ideas or suggestions why `\IPS\Member::loggedIn()` is not properly getting all the data?
Tom S. Posted November 21, 2018 Author Posted November 21, 2018 An additional thing that may be relevant. When I use the ips4.php on mydomain.com I get the following warnings: Quote MySQL Requirements MySQL connection could not be established to perform version check. Make sure your MySQL Server version is 5.0.3 or above (5.6.0 or above recommended). Quote Additional Requirements You do not have ionCube Loader or Zend Guard Loader available. This is required if you will be using IP.Nexus. If you are planning to use IP.Nexus, you should contact your hosting provider or system administrator to ask for one of these (it doesn't matter which) to be installed. However, MySQL is installed, and I am able to manually connect to it from mydomain.com
Tom S. Posted November 21, 2018 Author Posted November 21, 2018 Wow, well this is very odd. The PHP version of mydomain.com was 7.2. I changed it to 7.1 and it started working. Could this be a bug with IPS? Running 7.1 or 7.2 on app.mydomain.com doesn't seem to make any difference.
bfarber Posted November 21, 2018 Posted November 21, 2018 That's the front end domain? The IPS software supports PHP 7.2, so I'm not sure what the bug would be. If you were somehow using two different versions of PHP that could explain the issue (it is possible things like session handling behind the scenes may have differences that would cause something like this to happen).
Tom S. Posted November 21, 2018 Author Posted November 21, 2018 Yes, so Front end -> php72 - SSO doesn't work Front end -> php71 - SSO works App side -> works with both php7.1 or php7.2 I guess it could be any number of reasons. Hard to say...
bfarber Posted November 26, 2018 Posted November 26, 2018 So if your front end is 7.1, and the community is 7.2 it works, but if both are on 7.2 it doesn't? One possibility is that your PHP configuration is actually changing when you change PHP versions. Perhaps, for instance, the cookie path is being set to the current directory so it can't be read when a user is visiting outside of the forum directory. Ultimately it's pretty difficult to say from here.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.