Giter VIP home page Giter VIP logo

Comments (16)

alpham8 avatar alpham8 commented on August 31, 2024

Well, I see two possibilities for an easy running:
1st: Simply place the /public folder under XAMPP\htdocs. This should work, because the main index.php doesn't validte its current location: https://github.com/BlackScorpGames/webrpg/blob/master/public/index.php#L7
2nd: As I understood the code so far, it should also possible to create a vhost for the web app. Then, edit the hosts file (OS dependend where it is located) and add the just created vhost entry to it pointing to 127.0.0.1
These two steps above can be automated by an system dependend terminal script on all major OS, so that the user just need to call this file with one or maximal two parameters in order to bootstrap the web app on his or her computer.
E. g. on Windows it is an *.bat file and on *NIX like systems it is an bash script file. So, for doing so we just need two scripts: Windows and *NIX like systems:

  • for Windows, the hosts file is located under C:\Windows\System32\drivers\etc. It also possible in an Windows script file to use system vars like the one for the Windows system folder. So, if the windows folder is not located under the C: drive, we can use this system var to safely figure it out.
  • for *NIX like systems (any Linux Distri, Mac OS X and BSD) the hosts file is located under /etc/hosts
    I found already many of those predefined scripts in the internet. So, it should be less dev engagement to get these two scripts. Many of the code, that is needed, can be found on the internet.

from webrpg.

BlackScorp avatar BlackScorp commented on August 31, 2024

well i actually thought of something much easier, an index.php inside root folder which also work like public/index.php and a .htaccess file.

also a function is required which generates the URL for a route.

Modifying the hosts file requires special previleges + i think its too much efford for this :D

from webrpg.

alpham8 avatar alpham8 commented on August 31, 2024

Well, ok, then create a symlink inside htdocs and you are done (and also setup the web server's document root to follow symlinks, if not already present. Again: This could be also done via an OS dependend terminal script).
So, for just resolving this issue, just edit the README.md on about how to create a symlink and the issue should be in my opinion be done.

from webrpg.

BlackScorp avatar BlackScorp commented on August 31, 2024

no, my idea was to just download the game, unzip it in xampp/webrpg/htdocs and open localhost/webrpg and everything will just work fine thats it, no special settings nothing.

from webrpg.

Cruise44 avatar Cruise44 commented on August 31, 2024

Hello looking to get some help with MAMP on a mac? Ive tried the above and adjusting root folder to suit, like other root folders. to begin with i get text saying i need config/database.php is missing and that i need to copy database.example.php, i ahve done this and altered the file to suit the MAMP settings for local host. then just get a firefox page saying Problem loading page, the connection was reset? any ideas, ive also tried changing local-server.bat file. I am new to coding and Git, so most likely ive not altered settings correctly, however i have been able to get MAMP to work fine with other projects, also i got the error message at start about config/database.php

Using Sublime Text as text editor, also noticed that the database.php file appears to be greyed out in sublime text unlike other filenames.

Any help welcomed.

from webrpg.

BlackScorp avatar BlackScorp commented on August 31, 2024

Hello looking to get some help with MAMP on a mac? Ive tried the above and adjusting root folder to suit, like other root folders. to begin with i get text saying i need config/database.php is missing and that i need to copy database.example.php, i ahve done this and altered the file to suit the MAMP settings for local host. then just get a firefox page saying Problem loading page, the connection was reset? any ideas, ive also tried changing local-server.bat file. I am new to coding and Git, so most likely ive not altered settings correctly, however i have been able to get MAMP to work fine with other projects, also i got the error message at start about config/database.php

Using Sublime Text as text editor, also noticed that the database.php file appears to be greyed out in sublime text unlike other filenames.

Any help welcomed.

actually, for Mamp and Xampp and others, all you have to do is just to download the zip from https://github.com/BlackScorpGames/webrpg/archive/master.zip and extract the content to htdocs folder. afterwards just rename config/database.example.php to database.php and update the values. you also need to run the install.sql from root folder in your phpmyadmin.

the local-server.bat file is ment for windows users without xampp/mamp, you can ignore it. and the database.php s greyed out because i added it to gitignore, so that you cannot commit it by accident with your database password information. since this data you wont provide to public;)

from webrpg.

Cruise44 avatar Cruise44 commented on August 31, 2024

from webrpg.

BlackScorp avatar BlackScorp commented on August 31, 2024

no, the gitignore has nothing todo with your error. and the greyed out php file is correct. if it is not greyed out you might commit the file with your database password and then everyone can see it.

from webrpg.

Cruise44 avatar Cruise44 commented on August 31, 2024

from webrpg.

BlackScorp avatar BlackScorp commented on August 31, 2024
  1. https://github.com/BlackScorpGames/webrpg/archive/master.zip download and unzip to the htdocs folder in your mammp
  2. copy and rename database.example.php to database.php
  3. edit database.php and put your local cridentials in it
  4. open PHPMyadmin and run install.sql inside PHPMyadmin SQL
  5. open localhost/webrpg and see the game

if there is an error, please tell me the error message

from webrpg.

Cruise44 avatar Cruise44 commented on August 31, 2024

from webrpg.

Cruise44 avatar Cruise44 commented on August 31, 2024

from webrpg.

BlackScorp avatar BlackScorp commented on August 31, 2024

Hi, so that is the easiest way, just to unzip to the htdocs folder. since in most people dont modify their main document root.

if you have your special project setup with custom domains on local PC then, you need to configure the project the same way like you do it for your other project BUT please point with the new local domain to the "public" folder inside the project. So the location should be /path/to/webrpg/public so that if you open mylocaldomain.dev you should see the index.php from the public folder

from webrpg.

Cruise44 avatar Cruise44 commented on August 31, 2024

from webrpg.

BlackScorp avatar BlackScorp commented on August 31, 2024

iam really not sure what youre doing, i have no idea what you configured on your server, i just installed a Virtual machine to test it out, and i installed the current xampp version on it. unziped everything inside htdocs folder and installed the "install.sql" with PhpMyAdmin. Afterwards i made a copy of config/database.example.php to config/database.php and added there the login information to the database.

it is acutally plain simple, it seems like you modified your server config somehow that you get that response.

as i told, all you need is 1) Database (you get the information from install.sql) 2) Configured login to the database in config/database.php and 3) a Webserver with a document root poining to "public/" directory OR if you just use the default installation from xampp then the project should be within htdocs.

everything else you modified locally on your server is up to you, i have no idea about your hosts file, your apache httpd.conf and other things.

try out, install virtual box on your mac machine, install ubuntu or windows on this virtual box and install there a plain new xampp and then you will see the results.

"ERR_EMPTY_RESPONSE " usually means that the webserver is not configure properly

from webrpg.

Cruise44 avatar Cruise44 commented on August 31, 2024

from webrpg.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.