- Joined
- Jul 12, 2011
- Messages
- 1,229
- Reaction score
- 475
If you're having trouble setting up MapleBit, please post here instead of the main thread!
Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!
Join Today!you have php error in that ajax script, i think it named login.php.I can only login after pressing F5 ( refresh ), I read someone posted here before but I never got a fix on that.. anyone got a solution?
check via F12, see what file u need to edit, and edit it. you might just want to add <style></style> to release some cache, or add ?v=1 at the <link href, or ctrl + shift + r.I can only login after pressing F5 ( refresh ), I read someone posted here before but I never got a fix on that.. anyone got a solution?
Hello,
I am having 2 issue
1) When logging in from the webpage, if the account is a webadmin, it will not auto refresh. Thus, hung there, until f5/manual refresh is invoked. It has something to do in the login.php, which I'm figuring out as I can't echo anything out right now...
2) I have extracted the GD and did some research, I went to php.ini to enable extension=gd. However, still no image showing, is there any other config that I need to tweak?
Thanks!
1 - you have PHP error in the Ajax file (can’t remember the name of the file).
2 - enable debug (will help for both cases ^)
ah. i kind of fixed the GD issue by playing around with older rev GD files... (Still not sure abt the actual issue)
-> php error in ajax file? uhm, i'll look into it.. might be due to version incompatibility.. anw thanks for the suggestion to enable debugging, i had totally overlooked it..
-> there was an error in the registration too.. one of the module was deprecated in php 7.4 and over, thus i've reworked that portion for the registration...
from what I know, MapleBIT is made for PHP 5.6 and not 7.4.
but the CMS is very simple without any complicated code, so it’s should be able to run on the newer versions, I want to say even on 8 but it’s requires some testing!
Fatal error: Uncaught TypeError: Unsupported operand types: string / string in C:\xampp\htdocs\heavenms\assets\libs\Zebra_Pagination.php:337
Stack trace: #0 C:\xampp\htdocs\heavenms\assets\libs\Zebra_Pagination.php(291): Zebra_Pagination->get_pages() #1 C:\xampp\htdocs\heavenms\sources\admin\manage-accounts.php(158): Zebra_Pagination->get_page() #2 C:\xampp\htdocs\heavenms\sources\admin\main.php(149): include('C:\\xampp\\htdocs...') #3 C:\xampp\htdocs\heavenms\index.php(41): include('C:\\xampp\\htdocs...') #4 {main} thrown in C:\xampp\htdocs\heavenms\assets\libs\Zebra_Pagination.php on line 337
Oh i'm running on php8. Thus i've been trying to tweak some deprecated library to make it actually functionable. So far I've fixed the registration, and there's one more error that I've yet to solve in the admin-cp.
-> Manage account button returns this error
-> Also i have not fixed the problem where I need to refresh the page manually to login...
Oh i'm running on php8. Thus i've been trying to tweak some deprecated library to make it actually functionable. So far I've fixed the registration, and there's one more error that I've yet to solve in the admin-cp.
-> Manage account button returns this error
public function get_pages()
{
// return the total number of pages based on the total number of records and number of records to be shown per page
return [USER=793105]Ceil[/USER]($this->_properties['records'] / $this->_properties['records_per_page']);
}
$query = $mysqli->query('SELECT * FROM accounts LIMIT '.(($pagination->get_page() - 1) * $records_per_page).', '.$records_per_page.'');
For the issue you have with the pagination library, a possible solution (haven't tried it honestly) would bee to update the library to the latest version. The one included with MapleBit is dated back to 2016, whereas the latest version of the library dates back to 2017, perhaps it has a few changes in regards to compatibility with newer versions of PHP.
Also, after reviewing your error and the code, perhaps it lies here:
PHP:public function get_pages() { // return the total number of pages based on the total number of records and number of records to be shown per page return [USER=793105]Ceil[/USER]($this->_properties['records'] / $this->_properties['records_per_page']); }
I can only assume that this line expects integers and not strings, therefore I'd suggest debugging the code in sources\admin\manage-accounts.php line 158;
Please use the die() function on the variable $query after line 158, this will end the execution of the website code, that's below this line, and will instead allow you to see the actual value of the $query variable after returning the query from the Database.PHP:$query = $mysqli->query('SELECT * FROM accounts LIMIT '.(($pagination->get_page() - 1) * $records_per_page).', '.$records_per_page.'');
Post whatever it gives you, I'll try to help a bit
P.S. another suggestion would be to downgrade the PHP version from 8 to 7 if there are compatibility issues.
Since it's not a prepare statement you can replace $mysqli->query with print and then it's will output the query filled with the parameters, then just paste it under MySQL WorkBench and see what is the reason for the error.
enable debug, or have a look at the error_log filethanks! that issue got fixed, the other issue im having is not being able to login without pressing f5/refresh.. shall fix that abit later
enable debug, or have a look at the error_log file
thanks i'll try that today! do you happen to have discord? :x
nevertheless, thank you for your help!
Oh i'm running on php8. Thus i've been trying to tweak some deprecated library to make it actually functionable. So far I've fixed the registration, and there's one more error that I've yet to solve in the admin-cp.
-> Manage account button returns this error
-> Also i have not fixed the problem where I need to refresh the page manually to login...
Thanks for reporting this issue, I've released v1.31 which resolves this issue under PHP 8.x:You must be registered to see links