Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit Ban Details Fatal error: Uncaught Error: Cannot use object of type ADORecordSet_mysqli as array #603

Open
borzaka opened this issue Sep 22, 2019 · 5 comments
Assignees
Labels
Projects

Comments

@borzaka
Copy link
Contributor

borzaka commented Sep 22, 2019

What are the steps to reproduce this issue?

  1. Issue a ban on the WebPanel for 30 minutes
  2. Edit later, change to permanent and upload a demo
  3. Save changes

What happens?

PHP Fater error, a ban changes to permanent, but the demo is not saved: File not found. when trying to review.
image

What were you expecting to happen?

Save changes without error, successful demo upload and being able to review (download) it.

Any logs, error output, etc.?

Fatal error: Uncaught Error: Cannot use object of type ADORecordSet_mysqli as array in /home/sourcebans/public_html/pages/admin.edit.ban.php:206 Stack trace: #0 /home/sourcebans/public_html/includes/page-builder.php(133): require_once() #1 /home/sourcebans/public_html/index.php(37): build('Edit Ban Detail...', '/admin.edit.ban...') #2 {main} thrown in /home/sourcebans/public_html/pages/admin.edit.ban.php on line 206

/var/log/apache2/error.log:

[Mon Sep 23 00:05:34.203020 2019] [php7:warn] [pid 16495] [client xxx.xxx.xxx.xxx:58312] PHP Warning:  move_uploaded_file(/home/sourcebans/public_html/demos/3a0d41a175d96149ad06f3e1711a043b): failed to open stream: Permission denied in /home/sourcebans/public_html/pages/admin.uploaddemo.php on line 43, referer: https://SERVERNAME.XX/~sourcebans/pages/admin.uploaddemo.php
[Mon Sep 23 00:05:34.203067 2019] [php7:warn] [pid 16495] [client xxx.xxx.xxx.xxx:58312] PHP Warning:  move_uploaded_file(): Unable to move '/tmp/php7quMVO' to '/home/sourcebans/public_html/demos/3a0d41a175d96149ad06f3e1711a043b' in /home/sourcebans/public_html/pages/admin.uploaddemo.php on line 43, referer: https://SERVERNAME.XX/~sourcebans/pages/admin.uploaddemo.php

Any other comments?

If I edit again this ban, and upload a demo (no other changes), it says The ban has been updated successfully, but still cannot review (download the demo). Says File not found.

The looks like successfully uploaded:
image

But no files in the /demos folder which has 766 permissions.

Edit: I have successfully resolved my issue with the demo upload with chown www-data to the demos folder. But this is the correct way?

What versions of software are you using?

Operating System: Linux 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2 (2019-08-28) x86_64 GNU/Linux (Debian 10.1)
SourceBans++ Version: 1.7.0 | Git: 931
PHP Version: 7.3.4-2
MySQL Version: mariadb Ver 15.1 Distrib 10.3.17-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Link to your project: Sorry, I don't want to post it here.
Link to a phpinfo() output: I don't want to post it here.

If you need the last two info, contact me on Discord.

@rumblefrog
Copy link
Member

The demo system has been funky in the past, so I'm not surprised if this does happen. This means we need to rewrite this portion of the system as well.

@Groruk Groruk self-assigned this Sep 23, 2019
@monsterbnd
Copy link

monsterbnd commented Sep 25, 2019

I observe a similar problem when editing mutes:
Fatal error: Uncaught Error: Cannot use object of type ADORecordSet_mysqli as array in /var/www/xxx.ru/public_html/pages/admin.edit.comms.php:152 Stack trace: #0 /var/www/xxx.ru/public_html/includes/page-builder.php(133): require_once() #1 /var/www/xxx.ru/public_html/index.php(37): build('Edit Block Deta...', '/admin.edit.com...') #2 {main} thrown in /var/www/xxx.ru/public_html/pages/admin.edit.comms.php on line 152

And a new problem. I can’t delete/unban the ban or mute.

@Hackmastr
Copy link
Contributor

Hello,

That's a different error. Please create a separate issue ticket and follow the template.
Thanks.

@Groruk Groruk added this to To do in 1.7.0 via automation Sep 25, 2019
@Groruk Groruk moved this from To do to In progress in 1.7.0 Oct 28, 2019
@Groruk Groruk mentioned this issue Oct 30, 2019
12 tasks
@Groruk Groruk moved this from In progress to PR Open in 1.7.0 Nov 9, 2019
@Groruk Groruk moved this from PR Open to To do in 1.7.0 Mar 30, 2021
@crashzk
Copy link

crashzk commented Oct 9, 2021

Just to update, I'm getting this error too:
image

Same thing when having edit Comms: #606

I'm using SourceBans++ 1.7.0 | Git: 1145.

@Adrianilloo
Copy link

Adrianilloo commented Mar 11, 2022

I've reproduced this exact same error too, upon editing a ban length to make it permanent (from a week, initially). However the ban shows the updated length at the Dashboard, anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: To do
1.7.0
  
To do
Development

Successfully merging a pull request may close this issue.

7 participants