tags:

views:

502

answers:

6

Hey I have a question regarding the compatibility of ColdFusion and PHP.

We built a community website which is based on ColdFusion. Is it altogether possible to add features such as blogs, and other community features to our website in PHP?

I mean to combine both PHP and ColdFusion together.

Thanks very much for the help!

+4  A: 

I think it can be done, if you're using ColdFusion 8. I know that Sean Corfield has a project on RIAForge doing this sort of thing, and there are a string of posts on his blog, starting with this one:

http://corfield.org/blog/index.cfm/do/blog.entry/entry/ColdFusion_8_running_PHP

All of this being said, it will be easier to integrate products from the same core language. There are hundreds of open source options for different things in ColdFusion. RIAForge.org is a good place to start.

Steve -Cutter- Blades
+2  A: 

I think Corfield's way is not (very) suitable for standalone apps like blogs and forums. But it can help with sharing sessions.

On the other hand, these types of software are not so good in CF world.

I'd better proposed to play with webserver settings. Can't say much about IIS, but in Apache you are typically using different handlers for .cfm and .php files. Possible problem here is index file, that can be index.cfm or index.php. In this case .htaccess rules should help.

So, tuning webserver allows to use PHP apps in subdirectories of CF application.

Additional possibility is using subdomains, this even easier to set up, that can fit your needs. Say, blog.website.com and forum.website.com

Hope this helps.

Sergii
+1  A: 

What do you mean by "On the other hand, these types of software are not so good in CF world." Are you saying there aren't good blogs/forums for CF? If so, I strongly disagree. (But before I get into a list I will see if I read you right.)

CF Jedi Master
+3  A: 

Yes, it's possible. You would have to probably integrate the PHP application's session management into your Coldfusion application's session management.

I recently did that with a PHP shopping cart into Coldfusion because I didn't have the time or resources available to get the same results in Coldfusion -- often the great and polished pieces in CF can cost some money, and with PHP its a gamble or a time pit to get it to dance how you want.

Second, there might already be blogs, forums, etc that suit your needs made in Coldfusion. Check them out. You might be able to stay more towards one platform. Chances are you might want a PHP solution because it has addons or something else that you don't want to program.

I like your best-of-breed approach, Coldfusion overall has a lot more commercial development than open source when it comes to large packages that are incredibly featured.

Best of luck, be sure to share what you end up doing.


Jas Panesar
+1  A: 

To question owner: sorry for such odd reply, I just can't comment here yet. And sorry for small offtop too.

To Ray Camden: yes I am saying that there're not so good opensource forums/blogs for CF as for PHP. I am happy to know about Galleon and BlogCFC. But if talking about features -- they in 2006 of PHP analogues, especially Galleon. BlogCFC grows and getting better fast.

Anyway, I have a suspicion that many of BlogCFC users using it because it is written in CFML. And me too, partially.

Problem is not these two applications, they can fit someone's needs. Problem is that there're no alternatives. Or maybe I am wrong here and there's lots of another cool apps of these types?

And yes. Maybe there're another amazing proprietary blogs/forums, but we're not talkin about them now right?

Sergii
The commenting limit is incredibly stupid, so I've upvoted you and Ray to both have enough rep to comment - don't get too excited though, you're limited to 300 chars per comment, with no formatting nor editing.
Peter Boughton
Thank you Peter.
Sergii
Sergii, I'd look at the comment by Adam Tuttle below, specifically, take a look at RIAForge where there are quite a few CF OS projects listed. As for Galleon, well, I'm obviously biased, but the only way apps can grow is with support - so feel free to ping me direct with new feature ideas.
CF Jedi Master
+3  A: 

Your question wasn't really focused enough to give a single direct correct answer.

We built a community website which is based on ColdFusion. Is it altogether possible to add features such as blogs, and other community features to our website in PHP?

I mean to combine both PHP and ColdFusion together.

When you say you want to "combine" them, what exactly do you mean? They can both co-exist on a web server and both have access to the same database; so if you want both PHP and ColdFusion applications to have access to the same data, that is not a problem at all. There would be some concerns about locking and race conditions, but from an "is this possible?" standpoint, the answer is undoubtedly YES.

Sharing session, client, or other special scopes/variables from CF to PHP should be possible with some clever programming, but would be tricky. It would depend entirely on your needs and your implementation.

If you're looking for applications to add to your community, I would recommend that you try to find something in CFML that suits your needs before you go the route of attempting to mix CFML and PHP. There are tons of free open source applications including blogs and wikis written in CFML available on RIAForge, and other websites. Canvas Wiki, and Codex Wiki are solutions that focus strictly on Wiki functionality, and there are others that include Wiki functionality as part of a larger package. Searching for "blog" in the ColdFusion category on RIAForge shows no less than 6 blogging applications like BlogCFC and others, and that doesn't even include my personal favorite, Mango Blog.

Adam Tuttle