The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
users and userc not mirrors
#7
(04-26-2019, 06:16 PM)mudmin Wrote: Ok. That seems really weird.  Does your template seem to be working? Does it seem like you're logged in?  

Try just doing dump($user); somewhere on the page and seeing if all the $user info is there.

Yeah, it's odd. I'm back to trying to figure it out. I added start_session() at the top of the page, just below the 2 "require_once" lines, and it still isn't keeping a session.

When I go to index.php or messages.php or any other page, it shows in the banner that I'm logged in and the session is valid, but on in the users folder, wall.php does not keep the session. If I reload any other the other pages, the session is still active. wall.php doesn't load it, for some reason, and shows this:

User Object
(
   [_db:User:private] => DB Object
       (
           [_pdoBig GrinB:private] => PDO Object
               (
               )

           [_queryBig GrinB:private] => PDOStatement Object
               (
                   [queryString] => SELECT id, group_id FROM groups_menus WHERE menu_id = ?
               )

           [_errorBig GrinB:private] =>
           [_errorInfoBig GrinB:private] => Array
               (
                   [0] => 0
                   [1] =>
                   [2] =>
               )

           [_resultsBig GrinB:private] => Array
               (
                   [0] => stdClass Object
                       (
                           [id] => 7
                           [group_id] => 0
                       )

               )

           [_resultsArrayBig GrinB:private] => Array
               (
                   [0] => Array
                       (
                           [id] => 7
                           [group_id] => 0
                       )

               )

           [_countBig GrinB:private] => 1
           [_lastIdBig GrinB:private] => 0
           [_queryCountBig GrinB:private] => 17
       )

   [_data:User:private] =>
   [_sessionName:User:private] => user
   [_isLoggedIn:User:private] =>
   [_cookieName:User:private] => pmresofiw318373csb
   [_isNewAccount:User:private] =>
   [tableName] => users
)


I have also logged in to the site with an iOS device and sessions are find for all pages except wall.php

At the top of wall.php I have:

<?php
require_once '../users/init.php';
require_once $abs_us_root.$us_url_root.'users/includes/template/prep.php';
?>


Also, $abs_us_root.$us_url_root.'users/includes/template/prep.php'; = /home/admin/public_html/users/includes/template/prep.php (which is valid)

In users/init.php after session_start();  I added a print_r($_SESSION) and found that in all pages there is a valid session, except users/wall.php $_SESSION is not even set. But the thing is, if I go to any other existing page (messages.php mail index etc) the session is valid again and init.php's print_r ($_SESSION) shows valid for all pages except wall.php, even if I go back and forth to different pages.

I put wall.php in usersc and get the same results.

I think at this point, I have to go into init.php to see where things are getting lost. The session isn't valid anymore after the 2 require_once lines. Working on it more tonight.

* solved *

It was the footer. This was missing:

<?php require_once $abs_us_root . $us_url_root . 'usersc/templates/' . $settings->template . '/footer.php'; //custom template footer ?>

This footer must be there, like you said, this has something to do with the templates, and that needs the footer.
I am assuming that in this footer, it uses "usersc" instead of "users" because it wants to give first dibbs to the usersc folder for templates or changes to templates, over the "users" folder.
  Reply


Messages In This Thread
users and userc not mirrors - by Malatesa - 04-23-2019, 04:42 PM
RE: users and userc not mirrors - by mudmin - 04-23-2019, 04:51 PM
RE: users and userc not mirrors - by Malatesa - 04-24-2019, 06:11 AM
RE: users and userc not mirrors - by mudmin - 04-24-2019, 11:59 AM
RE: users and userc not mirrors - by Malatesa - 04-26-2019, 01:57 PM
RE: users and userc not mirrors - by mudmin - 04-26-2019, 06:16 PM
SOLVED * users and userc not mirrors - by Malatesa - 04-27-2019, 02:35 AM
RE: users and userc not mirrors - by mudmin - 04-27-2019, 10:55 AM
RE: users and userc not mirrors - by Malatesa - 04-28-2019, 03:47 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)