InvoicePlane IIS Install Guid

I have been working for a few weeks now for a good step by step or how to document to install InvoicePlane in Windows Server 2012 and IIS.

With the directions that are out their I still have been unable to even get the installation to run.

I am able to install MySQL, I am able to get PHP downloaded and what I believe to be installed.

I than take and create the Blank DB in MySQL, than I go and extract the InvoicePlane file into the wwwroot directory on the server.

Once I do that I can’t get any further. I am unable to get the setup/Install to run when I navigate to http://localhost/setup.

Does anyone have a better install walk through, or would be willing to walk through it with me and create one with me at the same time? Any info or more description on how to get the install completed would be helpful. Thanks.

I was able to get the requirements installed properly and now my directories on the web server look like this.


Inside the “Invoice” folder I have the contents of the extracted InvoicePlane zip folder.

I then restart the IIS services and open a web browser. I navigate to http://localhost/License/setup and I get HTTP:// 404 Error

If I go to http://localhost/license/index.php I get an error “A Database Error has occured line 125”

My .htaccess file is set to the following:

RewriteEngine on
RewriteBase /Invoice
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

I have made no other changes to any of the files that are inside the “Invoices” folder, I assumed I did not need to go in and configure any other files as the setup that should run would allow me to enter the DB name and or connection but I never get to the setup screen I always get one of the above errors.

Please help, any ideas would be appreciated?

In IIS did you import the .htaccess file into URL Rewrite?

No I did now the file is just in the invoice directory

I am not quite sure where to do that either

You may want to read up on this, IIS does not read the .htaccess file. You have to import it first into IIS URL Rewrite

Let me know if you have any further trouble, I currently am running tests on IIS 8.5 (Windows Server 2012 R2)

Thank you for the information, yes I did go read up on it a little further and I am now able to gain access to Invoice Plane setup.

I get to the setup where I am filling in my SQL Server information but am unable to connect to the DB

username: user
Password: Password
Database: Invoice

I get the error cannot connect to database, I am not 100% sure but I assume I dont need MYSQL I can use MSSQLSERVER?

Per the Wiki these are the requirements:

If you want to use InvoicePlane you have to follow these requirements:

A webserver / webhost with the following specifications:
PHP > 5.3.0
MySQL > 4.x
mCrypt Extension activated (How-To)
and a modern and up-to-date web browser.

Makes Sense I recreated this using MYSQL, and I am able to connect now and move through the setup.

I get to the piece in the setup upgrade_tables and I get the following error:

Error Number: 1364

Field 'family_id' doesn't have a default value

# Move lookup items to products INSERT INTO ip_products (product_name, product_description, product_price) SELECT item_name, item_description, item_price FROM ip_item_lookups;

Filename: C:\inetpub\wwwroot\system\database\DB_driver.php

Line Number: 331

Any idea anyone had this before. I also went and completly deleted the invoice_plane database and than recreated it and that did not fix the issue.

I am not a MySQL expert but I think I fixed this issue by turned off Strict Mode in MySQL

You may need to delete your invoice database(schema) and recreate it.

If you’re running on Windows 7/Server 2008 R2+ then the ini file should be in C:\ProgramData\MySQL\MySQL Server 5.x\

See this post Installation problem

I viewed the links and I did see where this could be an issue, I did turn the strict mode off and I did replace the .sql code and now I get this error,

A Database Error Occurred

Error Number: 1067

Invalid default value for 'family_id'

# Module "products" CREATE TABLE IF NOT EXISTS `ip_products` ( `product_id` int(11) NOT NULL AUTO_INCREMENT, `family_id` int(11) NOT NULL DEFAULT '', `product_sku` varchar(15) NOT NULL DEFAULT '', `product_name` varchar(50) NOT NULL, `product_description` longtext NOT NULL, `product_price` float(10,2) NOT NULL, `purchase_price` float(10,2) NOT NULL DEFAULT '', `tax_rate_id` int(11) NOT NULL DEFAULT '', PRIMARY KEY (`product_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Filename: C:\inetpub\wwwroot\system\database\DB_driver.php

Line Number: 331

Not the same error as the user in the post did after he made the change but It did not solve the issue.

This is what I would recommend, start with a fresh clean copy of the Invoiceplane download.
No script changes to the .sql files.

Make sure MySQL is not in strict mode, restart the MySQL Service for good measure :smile:

Then create a brand new schema in MySQL and attempt to install.

I ran into issues when I was upgrading v1.1 to v1.2 where if an error was thrown half way through the upgrade. I had to completely restore the schema to v1.1.
Otherwise the upgrade script would continue to throw errors and never complete.

Yes I just completed this, and this is what I got at the upgrade_table

Error Number: 1364

Field 'family_id' doesn't have a default value

# Move lookup items to products INSERT INTO ip_products (product_name, product_description, product_price) SELECT item_name, item_description, item_price FROM ip_item_lookups;

Filename: C:\inetpub\wwwroot\system\database\DB_driver.php

Line Number: 331

Again I have not altered the .SQL file at all.

I removed the Schema and removed the files from IIS, redownloaded and than extraced the files to the root of IIS. went into IIS stopped and atted the rewrite rule then started IIS

than edited MySQL so that strict mode was off, than I went and rebooted and created a new DATABASE

than went and ran through the setup and it error with the above

@rtirak Please format error messages as code blocks with

``` (three backticks)

before and after the message. See your own post for details.

@kovah got it sir will do for now on.

Thank you for all of your help. This seemed to have fixed my issue. I went and Started with a clean download as you said and than ran the command from your second link. Than I created the new Schema and I was able to move past. I now have IP setup and working.

I appreciate all of your time and effort. Thanks for the help!

@rtirak Sorry I wasn’t able to reply back to you earlier, I’m glad its working for you.
I would highly recommend that you make a backup of the MySQL database before you attempt to upgrade for future versions, just in case you run in any errors.

Great job Evelio.

This is what worked for me with Windows Server 2012r2. In IIS Manager, followed to my IP website, opened URL Rewrite module and imported the .htaccess file from the IP folder. The line “RewriteBase /sub_directory” was highlighted in red as an error. Removed that entire line from the imported rule, everything went green, applied changes and finally closed. Restarted the IIS.

Hope this will help