invoiceplane
This tutorial is for users of Debian who have already established a host with TLS/LAMP and want to create an InvoicePlane instance in order to create and send invoices to clients. If you have not yet completed TLS/LAMP, however, please begin with ApacheSurvival. Okay, once you have that set up, download invoice plane and place it in the web server root for the desired virtual host:
cd /var/www/site1.com/ rm -r public_html wget /var/www/monitor.haacksnetworking.com/public_html/invoice-plane-1-5-9.zip unzip invoice-plane-1-5-9.zip mv v1.5.9.zip public_html
Now, let's copy the example php configuration file and then edit it with some basic parameters:
cp ipconfig.php.example ipconfig.php nano ipconfig.php <IP_URL=https://site1.com/>
Okay, you need to adjust permissions for the portions of the web root directory that require external access by the www-data user:
sudo chown -R www-data:www-data /var/www/site1.com/public_html/uploads/ sudo chmod -R 755 /var/www/site1.com/public_html/uploads/ sudo chown -R www-data:www-data /var/www/site1.com/application/logs/ sudo chmod -R 755 /var/www/site1.com/application/logs/ sudo chown -R www-data:www-data /var/www/invoice.haacksnetworking.com/public_html/vendor/mpdf sudo chmod -R 755 /var/www/invoice.haacksnetworking.com/public_html/vendor/mpdf
There are more hardening and permissions that could be done, but that will get everything working and allow for creation of pdf invoices. After this is done, it is not time to create the database and configure the invoice plane configuration file to be able to read that database:
mysql -u root -p CREATE DATABASE invoiceplane; CREATE USER ipuser@localhost IDENTIFIED BY 'put-password-here'; GRANT ALL PRIVILEGES ON invoiceplane.* to ipuser@localhost IDENTIFIED BY 'put-password-here'; FLUSH PRIVILEGES; EXIT;
Now, navigate to the website and enter in your database credentials using the web-based installer:
https://site1.com/
It is quite possible that you will get a php error, since the version I have linked here is the last stable version before @kovah.de decided to stop maintaining the project and it utilizes an out of date php function syntax. If that happens, navigate to the directory below and swap 221-228 as follows (see this Forum Post for more information):
Original php code:
public function set_class($class) { $suffix = $this->config->item('controller_suffix'); if (strpos($class, $suffix) === false) { $class .= $suffix; } parent::set_class($class); }
Correct/updated php code:
public function set_class($class) { $suffix = (string) $this->config->item('controller_suffix'); parent::set_class($class); }
Revisit the website and refresh, and you should now be able to configure the database using the web-based installer without a php error. Once that is done, you will be met with a log in screen requesting a user name and password for invoice plane. This is not created by default by the installer. Rather, it is the expectation that you create a demo-user and then edit parameters after first log in. Before diving into mysql to do this, make sure to read the forum post on this topic. Once you have read up, log in to mysql and configure away:
mysql -u root -p use invoiceplane; INSERT INTO `ip_users` (`user_type`, `user_active`, `user_date_created`, `user_date_modified`, `user_language`, `user_name`, `user_company`, `user_address_1`, `user_address_2`, `user_city`, `user_state`, `user_zip`, `user_country`, `user_phone`, `user_fax`, `user_mobile`, `user_email`, `user_password`, `user_web`, `user_vat_id`, `user_tax_code`, `user_psalt`, `user_passwordreset_token`, `user_subscribernumber`, `user_iban`, `user_gln`, `user_rcc`) VALUES (1, 1, '2017-04-23 17:29:31', '2017-04-23 17:29:31', 'system', 'InvoicePlane Demo', NULL, 'Test Street', '', '', '', '', 'US', '', '', '', 'demo@invoiceplane.com', '$2a$10$586b8f3f5a93f2b62623de1.JtIdo3wT/cNZuYx/KhkglXlegxAXK', 'https://invoiceplane.com', NULL, NULL, '586b8f3f5a93f2b62623de', '', NULL, NULL, NULL, NULL); flush privileges; exit;
Okay, you should now be able to log in using the credentials @kovah.de originally specified in the forum. It is probably also a good idea to restart the webserver and php once before you log in:
systemctl restart apache2 systemctl restart php7.3-fpm.service user: demo@invoiceplane.com pass: demopassword
After logging in, immediately change your credentials and log back out and in again. That's it! Happy hacking! This project is currently in need of a maintainer - see the project's Twitter for more information.
— oemb1905 2019/12/23 23:35