https://github.com/cstringer17/hashedpotatoes
Password Playground in PHP
https://github.com/cstringer17/hashedpotatoes
mysql password-playground php php-files
Last synced: 2 months ago
JSON representation
Password Playground in PHP
- Host: GitHub
- URL: https://github.com/cstringer17/hashedpotatoes
- Owner: cstringer17
- Created: 2020-12-01T14:41:39.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-04T13:26:48.000Z (about 5 years ago)
- Last Synced: 2025-01-14T13:33:58.166Z (about 1 year ago)
- Topics: mysql, password-playground, php, php-files
- Language: PHP
- Homepage:
- Size: 1.62 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```
_ _ _ _ _____ _ _
| | | | | | | | | __ \ | | | |
| |__| | __ _ ___| |__ ___ __| | | |__) |__ | |_ __ _| |_ ___ ___ ___
| __ |/ _` / __| '_ \ / _ \/ _` | | ___/ _ \| __/ _` | __/ _ \ / _ \/ __|
| | | | (_| \__ \ | | | __/ (_| | | | | (_) | || (_| | || (_) | __/\__ \
|_| |_|\__,_|___/_| |_|\___|\__,_| |_| \___/ \__\__,_|\__\___/ \___||___/
```

# Password Playground in PHP
To get our project running run the following MYSQL script in a MYSQL installation [MYSQL File](./mysql/userRegisterTable.sql)
After that you can run the PHP Files, maybe start with [Register Page](./pages/register.php)
## Installation
First download the [source code](https://github.com/cstringer17/HashedPotatoes/releases/tag/v1.0-alpha)
Then cd into the root folder and run the following composer command to install the dependencies
Download composer here: https://getcomposer.org/download/
`composer install`
### Database setup
The following script sets up the mysql database with all the users and tables
mysql/userRegisterTable.sql
### hCaptcha Setup
As we use captcha on this web application there are a few changes that need to be done to get this to work in local development the following instructions taken from the hCaptcha Developer Docs will get it running:
> Modern browsers have strict CORS and CORB rules, so opening a file:// URI that loads hCaptcha will not work. Loading hCaptcha from http://localhost/ will encounter the same issue on some browsers. The hCaptcha API also prohibits 'localhost' and '127.0.0.1' as supplied hostnames.
> The simplest way to circumvent these issues is to add a hosts entry. For example:
`127.0.0.1 test.mydomain.com`
> Place this in /etc/hosts on Linux, /private/etc/hosts on Mac OS X, or C:\Windows\System32\Drivers\etc\hosts on Windows.
> You can then access your local server via http://test.mydomain.com, and everything will work as expected.
Quoted from https://docs.hcaptcha.com/#localdev
### Running the web server
In VSCode you can use the following extension to run the php webserver
https://github.com/brapifra/vscode-phpserver
As we changed the host file in the hCaptcha setup you will need to point the extension to the domain name given above:

### PHP Sodium configuration
The application uses the PHP sodium library to encrypt passwords, this however needs to be enables in the php.ini file inside your php installation. Add the following line to that file
`extension=php_sodium.dll`
created by @cstringer17 and @FlicT1337