Daily Lucky Numbers:
4
5
16
37
44
47

Arcade install

Started by Vincent Titus, April 29, 2024, 04:16:22 PM

Previous topic - Next topic

Vincent Titus

ok i was able to get by the database.php file by changing it to

if (strpos($db_name, '.') === false) {
    $result = $smcFunc['db_query']('', "SHOW TABLE STATUS FROM `{raw:db_name}`", array('db_name' => $db_name));
} else {
    $result = $smcFunc['db_query']('', 'SHOW TABLE STATUS FROM `' . $db_name . '`', array());
}


by adding the backtick ` here `{raw:db_name}`" and here  `' . $db_name . '`',


i assume ill have to do that to all including the other files like Sub_install.php because now the error is on Sub_install.php file lol

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-353035393de2
LIKE 'smf_arcade_games'' at line 2
File: /home/sites/36b/7/7588baaf12/public_html/Packages/temp/arcadeinstall/Subs-Install.php
Line: 57

Vincent Titus

so i found this on the error logs of my host

PHP Parse error:  syntax error, unexpected single-quoted string "{db_prefix}", expecting ")" in

/arcadeinstall/Subs-Install.php on line 53'

Vincent Titus

So I was having the same error when I tryed to install the battle mod so in order to fix that I had to add the backtick to a couple parts of the 2 files dealing with the data base and I was able to install the battle mod and all is well so I need to find where I need to add the backtick like this '{ $data_base }' that's not the back tick it's the one pointing the other way I can't do it from my phone but you get what I mean in the database files... I'll figure it out eventually lol

Chen Zhen

#33
I apologize for not being around much as of late.
It isn't recommended to use improper characters for your db schema (db names,table names or column names) although I did attempt to have the installer try to circumvent any errors when it encounters those characters.

ref.
https://stackoverflow.com/questions/925696/mysql-create-database-with-special-characters-in-the-name

An option for you is to copy your DB for download (for safety) & then alter it to not contain any illegal characters.
Afterward you may have to use the SMF tool to fix any reference to the older db table names.
Having your DB backup available can fix things if you have trouble while trying to do this.
 

Vincent Titus

yes i have used the backtick to fix the install of your battle mod witch worked and i was able to get that installed but not sure where to place the backtics in the arcade... and my host creates the database automasicly when i installed smf, i cant create one myself, still not sure where to make the changes in the DB..

Vincent Titus

and they splitup the DB for performance i guess


Vincent Titus

#36
heres the complete data base, i have no idea what im looking for lol not a coder maybe someone can have a look at it

Chen Zhen

#37
The Arcade installer uses many SMF native database package functions which aren't currently developed to handle reserved DB characters in the schema name(s) structure. The hyphen in your database name is what's causing the issue.

I created a database that contained a hyphen for testing and attempted to patch the installer to handle this scenario but the rabbit hole runs deep. It's too much work to attempt to circumvent this scenario so I suggest finding another host.
Is this host offering free service? If it's paid then ask them to create a database for you that doesn't include any reserved characters. If it's a free host then I suggest finding some cheap hosting. If you contact Skhilled on this site he can likely set you up with something for a low cost & some support. 

Here is his website: https://www.docskillz.com/docs


Vincent Titus

no its not free i paid for a life time subscription before i knew about this but ill see if they can do anything, thats why i would like to use them ill figure something out ty chen for looking into it

Chen Zhen

#39
Just ask your host not to use hyphens in their database names because those are reserved characters.
They need to be using underscores & they should know this since they're providing a hosting service.

In order to have hyphens in database names, SMF developers would have to wrap the database names in all their native db queries within backticks. They haven't done that with many of their native functions so you're going to see errors like that for many mods that use any of the extended functions.

I can do that in my mods but it involves creating my own functions for various tasks instead of using SMF's native ones plus I'd have to try and accommodate multiple database types. This is too much work.. the simple solution is not to use hyphens in database names.

ref.
https://dev.mysql.com/doc/refman/8.4/en/identifiers.html