mathhulk / advancedbans

Exhibit bans and other punishment types from your Minecraft server online using AdvancedBan.
https://mathhulk.me/advancedbans/example
MIT License
20 stars 27 forks source link

Error while loading Page #55

Closed xXSchrandXx closed 5 years ago

xXSchrandXx commented 5 years ago

Hi, I am getting this Error: Failed to load resource: the server responded with a status of 500 (Internal Server Error) Link to my page

I don't know why. Everything is correctly set up.

Do you have a guess what Chrome can't load?

falceso commented 5 years ago

Hey there @xXSchrandXx,

Please answer the following two questions so we can get a slightly deeper scope into the error. Do you have php errors enabled? Are your database information correct?

xXSchrandXx commented 5 years ago

Sry, I am still waiting for the owner to correct the log path. But I can say that the database is correct.

winnipeg21 commented 5 years ago

Make sure your database it set up correctly. If your webserver is hosted on the same machine as your MySQL and server use localhost. If your MySQL and server are on one machine but your webserver is on a different machine make sure your MySQL has remote access (contact provider if need be). Another issue could be not having the proper php version or your site is messed up. I suggest a reinstall if need be.

xXSchrandXx commented 5 years ago

Error: [Mon Dec 03 20:08:58.548355 2018] [:error] [pid ####] [client ***] PHP Catchable fatal error: Argument 1 passed to AdvancedBan::initialize() must be an instance of string, string given, called in /var/www/ban/index.php on line 23 and defined in /var/www/ban/AdvancedBan/AdvancedBan.class.php on line 30 SQL is localand host is local

xXSchrandXx commented 5 years ago

I suggest a reinstall if need be.

Could you remove the old installation in the wiki?

winnipeg21 commented 5 years ago

I suggest a reinstall if need be.

Could you remove the old installation in the wiki?

What?

xXSchrandXx commented 5 years ago

In the readme.md and in your wiki are 2 different installation configurations. Only the one in the readme.md is useful for the last version. Anything you can help me to fix that error?

winnipeg21 commented 5 years ago

Like I've said, reinstall. Delete all AB-Web files, redownload them from git or spigot (spigot being the main release) then upload the files again. Config AB to connect to your database then load your site. If your machine for your webserver is different from your MySQL server make sure your MySQL has remote access. Remote access is needed if your web server, MySQL and server are on different servers. (contact provider if need be).

xXSchrandXx commented 5 years ago

I deleted the web-addon, installed it with the ZIP from spigot, deleted the databasetables from AdvancedBan, set the database host, user, password and table and restarted the BungeeCord Server so they generate a new table.

And set the rights of the webfiles to 777.

Result:

[Tue Dec 04 18:55:57.430550 2018] [:error] [pid 898] [client *] PHP Catchable fatal error:  Argument 1 passed to AdvancedBan::initialize() must be an instance of string, string given, called in /var/www/ban/index.php on line 23 and defined in /var/www/ban/AdvancedBan/AdvancedBan.class.php on line 30
[Tue Dec 04 18:55:57.978626 2018] [:error] [pid 969] [client *] PHP Catchable fatal error:  Argument 1 passed to AdvancedBan::initialize() must be an instance of string, string given, called in /var/www/ban/index.php on line 23 and defined in /var/www/ban/AdvancedBan/AdvancedBan.class.php on line 30
winnipeg21 commented 5 years ago

Are you using PHP 7.1 (recommended)?

xXSchrandXx commented 5 years ago
PHP 7.2.12-1+0~20181112102353.11+jessie~1.gbp55f215 (cli) (built: Nov 12 2018 14:04:20) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.12-1+0~20181112102353.11+jessie~1.gbp55f215, Copyright (c) 1999-2018, by Zend Technologies
winnipeg21 commented 5 years ago

use the spigot Ver

On Dec 4, 2018 2:11 PM, "xXSchrandXx" notifications@github.com wrote:

7.2.12

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mathhulk/advancedban-panel/issues/55#issuecomment-444200386, or mute the thread https://github.com/notifications/unsubscribe-auth/AJhLI8RQb7paZ9YTezqBsaKQMZffINKlks5u1rrTgaJpZM4Yz7Ov .

xXSchrandXx commented 5 years ago

?

Using Spigot ver

winnipeg21 commented 5 years ago

Sorry, sent that as an email. Hmm must be an issue with the panel.

winnipeg21 commented 5 years ago

Update your php to the latest version

xXSchrandXx commented 5 years ago

I am currently on the last save build, or don't it does update with sudo apt-get update?

xXSchrandXx commented 5 years ago

PHPInfo

php.php

<?php
phpinfo();
?>
xXSchrandXx commented 5 years ago

well, php -v does say I have 7.2.12 and phpinfo() does say I have 5.6.38-0... fk me

xXSchrandXx commented 5 years ago

my bad, php7 now endabled

$ sudo a2dismod php5
Module php5 disabled.
To activate the new configuration, you need to run:
  service apache2 restart
$ sudo a2enmod php7.2
Considering dependency mpm_prefork for php7.2:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php7.2:
Enabling module php7.2.
To activate the new configuration, you need to run:
  service apache2 restart
$ sudo service apache2 restart

Solved it...

winnipeg21 commented 5 years ago

Is it all working?