The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/portal.php 39 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!

Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 1,007
» Latest member: kavitasinghji
» Forum threads: 1,324
» Forum posts: 7,788

Full Statistics

Online Users
There are currently 584 online users.
» 0 Member(s) | 582 Guest(s)
Bing, Google

Latest Threads
UserSpice Alpha Testing a...
Forum: News Center
Last Post: ivinsons
11-08-2024, 06:13 PM
» Replies: 13
» Views: 42,475
UserSpice 4.4 Development
Forum: News Center
Last Post: Amelie12
09-21-2024, 12:23 PM
» Replies: 4
» Views: 15,199
Welcome to the new UserSp...
Forum: News Center
Last Post: ivinsons
08-25-2024, 07:39 AM
» Replies: 2
» Views: 27,918
How to use hasPerm
Forum: UserSpice 4.4
Last Post: mudmin
07-20-2019, 02:45 PM
» Replies: 1
» Views: 13,755
Session issue? What I sho...
Forum: UserSpice 4.4
Last Post: Parth
07-17-2019, 05:06 PM
» Replies: 4
» Views: 14,502
Email Error
Forum: UserSpice 4.4
Last Post: Brandin
07-17-2019, 04:47 PM
» Replies: 1
» Views: 6,623
{ Missing Text } after up...
Forum: UserSpice 4.4
Last Post: Brandin
07-16-2019, 04:23 PM
» Replies: 22
» Views: 53,638
Best Practice Info
Forum: New to UserSpice?
Last Post: Brandin
07-16-2019, 11:55 AM
» Replies: 1
» Views: 13,490
Force to use 2FA -always-
Forum: UserSpice 4.4
Last Post: Brandin
07-12-2019, 12:43 PM
» Replies: 1
» Views: 6,636
e-mail not verifying
Forum: UserSpice 4.4
Last Post: LBC
07-10-2019, 11:34 AM
» Replies: 31
» Views: 76,232

 
  parent child permissions
Posted by: alinea - 11-15-2018, 02:13 PM - Forum: UserSpice 4.4 - Replies (1)

Hi

I am new to userspice but enjoying the experience so far.

I need child parent permissions and my search sees that you have addressed this.

but I cannot see how to implement it. 
Please can you signpost me to how to do this.

Many thanks

Graham


  Align Left Navigation
Posted by: lordtyla - 11-15-2018, 12:01 AM - Forum: UserSpice 4.3 and Below - No Replies

Any way to align navigation buttons to the left? I'd like the settings dropdown to remain on the right hand side but links such as Home, Forums, should be on the left. It isn't an option on the Menu Manager and editing core files doesn't seem to do anything at all?

Thanks in advance.


  Generating navigation markup within function fails
Posted by: mlam19 - 11-14-2018, 02:17 AM - Forum: UserSpice 4.3 and Below - Replies (2)

Greetings,

I would like to write a class that contains function that serves as a sort of wrapper around some UserSpice 4 features. I'm mostly concerned with controlling when and where in my own program the UserSpice HTML markup is generated and used. Unfortunately, I've run into some problems using UserSpice code from within functions.

To start, first I modified step 5 from the Getting Started instructions. I skipped the generation of the header, and saved the output of the navigation markup to a variable. The following script works when no user is logged in, and when a user is logged in (script #1):

PHP Code:
<!DOCTYPE html>
<
html>
    <
head>
        <
title>Works logged in and out</title>
    </
head>
    <
body>
<?
php

require_once "users/init.php";

// Stuff not initialized in UserSpice init script, but should be.
$db DB::getInstance();
$settingsQ $db->query("Select * FROM settings");
$settings $settingsQ->first();

// Verify that user object exists at this point.
dump($user);

ob_start();

require_once 
"users/includes/navigation.php";

$navigationMarkup ob_get_contents();

ob_end_clean();
?>
        <?=$navigationMarkup;?>
    </body>
</html> 

Next, I moved the code into a function as follows (script #2):

PHP Code:
<!DOCTYPE html>
<
html>
    <
head>
        <
title>Only works when logged out</title>
    </
head>
    <
body>
<?
php

function initialize() {

    require_once 
"users/init.php";

    
// Stuff not initialized in UserSpice init script, but should be.
    
$db DB::getInstance();
    
$settingsQ $db->query("Select * FROM settings");
    
$settings $settingsQ->first();

    
// Verify that user object exists at this point.
    
dump($user);
    
    
ob_start();

    require_once 
"users/includes/navigation.php";

    
$navigationMarkup ob_get_contents();

    
ob_end_clean();

    return 
$navigationMarkup;
}
?>
        <?=initialize();?>
    </body>
</html> 

Script #2 works when nobody is logged in, but after logging in an error occurs when processing navigation.php. The following appears in the Apache error log (I have replace the paths with --- but the remainder should be sufficient):

Code:
[client 127.0.0.1:52386] PHP Fatal error:  Uncaught Error: Call to a member function data() on null in ---/users/helpers/us_helpers.php:1010
Stack trace:
#0 ---/users/includes/database-navigation.php(56): hasPerm(Array, '1')
#1 ---/users/includes/navigation.php(119): require_once('---..')
#2 ---/test2.php(23): require_once('---...')
#3 ---/test2.php(32): initialize()
#4 {main}
thrown in ---/users/helpers/us_helpers.php on line 1010

The data() function is apparently a member of the global $user variable. $user seems to exists before processing navigation.php, and I am uncertain when and why it becomes null.

Is there some other way to massage things to get the function working?


  users/admin.php ERROR 500 // SOLVED
Posted by: JUG - 11-13-2018, 05:58 PM - Forum: UserSpice 4.3 and Below - Replies (8)

Suddenly users/admin.php page is not reachable. I get ERROR 500.

Everytime I try to access /users/admin.php I get mail in /var/mail/

Code:
From jakob@server.oblak.ersim.si Tue Nov 13 18:03:01 2018
Return-path: <jakob@server.oblak.ersim.si>
Envelope-to: jakob@server.oblak.ersim.si
Delivery-date: Tue, 13 Nov 2018 18:03:01 +0100
Received: from jakob by server with local (Exim 4.84_2)
        (envelope-from <jakob@server.oblak.ersim.si>)
        id 1gMc5d-0000W9-Gp
        for jakob@server.oblak.ersim.si; Tue, 13 Nov 2018 18:03:01 +0100
From: root@server.oblak.ersim.si (Cron Daemon)
To: jakob@server.oblak.ersim.si
Subject: Cron <jakob@server> oblak.ersim.si/admin.php
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/jakob>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=jakob>
Message-Id: <E1gMc5d-0000W9-Gp@server>
Date: Tue, 13 Nov 2018 18:03:01 +0100

/bin/sh: 1: oblak.ersim.si/admin.php: not found


Last line of this mail I do not understand. I know that oblak.ersim.si/admin.php cannot be found because it does not exist. But why the server wants to load oblak.ersim.si/admin.php instead of oblak.ersim.si/users/admin.php?

Userspice is running on debian with apache2. I get no PHP errors in apache2/error.logwhen accessing users/admin.php. Other pages are working correctly like users/admin_pages.php or users/admin_users.php.

I did not change any file in users/ folder. I already tried to replace users folder with backup image.

Is this some redirection mistake or where should I look to solve this problem.

EDIT 1: I deleted admin.php from server and got Not found (which is expected). Now I make a copy of admin_users.php and rename it to admin.php. Browser now shows users/admin.php so I believe there must be some error in the admin.php file or sth?

EDIT2: Looks like that I had error.logs from apache disabled. I dont know why. So now I got some errors. 
Code:
PHP Notice:  Undefined property: stdClass::$is_read in /var/www/html/users/classes/Notification.php on line 40
PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 32 bytes) in /var/www/html/users/classes/DB.php on line 76
now I tried to resolve these issues. First error is userspice bug. Since I have no rights to change users/classes/Notification.php file (or any file in users folder) I cannot resolve this issue. But issue nr.2 (Fatal error) is real problem. If you look closely you can see that there is memory limit set to 1024MB in admin.php page (line21). This limit was reached when line 76 from DB.php was called. This is:
Code:
$this->_results = $this->_query->fetchALL(PDO::FETCH_OBJ);

So I went reserching my DB. I have found that I had similar number of lines written to audit table (somewhere in the neighbourhood of 1050x10E6). So I tried to delete some lines (about 1k) with no success. Then I truncated whole table and boom. It works like it should. users/admin.php is again reachable.

I believe this is a bug in userspice. I believe that audit inserts should be automaticaly deleted when there is more then, lets say, 100k lines. Also bug from Notification.php should be addressed.

EDIT:3 oh and by the way, error with Notification.php is not present just on admin.php page but on all pages.


Thumbs Up install userspice in a sub-folder without errors
Posted by: Ruud - 11-10-2018, 10:59 AM - Forum: UserSpice 4.4 - Replies (2)

It's a contribution to others that struggle with using US when it is installed not in the root of your website.

Something goes wrong (error messages in init.php and loading helper.php) and my below solution, that works:

i downloaded the last version of US and place this in a sub-folder: /applic/ 
then starting the install instructions and after that cleanup the install directory.

When using US you got error messages with the helper and init files.

The easiest way to solve this was defining my subfolder hardcoded in the init.php file like below:

$us_url_root="/applic/";
require_once $abs_us_root.$us_url_root.'users/helpers/helpers.php';

then you can remove the lines above because it doesn't work very well and give waist compute time.
what i discover was that the variable $us_url_root first was /applic/ and later was gone and still / 

so my init.php file looks like below:


<?php

require_once 'classes/class.autoloader.php';
session_start();

$abs_us_root=$_SERVER['DOCUMENT_ROOT'];

/*
$self_path=explode("/", $_SERVER['PHP_SELF']);
$self_path_length=count($self_path);
$file_found=FALSE;

for($i = 1; $i < $self_path_length; $i++){
array_splice($self_path, $self_path_length-$i, $i);
$us_url_root=implode("/",$self_path)."/";

if (file_exists($abs_us_root.$us_url_root.'z_us_root.php')){
$file_found=TRUE;
break;
}else{
$file_found=FALSE;
}
}
*/
$us_url_root="/applic/";
require_once $abs_us_root.$us_url_root.'users/helpers/helpers.php';


  Sub domain hosted domain issue
Posted by: ohiggins - 11-09-2018, 12:02 PM - Forum: UserSpice 4.4 - Replies (4)

I am a bit stuck here.

I have a US site installed at example.com/us. Fresh install no changes, it works fine when accessing it.  When I point a new domain to it through a hosted domain i get an error see below

Code:
Warning: require_once(/var/chroot/home/content/15/8893015/html/users/helpers/helpers.php): failed to open stream: No such file or directory in /home/content/15/8893015/html/dachi/users/init.php on line 23

Fatal error: require_once(): Failed opening required '/var/chroot/home/content/15/8893015/html/users/helpers/helpers.php' (include_path='.:/usr/local/php5_6/lib/php') in /home/content/15/8893015/html/dachi/users/init.php on line 23

You can see my directory "dachi" is missing in the first section. I have tried making some changes in z_us_root.php to insert my directory bbut nothing has worked. Any ideas?

I am using a shared host on godaddy and the new domain is a .app. SSL has not been setup yet.

i am using 4.3.25


  Login function breaks with .htaccess file
Posted by: Ben in CA - 11-08-2018, 11:12 PM - Forum: UserSpice 4.4 - Replies (2)

If I place a .htaccess file on the server (in project root directory) with this code in it:

ErrorDocument 401 https://mydomain.com/
ErrorDocument 403 https://mydomain.com/
ErrorDocument 404 https://mydomain.com/
ErrorDocument 500 https://mydomain.com/

It breaks the UserSpice login system. When I try to login, then I just get the message:

There was an error with your form. Please go back and try again. Please note that submitting the form by refreshing the page will cause an error.
If this continues to happen, please contact the administrator.


However, if I've already logged in, and put in that .htaccess file, it all works fine, UNTIL I log out and try to login again... (then I get that message)

Any ideas?


  Problem with Forum
Posted by: ismailoezcan - 11-08-2018, 03:58 PM - Forum: Off-topic Discussions - Replies (2)

Hi,

I've had a problem with this forum because I've already got an account here, but I couldn't reset my password because of recaptcha, see screenshot below.

   

Have a nice day!


  4.3.25 - PHP Version
Posted by: MHALL1 - 11-07-2018, 08:20 AM - Forum: UserSpice 4.4 - Replies (1)

Hi, 

I saw the note that 4.4 will need min PHP7.
Will 4.3.25 run ok on PHP7 if I migrate? 

Thanks,
Matthew


  Point to Main Domain running UserSpice from SubDomain (how to)
Posted by: djlaserman - 11-04-2018, 01:26 PM - Forum: UserSpice 4.4 - Replies (7)

Hi all, please help me configure userspice.

I  hosted it on a subdomain like this: www.subdomain.example.com for a website www.example.com, so all I see and can protect are subdomain files, where and with what syntax should I add the files in my main domain?

I tried to add $main_dom_path = $_SERVER['DOCUMENT_ROOT'].'/../example.com'; $path=['','users/','usersc/',$main_dom_path]; in the file z_us_root.php but it is not working  Huh