WinPHP Challenge
This post is part of a series about my experiences building a PHP app for Windows Server 2008 and IIS 7 for the European WinPHP Challenge 2009 which is sponsored by iBuildings, Microsoft and Leaseweb.
For some insane reason, I decided to enter the WinPHP Challenge and having been accepted, I now need to actually write an app! It’s not like I’m not already way too busy or anything…
The main reason that I decided to do the competition was so that I could learn about running PHP on IIS, particularly learning the .htacess equivalents. Also getting more familiarity with SQL Server is useful. We are getting more enquiries from potential clients about running our software on these technologies, so being better informed is a good thing. I’m expecting that our software will run pretty much as-is though because PHP is a cross-platform solution.
The server
First order of business will be to get a VMWare Fusion instance of Windows Server 2008. Apparently, MS are sorting out a license which is good. Does anyone know if I can “upgrade” the trial version or will I have to reinstall from scratch? As I’m on a very slow ADSL connection (around 1.3MBps, it may take a while…)
Incidentally, I see that PHP is mentioned on the Windows Server 2008 home page in the tag line “Manages ASP.NET, PHP, and everything in between.“, so may be MS is serious about making Windows a first class hosting platform for PHP sites too. That can only be good for us when selling into companies with a Windows-centric IT department.
The application
I currently have two choices of app to write and I need to decide this week :)
Firstly, I could take the example app in Zend Framework in Action, Places to take the kids and work it up into a usable application. This would have the advantage that I could integrate Zend_Application into it and show what I would do differently now compared to what’s in the book. We could also explore how to do dojo for the Ajax stuff.
A second choice is to write an SQL Server inspector/administrator along the lines of a very basic phpMyAdmin. Obviously phpMyAdmin is very mature, so I don’t set my sights that high! It would however be useful if I had a tool that let me view the structure of MSSQL tables and be able to query the data in them. Related to that, the ability to dump all tables to a single file of SQL statements would be handy as I can’t seem to find a way to do that in the SQL Server Management Studio Express tool.
Decisions… decisions…
The photo
One decision that I’ve actually made is that this blog needs more pictures! It was sunny today in Birmingham, so here’s a picture of people enjoying the sunshine in the cathedral grounds:
Hi Rob,
Welcome to the competition :)
Do you want to dump the data or the schema out into a single file? Dumping the schema used to be very easy to do. Dumping the data used to require third-party tools. This was back in the SQL Server 2000 days.
Best regards,
Stu
Hi Stuart,
The entire lot into one file. Would make me more comfortable as a back up and I can rsync it around easily. Assuming I can find a good rsync for Windows…
Regards,
Rob…
Rob … why not just use a standard SQL Server data backup? It's binary, but it can be rsynced just fine.
Or you could setup replication. SQL Server's replication is very nice; I find it much easier to work with than MySQL's.
Stuart,
Mainly because we have nothing but trouble with it. We have one client that uses Windows/SQL Server and whenever we get a new BAK file from then and restore it locally, we enter a world of pain. Even the restore is not easy as you have to remember to check the correct boxes on the Options tab and alter the file paths to the database.
The main issue however is that after restore, the user that owns the tables in the database is not the user with the same name that is in the Security section. This means that we have to change the owner of all the tables to dbo so we can delete the user within the database. We can then assign the user within Security to the database and get on with life. It's a right pain when you only touch SQL Server once ever 3 or 4 months.
I don't know anything about replication, does it work well if you leave the VM turned off for months at a time before you come back to do some maintenance? I've always thought of it as a production thing to share data between primary and secondary servers.
Related to that is that as we rarely use SQL Server, we don't know the manager problem. It's slow too as everything seems to be hidden within a right clicked menu.
A final minor issue is that I can't diff the backups to find out what's changed. (Maybe I can, but haven't worked out how to in the Express manager thing!)
Essentially all of our problems lie in the fact that we don't know the MS way and it doesn't fit the workflow of bash scripts that we currently have. The biggest thing that I am hoping to get out of this competition is a better understanding of how to actually use an MS stack when 95% of your work is nix based.
One other minor issue is that we have to connect to a VPN before we can use the SQL Server manager to connect to the database. Whenever we do this, we lose DNS for anything outside the network we connect to. Again, we know nothing about Windows network administration, so don't know if this is our fault or the just the way the clients's IT dept has set up the VPN. It always seems to me that the VPN takes two or three attempts to actually get a connection and is forever dropping out if you connect and then don't do anything with it for an hour or two.
It'd be much simpler to be able to query the data from a web browser over SSL.
Rob, something like Microsoft's own "SQL Server Web Data Administrator"? :)
Brendon,
Essentially :)
It's a long while since I last tried it, but I could never get it working reliably for me on XP's IIS and it seemed to try and be a copy of the desktop version but on the web.
Good job on entering into the comp. To me the dump tool would be the best fit for what I think they are looking for.