Can we call php function in Rails?

Hi all ,

I have a small doubt , Can we call a php function in Rails . Is there
any
Interpreter or a Bridge in which Rails application can talk to a Php
File
and call a specific method from php file . Thanks in Advance

Srinivas I. wrote:

Hi all ,

I have a small doubt , Can we call a php function in Rails . Is there
any
Interpreter or a Bridge in which Rails application can talk to a Php
File

Not as such. I’d suggest either of the following two options:

  • Treat your PHP app as an external Web service. This is simple and
    clean.
  • If you really need PHP and Ruby playing in the same pool, try using
    Java, JRuby, and Quercus. But this is likely to be far more difficult.

and call a specific method from php file . Thanks in Advance

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Thanks Marnen for your Suggestions

Out of the two solutions you have suggested , which one will provide
better performance ,

If i create the PHP app as an external Web Service and and call the
method , My application should always be dependent on the Apache Server
and this may afftect the performance of the Application and using
webservice there may be time delay inorder to talk with the Apache
Server
and get the desired result

How about the Second option’s performance ? since i havent tried it
.

Regards,
Srinivas

On Tue, Jul 14, 2009 at 3:56 AM, Marnen Laibow-Koser <

Srinivas I. wrote:

Thanks Marnen for your Suggestions

Out of the two solutions you have suggested , which one will provide
better performance ,

I have no idea.

If i create the PHP app as an external Web Service and and call the
method , My application should always be dependent on the Apache Server
and this may afftect the performance of the Application and using
webservice there may be time delay inorder to talk with the Apache
Server
and get the desired result

Yes, that’s true. Is this a big deal?

How about the Second option’s performance ? since i havent tried it
.

Neither have I. And I’ve only really used the first option in
developing Facebook apps (and in those cases, it was wrapped by
Facebooker).

Regards,
Srinivas

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]