Maian Music Setup - Please Read Carefully

Server Requirements
A Windows or Linux web server with a PHP version 8.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.
OpenSSL library enabled for data encryption (not required for white label licence).
ZipArchive Class enabled for consolidating collection purchases and cover art into single download.
CURL functions enabled for software version check & payment gateways.
.htaccess and Mod_Rewrite supported web server.

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 or WinSCP, transfer the contents of the ' public' folder to your web server.

Most good FTP programs auto detect 'ascii' mode for PHP files. However, if you are presented with an option, you should specify 'ascii' and not 'binary'.

Files can be uploaded directly into your web root or inside any folder you specify.

https://www.example.com/dir/*
https://www.example.com/*
Step 4 Create Secure Audio Directory
You need to protect your audio 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.

content/_theme_default/cache
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
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 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.