+ Reply to Thread
Results 1 to 2 of 2

Thread: Custom PHP Extension Hosted on Differant Server

  1. #1
    Join Date
    Jan 2010
    Location
    Oak Ridge, TN
    Posts
    35

    Default Custom PHP Extension Hosted on Differant Server

    Can someone tell me how I can host a custom written PHP Extension on a differant server then where I have MindTouch installed?

    When I go to the remote server via URL I am seeing this:

    Code:
    - <extension>
      <title>Hello World Test Script</title> 
      <description>Hello Work Test Script</description> 
      <copyright>Test 2011</copyright> 
      <namespace>test</namespace> 
    - <function>
      <name>sayHello</name> 
      <uri protocol="xmlrpc">http://myserver.com/sayHello.rpc</uri> 
      <return type="str" /> 
      </function>
      </extension>
    So it looks like it is working but the xmlrpc should be http://myserver.com/mtext/Hello.php/sayHello.rpc

    Any suggestions?

  2. #2
    Join Date
    Jan 2010
    Location
    Oak Ridge, TN
    Posts
    35

    Default

    OK I found the issue... It is in the DekiExt.php file. What I did was on line 205 of the DekiExt.php file you will find this:

    Code:
    self::$uri = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    Well the REQUEST_URI is NOT a valid Server variable on my other server (it is a Windows system). So I changed it to look like

    Code:
    self::$uri = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
    Now looking at this even more might want to change this so it does a check and if the request is a HTTPS request it uses https else use http and also might include the port. But this got me working for now.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts