Skip to content

API Site Setup Instructions

gregtheyoung edited this page Dec 9, 2014 · 17 revisions

#Instructions for Setting Up a Server for PatentsView API

Initial Setup

  1. Download the code
  2. Use your favorite tool to get the code from Github: https://github.com/CSSIP-AIR/PatentsView-API and put it at c:\PatentsView-API.
  3. Using the Windows Server Manager, add the Web Server (IIS) role.
  4. While going through that wizard, be sure to include: 1. .NET 3.5 Framework. 1. HTTP Activation - which is under the .NET 4.5 group. Clicking that will confirm to add a slew of other features. 1. If you get a warning on the confirmation screen that you need to specify a different source for missing files, specify the source: C:\Windows\WinSxS.
  5. Install PHP via the Web Platform Installer
  6. http://www.microsoft.com/web/gallery/install.aspx?appid=PHP53 and click the "Install Now" button.
  7. Run the php53.exe file that was downloaded.
  8. On the "Prerequisites" page, deselect the drivers for SQL Server.
  9. Click install.
  10. It will probably say that it failed to install "PHP Manager for IIS", so we will install it manually.
  11. Install PHP Manager
  12. Go to: http://phpmanager.codeplex.com/releases/view/69115
  13. Download "PHP Manager 1.2 for IIS 7 - x64"
  14. Run the download
  15. Configure IIS
  16. Run the PHP Manager 1. It will say the it has some recommendations. Accept those, which are to set index.php as a default doc and to monitor changes to the php.ini file.
  17. Set up sites
  18. These instructions are for just one model for setting up the sites in IIS. You may want to do it differently.
  19. Copy the contents of c:\PatentsView-API to c:\qm\current and to (assuming this is for version 1) c:\qm\v1.
  20. Create a virtual directory called api off of the default site and point it to c:\qm\current\querymodule\public_html.
  21. Create a virtual dir off the api vdir called v1 and point it to c:\qm\v1\querymodule\public_html.
  22. Edit the c:\qm\current\querymodule\public_html/web.config file and change the name of the rewrite rule from "slim" to "slimCurrent".
  23. Go into the URL Rewrite for the v1 vdir and remove the "slimCurrent" rule. 1. Do this for all other vN directories.

Add New Version

  1. Copy the contents of c:\PatentsView-API to c:\qm\current and to (assuming this is for version X) c:\qm\vX.
  2. Create a virtual dir off the api vdir called vX and point it to c:\qm\vX\querymodule\public_html.
  3. Edit the c:\qm\current\querymodule\public_html/web.config file and change the name of the rewrite rule from "slim" to "slimCurrent".
  4. Go into the URL Rewrite for the v1 vdir and remove the "slimCurrent" rule.
  5. Do this for all other vN directories.
  6. Edit the c:\qm\vX\querymodule\public_html\web.config and delete the httpProtocol section.
  7. Special Note: The app\config.php file does not (or at least should not) be in Github, so you will need to make any necessary changes to it, for the current and new version, by hand. This is intentional so as to prevent accidentally getting a config.php that has setting for development or test in it. The config-sample.php should be used as an example.
Clone this wiki locally