Hello,
I have connected Stencyl to my localhost server using PHP 7.2 (One of the latest releases).This task was very difficult to do and took over a week of review, and I hired a PHP developer to help me out. I would like to give him a big shout out at:
https://www.fiverr.com/indragrg92/I want to release this updated tutorial because I want to save Stencyl users countless hours and money spent trying to get this thing to work, and also advance the technological capability of Stencyl.
This tutorial utilizes MdotEdot's Online Properties Extension, the latest version you can download here: http://photoquesting.com/repo/register.php?name=UFJPUEVSVElFUw==&url=download/Properties_402.zipWith Localhost, you will have unlimited get/set calls that will always work if your server is up. Furthermore, you can transfer the hosting to a VPS if you want faster speeds, and if you want it up 24/7.NOTE: Since this tutorial is relatively new, there may be a few skipped steps. If anyone has any problems, please post here or message me on Discord at Noroup#1394 and I will guide you. Thank you.Let's begin.
1. First, you need software that will Localhost your server on your computer.
Download WAMP here and make sure you check box ALL the PHP additions:
http://www.wampserver.com/en/2. Now you need to host the server. After WAMP is done downloading, click the start menu, and run WAMPserver as admin.
3.
CHECK: When you click your task tray, the wamp icon should show up in green like this.
https://imgur.com/a/j7aEIHp4.
CHECK: Click the tray, click the wamp server icon, click PHP, and make sure you are running PHP 7.2.25 and have it checked.
5. Now, we need to make sure we can run PHP scripts from our command line. In the start bar, type "Advanced System Settings". Click Environmental variables, and click Path, then click edit. Now, you must add the file location of your PHP version in WAMP.
Like this:
https://imgur.com/a/AUpcNMAThen click OK. Now you can run PHP scripts on your command line!
5. Now we must input our server PHP files into WAMP. Click the tray, click the wamp server icon, and click open "www directory".
You must drag the updated server files into that folder.
Here are the updated server files:
https://drive.google.com/open?id=12oveTDg8KMJe2VQvVMgXLR5NPi3_1egHMake sure you use these files. They are designed to work with the latest version of PHP6. Now we must create a database in WAMP. This database will hold all of our properties. Type localhost/phpmyadmin. And log in through MySQL with your user details. Click "SQL" next to "Databases" and run these scripts
create database stencyl;
grant all privileges on stencyl.* to root@localhost;
7.
CHECK: Open the connect.php file in your www directory, and make sure your details are correct. Type localhost/connect.php in your url and see if the page that pops up is a blank white page. If it is, it connected correctly.
8. Time to create some tables in our MySQL Stencyl database. Open up command line, and run:
php -f create_db.php
The script should say "Tables Created!" if it was ran successfully.
9.
CHECK: Let's see if our tables were created. Open up localhost/phpmyadmin. Log into MySQL. Open the stencyl database you've created. It should look like this:
https://imgur.com/a/ZXTN7gf10. Now we must add an AppID and SecretID. Click stencyl_apps and insert any text to the AppID and SecretID lines.
11. Now, let's open up Stencyl and see if it can connect using MdotEdot's extension. Create a new scene, and within the scene input these codes and run the scene in HTML5.
Add this into Stencyl to check connection:
https://imgur.com/a/u1hURo812. After you run the scene in HTML5, the results should look like this:
https://imgur.com/a/PzdfoGXCongratulations: Your new Localhost server is set! Keep in mind this will only work on your personal computer until you transfer it over to a VPS.