We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10525
    • 247 Posts
    A question about ports and users on linux..

    I use a statistical language called R to run analyses and create plots and charts. R runs on port 8787. For the purposes of this test I have installed R under root.

    I want to use MODX to run R scripts and output the results in my MODX-served web pages. MODX is installed in the usual way, with the manager on port 8443.

    I want to be able to write and save R scripts as resources in MODX, possibly using the template to direct the script to R for processing, with the output returned to MODX for display.

    Can anyone advise me on whether this sounds feasible and, if so, what I need to know/do in order to do it?

    Centos 7
    MODX Revolution 2.5.7-pl
    R version 3.4.1 (2017-06-30). Platform: x86_64-redhat-linux-gnu (64-bit)
      • 10525
      • 247 Posts
      OK, maybe I should generalise this question a bit.

      MODX accesses MySQL, which runs on port 3306.

      Are there any standard methods available in MODX to access other services which run on different ports on the same server?
        • 10525
        • 247 Posts
        Hmmm, how do I find info on ports in the docs?...

        MODX Documentation
        Search Results
        There were no search results for the search "port". Please try using more general terms to get more results.
          • 38783
          • 571 Posts
          I wonder if it is correct to think in terms of accessing R via a port number?

          Should you instead be using php to run R scripts using local paths, having defined where your R binary lives on the server?

          This conversation on StackExchange might help (or be completely off topic)!

          https://stats.stackexchange.com/questions/4279/how-can-i-integrate-r-with-php
            If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

            email: [email protected] | website: https://andytough.com