# RE: Can Ruby and PHP play nice together?

**URL:** <https://www.ruby-forum.com/t/re-can-ruby-and-php-play-nice-together/77847>\
**Category:** Rails\
**Created:** [March 7, 2006, 4:30pm UTC](https://www.ruby-forum.com/t/re-can-ruby-and-php-play-nice-together/77847 "2006-03-07T16:30:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [March 7, 2006, 4:30pm UTC](https://www.ruby-forum.com/t/re-can-ruby-and-php-play-nice-together/77847/1 "2006-03-07T16:30:11Z")

</div>

I’m doing the opposite on Dreamhost… I have a wordpress blog in the  
public folder of my Rails application. Everything seems to work just  
fine there.

I don’t recall if I had to do anything special to make that work… I  
believe that the default htaccess worked fine, as the php page were  
handled by Apache instead of the dispatch.fcgi.

---

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [March 7, 2006, 6:35pm UTC](https://www.ruby-forum.com/t/re-can-ruby-and-php-play-nice-together/77847/2 "2006-03-07T18:35:11Z")

</div>

If your webserver is configured for rails but also for php then you  
can just put any php files or apps in your public dir and they will  
just work.

-Ezra

On Mar 7, 2006, at 7:29 AM, Hogan, Brian P. wrote:

> From: removed\_email\_address@domain.invalid [mailto:rails-  
> But, if you want some links/pages/content to use PHP and some to
> 
> to rewrite them to work with Rails as, well, I don’t see the point in  
> or point me to some interesting links on the topic? Being a pragmatic
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

-Ezra Z.  
Yakima Herald-Republic  
WebMaster

> **[yakimaherald.com | Yakima, Washington - We Tell Your Stories](https://www.yakimaherald.com/)**

509-577-7732  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [March 7, 2006, 7:04pm UTC](https://www.ruby-forum.com/t/re-can-ruby-and-php-play-nice-together/77847/3 "2006-03-07T19:04:57Z")

</div>

That’s not the issue here really. The webserver can run both PHP and  
Rails apps, I just want to be able to have them running as part of the  
same app, same look-and-feel without having to maintain two sets of  
templates.

Ezra Z. wrote:

> If your webserver is configured for rails but also for php then you  
> can just put any php files or apps in your public dir and they will  
> just work.
> 
> -Ezra
> 
> On Mar 7, 2006, at 7:29 AM, Hogan, Brian P. wrote:
> 
> > From: removed\_email\_address@domain.invalid [mailto:rails-  
> > But, if you want some links/pages/content to use PHP and some to
> > 
> > to rewrite them to work with Rails as, well, I don’t see the point in  
> > or point me to some interesting links on the topic? Being a pragmatic
> > 
> > * * *
> > 
> > Rails mailing list  
> > removed\_email\_address@domain.invalid  
> > [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)
> 
> -Ezra Z.  
> Yakima Herald-Republic  
> WebMaster  
> [http://yakimaherald.com](http://yakimaherald.com)  
> 509-577-7732  
> removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![HoganS\_Brian\_P](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/9de0a6/32.png) [@HoganS\_Brian\_P](https://www.ruby-forum.com/u/HoganS_Brian_P)\
**Post date:** [March 7, 2006, 8:00pm UTC](https://www.ruby-forum.com/t/re-can-ruby-and-php-play-nice-together/77847/4 "2006-03-07T20:00:34Z")

</div>

On 3/7/06, Chris H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> That’s not the issue here really. The webserver can run both PHP and  
> Rails apps, I just want to be able to have them running as part of the same  
> app, same look-and-feel without having to maintain two sets of templates.

I’m not aware of an easy way to re-use Rails’ layouts/views in PHP; or  
vice-versa.
