• 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!

From Windows 10 to OTS development machine for dummies - part 2

Gesior.pl

Mega Noob&LOL 2012
Senator
Joined
Sep 18, 2007
Messages
2,965
Solutions
99
Reaction score
3,375
Location
Poland
GitHub
gesior
5. Install MariaDB, PHP and Apache2 servers

30.png

Download newest XAMPP for Windows.

Link:Download XAMPP (https://www.apachefriends.org/download.html)

31.png

During installation deselect components we won’t use for OTS development.

32.png

Start Apache, MySQL and open phpMyAdmin site (database administration site).

If Apache fails to start, it’s probably because some other application is already using port 80.
Common problem is Skype. Turn off Skype, start Apache, start again Skype – you got website and Skype working.

33.png

In phpMyAdmin open page with new user account configuration.

34.png

Type username forgottenserver
Type secure password for that user
Check ‘Create database with same name and grant all access.’

35.png

New database will appear in left panel. Click it and go to Import page.

36.png

Choose file: C:\ots\forgottenserver\schema.sql
Code:
C:\ots\forgottenserver\schema.sql

and click Import.
We got database for our OTS! Time to configure game server.

37.png

Open folder C:\ots\forgottenserver and copy file config.lua.dist to config.lua

6. Install IntelliJ IDEA, configure game server and run it for first time!

What is IntelliJ IDEA? It’s IDE for Java and Android development.
What is IDE? It’s ‘Integrated Development Environment’.
Why do I need it? To develop code faster, automatically detect simple bugs and make cleaner code.

38.png


39.png


40.png

Choose folder: C:\ots\forgottenserver
Code:
C:\ots\forgottenserver

41.png

Open IntelliJ IDEA Settings

42.png

Go to Plugins and install EmmyLua

43.png

Restart IDE to make it work with LUA

44.png

Configure your password to database user forgottenserver in file config.lua

45.png

Your server is running!

7. Install website (Gesior2012)

46.png

Open folder: C:\xampp\htdocs
Code:
 C:\xampp\htdocs

47.png

Remove all files from C:\xampp\htdocs

48.png

Open Git Bash in folder C:\xampp\htdocs

49-1.png

Type: git clone gesior/Gesior2012 (https://github.com/gesior/Gesior2012.git) .
Code:
git clone https://github.com/gesior/Gesior2012.git .

Yes. There is space and dot at end. We want to download Gesior2012 to current folder. Not to folder C:\xampp\htdocs\Gesior2012

50.png

Type: git checkout TFS-1.3
Code:
git checkout TFS-1.3

Change Gesior2012 version to TFS-1.3 (exactly change git branch to TFS-1.2)
Same as we did during vcpkg installation. Download from GitHub with git clone and then change version.

51.png

From now you will edit every directory in IntelliJ IDEA

PHP files are not colored in IntelliJ IDEA Community edition

LUA plugin is free, but PHP is available only in IntelliJ IDEA Ultimate (paid / 30 days trial) or as separate application PHPStorm (it’s IntelliJ IDEA with PHP plugin).

52.png

Open website http://127.0.0.1 and click link to installation.

53.png


54.png


55.png

Refresh site. Error about IP should disappear.
There will be probably some errors about cache folder.

56.png

We got to set cache folder not read-only.

57.png

When it asks about ‘To all files and sub-directories’ click Yes.

58.png

Click link to Step 1 in left side menu.
Type path to TFS: C:\ots\forgottenserver
Code:
C:\ots\forgottenserver

Continue steps 2-5.

59.png

Your website should be ready to use!
Post automatically merged:

I was not able to post this as 1 thread.
It was keep saying that I cannot post more than 30 images in 1 post. Even when I split it into 2 posts.

Can some moderator merge my 2 threads?
 
Last edited:
Hello,

I have the same issue as the person above.
Im running Linux - Debian. No issues with cache or setting access, however in step 5 when setting the password and pressing "SET" the entire window disappears and just says "STEP 5 Set Admin Account" and nothing happens. When accessing 127.0.0.1 it simply says "you must install ACC".

I have checked the db and it does create a new account.
Removing install.txt results in a blank page when accessing the IP address.

Any ideas on how to fix this?
I can provide screenshots if needed.

Thank you

EDIT: After checking apache2 logs, there seems to be a error

Code:
[php7:error] [pid 698] [client 10.75.10.230:48270] PHP Fatal error:  Uncaught RuntimeException: #E-7 -Cannot load class <b>DOMDocument</b>, file <b>./classes/class.domdocument.php</b> doesn't exist in /var/www/html/install.php:27\nStack trace:\n#0 [internal function]: autoLoadClass('DOMDocument')\n#1 /var/www/html/classes/vocations.php(13): spl_autoload_call('DOMDocument')\n#2 /var/www/html/classes/website.php(105): Vocations->__construct('/home/OTServer/...')\n#3 /var/www/html/classes/website.php(111): Website::loadVocations()\n#4 /var/www/html/system/load.compat.php(55): Website::getVocations()\n#5 /var/www/html/install.php(427): include_once('/var/www/html/s...')\n#6 {main}\n  thrown in /var/www/html/install.php on line 27, referer: http://10.75.10.230//install.php?page=step&step=5

EDIT2: I have remade the entire process on Windows and there is no issue apart from Cache folder being in Read-Only constantly. I'm not sure what is causing the issue on Linux, but i wanted to have my server on linux...


SOLUTION: If you running linux, remember to install php-xml ;D as that causes the above issue.
Code:
sudo apt-get install php-xml
sudo service apache2 restart

fixed all the issues!

EDIT3: I would recommend using Visual Studio Code -> its free, supports Lua, C++, PHP and all other languages making it much easier to edit any file :)
 
Last edited:
Hi there, im just following the step through this guide and im up to the point where I have to copy the config.lua and config.lua.dist and in my file I only have the config.lua.dist file. do I just continue with the one file or do I have to find the other file from somewhere else or have I messed up a step somewhere?

Thanks
 
Hi there, im just following the step through this guide and im up to the point where I have to copy the config.lua and config.lua.dist and in my file I only have the config.lua.dist file. do I just continue with the one file or do I have to find the other file from somewhere else or have I messed up a step somewhere?

Thanks
Make a copy of config.lua.dist and name the new copy config.lua. From then on you only need to look at config.lua.
 
EDIT3: I would recommend using Visual Studio Code -> its free, supports Lua, C++, PHP and all other languages making it much easier to edit any file :)
I tried VS/VSC many times, but when I compare 'search in project' and 'search in files' views, shortcuts and code navigation.. I always switch back to JetBrains tools.
 
In my workplace I use both VSC and JetBrains tools (pyCharm mostly) and - well, for almost 5 years using them simultaneously JetBrains is in my opinion way better and I am just talking about free version.
The JetBrains premium one is without comparison; I wouldn't even argue at this point.
 
Getting this error:
STEP 4
Add samples to DB:

Fatal error: Uncaught Error: Call to a member function fetch() on bool in C:\xampp\htdocs\classes\account.php:33 Stack trace: #0 C:\xampp\htdocs\classes\account.php(21): Account->load(1, 'name') #1 C:\xampp\htdocs\install.php(334): Account->__construct(1, 'name') #2 {main} thrown in C:\xampp\htdocs\classes\account.php on line 33

Please help. Thanks.
 
Getting this error:
STEP 4
Add samples to DB:

Fatal error: Uncaught Error: Call to a member function fetch() on bool in C:\xampp\htdocs\classes\account.php:33 Stack trace: #0 C:\xampp\htdocs\classes\account.php(21): Account->load(1, 'name') #1 C:\xampp\htdocs\install.php(334): Account->__construct(1, 'name') #2 {main} thrown in C:\xampp\htdocs\classes\account.php on line 33

Please help. Thanks.
Have u figured this part out yet? Am getting same issue ..
 
Getting this error:
STEP 4
Add samples to DB:

Fatal error: Uncaught Error: Call to a member function fetch() on bool in C:\xampp\htdocs\classes\account.php:33 Stack trace: #0 C:\xampp\htdocs\classes\account.php(21): Account->load(1, 'name') #1 C:\xampp\htdocs\install.php(334): Account->__construct(1, 'name') #2 {main} thrown in C:\xampp\htdocs\classes\account.php on line 33

Please help. Thank
getting same issue i use znote acc
 

STEP 4​

Add samples to DB:

Fatal error: Uncaught Error: Call to a member function fetch() on bool in C:\Xpam\htdocs\classes\account.php:33 Stack trace: #0 C:\Xpam\htdocs\classes\account.php(21): Account->load(1, 'name') #1 C:\Xpam\htdocs\install.php(334): Account->__construct(1, 'name') #2 {main} thrown in C:\Xpam\htdocs\classes\account.php on line 33

Someone fix it? i can pay for this xD
 
Last edited:

STEP 4​

Add samples to DB:

Fatal error: Uncaught Error: Call to a member function fetch() on bool in C:\Xpam\htdocs\classes\account.php:33 Stack trace: #0 C:\Xpam\htdocs\classes\account.php(21): Account->load(1, 'name') #1 C:\Xpam\htdocs\install.php(334): Account->__construct(1, 'name') #2 {main} thrown in C:\Xpam\htdocs\classes\account.php on line 33

Someone fix it? i can pay for this xD
use UniServerZ and znote
is better
 

STEP 4​

Add samples to DB:

Fatal error: Uncaught Error: Call to a member function fetch() on bool in C:\Xpam\htdocs\classes\account.php:33 Stack trace: #0 C:\Xpam\htdocs\classes\account.php(21): Account->load(1, 'name') #1 C:\Xpam\htdocs\install.php(334): Account->__construct(1, 'name') #2 {main} thrown in C:\Xpam\htdocs\classes\account.php on line 33

Someone fix it? i can pay for this xD
Code:
Call to a member function fetch() on bool
This error in 99% cases means that your acc. maker version is not compatible with your OTS database structure ex. using TFS 0.4 acc. maker and TFS 1.2 database.
 
Code:
Call to a member function fetch() on bool
This error in 99% cases means that your acc. maker version is not compatible with your OTS database structure ex. using TFS 0.4 acc. maker and TFS 1.2 database.

i had this problem with TFS 1.3 and your last version of acc maker but i tought version for TFS 1.2+ mean 1.3 aswell :p
 
i had this problem with TFS 1.3 and your last version of acc maker but i tought version for TFS 1.2+ mean 1.3 aswell :p
Do you mean newest version of TFS from github? There is just updated 1.2 with broken backward compability.
I see they changed accounts table structure 3 months ago:

I will update Gesior2012 to newest TFS structure tommorow and release '1.3' branch.
 
Do you mean newest version of TFS from github? There is just updated 1.2 with broken backward compability.
I see they changed accounts table structure 3 months ago:

I will update Gesior2012 to newest TFS structure tommorow and release '1.3' branch.

thank you mate.
just let me know when u done :)
 
thank you mate.
just let me know when u done :)
Done. Added TFS-1.3 branch and merged it to master:
Added PHP 8.0 compatibility to 1.3 and 1.2 branches. PHP 5.6 is no longer supported by Gesior2012 (8.0 support breaks 5.6 support).
Added list of PHP extensions required by acc. maker to README.md:
Code:
bcmath
dom
gd
xml
 
Hello @Gesior.pl, I am having the following error, any idea?

STEP 1​

Check server configuration

Parse error: syntax error, unexpected token "{", expecting ";" in C:\xampp\htdocs\classes\configlua.php(57) : eval()'d code on line 1
 
Back
Top