my6solutions

asp .net, the social web & other distractions

 

Running Apps

Disclaimer

I am in no way affiliated with Microsoft or Google. I am just another developer trying to make a difference. All opinions and observations are usually my own.

OpenSocial: Running Partuza under IIS

Partuza is an example of an OpenSocial site using Shindig. It is based on PHP. The following describes my experience getting Partuza running under IIS 7.0 on Windows Vista. For a guide getting Partuza running using Apache, please refer here.

The article assumes that you have read the previous article on running Shindig PHP on IIS and have a running IIS that supports PHP applications. Because Partuza uses mySQL as its backend, you will need to download and install a copy of mySQL. You can download a copy of mySQL 5.1 Community Server here. You will need to download obtain Partuza from the SVN repository at http://partuza.googlecode.com/svn/trunk/. While it is possible to run Partuza under a virtual directory, it currently does not work very well using a web prefix.

Installing mySQL database

1. Basically, just run the setup file and it's quite intuitive but if you have problems deciding on what options to choose, you can have a look at this other guide here. You can ignore the extrra bits unrelated to the setup wizard. Apart from the database, the setup wizard will install a few other tools that will helpful later.

2. Using the mySQL Administrator, under "Catalogs" create a new database (schema) called partuza. Right click to bring up a menu for the create option.

3. Under "User Administration", ensure that root is given all the privileges for the partuza database.

4. Open "mySQL Query Browser", and log on to the newly created partuza database as root. Go File -> Open Script, and open the file partuza.sql in your partuza installation directory.

5. Execute the script to create the tables for the database.

IIS Configuration

1. Launch IIS Manager (under Control Panel -> Administrative Tools) 

2. Create a new website called partuza under IIS. Ideally partuza should be on a different domain to Shindig to prevent script attacks. But for development, the following settings using different port numbers will suffice for now

 Alias:  partuza
Hostname:
locahost
Port:
8181 (any port number not in use)
Physical path: Point to the 'html' folder within your Partuza installation, eg. "C:\wamp\www\partuza-latest\html", where "C:\wamp\www\partuza-latest" is where I installed Partuza.

3. Select your new partuza web site, and double click on the "URL Rewrite" icon. Select "Import Rules ... " and go to your Partuzza installation "html" subfolder and open the file".htaccess". Click "Import" and delete the entry corresponding to "RewriteBase /" as there is no equivalent for this under IIS.

Partuza Configuration

1. Open up the file config.php under the "html' subfolder, and update the following fields.

 gadget_server:  'http://localhost:8080'
 partuza_url:  'http://localhost:8181'

 

Shindig Configuration Update

1. We next need to update Shindig to tell it to use our new mySQL database and new Partuza service files. Open up container.php in your shindig installation "config" subfolder, and update the following fields

oauth_lookup_service
'PartuzaOAuthLookupService'

person_service, activity_service, app_data_service, messages_service

 'PartuzaService'
extension_class_paths Point this to the Shindig subfolder in your Partuza installation folder, eg."C:\wamp\www\partuza-latest\Shindig", so that shindig knows where to find the new service classes above.
 db_user, db_passwd As what you have chosen for the partuza database

2. Shindig and Partuza will run fine out of the box without setting up the encryption and hashing keys for the use of Security Tokens for exchanges between the 2 sites. There are also used for OAuth exchanges. For more details on how to set these up, have a look here.

3. And with that you should be able to open the site at http://localhost:8181 and check that everything is working perfectly. If you have problems adding an application, you will need to change the following lines in the file Model.php in the "Library" subfolder to disable caching.

  170 if (in_array($method, $this->cachable)) {

  171      // if (in_array($method, $this->cachable) && false)

 

Bookmark and Share

Categories: ASP .NET | OpenSocial | PHP
Permalink | Comments (0) | Post RSSRSS comment feed