diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml
index 027cc62ed..a9d1746a2 100644
--- a/.github/workflows/php.yml
+++ b/.github/workflows/php.yml
@@ -43,6 +43,7 @@ jobs:
echo > ./src/bb-data/log/license.log
echo > ./src/bb-data/log/application.log
echo > ./src/bb-data/log/php_error.log
+ rm -rf ./src/install
- name: Run test suite for bb-modules
run: |
@@ -50,4 +51,4 @@ jobs:
- name: Run test suite for bb-library
run: |
- php ./src/bb-vendor/bin/phpunit ./tests/bb-library/
\ No newline at end of file
+ php ./src/bb-vendor/bin/phpunit ./tests/bb-library/
diff --git a/Makefile b/Makefile
index 994ff3543..6dc14c171 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,9 @@ logs: ## Show app logs
exec-php: ## Enter PHP container shell
$(DOCKER_PHP_CONTAINER_EXEC) bash
+cache-flush: ## Flush Twig cache
+ $(DOCKER_PHP_CONTAINER_EXEC) rm -fr src/bb-data/cache/*
+
exec-db: ## Enter DB container shell
$(DOCKER_DB_CONTAINER_EXEC) bash
@@ -46,6 +49,7 @@ test: start ## Run app tests
echo "Running unit tests"
echo > ./src/bb-data/log/application.log
echo > ./src/bb-data/log/php_error.log
+ rm -rf src/install
$(DOCKER_PHP_CONTAINER_EXEC) composer install --working-dir=src --no-progress --no-suggest --prefer-dist
$(DOCKER_PHP_CONTAINER_EXEC) ./src/bb-vendor/bin/phpunit --dont-report-useless-tests ./tests/bb-modules/
diff --git a/src/htaccess.txt b/src/.htaccess
similarity index 92%
rename from src/htaccess.txt
rename to src/.htaccess
index 4ea01a860..fcd5b8b82 100644
--- a/src/htaccess.txt
+++ b/src/.htaccess
@@ -1,6 +1,5 @@
# Read documentation http://docs.boxbilling.com/ for more information
-# Rename this file to .htaccess in order to work
-# If you are receiving "Internal Server Error" message - make sure mod_rewrite is enabled in apache
+# If you are receiving "Internal Server Error" message, make sure mod_rewrite is enabled in apache
Options -Indexes
Options +FollowSymLinks
@@ -24,7 +23,7 @@ RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.
-### re-direct to www
+### Redirect to www
#RewriteCond %{HTTP_HOST} ^yourdomain.com
#RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
@@ -61,4 +60,4 @@ RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
- ";
+
+
+
+
+
+
+
+
+ Code: %s
', $e->getCode()); + print sprintf('%s
', $e->getMessage()); - print sprintf('Look for detailed error explanation
', urlencode($e->getMessage())); + print sprintf('Line: "%s"
', $e->getLine()); print sprintf('Trace:%s', $e->getTraceAsString()); } + print("
Powered by BoxBilling
composer install\" in order to install them. For detailed instruction, you can see Composer's getting started guide.Continue with BoxBilling installation", $url); + $msg = sprintf("The $configFile path seems to be invalid. You may have not generated the configuration file yet, or the configuration file may not contain the required configuration parameters. BoxBilling needs to have a valid configuration file present in order to function properly.
Need some help with the installation? We got it. You can create the configuration file using the interactive installer, or manually create the configuration file.
If it's your first time setting up BoxBilling, you can continue with the web-based interactive BoxBilling installation.", $url); throw new Exception($msg, 101); } +// 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')) { + throw new Exception("For safety reasons, you have to delete the /install directory to start using BoxBilling.
Please delete the /install directory from your web server.", 102); +} + $config = require_once $configPath; require BB_PATH_VENDOR . '/autoload.php'; @@ -124,15 +261,15 @@ if($config['sef_urls']) { } if($config['debug']) { - error_reporting( E_ALL ); + error_reporting(E_ALL); ini_set('display_errors', '1'); ini_set('display_startup_errors', '1'); } else { - error_reporting( E_RECOVERABLE_ERROR ); + error_reporting(E_RECOVERABLE_ERROR); ini_set('display_errors', '0'); ini_set('display_startup_errors', '0'); } ini_set('log_errors', '1'); ini_set('html_errors', FALSE); -ini_set('error_log', BB_PATH_LOG . '/php_error.log'); \ No newline at end of file +ini_set('error_log', BB_PATH_LOG . '/php_error.log'); diff --git a/src/bb-modules/Servicedomain/html_admin/mod_servicedomain_order.phtml b/src/bb-modules/Servicedomain/html_admin/mod_servicedomain_order.phtml index 459fb5dc5..3933b0f87 100644 --- a/src/bb-modules/Servicedomain/html_admin/mod_servicedomain_order.phtml +++ b/src/bb-modules/Servicedomain/html_admin/mod_servicedomain_order.phtml @@ -1,3 +1,4 @@ +{% import "macro_functions.phtml" as mf %}
This setup will guide you through installation process of BoxBilling.
-Check if your system meets minimum requirements to install and run billing software.
+Check if your system meets minimum requirements to install and run BoxBilling.