Run php on different server

Posted on 2008-11-04
Last Modified: 2013-12-13
My Server runs Caucho Resin with jsp code. I also want to use PHP in my code, but I want PHP to be run on another server of mine, but included on my first server.

Can I do this? I don't want to use iframe.
Question by:kvaade
    LVL 20

    Expert Comment

    you can include php code off a different server using something like :

    include '';

    But that would still have to be inside a php page so you would also have to have php on the main server to run that.

    What about

    Author Comment

    Server1 with caucho resin is my server.

    A "customer" wants to run php on Server1.

    I don't want:
    1) to give customer access to Server1, no chroot jail, no access.
    2) php from customer to potentially disturb Server1

    I can give customer access to Server2 with php installed, but presentation should be on Server1...
    LVL 20

    Expert Comment

    include it as iframe then.... otherwise they DO have access as the php file is included from the main one.
    LVL 13

    Accepted Solution

    What about configuring your apache/mod_caucho box to reverse proxy url's back to the php server?

    <Location /some/url>
    ProxyPass              http://phphost/url/
    ProxyPassReverse    http://phphost/url/

    We use this setup for passing particular servlet url's off to third parties...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now