zend framework and isapi rewrite on IIS (and why)
To be honest the classic asp works fine for most purposes, but is becoming increasingly obsolete, along with availability of developers, and I have been trying to move on from it for years. The obvious choice for migrating a classic ASP app would usually be ASP.NET, but frankly the idea of spending the rest of my working life tied into windows-only development, and the fighting with software licences and scarce availability (it seems, at least in this town) of contractors makes me want to give up try a different career altogether. So I decided on php a while back (mainly because I wanted something open source, with an abundance of developers - I think if you throw a coin randomly in the watershed in bristol, chances are you would hit a freelance php developer).
So with php decided on, I then spent time evaluating a few frameworks. They all look good - this was a difficult decision - but I decided on Zend because Olivewood will be primarily concerned with eCommerce and eProcurement, and with magento being built on zend, and the "big industry" partnerships, it seemed the right fit. It also seemed to be useful and provide structure without being overly prescriptive. Also by writing this here i'm hoping to commit myself to at least something!
So, I also wanted something that would work cross platform, even though the obvious choice is to run open source web apps on linux/ apache, it was important to me that it would also play nicely with IIS, as many businesses have already invested in windows servers and already run other apps on IIS and wouldn't be happy supporting anything else. This gets an indignant response from many "purist" developers/ sysadmins, but i'm basing this on real-life situations, and I hate the idea of a potential client ruling out open source software because it won't run on their IIS server.
The other factor here was that I wanted something that would coexist with my classic ASP app until such a time that I have rewritten everything I need to make it a pure zend framework/php app. The classic asp scripts will handshake with the php code by dumping session data to the database and passing credentials via a cookie, so the session data can be shared between the two. This is vital to the plan, as it is a long term project - and much of the investment in migrating this will be my own time and money.
Installing Apache on the same server and setting up some kind of proxying would be another option, but not on the live server that this app runs on. I also needed to prove that it would work on just IIS before betting my future business plans on it, even if the first thing I would do is suggest that it is run on Apache.
I wasted a monumental amount of time getting this working, although it turned out to be fairly trivial once I had cracked it. The red herring is that there are two versions of isapi rewrite - version 2 and version 3. All the zend related documentation I found (hardly any) seems to be for version 2 (although this wasn't mentioned!), which I just couldn't get to work at all for my setup, but eventually I gathered that version 3 has been almost completely rewritten to work with apache mod_rewrite rules. So now I have a classic asp app, with a single folder (caled "zend") containing my front controller from where all the php will be served the application folder (with all the models, views, and controllers) is outside the site root.
My httpd.conf file looks like this:-
RewriteEngine onRemember this is for version 3 of Isapi rewrite. All quite simple really, when you know how. It's a pity it took me about 9 hours to work out how!
RewriteBase /zend/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !.(js|ico|gif|jpg|png|css|asp)$ /zend/index.php
My clients don't allow ISAPI_Rewrite, so I've written a router that handles GET requests.
Regards,
Rob...
Rob... 2008-04-24 12:14:15
jenn 2008-05-31 15:01:45
I cannot use ISAPi_Rewrite, what would be the alternative to run zend effectively on IIS 7.5 ?
Thank you.
Sam 2010-07-13 19:55:45
Drupal on a different port - access denied
/**
* We try to set the correct cookie domain. If you are experiencing problems
* try commenting out the code below or specifying the cookie domain by hand.
*/
New drupal based site - Green Infrastructure in the west of England
This has actually been quietly live for a while now, but wanted to monitor how it coped with the fairly heavy load exerted by the AJAX based mapping tool, which bought our dev server to it's knees during original user testing, before being moved to a server with a bit more RAM.
Beware moving vmware fusion machines to the free version of vmware server - you can't
I actually moved from parallels to VMware fusion on the basis that I would be able to simply move VMs from my mac to a production server, but it looks like unless I cough up for the paid version of VMware server, this isn't going to happen - very frustrating. Time to investigate KVM
VMware Server 2 (in beta) and VMware Player 2 support hardware version 6.
If you need to make your VMware Fusion virtual machine work with VMware Server 1 and older products, you can use the free VMware Converter to convert your virtual machine to the older version. (You can also do this in VMware Workstation.)
Good luck!
Ben G. 2008-04-16 15:57:58
Apache as Proxy to IIS
Been meaning to get this working for ages - using apache 2.0 on my ubuntu dev server to proxy requests to an IIS server on the local network - to avoid having IIS facing the internet directly and to be able to have a central place to configure virtualhosts. Finally got it working with a bit of help from the helpful people on underscore. First enable mod_proxy, and then set up a virtual host something like the following:-
(note this is just to enable access to dev servers for testing etc. - not a production environment)
<VirtualHost *>
ServerName myvirtualhost.whatever
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / http://myiisserver/
ProxyPassReverse / http://myiisserver/
</VirtualHost>
The integration is just what I missed with the standard Gmail interface. Finally I can ditch the slow Mail.app retrieval...
Hmmm... D'you think they're going to make an iPhone 2.0 app for it?
Nikki 2008-04-30 11:24:26
Donnovan 2011-08-09 03:26:31