Deploying web applications and making updates

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

I'm using 0.3.1
User avatar
The Phoenix
Forum Contributor
Posts: 294
Joined: Fri Oct 06, 2006 8:12 pm

Re: Deploying web applications and making updates

Post by The Phoenix »

The Ninja Space Goat wrote:Basically I'm just looking for any advice you guys can give me on optimizing our deployment and update process. Thanks! :D
I think in terms of web-based apps, so thats the answer I will give. :)

The admin logs in, and in the admin control panel, they see that there is an update available. (Most likely checked from an external xml file if it is available).

They then click on the update button, which *attempts* to turn off the service to other users, and change the permissions. Once thats done, then it downloads a zip file containing the changed files from their version, and extracts them into the directory.

After that is complete, the application runs an sql update script. I happen to use adodb quite a bit, so the xml-schema makes this particularly nice for schema changes.

Finally, the application should then do a sanity check, and if it passes, put the permissions back into a secure state, and then enable user access once again.

Notably, this is remarkably close to the process that phpbb uses, and doesn't require any substantially nifty coding.. just some attention to detail.

Doing things this way allows you to upgrade the database, the php code, and so forth.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Actually it works great in linux, but on Windows, the svn export craps out, unfortunately.
we use it and it works on our windows desktops. You may need to add 'svnpath' attribute to your svn task though.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Working fine here also - :(. It could be svn path - generally it's already on PATH though. May not be in your case.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

still doesn't work. I have subversion's bin directory in my path as well as in the task. When I run phing, it says that it exports the subversion repo, but it doesn't. :(

EDIT: It's really frustrating that it doesn't even bother to give me an error. Any way I can probe some information from it?
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

It could be svn path - generally it's already on PATH though.
That doesn't matter from what I know. VersionControl_SVN tries to execute '/usr/local/bin/svn' by default - which path most probably simply does not exist on windows.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Skip Phing altogether for this - try exporting using VersionControl_SVN directly and check for any stacked errors. I'll do a little digging at the weekend if possible - I'm doing the same for Phing's XSLT/XInclude filters which have a few small bugs in RC1.
Post Reply