• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua cannot load website

Glidarn

Member
Joined
May 9, 2009
Messages
970
Reaction score
16
Location
Åkersberga, Sweden
so this is my problem and i had it before but i don't remember how to fix it


Warning: parse_ini_file(C:/RmS 2.2/config.lua) [function.parse-ini-file]: failed to open stream: No such file or directory in C:\xampp\htdocs\config-and-functions.php on line 13
Database error. Unknown database type in C:/RmS 2.2/config.lua . Must be equal to: "mysql" or "sqlite". Now is: ""

Line 13:
Lua:
//load server config
$config['server'] = parse_ini_file($config['site']['server_path'].'config.lua');
if(isset($config['server']['mysqlHost']))

why doesnt it work? :(
 
but without "" it doesnt work

Lua:
    sqlType = "mysql"
    sqlHost = "localhost"
    sqlPort = 3306
    sqlUser = "root"
    sqlPass = ""
    sqlDatabase = "rms"
    sqlFile = "forgottenserver.s3db"
    sqlKeepAlive = 0
    mysqlReadTimeout = 10
    mysqlWriteTimeout = 10
    encryptionType = "plain"

it looks like that
 
but without "" it doesnt work

Lua:
    sqlType = "mysql"
    sqlHost = "localhost"
    sqlPort = 3306
    sqlUser = "root"
    sqlPass = ""
    sqlDatabase = "rms"
    sqlFile = "forgottenserver.s3db"
    sqlKeepAlive = 0
    mysqlReadTimeout = 10
    mysqlWriteTimeout = 10
    encryptionType = "plain"

it looks like that

Grehy says:
Delete comment tags from config.lua.

OK delete it man...
Lua:
	-- Database
        -- COMMENT <---------
	sqlType = "mysql"
	sqlHost = "localhost"
	sqlPort = 3306
	sqlUser = "DBUser"
	sqlPass = "DBPass"
	sqlDatabase = "DB"
	sqlFile = "theforgottenserver.s3db"
	sqlKeepAlive = 0
	mysqlReadTimeout = 10
	mysqlWriteTimeout = 10
	encryptionType = "sha1"
 
i don't have -- COMMENT <---------

it looks like this:
Lua:
    -- Database
    -- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database.
    -- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value.
    sqlType = "mysql"
    sqlHost = "localhost"
    sqlPort = 3306
    sqlUser = "root"
    sqlPass = ""
    sqlDatabase = "rms"
    sqlFile = "forgottenserver.s3db"
    sqlKeepAlive = 0
    mysqlReadTimeout = 10
    mysqlWriteTimeout = 10
    encryptionType = "plain"


i should remove every "--" ?
 
Back
Top