Is there anyone who can recommend some info on how to add RoR to a PHP-driven website?
Ralph Shnelvar
> I am inheriting a legacy PHP website and I want to add a few Rails pages.
>
> Is there anyone who can recommend some info on how to add RoR to a PHP-driven website?
I've never tried this, but if you're using Passenger, it seems likely that you could add the handler directive to your Apache configuration (or maybe it would inherit the php handler stuff if the server can already host php by default) and then put the entire PHP site in the public folder. Just make sure that you don't clobber any of your routes, and it should work fine. If you're not hitting the same database with PHP and Rails, you could possibly get away with as little as that.
Walter
But Walter's hack might work. Alternatively there's some fancy mod_rewrite I'm sure apache will do to direct request to the right app.
But consider that PHP and Rails are mostly different technologies and you should have no expectation that they will work "together" -- what you're trying to do is a hack and probably should only be done if absolutely necessary and/or as a band-aid fix.
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
At the risk of going Off Topic, I would ask why on earth would you do that?
*I think* that's a terrible idea. Debugging and maintenance WILL hurt
you. Not to mention that every somebody does that kind of things a
baby Panda dies.
--
Leonardo Mateo.
There's no place like ~
Friday, April 6, 2012, 2:18:53 PM, you wrote:
JFB> Yea, I would even consider keeping the existing PHP app at "www.xyz.com" and making your Rails app "services.xyz.com" or something like that
JFB> But Walter's hack might work. Alternatively there's some fancy mod_rewrite I'm sure apache will do to direct request to the right app.
JFB> But consider that PHP and Rails are mostly different technologies and you should have no expectation that they will work "together" -- what you're trying to do is a hack and probably should only be done if absolutely necessary and/or as a band-aid fix.
JFB> On Apr 6, 2012, at 4:14 PM, Walter Lee Davis wrote:
>>
>> On Apr 6, 2012, at 3:53 PM, Ralph Shnelvar wrote:
>>
>>> I am inheriting a legacy PHP website and I want to add a few Rails pages.
>>>
>>> Is there anyone who can recommend some info on how to add RoR to a PHP-driven website?
>>
>> I've never tried this, but if you're using Passenger, it seems likely that you could add the handler directive to your Apache configuration (or maybe it would inherit the php handler stuff if the server can already host php by default) and then put the entire PHP site in the public folder. Just make sure that you don't clobber any of your routes, and it should work fine. If you're not hitting the same database with PHP and Rails, you could possibly get away with as little as that.
>>
>> Walter
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
>> To post to this group, send email to rubyonra...@googlegroups.com.
>> To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
>> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
What a simple and wonderful idea! Thanks!!!
Ralph Shnelvar
Matt,
-- |
|
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. |
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/FAV9sfY553sJ. |
|
To post to this group, send email to rubyonra...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. |
This is way over my head although I have some glimpses of understanding.
I thank you for taking the time to write all this tuff. I'll save it and cogitate when I know a lot more.
--
Best regards,
Ralph mailto:ral...@dos32.com