PDA

View Full Version : Mixing and matching coding platforms


the_pm
November 30th, 2004, 14:48
Perhaps this is an easy question to answer, perhaps not. But here goes :)

I have a client who already has a Web site. The site is mostly static, but there are small ASP modules built into it. I'm hoping in the future to build in some PHP functionality, and I have the ability to support ASP through ChiliSoft on my Linux servers. My questions are:

1. Will I run into any problems having both PHP/MySQL and ASP/[SQL/Access] running under the same domain?

2. Is there some stable hack that will allow me to preprocess a page via one, but host an application via the other on the same page load?

3. Assuming #2 is a big :slap: and a "what are you thinking," can the same external file be included using PHP and ASP includes alternatively on different pages?

4. Has anyone run into any issues regarding ChiliSoft as an alternative to Windows servers?

- or -

5. Will I have to settle for hosting certain functionality remotely?

ethicaldesign
November 30th, 2004, 16:31
1. PHP and Mysql seem to run quite well on windows boxes. Running ASP on a linux box might be more problematic however (depending what version of chillisoft ASP is installed and what the scripts are trying to do).

Linux versions of ASP (at least at the time I tried them - I was using chillisoft at the time which seemed like the best option at the time, the other being apache:asp) don't appear to offer all of the functionality that's available in the IIS version of ASP and they run slower than ASP on IIS (and slower than php aswell).

So if you have several prexisting ASP scripts I would check that they'll run OK on chillisoft ASP first or you may end up having to modify them to get them working. In particular I seem to remember support for access databases being a bit of a pain in the backside at the time, which a lot of smaller ASP based systems tend to rely on.

Could be wrong about this because it was at least a couple of years ago when I looked at chillisoft so it might be improved a lot by now.

Another problem you might run into is if the scripts are going to need to use any compiled modules, because the dlls that some scripts rely on that are built to run on the microsoft platform won't be available for linux. Even if they aren't required to begin with then there are going to be scalability issues either way you look at it if you're running a site that relies on both languages (and at some point modules are required).

2. I'm not sure about this one. I know you can insert an image in a .html page and point its src to an ASP script and IIS will execute the ASP script seperately and deliver up the results to the .html page. So it may be possible (though not necessarily using that method). I'm not sure how that would work though if there was a method of doing that (unless you were perhaps querying a seperate php page on the server from an asp script and parsing and delivering up the results). I know you can do such things with classic ASP running on IIS, but not sure about chillisoft ASP. You can parse the output of a seperate page from a php script though.

3. Not sure 100% about this one either. I've never really needed to run php and asp code in the same page. But I don't think it's likely due to the way the page extensions are mapped. Could be wrong.

If this isn't what you are talking about however and you just want to include a block of html or static content on an asp page, and the same block of html on a seperate php page that should work fine. If that include contains php or asp code that doesn't match the language of the parent page then you might run into problems though.

4) Just those mentioned above though that was a while ago so things may be better now. If you find that scripts need to be modified to run on chillisoft though then you might find they need to be modified again to be moved back to a windows box (depending what the scripts are doing I guess), so there may be portability issues to contend with. Probably moreso than if you were wanting to move about PHP (because PHP under IIS is really good and most php code runs without modification).

5)I guess it depends upon the way the site is structured. If you were going to host the asp parts remotely, that probably wouldn't be too different from hosting them both on the same box and querying one page and parsing the results (as far as I'm aware).

All of the above is assuming you're talking about classic ASP rather than .NET

Is it not possible to rewrite the ASP scripts that already exist in php? That would be the ideal option imho. Either that or look at hosting them on a microsoft server and using php on the microsoft server rather than ASP on linux. As I say, my knowledge of this is a bit out of date and sketchy at best, so hopefully someone else can chime in and give their take on it.

sonicgroup
November 30th, 2004, 16:33
I've never had experience doing this, but in my opinion, the less processing, the better, not only for the server health/performance, but also from a maintainability standpoint.

My recommendation is to host the functionality remotely, or, depending on what exactly the "functionality" is, rewrite it in PHP. The second option would be my preference. Obviously, you are going to add the PHP fucntionality regardless, so porting the existing functionality makes the most sense for maintainability and consistency.

the_pm
November 30th, 2004, 16:52
In a perfect world, everything would be written on one platform, and PHP would be my choice. But that's a cost issue I'm almost certain the client is not interested in facing, even if it means hosting certain functionality remotely. I haven't been able to get in touch with the company that provides hosting for the client either. For all I know, the servers being used (undoubted Windows) are PHP-enabled already, and some of these problems will go away.

Of course, this is the same client who has discussed the possibility of mirroring their site with a full Flash version, so perhaps consolidating scripts is a possibility in the future...

ethicaldesign
November 30th, 2004, 18:05
If they're already hosting on a windows platform, and all of the existing scripts are written in asp, and there's not the budget to have those scripts rewritten in php, then I would recommend developing the additional scripts in ASP aswell. That'll keep everything uniform and won't be so much of a headache later. Not only will the code on their site be more streamlined but it should be easier to maintain.

Although I like php much more than classic ASP (which I try to avoid like the plague now), I can see how it would be better in this particular situation if my assumptions are correct.

I'm not really sure how you would go about hosting functionality remotely or even why it would be needed as you would presumably have to still go to the same lengths you would if you were using mixed scripts on the same server (parsing results from one page to include in another page in the alternative language). It's hard to tell without knowing much about the site and exactly what it entails.

What are your reasons for wanting to use PHP in the first place, if their existing site is ASP based and running on a microsoft server?

the_pm
November 30th, 2004, 18:14
Why the PHP? Simple, I'm installing prescripted functionality for a photo gallery (Coppermine). They have no budget currently to create a custom application in ASP, and since I have no familiarity whatsoever with any prescripted galleries in ASP and they want this up in time for holiday shopping (yes, that mean NOW), I'm going the best route I can. The restrictions and pressure are enormous for this project. The only thing that isn't enormous is the budget :)

If this was a project happening over a reasonable time frame, I would look for an ASP solution and/or research ways to create this for them. But I was basically given one week to make this happen...two weeks ago :( We're waiting to hear back from the host for some vital information, so the hold-up isn't on my end, but when we get it, I need to be able to move fast! So I might just have to set up the gallery as a remote application, link to it through a redirect, and slowly migrate that functionality over to PHP and the new location over time once the emergency has been handled. Once it's all moved, I can just do a quick DNS change, and everyone's happy again.

ethicaldesign
November 30th, 2004, 18:37
Ahh.. That's a tough one.

I can completely empathise with your situation (if not over these exact technical issues because I haven't faced them yet, most definitely the restrictions, pressure, budget aspects that you mention!).

I imagine coppermine would run fine on PHP and MySQL installed on their current windows box (don't have any experience of coppermine but phpbb and a few other fairly heafty php scripts that I've tried run fine on my windows box without modification at all).

This would save you the hastle of hosting remotely and their existing pages would run as expected without any modification. Would probably run a lot faster than moving it all to a linux server and running them using chillisoft aswell as far as I'm aware. Might also save you the cost of hosting that remotely if that's an issue. PHP on windows seems to run pretty quickly from what I can gather so I doubt coppermine would be slowed down that much (if at all).

If it's just for a photo gallery that you want to use php for (and you don't need to have asp pages interfacing with that), then it shouldn't cause any problems because the photo gallery would probably be quite isolated (in code terms) anyway. You could still access the MySQL database containing the coppermine data from ASP if you needed to though.

I guess if the coppermine uses the GD Library or imagemagick that would be worth investigating though (not sure how they work with php for windows, though I think imagemagick has a windows version). Perhaps a google search for 'coppermine iis' might detail any issues that you might need to watch out for.

the_pm
November 30th, 2004, 18:49
Another component in all of this that is driving the remote server option is that I have no idea whether GD or Imagemagick are installed on their current servers, or like you said, if either one is even available. A quick search reveals a number of albums created for ASP - http://www.aspin.com/home/webapps/graphics?pg=1&order=desc - so I imagine there must be a module that will do image manipulation on Windows servers. I just don't have the time to purchase, test and fiddlefart around with a buch of applications that might never deliver the necessary functionality anyway.

Ugh.

ethicaldesign
November 30th, 2004, 18:55
LOL @ "Fiddlefart" :D

Just did a quick search for 'coppermine' and IIS and came across:

http://coppermine.sourceforge.net/

"Coppermine Photo Gallery has been tested working well on IIS"

"either GD or ImageMagick (any version);"

ImageMagick should be very easy to install on a windows box. Looks like coppermine will work with it as an alternative to GD. If you have sufficent rights you could probably have imagemagick installed in a couple of minutes, or if not you could ask the host (if he hasn't already got it installed which he very well might as it's very popular).

Also noticed a link to: http://coppermine.sourceforge.net/tutorial/permissions/iis.php (setting file permissions on IIS), so it seems that some effort has gone into getting this script working on the microsoft platform.

Probably lots of help on the coppermine site to get you up and running on IIS.

the_pm
November 30th, 2004, 19:04
Thanks for all that info. I've been waiting about 1-1/2 weeks to hear from the host. I left answering machine messages, and today wrote an email to the address in the whois. If I don't hear from them soon, I'll just have to pop back on here and flame them mercilessly :twisted:

ethicaldesign
November 30th, 2004, 19:10
Just did a little more searching and came across this:

http://damysterious.xs4all.nl/viewtopic.php?t=87

seems to suggest that coppermine and imagemagick can be set up quite easily on a windows box (at least if you have access rights to it - could be a bit of a pain if your host is unresponsive I guess, but then it might already be installed so you may not need them to do anything anyway).

the_pm
November 30th, 2004, 19:12
Just did a little more searching and came across this:

http://damysterious.xs4all.nl/viewtopic.php?t=87

seems to suggest that coppermine and imagemagick can be set up quite easily on a windows box (at least if you have access rights to it - could be a bit of a pain if your host is unresponsive I guess, but then it might already be installed so you may not need them to do anything anyway).
Maybe they need to install it, maybe not. But at least they need to send FTP information so I can access the damn account :mad:

ethicaldesign
November 30th, 2004, 19:15
I would just try uploading a little php script (perhaps one of the samples from the imagemagick site) and try accessing it. That should only take a few minutes and it might give you a better idea of whether PHP and imagemagick is already installed (if it is you mightn't need to even talk to the host, particularly if the control panel offers permissions settings on the folders which it probably will).

The only other hurdle appart from that I can see is MySQL, but a lot of windows hosts will support that anyway, so you may find that in the control panel aswell (or just check out the hosts site and see if there's any mention of it there).

ethicaldesign
November 30th, 2004, 19:17
LOL!. You keep beating me to the posts before I hit the submit button.

If they haven't even sent you the FTP details, then that's even more of a problem. If you don't mind me asking, where are you hosting? (pm me if you don't want to mention it here - just helpful to know who to avoid in the future!).

ethicaldesign
November 30th, 2004, 19:37
At the bottom of that site, there's a link to 'the canton web works'. This goes to a 404 page.

I did a little searching and noticed that: http://www.mitchellsstudio.com/ at some point had some text on it that said 'designed by the canton web works'. Site doesn't appear to have that now, but perhaps they still have some valid contact details to get through to those guys (if it's the same people who are responsible for hosting).

http://www.novabehavioral.com/location.asp - also has a credit for them so a mail to that site might result in some better contact details.

This is assuming that the contact details are the problem though. Was it canton web works that were responsible for designing and maintaining your clients existing site aswell as hosting it? If so, then you might have a problem. Could possibly be the case that they're deliberately ignoring you because you've now got their client (some people can get funny when that happens). If that turns out to be the case, then it might be worth thinking about setting up that site on an alternative server and getting ready to point the dns to it (assuming that your client has a backup of the site files that you could upload).

Hope it works out for you anyway :)

ethicaldesign
November 30th, 2004, 19:39
Man, that smiley face icon looks bad in that situation. We should have a :sympathy: icon!

ethicaldesign
November 30th, 2004, 19:45
Assuming your client is actually in canton, could one of their staff pop down to the actual offices of the guys who are hosting the site and have a word. Sometimes even a firm but polite 'I seem to be having problems getting through to you by phone and email, so I'll be popping in to see you sometime over the next day or two to see you in person' answer machine message can work wonders, particularly if you don't specify the time you're going to arrive and they're a small business (people popping in at any time over a couple of days or more timescale is usually more hastle than a phonecall or email, so if they are trying to ignore you they'll likely respond by phone or email when they get that message to avoid being caught unawares or at an inconvenient time).

the_pm
November 30th, 2004, 19:58
Assuming Gasser paid for the Web work, unless their contract explicitly stated Gasser does not own the work produced for them (God help them), then Canton Web must release it, all source files included, on demand. I have no idea who created Gasser's current site, but when I've had clients decide to take work elsewhere (I had two go in-house with maintenance), I was most gracious and accommodating with source files, instructions, etc. The only ones who look bad here are them - even the most elementary business person must see this. Either way, a little visit to Canton Web offices might be in order in the near future, but I can't make that visit. I have no rights to files or login information myself. The people at Gasser have to make the actual request and all info must be given to them. It is then at their discretion that they hand it to me. On the flip side of that, I would never, ever give out password info, server info or source files to someone claiming to represent a client! I would gladly give them to the client directly, but that's all. That being said, the first correspondences to Canton Web came from Gasser, so they're essentially ignoring their own client. Not good. Not good.

ethicaldesign
November 30th, 2004, 20:43
Assuming Gasser paid for the Web work, unless their contract explicitly stated Gasser does not own the work produced for them (God help them), then Canton Web must release it, all source files included, on demand.

Not necessarily. It's more a case of 'if their contract didn't explicitly state that the copyright of the work was owned by the client' then it could well still be considered in law to belong to canton (or whoever developed it).

Copyright of any creative work immediately belongs to the creator (unless its done by a regular employee in which case things are usually different). In the case of an independant contractor even if paid to complete a project, the copyright automatically belongs to the contractor unless a contractual agreement states that copyright is transferred to the client or some subsequent agreement is made.

Seems strange I know, particularly if you're looking at things from the perspective of an employee, but that's the way things work.

I don't tend to work like that myself (except in certain cases where code is concerned and with the clients agreement), but that's the way things are regarding copyright as far as I'm aware.

Even if canton had agreed in their contract to hand over copyright to the client at the projects completion, unless there was also an agreement about maintaining the files, then there could still be grey issues.

I don't want to scare you over this, or slag off this canton company because there could be very genuine reasons why they haven't been in touch.

Just trying to point out that in law, things aren't quite as simple as they might at first seem.


I have no idea who created Gasser's current site, but when I've had clients decide to take work elsewhere (I had two go in-house with maintenance), I was most gracious and accommodating with source files, instructions, etc.

I would be the same! Not everyone is though. Even when the law isn't on their side. I'm not at all suggesting that this is what is happening in this situation, because there might well be perfectly justifiable reasons why they have been hard to contact.

Just trying to make you aware that if they are being awkward I would tread carefully, because the laws regarding independent contractors are quite different to those of employees as far as I'm aware.


The only ones who look bad here are them - even the most elementary business person must see this.

It really depends. Take for example a large design agency creating a logo for a corporate client (who has requested a logo design for use on their website and stationery). The client pays the design agency £10,000 for their logo. Now a couple of years down the line the client decides to do a bit of TV advertising, and they use the logo without asking permission from the designer (and the contract only mentioned stationery usage and didn't mention anything about copyright ownership being transferred to the client). As soon as they use that logo on the TV the design agency could technically (as far as I'm aware) go after the client for usage fees, and potentially copyright infringement.

This might seem completely unfair to a lot of people, particularly in the small business arena, but it might be considered 'fair enough' to larger businesses and agencies who are more familiar with dealing with such issues.

I'm not saying this is right, this just appears to be the way things work. If you do a bit of googling for the phrase "who owns the copyright" and perhaps tag on the phrase "independant contractor" as a second search you should find more info about this.


Either way, a little visit to Canton Web offices might be in order in the near future, but I can't make that visit.

Just be sure to tell them to be polite and not get agressive because that could make the situation worse, and you mightn't be on such firm ground as you think you are. I'm not a lawyer but I would tend to be careful (as I say, firm but polite would be my approach).


I have no rights to files or login information myself. The people at Gasser have to make the actual request and all info must be given to them. It is then at their discretion that they hand it to me. On the flip side of that, I would never, ever give out password info, server info or source files to someone claiming to represent a client! I would gladly give them to the client directly, but that's all. That being said, the first correspondences to Canton Web came from Gasser, so they're essentially ignoring their own client. Not good. Not good.

Yes, that seems completely reasonable. It's probably going to have to be your client that approaches them for those details, or at least for it to be agreed with them that you have the power to act on their behalf. That's sometimes a good way of working it, as it saves a lot of backward/forwarding with your client stuck in the middle.

Good luck anyway. I don't want to freak you out and really hope that the hosts aren't being awkward (they might not be - so try not to get too worked up about that - just something to keep in mind perhaps if this drags on for too much longer and if you continue to have mails and phone calls go unanswered).

the_pm
November 30th, 2004, 21:08
Copyright of any creative work immediately belongs to the creatorI thought work-for-hire was considered a purchase, payment in return for ownership, unless specifically stated otherwise.

In any case, I just got a phone call from CantonWeb. The company that created the old site (not CantonWeb) signed off on it and all files, though we have no idea where those files might be. CantonWeb servers have ASP-Image and ASP-JPEG modules (something like that), which are their version of ImageMagick/GD. They support MySQL, but not PHP (no client has requested that yet). The current Gasser applications are ASP/Access.

Kerri from CantonWeb was very nice, very accommodating, and it seems everything will be just fine. There was no FTP account in existence - when DBM signed off on the work, they had the FTP account closed so no one could accuse them of shenanigans. The site hasn't been updated since then (Jan. 2003). Kerri is giving me FTP access and copying Gasser on all the information for their own use.

I think the way we're going to have to approach this for now is that the Gasser catalog (Coppermine) will be remotely hosted under the straight IP/~gasser. Links to the catalog will be regular links served through temporary redirects. And that will be that. I think this is the path of least resistence until a more permanent solution can be found, unless someone else has any other bright ideas!

ethicaldesign
November 30th, 2004, 21:48
I thought work-for-hire was considered a purchase, payment in return for ownership, unless specifically stated otherwise.

Only if the contract itself states that it's "work-for-hire" or an agreement has been made before work begins.

In the case of a regular employee I think it's generally assumed that the copyright belongs to the employer, but when an outside entity is contracted particularly for creative work, the rules change.

That's the way I understand it to work anyway (I'm pretty sure about that but ofcourse not a lawyer so if this ever became an issue would be best to check with one in individual circumstances).


In any case, I just got a phone call from CantonWeb. The company that created the old site (not CantonWeb) signed off on it and all files, though we have no idea where those files might be.

Shouldn't the files be easily locatable by just looking at which folder the domain is mapped to?

Hope you get that sorted out soon anyway.


CantonWeb servers have ASP-Image and ASP-JPEG modules (something like that), which are their version of ImageMagick/GD. They support MySQL, but not PHP (no client has requested that yet). The current Gasser applications are ASP/Access.

Kerri from CantonWeb was very nice, very accommodating, and it seems everything will be just fine.

Good to hear that you got that sorted out :)

the_pm
November 30th, 2004, 21:50
Shouldn't the files be easily locatable by just looking at which folder the domain is mapped to?
Sorry, it's the source files that are God-knows where. I'm talking about the files from which their old, beat-up rollovers were generated and all of their visuals were created and manipulated. I'll recreate a lot of it for the site's content, but it would sure be nice to have my hands on the entire project in it's current state, not just the end product :(

No biggie though.

ethicaldesign
November 30th, 2004, 21:58
Ah..Sorry about that. At least you have access to the code and original buttons though which is the biggest thing. Glad that worked out for you anyway.

About the work for hire thing, I did a little searching and came across:

http://www.ivanhoffman.com/work2.html

This details the presedence for this issue (there appear to be lots of other really good articles on that site aswell - bookmarked it myself for reading later). He could really do with a better looking website though! Perhaps he's just paranoid about who would own it if he got someone else in :D

ethicaldesign
November 30th, 2004, 22:00
Also : http://www.ivanhoffman.com/website.html has some web specific info (that site seems to have been written by a intellectual property lawyer specialising in electronic rights - though hopefully he's a better lawyer than web designer!).