diff --git a/Makefile.am b/Makefile.am index efd4ae17..da64c933 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,6 +4,7 @@ install: install-am mkdir -p $(DESTDIR)@sysconfdir@/sudoers.d/ # dnl #mkdir -p $(DESTDIR)@sysconfdir@/@PACKAGE@ # dnl #mkdir -p $(DESTDIR)@sbindir@ + cp -p init_autoloader.php $(DESTDIR)$(pkgdatadir) cp -pr config/ data/ module/ public/ $(DESTDIR)$(pkgdatadir) # #mkdir -p $(DESTDIR)$(pkgdatadir)/install diff --git a/Makefile.in b/Makefile.in index 0ae355c6..5ac78015 100644 --- a/Makefile.in +++ b/Makefile.in @@ -484,6 +484,7 @@ install: install-am mkdir -p $(DESTDIR)@sysconfdir@/sudoers.d/ # dnl #mkdir -p $(DESTDIR)@sysconfdir@/@PACKAGE@ # dnl #mkdir -p $(DESTDIR)@sbindir@ + cp -p init_autoloader.php $(DESTDIR)$(pkgdatadir) cp -pr config/ data/ module/ public/ $(DESTDIR)$(pkgdatadir) # #mkdir -p $(DESTDIR)$(pkgdatadir)/install diff --git a/config/application.config.php b/config/application.config.php index eec75ae5..41a8c470 100644 --- a/config/application.config.php +++ b/config/application.config.php @@ -44,9 +44,21 @@ 'User', ); +/* if($env == 'development') { - $modules[] = 'ZendDeveloperTools'; + $modules[] = 'ZendDeveloperTools'; } +*/ + +// to display all errors use: + +/* +if($env == 'development') { + $modules[] = 'ZendDeveloperTools'; // you may comment only this line out if ZendDeveloperTools are not installed e.g. + error_reporting(E_ALL); + ini_set("display_errors", 1); +} +*/ return array( // This should be an array of module namespaces used in the application. diff --git a/doc/install/INSTALL.md b/doc/install/INSTALL.md index 53c5acac..422457f0 100644 --- a/doc/install/INSTALL.md +++ b/doc/install/INSTALL.md @@ -28,7 +28,7 @@ cd /var/www/htdocs * Get the current version from github ``` -git clone https://github.com/fbergkemper/barbossa.git +git clone https://github.com/bareos/bareos-webui.git ``` * Change into the barbossa directory @@ -49,17 +49,17 @@ See [https://getcomposer.org/](https://getcomposer.org/) for more information an ### Configure Apache -See the example file [bareos-console-web.conf](https://raw.github.com/fbergkemper/barbossa/master/install/apache/bareos-console-web.conf). +See the example file [bareos-console-web.conf](https://raw.github.com/bareos/bareos-webui/master/install/apache/bareos-webui.conf). You might configure your Apache manually or copy the example configuration with wget from the git repo, e.g. ``` cd /etc/apache2/conf.d -wget https://raw.github.com/fbergkemper/barbossa/master/install/apache/bareos-console-web.conf +wget https://raw.github.com/bareos/bareos-webui/master/install/apache/bareos-webui.conf ``` ### Configure the database connection -* Copy barbossa/config/autoload/local.php.dist to barbossa/config/autoload/local.php and edit the local.php file to your needs. +* Copy bareos-webui/config/autoload/local.php.dist to bareos-webui/config/autoload/local.php and edit the local.php file to your needs. ### Configuration to be able to run bconsole commands within the web-frontend diff --git a/init_autoloader.php b/init_autoloader.php index 083b02fd..69428bb7 100644 --- a/init_autoloader.php +++ b/init_autoloader.php @@ -42,6 +42,16 @@ ) )); } +} else { + // Zend Framework available in normal include path? Use it. + if( stream_resolve_include_path("Zend/Loader/AutoloaderFactory.php") ) { + include 'Zend/Loader/AutoloaderFactory.php'; + Zend\Loader\AutoloaderFactory::factory(array( + 'Zend\Loader\StandardAutoloader' => array( + 'autoregister_zf' => true + ) + )); + } } if (!class_exists('Zend\Loader\AutoloaderFactory')) { diff --git a/install/apache/bareos-webui.conf b/install/apache/bareos-webui.conf index 935cd4e3..572a1560 100644 --- a/install/apache/bareos-webui.conf +++ b/install/apache/bareos-webui.conf @@ -10,8 +10,8 @@ # RewriteLog "/var/log/httpd/mod_rewrite.log" # RewriteLogLevel 3 -SetEnv "APP_ENV" "development" -#SetEnv "APP_ENV" "production" +SetEnv "APPLICATION_ENV" "development" +#SetEnv "APPLICATION_ENV" "production" Alias /bareos-webui /usr/share/bareos-webui/public diff --git a/install/sudoers.d/bareos-webui-bconsole b/install/sudoers.d/bareos-webui-bconsole index a488af15..d1dd35b7 100644 --- a/install/sudoers.d/bareos-webui-bconsole +++ b/install/sudoers.d/bareos-webui-bconsole @@ -1,4 +1,4 @@ # allow apache to run bconsole. required for bareos-webui -Cmnd_Alias BCONSOLE = /usr/sbin/bconsole -n -c /etc/bareos/bconsole.conf, /usr/sbin/bconsole -n -c /etc/bareos/webui/bconsole.conf +Cmnd_Alias BCONSOLE = /usr/sbin/bconsole -n -c /etc/bareos/bconsole.conf, /usr/sbin/bconsole -n -c /etc/bareos/webui/bconsole.conf, /usr/sbin/bconsole Defaults!BCONSOLE !requiretty wwwrun,www-data,apache ALL=(root) NOPASSWD: BCONSOLE