Can anyone tell me how one might go about integrating Rails with a PHP app. The main site itself is in PHP. The way things would work is most of the static content will be handed off in PHP, and the dynamic content will be Rails. S -- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dark Ambient wrote:> Can anyone tell me how one might go about integrating Rails with a PHP app. > The main site itself is in PHP. The way things would work is most of > the static content will be handed off in PHP, > and the dynamic content will be Rails. > > S > > -- > http://en.wikipedia.org/wiki/Dark_ambient > >you can proxy PHP pages through Rails, examples exists on rails wiki page and there is also simple code snipet on: http://www.bigbold.com/snippets/posts/show/197 hope it helps, Bojan -- Bojan Mihelac Informatika Mihelac, Bojan Mihelac s.p. | www.informatikamihelac.com -> tools, scripts, tricks from our code lab: http://source.mihelac.org --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> Can anyone tell me how one might go about integrating Rails with a PHP app. > The main site itself is in PHP. The way things would work is most of the > static content will be handed off in PHP, > and the dynamic content will be Rails.http://rubyforge.org/pipermail/mongrel-users/2006-August/001300.html --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 11/7/06, Bojan Mihelac <lists-3SxN1WY3PMJAfugRpC6u6w@public.gmane.org> wrote:> > > Dark Ambient wrote: > > Can anyone tell me how one might go about integrating Rails with a PHP > app. > > The main site itself is in PHP. The way things would work is most of > > the static content will be handed off in PHP, > > and the dynamic content will be Rails. > > > > S > > > > -- > > http://en.wikipedia.org/wiki/Dark_ambient > > > > > you can proxy PHP pages through Rails, examples exists on rails wiki > page and there is also simple code snipet on: > > http://www.bigbold.com/snippets/posts/show/197 > > hope it helps, > BojanDefintely helps, or at least seems the most feasible at this point. I found these two links on wiki: http://wiki.rubyonrails.com/rails/pages/HowToRenderProxiedPages and this one, though the author doesn''t seem in favor of proxying http://wiki.rubyonrails.com/rails/pages/Integrate+Rails+with+a+CMS Are there performance issues. I''m wondering if the two apps can be managed seperately. Basically Rails will come into play when a table or query is needed. At that point PHP will send the header and footer of the template and Rails would deliver the partial , but maybe I''m dreaming. Stuart --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Stuart Fellowes wrote:> Can anyone tell me how one might go about integrating Rails with a PHP > app. > The main site itself is in PHP. The way things would work is most of > the > static content will be handed off in PHP, > and the dynamic content will be Rails.We currently pull a fair amount of content for our main website (PHP) out of an internal Rails application using XML-RPC. Easy to setup and test using the webservices scaffolding. Works pretty good. -matthew -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 11/7/06, Matthew Isleb <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Stuart Fellowes wrote: > > Can anyone tell me how one might go about integrating Rails with a PHP > > app. > > The main site itself is in PHP. The way things would work is most of > > the > > static content will be handed off in PHP, > > and the dynamic content will be Rails. > > We currently pull a fair amount of content for our main website (PHP) > out of an internal Rails application using XML-RPC. Easy to setup and > test using the webservices scaffolding. Works pretty good. > > -matthewMatthew that sounds like a good approach. Any performance or security issues ? I found the XML-RPC page, so I''ll be reading up. And I''m assuming (since this is the first time I''m hearing) web services scaffoling is part of Rails 1.1.6 ? Stuart --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Stuart Fellowes wrote:> Matthew that sounds like a good approach. Any performance or security > issues ? I found the XML-RPC page, so I''ll be reading up. > And I''m assuming (since this is the first time I''m hearing) web services > scaffoling is part of Rails 1.1.6 ?We don''t have a high traffic website, so performance isn''t an issue. If it were, I''d probably implement some caching on the PHP side. I can''t think of any possible security issues. There is nothing available through XML-RPC that isn''t public anyway. You write special web services "models" (ActionWebService::Struct) which contain just enough information for the XML-RPC client. So nothing in your app is directly exposed to the web. Web services are standard part of 1.1.6, but I hear they are moving it out to its own plugin. Maybe in 1.2? Scaffolding just means that you can put a line like this at the top of the controller: web_service_scaffold :invoke That gives you are URL like: http://yoursite.com/remote/posts/invoke/api where you can manually enter SOAP/XML-RPC requests to test the results before you try to get the PHP to work with it. -matthew -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 11/7/06, Matthew Isleb <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Stuart Fellowes wrote: > > > Matthew that sounds like a good approach. Any performance or security > > issues ? I found the XML-RPC page, so I''ll be reading up. > > And I''m assuming (since this is the first time I''m hearing) web services > > scaffoling is part of Rails 1.1.6 ? > > We don''t have a high traffic website, so performance isn''t an issue. If > it were, I''d probably implement some caching on the PHP side. > > I can''t think of any possible security issues. There is nothing > available through XML-RPC that isn''t public anyway. You write special > web services "models" (ActionWebService::Struct) which contain just > enough information for the XML-RPC client.Just to confirm then, the XML-RPC client would be the PHP (in my case) application ? Stuart So nothing in your app is> directly exposed to the web. > > Web services are standard part of 1.1.6, but I hear they are moving it > out to its own plugin. Maybe in 1.2? > > Scaffolding just means that you can put a line like this at the top of > the controller: > > web_service_scaffold :invoke > > That gives you are URL like: http://yoursite.com/remote/posts/invoke/api > where you can manually enter SOAP/XML-RPC requests to test the results > before you try to get the PHP to work with it. > > -matthew > > -- > Posted via http://www.ruby-forum.com/. > > > >-- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 11/8/06, Dark Ambient <sambient-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On 11/7/06, Matthew Isleb <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > > > > > > Stuart Fellowes wrote: > > > > > Matthew that sounds like a good approach. Any performance or security > > > issues ? I found the XML-RPC page, so I''ll be reading up. > > > And I''m assuming (since this is the first time I''m hearing) web > > services > > > scaffoling is part of Rails 1.1.6 ? > > > > We don''t have a high traffic website, so performance isn''t an issue. If > > it were, I''d probably implement some caching on the PHP side. > > > > I can''t think of any possible security issues. There is nothing > > available through XML-RPC that isn''t public anyway. You write special > > web services "models" (ActionWebService::Struct) which contain just > > enough information for the XML-RPC client. > > > Just to confirm then, the XML-RPC client would be the PHP (in my case) > application ? >Another question - instead of using XML-RPC , can I use REST ? Stuart Stuart> > So nothing in your app is > > directly exposed to the web. > > > > Web services are standard part of 1.1.6, but I hear they are moving it > > out to its own plugin. Maybe in 1.2? > > > > Scaffolding just means that you can put a line like this at the top of > > the controller: > > > > web_service_scaffold :invoke > > > > That gives you are URL like: http://yoursite.com/remote/posts/invoke/api > > where you can manually enter SOAP/XML-RPC requests to test the results > > before you try to get the PHP to work with it. > > > > -matthew > > > > -- > > Posted via http://www.ruby-forum.com/. > > > > > > > > > > > -- > http://en.wikipedia.org/wiki/Dark_ambient >-- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Stuart Fellowes wrote:> > > Another question - instead of using XML-RPC , can I use REST ?Sure. Never used it though. And yes, the XML-RPC client would be the PHP. -matthew -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 11/8/06, Matthew Isleb <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Stuart Fellowes wrote: > > > > > > Another question - instead of using XML-RPC , can I use REST ? > > Sure. Never used it though. > > And yes, the XML-RPC client would be the PHP. > > -matthewLooking at this article http://www-128.ibm.com/developerworks/java/library/j-cb08016/index.html it appears that the client makes the request "show me some data" and sends it into Rails. And then the data might be sent back in html, xml , etc but the client is rendering that data itself However I think the way it should work for me is the client makes the request and Rails takes control of the output at that point. I''m thinking that''s reasonable. So at a deeper level, if the a user enters a query on the PHP client, PHP must send back an array or hash of the query options ? Stuart -- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Starting a new thread since I have a new question. Plan is to have Rails as the web services server and PHP as client. What I''m trying to figure out is at one point in the request does "respond_to" know when it''s being called. Example, I have a state controller, with a list action: StateController: def list @state = State.find_all respond_to do |wants| wants.html wants.xml { render :xml => @state.to_xml} end Now the php makes a request to the server (using REST) via curl - $request = ''http://myrailsserver & query=''.urlencode(''state/list).''&results=8''; $session = curl_init($request); So this establishes the curl session. What I want to do is create a conditional statement based on the request coming in and Rails acting. I am trying not to send data back to php. I know this is probably an insane question. I do hope someone answers and knows something. Stuart -- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 11/9/06, Dark Ambient <sambient-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Starting a new thread since I have a new question. > Plan is to have Rails as the web services server and PHP as client. > > What I''m trying to figure out is at one point in the request does > "respond_to" know when it''s being called. > > Example, I have a state controller, with a list action: > StateController: > def list > @state = State.find_all > respond_to do |wants| > wants.html > wants.xml { render :xml => @ state.to_xml} > end > > Now the php makes a request to the server (using REST) via curl - > > $request = ''http://myrailsserver & query=''.urlencode(''state/list).''&results=8''; > > $session = curl_init($request); > > So this establishes the curl session. What I want to do is create a > conditional statement based on > the request coming in and Rails acting. I am trying not to send data back > to php. > > I know this is probably an insane question. > I do hope someone answers and knows something.I''m not sure what the question is, but GET /state/list.xml?results=8 so respond_to knows to use the .xml block. jeremy --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The question is really a way on how I can NOT have php pulling the data and delivering it but have PHP call into Rails and letting Rails takeover delivering either a form to create a query and then rendering the results , or rendering the results from a table. Everything I''ve read and heard so far is that either using Rails as a proxy or using Web services, Rails sends the data requested back to PHP and then it''s up to PHP to format and return the data for presentation. Yet I read here: http://www.almaer.com/blog/archives/001178.html in particular this paragraph: *Migration via ''Portal''* The PHP front end can also proxy through to the Rails applications running behind the scenes. This makes the app feel a little like a portal, but basically it is just a proxy. The front end can build the template (header, footer, sidebars) and then call back to the Rails backend to get the main content. Either I"m missing something in what I''ve been told so far and read or maybe I''m misinterpreting this article. Stuart On 11/9/06, Jeremy Kemper <jeremy-w7CzD/W5Ocjk1uMJSBkQmQ@public.gmane.org> wrote:> > On 11/9/06, Dark Ambient <sambient-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Starting a new thread since I have a new question. > > Plan is to have Rails as the web services server and PHP as client. > > > > What I''m trying to figure out is at one point in the request does > > "respond_to" know when it''s being called. > > > > Example, I have a state controller, with a list action: > > StateController: > > def list > > @state = State.find_all > > respond_to do |wants| > > wants.html > > wants.xml { render :xml => @ state.to_xml} > > end > > > > Now the php makes a request to the server (using REST) via curl - > > > > $request = '' http://myrailsserver & query=''.urlencode(''state/list).''&results=8''; > > > > $session = curl_init($request); > > > > So this establishes the curl session. What I want to do is create a > > conditional statement based on > > the request coming in and Rails acting. I am trying not to send data > > back to php. > > > > I know this is probably an insane question. > > I do hope someone answers and knows something. > > > I''m not sure what the question is, but GET /state/list.xml?results=8 so > respond_to knows to use the .xml block. > > jeremy > > > >-- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 11/10/06, Dark Ambient <sambient-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > The question is really a way on how I can NOT have php pulling the data > and delivering it but have PHP call into Rails and letting Rails takeover > delivering either a form to create a query and then rendering the results , > or rendering the results from a table. > > Everything I''ve read and heard so far is that either using Rails as a > proxy or using Web services, Rails sends the data requested back to PHP and > then it''s up to PHP to format and return the data for presentation. > > Yet I read here: http://www.almaer.com/blog/archives/001178.html in > particular this paragraph: > > *Migration via ''Portal''* > The PHP front end can also proxy through to the Rails applications running > behind the scenes. This makes the app feel a little like a portal, but > basically it is just a proxy. The front end can build the template (header, > footer, sidebars) and then call back to the Rails backend to get the main > content. > Either I"m missing something in what I''ve been told so far and read or > maybe I''m misinterpreting this article.Another possibility which I read about on a thread at ruby-forum.com has some php pages living in side the Rails app''s public directory. It was suggested as one possibility that you could use sub-domains for the php. In my case though I wonder if I could use sub-domains for Rails ? For example , the link in the PHP menu might be www.mydomain.com/users . This would re-direct(?) to the Rails app . Stuart> > > > On 11/9/06, Jeremy Kemper <jeremy-w7CzD/W5Ocjk1uMJSBkQmQ@public.gmane.org> wrote: > > > > On 11/9/06, Dark Ambient <sambient-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > wrote: > > > > > Starting a new thread since I have a new question. > > > Plan is to have Rails as the web services server and PHP as client. > > > > > > What I''m trying to figure out is at one point in the request does > > > "respond_to" know when it''s being called. > > > > > > Example, I have a state controller, with a list action: > > > StateController: > > > def list > > > @state = State.find_all > > > respond_to do |wants| > > > wants.html > > > wants.xml { render :xml => @ state.to_xml} > > > end > > > > > > Now the php makes a request to the server (using REST) via curl - > > > > > > $request = '' http://myrailsserver & query=''.urlencode(''state/list).''&results=8''; > > > > > > $session = curl_init($request); > > > > > > So this establishes the curl session. What I want to do is create a > > > conditional statement based on > > > the request coming in and Rails acting. I am trying not to send data > > > back to php. > > > > > > I know this is probably an insane question. > > > I do hope someone answers and knows something. > > > > > > I''m not sure what the question is, but GET /state/list.xml?results=8 so > > respond_to knows to use the .xml block. > > > > jeremy > > > > > > > > > > > -- > http://en.wikipedia.org/wiki/Dark_ambient >-- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 10, 2006, at 4:55 AM, Dark Ambient wrote:> Another possibility which I read about on a thread at ruby- > forum.com has some php pages living in side the Rails app''s public > directory. It was suggested as one possibility that you could use > sub-domains for the php. > > In my case though I wonder if I could use sub-domains for Rails ? > For example , the link in the PHP menu might be > www.mydomain.com/users . This would re-direct(?) to the Rails app . > > StuartHey Stuart- I had to deal with this problem about a year and a half ago when i built the yakimaherald.com website. There were still some php scripts that were in use that weren''t worth rewriting at the time. The way I did it was to have lighty setup like a normal rails/fcgi configuration. And then tell lighty to also run any php scripts that it find in /public. This works fine for simple integration stuff. You could do the same thing now with apache2.2 and mod-proxy- balancer. Just use the normal mongrel setup for the apache vhost and add the php handler in as well. Then any call to a url that ends in .php will serve the php page directly as long as its in public. It''s all a bit fugly but it can be done. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez-NLltGlunAUd/unjJdyJNww@public.gmane.org -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 11/10/06, Ezra Zygmuntowicz <ezmobius-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > On Nov 10, 2006, at 4:55 AM, Dark Ambient wrote: > > > Another possibility which I read about on a thread at ruby- > > forum.com has some php pages living in side the Rails app''s public > > directory. It was suggested as one possibility that you could use > > sub-domains for the php. > > > > In my case though I wonder if I could use sub-domains for Rails ? > > For example , the link in the PHP menu might be > > www.mydomain.com/users . This would re-direct(?) to the Rails app . > > > > Stuart > > Hey Stuart- > > I had to deal with this problem about a year and a half ago when i > built the yakimaherald.com website. There were still some php scripts > that were in use that weren''t worth rewriting at the time. The way I > did it was to have lighty setup like a normal rails/fcgi > configuration. And then tell lighty to also run any php scripts that > it find in /public. This works fine for simple integration stuff. > > You could do the same thing now with apache2.2 and mod-proxy- > balancer. Just use the normal mongrel setup for the apache vhost and > add the php handler in as well. Then any call to a url that ends > in .php will serve the php page directly as long as its in public. > > It''s all a bit fugly but it can be done.public Rails public ? What if there are subdirectories. This has numerous directories for php Stuart --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
public Rails public ? What if there are subdirectories. This has numerous directories for php That wont work. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 11/10/06, Mark A. Turner <turner-2HMn1v42alVBDgjK7y7TUQ@public.gmane.org> wrote:> > > > public Rails public ? What if there are subdirectories. This has numerous > directories for php > > That wont work. >Okay thank you. So then back to my original question. What if Rails exists as a sub - domain and certain pages are invoked via links in the PHP site ? Stuart> >-- http://en.wikipedia.org/wiki/Dark_ambient --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Nov 10, 2006, at 12:46 PM, Dark Ambient wrote:> It''s all a bit fugly but it can be done. > public Rails public ? What if there are subdirectories. This has > numerous directories for php > > > StuartSubdirectories are fine. You just need to have the front end webserver always look for static files first before it send the request to mongrel. If there is a static file with .php ext apache will interpret the php and send it out. So yes it has to be in public but it can be nested directories inside public. Its pretty nasty though when you get a big mix of php code in your public dir. The other side effect of this is that to make the php files work with this method, the url always has to have the full url to the php file including the .php ext. -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez-NLltGlunAUd/unjJdyJNww@public.gmane.org -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---