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
/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
US4.1.5 - Table 'Pages' emptied by users/admin_pages.php
#11
That is something I have been thinking about, to introduce some kind of safeguard in case of an accident. Another idea would be to implement a baseline configuration that sets default page permissions that are more difficult to change or that you must add or remove manually, rather than in the fully automated approach currently implemented.
  Reply
#12
Yep. I think I'm actually going to roll that into 4.2 before final release.

It's a TON better than it was. It used to just flash up something about line 365 in a php error. Let me see what I can do on that.
  Reply
#13
@yolo, Try replacing your us_helpers.php file with this one

http://pastebin.com/J4wnSXfz

And see if it acts like you're thinking it should. In that case, if you don't have a page in the db, it will add it instead of tossing an error. If it can't add it, THEN it will toss the error. There could be bugs, but it's worth a shot. If it doesn't work, you can just replace it with the original.
  Reply
#14
Hello mudin,

I did some tests.

1/ With right installation/configuration => All fine

2/ With MariaDB stopped : Message « SQLSTATE[HY000] [2002] No such file or directory » when accessing to the website.

3/ With DB dropped : Message « SQLSTATE[HY000] [1049] Unknown database 'userSpiceDB' » when accessing to the website.

4/ With 'users' table dropped :
when validating the user/password in login.php :

Fatal error: Call to a member function count() on boolean in /var/www/html/mlm09/users/classes/us_classes.php on line 407
PHP 1. {main}() /var/www/html/mlm09/users/login.php:0
PHP 2. User->loginEmail() /var/www/html/mlm09/users/login.php:101
PHP 3. User->find() /var/www/html/mlm09/users/classes/us_classes.php:452

5/ With 'pages' table dropped :
When accessing to the website or logged:

PHP Notice: Undefined property: stdClass::$page in /var/www/html/mlm09/users/helpers/us_helpers.php on line 436
PHP 1. {main}() /var/www/html/mlm09/index.php:0
PHP 2. require_once() /var/www/html/mlm09/index.php:45
PHP 3. securePage() /var/www/html/mlm09/menu.inc.php:5

PHP Notice: Undefined property: stdClass::$private in
/var/www/html/mlm09/users/helpers/us_helpers.php on line 436
PHP 1. {main}() /var/www/html/mlm09/index.php:0
PHP 2. require_once() /var/www/html/mlm09/index.php:45
PHP 3. securePage() /var/www/html/mlm09/menu.inc.php:5

=> Nota : Possible to open public and private pages without logging (login.php isn't requested).

6/ With misconfiguration in z_us_root.php ($path=['mlm09','mlm09/users/','mlm09/usersc/']Wink
Logged in admin and opening users/admin_pages.php

PHP Notice: Undefined variable: row in /var/www/html/mlm09/users/helpers/us_helpers.php on line 166
PHP 1. {main}() /var/www/html/mlm09/users/admin_pages.php:0
PHP 2. getPathPhpFiles() /var/www/html/mlm09/users/admin_pages.php:52

PHP Warning: Invalid argument supplied for foreach() in /var/www/html/mlm09/users/admin_pages.php on line 53
PHP 1. {main}() /var/www/html/mlm09/users/admin_pages.php:0

=> Nota : No specific message. The page doesn't display the list of files due to misconfiguration of z_us_root.php. The 'pages' table has been emptied.


I don't know if it runs as expected. For the last case, should I see a specific message ?
Thank you.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)