Executing php code in rails

Hello guys. How could I execute a php script from RoR templates?

I've tried to do that in such way:
<% command = 'php /site/script.php uri=' %>
<%= `#{command}` %>

And got this:
X-Powered-By: PHP/4.4.7 Content-type: text/html require
File.dirname(__FILE__) + "/../config/environment" unless defined?
(RAILS_ROOT) # If you're using RubyGems and mod_ruby, this require
should be changed to an absolute path one, like: # "/usr/local/lib/
ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise
performance is severely impaired require "dispatcher"
ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if
File.directory?(dir) } if defined?(Apache::RubyRun)
Dispatcher.dispatch

What I've done wrong?

trying:

  <% command = 'hostname' %>
  <%= `#{command}` %>

...everything works. i'm guessing you have some path problem -- try explicitly setting the php path, e.g. "/usr/local/bin/pgp /site/script.php uri="

-faisal