Installing Simple Invoices

Requirements

Before you get started there are a few requirements, have a quick read of the below pages

Installation

If you know what your doing re PHP/MySQL just follow the quick install guide, else read on below for the full details

Quick install guide:
1. Download latest version from our home page
2. Unzip to webserver
3. Create a blank MySQL database
4. Edit config/config.ini with db details
5. Open Simple Invoices in your browser ( http://localhost/simpleinvoices ) and follow the installer

Full details

  • Now the required software has been installed and is running, download the latest Simple Invoices package from http://simpleinvoices.org#get
  • Extract the contents of the simple_invoices_yyyy.version.zip to a simpleinvoices folder in your web servers document root (ie. /var/www in Debian)
    • Create a simple_invoices database on your database server. I recommend you use phpMyAdmin to create/manage your new database.
    • Now the database has been setup and files have been 'installed' in the webservers document root, SimpleInvoice just need to have its configuration file edited and then its fine to use
      • Open the Simple Invoices configuration file (which is config.ini in the config/ folder) up in
        • Edit the file so that
          • 'database.params.host' equals the name of your database server (normally “localhost”),
          • 'database.params.dbname' to the name of the database (normally “simple_invoices”),
          • 'database.params.username' to the database username for the database specified in $db_name,
          • 'database.params.password' to the password of the database user
        • Set the tmp directory as writeable. To do this cd to the Simple Invoices directory (cd /var/www/html/simpleinvoices) and chown the cache directory to the apache(web server) user (chown apache:apache cache) or if your lazy just chmod 777 the directory (chmod -Rv 777 tmp*)
  • Open up Simple Invoices in your web browser ie. ( http://localhost/simpleinvoices ) and follow the 3 step installer.
  • Simple invoices has been installed

Export to PDF

If creating PDF in Simple Invoices didn't 'Just Work' there are a couple of changes that need to be made on your system to enable Export to PDF

  • For 'Export to PDF' to work there are two modifcation that needs to be made to your system:
  • The first step is to ensure the pdf exports directory writeable by the webserver
    • To do this the cachce directory in your Simple Invoices folder must be writeable, in unix cd to the Simple Invoices 'tmp' directory (cd /var/www/html/simpleinvoices/tmp) and chown the cache directory to the apache (webserver user) (chown apache:apache cache), in windows just browse to the cache folder and make sure its writeable by all users.
    • We also need to make the pdf fonts directory writeable. To do this in unix chown the ./library/pdf/fpdf directory to the apache(web server) user (chmown apache:apache library/pdf/fpdf/*), in windows just browse to the fdpf folder(in the pdf folder) and make sure its writeable by all users.
  • gd2 Once this cache folder has been made writeable the next step is to test if version of PHP has GD2 support
    • GD2 is an extension to PHP which enables PHP to create and manipulate image files in a variety of different image formats
    • To test if your version of PHP has GD2 support open up your internet browser and browse inside Siple Invoice folder to the phpinfo.php file (http://localhost/simpleinvoices/phpinfo.php)
    • Once phpinfo.php is open in your browser, scroll down to the 'gd' section and check the values for 'GD Support' and 'GD Version'. If all goes well you should see similar information to below
      •           
                   gd
                   GD Support 	enabled
                   GD Version 	2.0 or higher
    • If your PHP doesnt have GD2 support enabled or doesnt have GD2 or above please refer to your operating systems PHP guide on how to enable this. In Debain/Ubuntu just install the php-gd package through 'Add Applications' to get gd support
  • Once you have confirmed your PHP has GD2 support we must test if your php.ini file needs to be altered to enable pdf creation
    • To test if you need to modify your php.ini file open your internet browser and go to your Simple Invoices directory ./library/pdf/ (http://localhost/simpleinvoices/library/pdf)
    • This page 'html2ps/pdf demo' is used to test if your system is capable of generating pdf files
    • The 'Source' area the 'Single URL' is set to www.google.com by default, if you are connected to the internet just leave this as is but if your currently not connected to the internet change this to a valid webpage on your system ie. http://localhost/simpleinvoices and scroll to the bottom of the page and click the 'Convert File' button
    • If all goes well a pdf of www.google.com homepage(or the valid url you entered) will be created and displayed in your pdf viewer
    • If a pdf wasn't created and the below error occurred this mean you will have to alter your php.ini file
      •            Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4864 bytes) 
                   in /var/www/simpleinvoices/pdf/filter.data.html2xhtml.class.php on line 8              
  • php.ini
    • If in the above procedure you found that a pdf cant be created and an 'Allowed memory size' error occurred you have to edit your php.ini
    • To find where your php.ini file is stored on the system browse again to tha phpinfo.php page (http://localhost/simpleinvoices/phpinfo.php) and note where the 'Configuration File (php.ini) Path' is referring to.
    • Open the php.ini file from the location referred in the previous step in your favourite text editor (notepad,vi,emacs,gedit…) and alter the specified 'memory_limit' number
      • Find the line 'memory_limit =' (refer below) and change this from the default 8M to 64M (more if your adventurous :) )
        •             ;;;;;;;;;;;;;;;;;;;
                      ; Resource Limits ;
                      ;;;;;;;;;;;;;;;;;;;
          
                      max_execution_time = 90     ; Maximum execution time of each script, in seconds
                      max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
                      memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)               
      • Your altered php.ini file should now looking like below
        •             ;;;;;;;;;;;;;;;;;;;
                      ; Resource Limits ;
                      ;;;;;;;;;;;;;;;;;;;
          
                      max_execution_time = 90     ; Maximum execution time of each script, in seconds
                      max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
                      memory_limit = 64M      ; Maximum amount of memory a script may consume (8MB)             
    • For this change to come into affect you need to reload apache, in red hat based systems sudo /etc/init.d/httpd reload or in ubuntu/debian sudo /etc/init.d/apache2 reload. If your unsure of this step or your a windows users just restart your system and it'll be right.

Final steps

  • Everything has been setup and configured now, Simple Invoice is ready to be used
  • Open your Internet browser and go to http://localhost/simpleinvoices and use Simple Invoices as you wish
  • Installation is finished

Had problems with the Simple Invoices installer ?

If you had problems with the Simple Invoices installer you can manually import the full Simple Invoices database, just follow the below steps

  • Open phpMyAdmin
  • Browse to the Simple Invoices database
  • Select the 'Import' tab and import the file './databases/mysql/simpleinvoices_full.sql' from your Simple Invoices directory
  • Open your Internet browser and go to http://localhost/simpleinvoices and use Simple Invoices as you wish

More info

For more information on setup options please refer to the below links:

Questions



Links: Frequently Asked Questions | Help

Discussion

bram, 2009/11/13 00:50

hi, im very new in programing, and, im want to know more :D

could u tell me, how to install simple invoice on xampp? step by step?

cause i want to make my custom made invoice, soo i can use it on my own,

thanks for ur help

justin, 2009/11/13 02:58

hey bram

refer full_details and just replace references to /var/www to the htdocs directory in your xammp install folder

post in the forum if you have further problems and we should be able to sort it out for you

cheers

justin

JUAN CARLOS, 2009/12/15 17:42

Hi Friends, I am not expert but i need to use this program in my website I do all steps, but doesn´t work.

justin, 2009/12/24 00:39

hey juan

if you have a specific error just post on our forum and we'll try and help you out

if your still stuck you can try http://smarterinvoices.com - its a Simple Invoices hosting service - you don;t have to install anything!!

cheers

justin

ronak, 2010/01/19 00:40

hello, am not that pro at programming though i have tried installing simple invoices. but i get the following error.

Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'Error parsing ./config/config.ini on line 11 ' in C:\wamp\www\simpleinvoices\library\Zend\Config\Ini.php:184 Stack trace: #0 C:\wamp\www\simpleinvoices\library\Zend\Config\Ini.php(125): Zend_Config_Ini→_loadIniFile('./config/config…') #1 C:\wamp\www\simpleinvoices\include\init.php(93): Zend_Config_Ini→__construct('./config/config…', 'production', true) #2 C:\wamp\www\simpleinvoices\index.php(26): require_once('C:\wamp\www\sim…') #3 {main} thrown in C:\wamp\www\simpleinvoices\library\Zend\Config\Ini.php on line 184

crimarova64, 2010/01/21 01:23

Add coutes ”” to the password in config.ini, maybe it will help you

waynob, 2010/03/19 00:22

Thanks, that worked perfectly!

hz6574, 2010/03/28 23:35

how can I change the the invoice to start from a diffrent number instead of 1.

I would like to start form 10001 or something like that.

thanks

justin, 2010/04/01 02:43

hey hz6574

refer our forum at http://simpleinvoices.org - just do a search for mysql autoincrement and you should be able to find the solution

cheers

justin

Ricahrd, 2010/05/18 15:34

hello Justin :-)

using the web-site DEMO ,I can input Taiwanese words and see well , but PDF output can see nothing about the Taiwanese words .

good day to U

richard

justin, 2010/05/31 03:51

hey richard

our PDF currently doesn't like some scripts like chinese etc..

there is work being done to fix this - hopefully for Simple Invoices 2010.3 due later this year

cheers

justin

Aryan, 2010/06/06 03:47

i am getting this page after config please help:

Simple Invoices - PDO problem

PDO is not configured in your PHP installation. This means that Simple Invoices can't be used.

To fix this please installed the pdo_mysql php extension. If you are using a webhost please email them and get them to install PDO for PHP with the MySQL extension

justin, 2010/06/08 01:07

hey aryan

re the error says - you need to install PDO and PDO_mysql for your PHP to make Simple Invoices work

cheers

justin

SatheeshKumar.R, 2010/06/14 09:58

I have tried installing simple invoices, but i get the Fatal error. Fatal error: Uncaught exception 'Zend_Auth_Adapter_Exception' with message 'A value for the identity was not provided prior to authentication with Zend_Auth_Adapter_DbTable.' in /var/www/simpleinvoice/library/Zend/Auth/Adapter/DbTable.php:344 Stack trace: #0 /var/www/simpleinvoice/library/Zend/Auth/Adapter/DbTable.php(304): Zend_Auth_Adapter_DbTable→_authenticateSetup() #1 /var/www/simpleinvoice/modules/auth/login.php(68): Zend_Auth_Adapter_DbTable→authenticate() #2 /var/www/simpleinvoice/index.php(314): include_once('/var/www/simple…') #3 {main} thrown in /var/www/simpleinvoice/library/Zend/Auth/Adapter/DbTable.php on line 344

SatheeshKumar.R, 2010/06/14 10:03

I have tried installing simple invoices, but i get the Fatal error. Fatal error: Uncaught exception 'Zend_Auth_Adapter_Exception' with message 'A value for the identity was not provided prior to authentication with Zend_Auth_Adapter_DbTable.' in /var/www/simpleinvoice/library/Zend/Auth/Adapter/DbTable.php:344 Stack trace: #0 /var/www/simpleinvoice/library/Zend/Auth/Adapter/DbTable.php(304): Zend_Auth_Adapter_DbTable→_authenticateSetup() #1 /var/www/simpleinvoice/modules/auth/login.php(68): Zend_Auth_Adapter_DbTable→authenticate() #2 /var/www/simpleinvoice/index.php(314): include_once('/var/www/simple…') #3 {main} thrown in /var/www/simpleinvoice/library/Zend/Auth/Adapter/DbTable.php on line 344

SatheeshKumar.R, 2010/06/14 10:08

I have tried installing simple invoices, but i get the Fatal error. Fatal error: Uncaught exception 'Zend_Auth_Adapter_Exception' with message 'A value for the identity was not provided prior to authentication with Zend_Auth_Adapter_DbTable.' in /var/www/simpleinvoice/library/Zend/Auth/Adapter/DbTable.php:344 Stack trace: #0 /var/www/simpleinvoice/library/Zend/Auth/Adapter/DbTable.php(304): Zend_Auth_Adapter_DbTable→_authenticateSetup() #1 /var/www/simpleinvoice/modules/auth/login.php(68): Zend_Auth_Adapter_DbTable→authenticate() #2 /var/www/simpleinvoice/index.php(314): include_once('/var/www/simple…') #3 {main} thrown in /var/www/simpleinvoice/library/Zend/Auth/Adapter/DbTable.php on line 344

kwame bee, 2010/07/28 14:02

hi justin, am able to install simple invoice with the full sql patch but i can't get the invoices displayed except Processing, please wait ..

Diana Rodriguez, 2010/08/04 07:43

Why does it say Welcome “[email protected]” ? can i change that?, can i add more users? thank you

Anders O Blomberg, 2010/08/09 08:24

Is there a simple step-by-step install manual for (us lazy) Mac users? I have a web hotel with php support but don't really know much about MySQL and stuff (is that not a MicroBugSoft thing…?).

I really like the idea of having access to my invoices from anywhere, and I like to customize it for my special needs here in Sweden.

Cheers! Anders

Anders O Blomberg, 2010/08/09 08:50

Is there a simple step-by-step install manual for (us lazy) Mac users? I have a web hotel with php support but don't really know much about MySQL and stuff (is that not a MicroBugSoft thing…?).

I really like the idea of having access to my invoices from anywhere, and I like to customize it for my special needs here in Sweden.

Cheers! Anders

Anders O Blomberg, 2010/08/09 10:02

Is there a simple step-by-step install manual for (us lazy) Mac users? I have a web hotel with php support but don't really know much about MySQL and stuff (is that not a MicroBugSoft thing…?).

I really like the idea of having access to my invoices from anywhere, and I like to customize it for my special needs here in Sweden.

Cheers! Anders

Anders O Blomberg, 2010/08/09 10:39

Is there a simple step-by-step install manual for (us lazy) Mac users? I have a web hotel with php support but don't really know much about MySQL and stuff (is that not a MicroBugSoft thing…?).

I really like the idea of having access to my invoices from anywhere, and I like to customize it for my special needs here in Sweden.

Cheers! Anders

vijesh, 2010/08/17 15:30

I have tried installing simple invoices, but i get the Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'Error parsing ./config/config.ini on line 10 ' in /home/jibuandt/public_html/simpleinvoices/library/Zend/Config/Ini.php:181 Stack trace: #0 /home/jibuandt/public_html/simpleinvoices/library/Zend/Config/Ini.php(201): Zend_Config_Ini→_parseIniFile('./config/config…') #1 /home/jibuandt/public_html/simpleinvoices/library/Zend/Config/Ini.php(125): Zend_Config_Ini→_loadIniFile('./config/config…') #2 /home/jibuandt/public_html/simpleinvoices/include/init.php(126): Zend_Config_Ini→__construct('./config/config…', 'production', true) #3 /home/jibuandt/public_html/simpleinvoices/index.php(29): require_once('/home/jibuandt/…') #4 {main} thrown in /home/jibuandt/public_html/simpleinvoices/library/Zend/Config/Ini.php on line 181

hector rodriguez, 2010/08/31 21:00

trying to pdf, test, send my this error. Could you help me?

Warning: DOMDocument::loadXML() [domdocument.loadxml]: AttValue: ” or ' expected in Entity, line: 1 in /home/clubrq/public_html/factura/library/pdf/treebuilder.class.php on line 22

Warning: DOMDocument::loadXML() [domdocument.loadxml]: attributes construct error in Entity, line: 1 in /home/clubrq/public_html/factura/library/pdf/treebuilder.class.php on line 22

Warning: DOMDocument::loadXML() [domdocument.loadxml]: Couldn't find end of Start Tag style line 1 in Entity, line: 1 in /home/clubrq/public_html/factura/library/pdf/treebuilder.class.php on line 22

Warning: DOMDocument::loadXML() [domdocument.loadxml]: Opening and ending tag mismatch: head line 1 and style in Entity, line: 1 in /home/clubrq/public_html/factura/library/pdf/treebuilder.class.php on line 22

Warning: DOMDocument::loadXML() [domdocument.loadxml]: Opening and ending tag mismatch: html line 1 and head in Entity, line: 2 in /home/clubrq/public_html/factura/library/pdf/treebuilder.class.php on line 22

Warning: DOMDocument::loadXML() [domdocument.loadxml]: Extra content at the end of the document in Entity, line: 2 in /home/clubrq/public_html/factura/library/pdf/treebuilder.class.php on line 22

Notice: Trying to get property of non-object in /home/clubrq/public_html/factura/library/pdf/dom.php5.inc.php on line 26

Notice: Trying to get property of non-object in /home/clubrq/public_html/factura/library/pdf/dom.php5.inc.php on line 8

Notice: Trying to get property of non-object in /home/clubrq/public_html/factura/library/pdf/dom.php5.inc.php on line 67

Notice: Trying to get property of non-object in /home/clubrq/public_html/factura/library/pdf/dom.php5.inc.php on line 67

Notice: Trying to get property of non-object in /home/clubrq/public_html/factura/library/pdf/dom.php5.inc.php on line 67

Fatal error: Call to a member function node_type() on a non-object in /home/clubrq/public_html/factura/library/pdf/box.php on line 91

hector

Charles Guerin, 2010/09/01 17:12

After installing it demanded that I Upgrade and said…

Simple Invoices :: Database Upgrade Manager

Your version of Simple Invoices has been upgraded

With this new release there are database patches that need to be applied

It has a long list of patches it wants to make however, it seems to be missing a table because when I go to apply the Update, I get this:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'invoicing.si_defaults' doesn't existDude, what happened to your query?:

ALTER TABLE si_defaults ADD def_number_line_items INT( 25 ) NOT NULL

0000000000

Ivan Del Toro, 2010/09/18 10:08

I keep getting the following error every time I try to install the database. Can someone help me? SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE IF NOT EXISTS `si_biller` ( `id` int(10) NOT NULL AUTO_INCREMENT,' at line 22Dude, what happened to your query?:

– phpMyAdmin SQL Dump – version 3.2.2.1deb1 – http://www.phpmyadmin.net – – Host: localhost – Generation Time: Jun 03, 2010 at 09:50 PM – Server version: 5.1.37 – PHP Version: 5.2.10-2ubuntu6 SET SQL_MODE=“NO_AUTO_VALUE_ON_ZERO”; – – Database: `simple_invoices` – – ——————————————————– – – Table structure for table `si_biller` – CREATE TABLE IF NOT EXISTS `si_biller` ( `id` int(10) NOT NULL AUTO_INCREMENT, `domain_id` int(11) NOT NULL DEFAULT '1', `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `street_address` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `street_address2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `state` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `zip_code` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `country` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `mobile_phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `fax` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `logo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `footer` text COLLATE utf8_unicode_ci, `paypal_business_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `paypal_notify_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `paypal_return_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `eway_customer_id` varchar(255) COLLATE

vhinle, 2010/10/15 03:54

I tried to install it in wampp but it says “Internal Server Error”. Although configurations settings are ok. I followed the instructions but still nohting happens. Pls help.

Sumit Malhotra, 2012/02/09 09:59

Hello,

I have been trying to install simple invoices on my wamp and web server, but nothing happens upon clicking the Install Database button.

Request help.

Regards Sumit Malhotra

Matt West, 2012/02/13 09:34

Hi Sumit,

We had a problem in the SVN trunk a couple of weeks ago. This should now be fixed. If you pull the latest version this problem should go away.

Drop me an email if you are still having problems. matt [at] simpleinvoices [dot] org

Jack alan, 2012/04/13 13:47

i tried to install it on XMPP server and after configure mysql database and config file i got this error when i open the url

Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'syntax error, unexpected '=' in ./config/config.ini on line 10 ' in C:\xampp\htdocs\simpleinvoices\library\Zend\Config\Ini.php:181 Stack trace: #0 C:\xampp\htdocs\simpleinvoices\library\Zend\Config\Ini.php(201): Zend_Config_Ini→_parseIniFile('./config/config…') #1 C:\xampp\htdocs\simpleinvoices\library\Zend\Config\Ini.php(125): Zend_Config_Ini→_loadIniFile('./config/config…') #2 C:\xampp\htdocs\simpleinvoices\include\init.php(126): Zend_Config_Ini→__construct('./config/config…', 'production', true) #3 C:\xampp\htdocs\simpleinvoices\index.php(29): require_once('C:\xampp\htdocs…') #4 {main} thrown in C:\xampp\htdocs\simpleinvoices\library\Zend\Config\Ini.php on line 181

Could you help please

justin, 2012/04/16 06:32

hey jack

re '=' - does the password contain a = ? - if so put ' around the password and retry

cheers

justin

Paul McCrodden, 2013/01/31 15:41

Hi, I just moved host and now have issues with the formatting of exported pdf documents. I have insured all the above settings are correct to the best of my knowledge but all content bar the “Invoice” heading is coming under a column on the left hand side of the pdf.

Here is an example http://www.paulmccrodden.com/temp/Invoice_1.pdf Any ideas what this could be due to and any pointers on what to look at to solve this? Thank you.

justin, 2013/01/31 22:46

hey paul

this invoice is using the 'export' template - its got no css styling etc..

1 - make sure that your invoice template that you selected is actually available on the new host - might try reselecting it in the sys settings

2 - is you do a print preview does it look like this ?

cheers

justin

Paul McCrodden, 2013/02/11 13:24

Hi Justin,

Many thanks for your reply! You are right, the print preview is working fine. I have been able to save as pdf from the print preview as a work around in the meantime. I tried to disable and enable the invoice template, but I am not 100% I am doing what you recommended.

Either way, it still isn't exporting. Here is the systemcheck output http://www.paulmccrodden.com/temp/syscheck.pdf It says the temp dir is missing, but it is in the root dir of simpleinvoices, there is a temp and tmp dir now both with 777 permissions. The syscheck also reports it is looking for some fonts in Windows server locations at C:/

Any other ideas?

Thanks, Paul

  • Bookmark "install" at del.icio.us
  • Bookmark "install" at Digg
  • Bookmark "install" at Reddit
  • Bookmark "install" at StumbleUpon
  • Bookmark "install" at Facebook
  • Bookmark "install" at Twitter
 
 | install.txt · Last modified: 2011/12/22 12:09 (external edit)