If you can not enable JavaScript for some reason you can follow these steps in
order to setup FOSSBilling:
- * Rename "bb-config-sample.php" file to "bb-config.php", fill in the values and change this file permissions to read only (CHMOD 644).
+ * Rename "config-sample.php" file to "config.php", fill in the values and change this file permissions to read only (CHMOD 644).
* Import /install/sql/structure.sql to your database
* Import /install/sql/content.sql to your database
* Open browser {{constant("BB_URL")}}index.php?_url=/admin to create new admin
diff --git a/src/install/assets/layout.html.twig b/src/install/assets/layout.html.twig
index 0da5c2e76..823432b36 100644
--- a/src/install/assets/layout.html.twig
+++ b/src/install/assets/layout.html.twig
@@ -10,7 +10,7 @@
composer install\" in order to install them. For detailed instruction, you can see Composer's getting started guide.Please use the example config as reference here. You may need to manually restore a old config file or fix your existing one.
"; + $msg = "Your $configFile file seems to be invalid. It's possible that your preexisting configuration file may not contain the required configuration parameters or have become corrupted. FOSSBilling needs to have a valid configuration file present in order to function properly.Please use the example config as reference here. You may need to manually restore a old config file or fix your existing one.
"; throw new Exception($msg, 101); } +// Try to check if /install directory still exists, even after the installation was completed and display a message +if (file_exists($configPath) && 0 !== filesize($configPath) && file_exists(PATH_ROOT . '/install/index.php')) { + throw new Exception('For safety reasons, you have to delete the /install directory to start using FOSSBilling.Please delete the /install directory from your web server.', 102);
+}
+
+// Detect old for files from an old BoxBilling or FOSSBilling preview installation.
+function detectOldFiles(){
+ $i = 0;
+ $msg = '';
+ $foundOld = false;
+
+ $oldFolderNames = ['bb-data','bb-library','bb-locale','bb-modules','bb-themes','bb-uploads','bb-cron.php','bb-di.php','bb-ipn.php','bb-load.php','bb-config.php'];
+ $newFolderNames = ['data','library','locale','modules','themes','uploads','cron.php','di.php','ipn.php','load.php','config.php'];
+
+ foreach ($oldFolderNames as $folder){
+ $toCheck = PATH_ROOT . DIRECTORY_SEPARATOR . $folder;
+ $newName = $newFolderNames[$i];
+ if(file_exists($toCheck) or is_dir($toCheck)){
+ $msg .= "$folder --> $newName
";
+ $foundOld = true;
+ }
+ $i++;
+ }
+ if($foundOld){
+ $finalMsg = "The FOSSBilling file structure has been changed, please migrate any custom files and folders from the old folder to the new folder and then delete the old ones. You will also need to update the paths in your config.php file.
";
+ $finalMsg .= "Feel free to join our Discord Server for assitance.
";
+ $finalMsg .= "Files and folders renamed:
";
+ $finalMsg .= $msg;
+ throw new Exception($finalMsg);
+ }
+}
+detectOldFiles();
+
// Try to check if /install directory still exists, even after the installation was completed
-if (file_exists($configPath) && 0 !== filesize($configPath) && file_exists(BB_PATH_ROOT . '/install/index.php')) {
+if (file_exists($configPath) && 0 !== filesize($configPath) && file_exists(PATH_ROOT . '/install/index.php')) {
throw new Exception('For safety reasons, you have to delete the /install directory to start using FOSSBilling.
Please delete the /install directory from your web server.', 102); } $config = require $configPath; -require BB_PATH_VENDOR . '/autoload.php'; +require PATH_VENDOR . '/autoload.php'; date_default_timezone_set($config['timezone']); define('BB_DEBUG', $config['debug']); define('BB_URL', $config['url']); define('BB_SEF_URLS', $config['sef_urls']); -define('BB_PATH_CACHE', $config['path_data'] . '/cache'); -define('BB_PATH_LOG', $config['path_data'] . '/log'); +define('PATH_CACHE', $config['path_data'] . '/cache'); +define('PATH_LOG', $config['path_data'] . '/log'); define('BB_SSL', str_starts_with($config['url'], 'https')); if ($config['sef_urls']) { @@ -309,13 +352,13 @@ if ($config['debug']) { ini_set('log_errors', '1'); ini_set('html_errors', false); -ini_set('error_log', BB_PATH_LOG . '/php_error.log'); +ini_set('error_log', PATH_LOG . '/php_error.log'); $isApache = (function_exists('apache_get_version')) ? true : false; $serverSoftware = (isset($_SERVER['SERVER_SOFTWARE'])) ? $_SERVER['SERVER_SOFTWARE'] : ''; if ($isApache or (false !== stripos($serverSoftware, 'apache'))) { - if (!file_exists(BB_PATH_ROOT . '/.htaccess')) { + if (!file_exists(PATH_ROOT . '/.htaccess')) { throw new Exception('Error: You appear to be running an Apache server without a valid .htaccess file. You may need to rename htaccess.txt to .htaccess'); } } diff --git a/src/bb-locale/en_US/LC_MESSAGES/index.html b/src/locale/en_US/LC_MESSAGES/index.html similarity index 100% rename from src/bb-locale/en_US/LC_MESSAGES/index.html rename to src/locale/en_US/LC_MESSAGES/index.html diff --git a/src/bb-locale/en_US/LC_MESSAGES/messages.mo b/src/locale/en_US/LC_MESSAGES/messages.mo similarity index 100% rename from src/bb-locale/en_US/LC_MESSAGES/messages.mo rename to src/locale/en_US/LC_MESSAGES/messages.mo diff --git a/src/bb-locale/en_US/LC_MESSAGES/messages.po b/src/locale/en_US/LC_MESSAGES/messages.po similarity index 99% rename from src/bb-locale/en_US/LC_MESSAGES/messages.po rename to src/locale/en_US/LC_MESSAGES/messages.po index deca6a96a..386e25b3a 100644 --- a/src/bb-locale/en_US/LC_MESSAGES/messages.po +++ b/src/locale/en_US/LC_MESSAGES/messages.po @@ -399,7 +399,7 @@ msgstr "" msgid "FTP Username/Password incorrect for :usernmae" msgstr "" -msgid "FOSSBilling license key must be defined in bb-config.php file." +msgid "FOSSBilling license key must be defined in config.php file." msgstr "" msgid "License is not valid" @@ -3250,7 +3250,7 @@ msgstr "" msgid "Module settings" msgstr "" -msgid "Edit bb-config.php file" +msgid "Edit config.php file" msgstr "" msgid "Licensed to" diff --git a/src/bb-locale/en_US/index.html b/src/locale/en_US/index.html similarity index 100% rename from src/bb-locale/en_US/index.html rename to src/locale/en_US/index.html diff --git a/src/bb-locale/index.html b/src/locale/index.html similarity index 100% rename from src/bb-locale/index.html rename to src/locale/index.html diff --git a/src/bb-locale/messages.pot b/src/locale/messages.pot similarity index 99% rename from src/bb-locale/messages.pot rename to src/locale/messages.pot index 4445912ac..4a0677f62 100644 --- a/src/bb-locale/messages.pot +++ b/src/locale/messages.pot @@ -398,7 +398,7 @@ msgstr "" msgid "FTP Username/Password incorrect for :usernmae" msgstr "" -msgid "FOSSBilling license key must be defined in bb-config.php file." +msgid "FOSSBilling license key must be defined in config.php file." msgstr "" msgid "License is not valid" @@ -3249,7 +3249,7 @@ msgstr "" msgid "Module settings" msgstr "" -msgid "Edit bb-config.php file" +msgid "Edit config.php file" msgstr "" msgid "Licensed to" diff --git a/src/bb-modules/Activity/Api/Admin.php b/src/modules/Activity/Api/Admin.php similarity index 100% rename from src/bb-modules/Activity/Api/Admin.php rename to src/modules/Activity/Api/Admin.php diff --git a/src/bb-modules/Activity/Controller/Admin.php b/src/modules/Activity/Controller/Admin.php similarity index 100% rename from src/bb-modules/Activity/Controller/Admin.php rename to src/modules/Activity/Controller/Admin.php diff --git a/src/bb-modules/Activity/Service.php b/src/modules/Activity/Service.php similarity index 100% rename from src/bb-modules/Activity/Service.php rename to src/modules/Activity/Service.php diff --git a/src/bb-modules/Activity/html_admin/mod_activity_index.html.twig b/src/modules/Activity/html_admin/mod_activity_index.html.twig similarity index 100% rename from src/bb-modules/Activity/html_admin/mod_activity_index.html.twig rename to src/modules/Activity/html_admin/mod_activity_index.html.twig diff --git a/src/bb-modules/Activity/manifest.json b/src/modules/Activity/manifest.json similarity index 100% rename from src/bb-modules/Activity/manifest.json rename to src/modules/Activity/manifest.json diff --git a/src/bb-modules/Api/Controller/Client.php b/src/modules/Api/Controller/Client.php similarity index 100% rename from src/bb-modules/Api/Controller/Client.php rename to src/modules/Api/Controller/Client.php diff --git a/src/bb-modules/Api/Service.php b/src/modules/Api/Service.php similarity index 100% rename from src/bb-modules/Api/Service.php rename to src/modules/Api/Service.php diff --git a/src/bb-modules/Api/manifest.json b/src/modules/Api/manifest.json similarity index 100% rename from src/bb-modules/Api/manifest.json rename to src/modules/Api/manifest.json diff --git a/src/bb-modules/Branding/Service.php b/src/modules/Branding/Service.php similarity index 100% rename from src/bb-modules/Branding/Service.php rename to src/modules/Branding/Service.php diff --git a/src/bb-modules/Branding/manifest.json b/src/modules/Branding/manifest.json similarity index 100% rename from src/bb-modules/Branding/manifest.json rename to src/modules/Branding/manifest.json diff --git a/src/bb-modules/Cart/Api/Admin.php b/src/modules/Cart/Api/Admin.php similarity index 100% rename from src/bb-modules/Cart/Api/Admin.php rename to src/modules/Cart/Api/Admin.php diff --git a/src/bb-modules/Cart/Api/Client.php b/src/modules/Cart/Api/Client.php similarity index 100% rename from src/bb-modules/Cart/Api/Client.php rename to src/modules/Cart/Api/Client.php diff --git a/src/bb-modules/Cart/Api/Guest.php b/src/modules/Cart/Api/Guest.php similarity index 100% rename from src/bb-modules/Cart/Api/Guest.php rename to src/modules/Cart/Api/Guest.php diff --git a/src/bb-modules/Cart/Controller/Client.php b/src/modules/Cart/Controller/Client.php similarity index 100% rename from src/bb-modules/Cart/Controller/Client.php rename to src/modules/Cart/Controller/Client.php diff --git a/src/bb-modules/Cart/Service.php b/src/modules/Cart/Service.php similarity index 100% rename from src/bb-modules/Cart/Service.php rename to src/modules/Cart/Service.php diff --git a/src/bb-modules/Cart/manifest.json b/src/modules/Cart/manifest.json similarity index 100% rename from src/bb-modules/Cart/manifest.json rename to src/modules/Cart/manifest.json diff --git a/src/bb-modules/Client/Api/Admin.php b/src/modules/Client/Api/Admin.php similarity index 100% rename from src/bb-modules/Client/Api/Admin.php rename to src/modules/Client/Api/Admin.php diff --git a/src/bb-modules/Client/Api/Client.php b/src/modules/Client/Api/Client.php similarity index 100% rename from src/bb-modules/Client/Api/Client.php rename to src/modules/Client/Api/Client.php diff --git a/src/bb-modules/Client/Api/Guest.php b/src/modules/Client/Api/Guest.php similarity index 100% rename from src/bb-modules/Client/Api/Guest.php rename to src/modules/Client/Api/Guest.php diff --git a/src/bb-modules/Client/Controller/Admin.php b/src/modules/Client/Controller/Admin.php similarity index 100% rename from src/bb-modules/Client/Controller/Admin.php rename to src/modules/Client/Controller/Admin.php diff --git a/src/bb-modules/Client/Controller/Client.php b/src/modules/Client/Controller/Client.php similarity index 100% rename from src/bb-modules/Client/Controller/Client.php rename to src/modules/Client/Controller/Client.php diff --git a/src/bb-modules/Client/Service.php b/src/modules/Client/Service.php similarity index 100% rename from src/bb-modules/Client/Service.php rename to src/modules/Client/Service.php diff --git a/src/bb-modules/Client/ServiceBalance.php b/src/modules/Client/ServiceBalance.php similarity index 100% rename from src/bb-modules/Client/ServiceBalance.php rename to src/modules/Client/ServiceBalance.php diff --git a/src/bb-modules/Client/html_admin/mod_client_group.html.twig b/src/modules/Client/html_admin/mod_client_group.html.twig similarity index 100% rename from src/bb-modules/Client/html_admin/mod_client_group.html.twig rename to src/modules/Client/html_admin/mod_client_group.html.twig diff --git a/src/bb-modules/Client/html_admin/mod_client_index.html.twig b/src/modules/Client/html_admin/mod_client_index.html.twig similarity index 100% rename from src/bb-modules/Client/html_admin/mod_client_index.html.twig rename to src/modules/Client/html_admin/mod_client_index.html.twig diff --git a/src/bb-modules/Client/html_admin/mod_client_login_history.html.twig b/src/modules/Client/html_admin/mod_client_login_history.html.twig similarity index 100% rename from src/bb-modules/Client/html_admin/mod_client_login_history.html.twig rename to src/modules/Client/html_admin/mod_client_login_history.html.twig diff --git a/src/bb-modules/Client/html_admin/mod_client_manage.html.twig b/src/modules/Client/html_admin/mod_client_manage.html.twig similarity index 100% rename from src/bb-modules/Client/html_admin/mod_client_manage.html.twig rename to src/modules/Client/html_admin/mod_client_manage.html.twig diff --git a/src/bb-modules/Client/html_admin/mod_client_settings.html.twig b/src/modules/Client/html_admin/mod_client_settings.html.twig similarity index 100% rename from src/bb-modules/Client/html_admin/mod_client_settings.html.twig rename to src/modules/Client/html_admin/mod_client_settings.html.twig diff --git a/src/bb-modules/Client/html_client/mod_client_balance.html.twig b/src/modules/Client/html_client/mod_client_balance.html.twig similarity index 100% rename from src/bb-modules/Client/html_client/mod_client_balance.html.twig rename to src/modules/Client/html_client/mod_client_balance.html.twig diff --git a/src/bb-modules/Client/html_client/mod_client_profile.html.twig b/src/modules/Client/html_client/mod_client_profile.html.twig similarity index 100% rename from src/bb-modules/Client/html_client/mod_client_profile.html.twig rename to src/modules/Client/html_client/mod_client_profile.html.twig diff --git a/src/bb-modules/Client/html_email/mod_client_confirm.html.twig b/src/modules/Client/html_email/mod_client_confirm.html.twig similarity index 100% rename from src/bb-modules/Client/html_email/mod_client_confirm.html.twig rename to src/modules/Client/html_email/mod_client_confirm.html.twig diff --git a/src/bb-modules/Client/html_email/mod_client_password_reset_approve.html.twig b/src/modules/Client/html_email/mod_client_password_reset_approve.html.twig similarity index 100% rename from src/bb-modules/Client/html_email/mod_client_password_reset_approve.html.twig rename to src/modules/Client/html_email/mod_client_password_reset_approve.html.twig diff --git a/src/bb-modules/Client/html_email/mod_client_password_reset_request.html.twig b/src/modules/Client/html_email/mod_client_password_reset_request.html.twig similarity index 100% rename from src/bb-modules/Client/html_email/mod_client_password_reset_request.html.twig rename to src/modules/Client/html_email/mod_client_password_reset_request.html.twig diff --git a/src/bb-modules/Client/html_email/mod_client_signup.html.twig b/src/modules/Client/html_email/mod_client_signup.html.twig similarity index 100% rename from src/bb-modules/Client/html_email/mod_client_signup.html.twig rename to src/modules/Client/html_email/mod_client_signup.html.twig diff --git a/src/bb-modules/Client/icon.png b/src/modules/Client/icon.png similarity index 100% rename from src/bb-modules/Client/icon.png rename to src/modules/Client/icon.png diff --git a/src/bb-modules/Client/manifest.json b/src/modules/Client/manifest.json similarity index 100% rename from src/bb-modules/Client/manifest.json rename to src/modules/Client/manifest.json diff --git a/src/bb-modules/Cookieconsent/Api/Guest.php b/src/modules/Cookieconsent/Api/Guest.php similarity index 100% rename from src/bb-modules/Cookieconsent/Api/Guest.php rename to src/modules/Cookieconsent/Api/Guest.php diff --git a/src/bb-modules/Cookieconsent/Controller/Admin.php b/src/modules/Cookieconsent/Controller/Admin.php similarity index 100% rename from src/bb-modules/Cookieconsent/Controller/Admin.php rename to src/modules/Cookieconsent/Controller/Admin.php diff --git a/src/bb-modules/Cookieconsent/Service.php b/src/modules/Cookieconsent/Service.php similarity index 100% rename from src/bb-modules/Cookieconsent/Service.php rename to src/modules/Cookieconsent/Service.php diff --git a/src/bb-modules/Cookieconsent/html_admin/mod_cookieconsent_index.html.twig b/src/modules/Cookieconsent/html_admin/mod_cookieconsent_index.html.twig similarity index 94% rename from src/bb-modules/Cookieconsent/html_admin/mod_cookieconsent_index.html.twig rename to src/modules/Cookieconsent/html_admin/mod_cookieconsent_index.html.twig index 583917c1d..cb3934b71 100644 --- a/src/bb-modules/Cookieconsent/html_admin/mod_cookieconsent_index.html.twig +++ b/src/modules/Cookieconsent/html_admin/mod_cookieconsent_index.html.twig @@ -13,7 +13,7 @@
{{ 'Here you can specify message which will be shown to user. It will be shown until user will click Close × button, however it will not be intrusive and will not disturb to perform any actions.'|trans }}
-{{ 'If there is a need to change the way notification looks or is being displayed, you can do it by editing'|trans }} src/bb-modules/Cookieconsent/html_client/mod_cookieconsent_index.html.twig
+{{ 'If there is a need to change the way notification looks or is being displayed, you can do it by editing'|trans }} src/modules/Cookieconsent/html_client/mod_cookieconsent_index.html.twig
{{ 'Use this tool to automatically migrate your configuration file to be compatible with the latest FOSSBilling changes. Note: this is only needed when performing manual updates'|trans }}
- + @@ -126,7 +126,7 @@{{ 'Default language can be set in'|trans }} bb-config.php parameter define('BB_LOCALE', 'en_US');
+{{ 'Default language can be set in'|trans }} config.php parameter define('BB_LOCALE', 'en_US');
{{ 'Removing languages from FOSSBilling is really simple. Just delete language folder you wish from'|trans }} {{ constant('BB_PATH_LANGS') }}
+{{ 'Removing languages from FOSSBilling is really simple. Just delete language folder you wish from'|trans }} {{ constant('PATH_LANGS') }}
{{ 'Follow these instructions to install new payment gateway.'|trans }}