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
Installing on existing site
#1
Hi,
I didn't see instructions on where to put the UserSpice directory within an existing site. Since US has its own index.php, I added the the directory to the root of my site as UserSpice4.  I removed "-master" as no one said not to.

I ran the installation and it went fine.  I see it created a new subdirectory called UserSpice4-master in which there is a second users directory. I created a new user and I am able to log in as both an admin and the new user.

I'm concerned that I may not have installed this correctly.

The only pages that I could find in the admin where within the UserSpice4 directory.  I searched the forums and found a question from simplymarkb titled "Existing site question"

I followed the instructions and was able to add some of my other subdirectories and pages, including the root.  But I always get php errors (I have error reporting on while I develop).  I've attached a screenshot.  Here is what I am trying to protect.

['','users/','usersc/','../resources/','../resources/templates/','../resources/templates/back/','../resources/templates/front/','../','../css/','../vendor/'];

If I add the following $path=['','users/','usersc/','../resources/','../resources/templates/back/','../resources/templates/front/','../']; it works with no errors. 

But if I add more than this I get errors. With every new one I get another error. The screenshot shows 3.  

Your help is much appreciated.

Have a good day - Ric

Hmm, I am not able to add attachments after choosing a jpg file and pressing the "Add Attachment" button.  Here is the text of one of the errors. They are all the same.  

Notice: Undefined variable: row in /Users/roki1981/Dropbox/Apps/MAMP htdocs/rainbowadult/public_html/UserSpice4/users/helpers/us_helpers.php on line 259
Call Stack
# Time Memory Function Location
1 0.0014 420336 {main}( ) .../admin_pages.php:0
2 0.0289 1652432 getPathPhpFiles( ) .../admin_pages.php:52
  Reply
#2
Hi. Sorry for the confusion.  I generally install userspice as the root and it's important that z_us_root.php be in that root folder.  

So I would do 
/ (includes z_us_root)
then you will have
/resources
/any other folders you have
/users
/usersc

off of that root folder.  Does that make sense?
  Reply
#3
Hi. Thank you for your prompt reply. Yes, it does make sense. I had assumed that but the existence of an index.php file in the folder threw me off. I moved the "users," "usersc" and z_us_root.php to the root.

I reverted the z_us_root.php back to its original state. I logged in and out of the admin. I added the directories back to the z_us_root file without the ../ in front of the path. I still got errors when I included folders like /css/ and /icons/. Then it hit me. They didn't contain any php pages to protect. So the PHP error about not finding a row made sense, since there were no db rows for pages that did not exist.

I had assumed US could protect directories as well, which was dumb of me. That's what .htaccess is for.

It looks ok, at least as far as pages goes. But do you think I should delete everything and reinstall in case there are problems down the line? Or is the z_us_root.php the config file and all else is good?

Thanks.

Have a great day,
Ric
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)