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
/printthread.php 16 require_once



UserSpice
init.php - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: init.php (/showthread.php?tid=375)



init.php - sqluser - 11-28-2016

Try to install a clean version on a new machine, see that there is a new version availabe, but it seems there is some data missing on the

Quote:users\init.php

file.
<pre>
Code:
// Set config
$GLOBALS['config'] = array(
    'mysql'      => array(
</pre>

After this there is no information more in my downloaded files. (42Beta)

What should be in this file.


init.php - dan - 11-28-2016

Are you instaing 4.2 or 4.1.8c?


Did you go through the install process (ie browse to the Userspice folder n your browser?


init.php - sqluser - 11-28-2016

Both had this issue.
Unzip the file, and in previous version there was where to change the credentials for the database.
Now there is no more data after the code that was supported.
Did no install on the server, just try to edit the data. But if this file is not complete, how to ensure that the rest is complete?


init.php - sqluser - 11-28-2016


<pre>
Code:
<?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;
    }
}

require_once $abs_us_root.$us_url_root.'users/helpers/helpers.php';

// Set config
$GLOBALS['config'] = array(
    'mysql'      => array(
</pre>



init.php - mudmin - 11-28-2016

The init file is built during the installation process. If you want to install a clean version, you should do that in an empty directory, create a database, and then point your browser to the folder you unzipped to.

If you want to update an old install, there are patches for every single version, you just unzip them (in order) over your existing install and they will upgrade you. Note that 2 of the patches require you to run a php file one time to update the database.


init.php - sqluser - 11-29-2016

Yes that works, need to install and run the installationm setup.


init.php - mudmin - 11-29-2016

Great! Glad you got it!