Maian Music Setup - Please Read Carefully

Server Requirements
A Windows or Linux web server with a PHP version 7.0 or higher. To view currently supported versions, see the system requirements.
1 MySQL/MariaDB database to hold the script tables. MySQL5+ is recommended. This is set up on your web server.
SSL installed so your server loads over https for secure encryption and connection to gateway APIs.
MySQL Improved Extension (mysqli) functions enabled on server for database connection.
JSON functions enabled on server for ajax responses.
Password Hash API support enabled for secure password hashing.
Mcrypt library enabled for data encryption (not required for white label licence). Required for PHP7.0* ONLY.
OpenSSL library enabled for data encryption (not required for white label licence). PHP7.1 or higher ONLY.
ZipArchive Class enabled for consolidating collection purchases and cover art into single download.
CURL functions enabled for software version check, payment gateways & twitter api.
Simple XML functions enabled for some payment gateways.

The installer will check what functions are available.

It is also important you can upload files outside of your web root, this means one directory lower than your public_html or www folder. Files stores here are NOT accessible on the web and cannot be found by web scrapers. For security, files should be outside of your web root, not in the public domain. If you cannot protect your files, this script may be useless to you.

Finally, a good VPS or Dedicated server is recommended. For download sites, don't expect too much reliability in a cheap shared server. Processing power is slow and unreliable. This could impact your business and sales!
Step 1 Create Config File/MySQL Database
If you don't have a database available, create one via your server control panel. Most server control panels have easy options to create databases, but if you are unsure, contact your host.

Once a database is available, copy the 'control/_cfg-sample.php' file as 'control/_cfg.php' and open the 'control/_cfg.php' file in your text editor and update the connection parameters. Example:

define('DB_HOST', 'localhost');
define('DB_USER', 'joeblogs_admin');
define('DB_PASS', '12345XX');
define('DB_NAME', 'music');
define('DB_PREFIX', 'mm_');
define('DB_CHAR_SET', 'utf8');
define('DB_LOCALE', 'en_GB');
Also, in the 'control/_cfg.php' file set a unique secret key (or salt) value. You can use the Maian Media secret key service to generate a unique key. See the connection file for more information.

define('SECRET_KEY', 'your unique string here');
Step 2 Set Administration Password
Again, in the 'control/_cfg.php' file enter an administration user/pass. Examples:

define('LG_USER', 'admin');
define('LG_PASS', 'admin');
You can also restrict the login to certain IP addresses ONLY for security. Enter one or more IP addresses separated with a comma. Useful only if you have a fixed IP address. Leave blank for no IP restriction. Examples:

define('LG_RESTRICT_BY_IP', '127.0.0.1');
define('LG_RESTRICT_BY_IP', '127.0.0.1,78.150.204.108');
Note that this is not a server IP restriction.
Step 3 FTP
Using a good FTP program such as FileZilla, WinSCP or Cyberduck, transfer the contents of the 'music-store' folder to your web server. You may rename the folder if you wish or have the files in your public html root not inside a folder. Examples:

https://www.example.com/
https://www.example.com/store/
https://www.example.com/music/
Step 4 Create MP3 Secure Directory
You need to protect your MP3 files. For this you need a secure directory ONE directory lower than your public_html/htdocs/www folder.

So, create a directory one directory lower with any name you like. So, if your structure looks like this:

etc/
public_ftp/
public_html/
tmp/
You should create your secure folder alongside these folders. Example:

etc/
public_ftp/
public_html/
secure/
tmp/
Make sure you specify the correct path to this folder in the admin settings. See below.
Step 5 Permissions
Give the following directories read/write permissions. Chmod to 0777 (or 0755 if supported) on Linux.

admin/backup/
logs/
You may be able to do this directly in your FTP via the right click menu. They should all be world writeable.
Step 6 Run Installer
Access the installer in your browser via the 'install/index.php' file. Follow the onscreen instructions.

Important: When you have run the installer, rename or delete the 'install' folder from your server.

Alternatively, if you are an advanced user and you are familiar with executing SQL files, run the following file in your MySQL database management program.

docs/schematic/database-schema.sql
The following FREE applications can be used to administer MySQL and are all excellent:

HeidiSQL (My software of choice for local administration on Windows and one of the best free pieces of software out there)
PHPMyAdmin (Installed on many servers as the default database software. PHP based.)
AdMiner (Single PHP file. Brilliant and best server based option in our opinion)
SQL Buddy (Lightweight PHP based software. Great alternative to PHPMyAdmin.)
MySQL Workbench (Powerful Windows based software from the MySQL creators)
Database Beaver (Free database management software for Windows. Java required.)
NOTE: If you manually run the 'docs/schematic/database-schema.sql' file you do NOT need to access the install folder!
Step 7 Update Settings / Secure Folder Path
Once the installer is run, log into your administration centre (admin/index.php) with the user/pass you specified above and update your settings.

You should make sure that the path is correct to your secure folder for the "Server Path to Secure Folder" option. This is a server path and NOT a http path. Use the "check" option to see if the path you have entered exists correctly.

Step 8 Rename Admin Folder
For extra security it is recommended you rename the 'admin' folder to something else. If you rename the folder, enter the new folder name in the 'ADMIN_FOLDER' value in the 'control/options.php' file.
Step 9 Set Up Cron Job
For certain ops. Please refer to the information here.
Step 10 Music File Setup
Refer to the MP3 Music Setup section for help in uploading & setting up your music files.
Step 11 Complete Music Store Setup & Other Options
In your admin area use the Help pages if enabled to view help for each page/section.
Help / Support
See the support option if you are having problems.