rapache

Set locale to system default UTF-8

两盒软妹~` 提交于 2019-12-17 06:09:23
问题 When running R inside rApache, the locale is inherited from the Apache webserver, and therefore Sys.getlocale() is always equal to "C" . I would like my web application to use UTF8 , so I use: Sys.setlocale("LC_ALL", 'en_US.UTF-8') However this doesn't work on machines that do not have this locale available: 1: Setting LC_CTYPE failed, using "C" 2: Setting LC_COLLATE failed, using "C" 3: Setting LC_TIME failed, using "C" 4: Setting LC_MESSAGES failed, using "C" 5: Setting LC_MONETARY failed,

Disable directory listing in OpenCPU

帅比萌擦擦* 提交于 2019-12-12 03:45:19
问题 I have been trying to disable directory listing in OpenCPU so our users cannot see the resulting directories and files in the http://server/ocpu/tmp/ directory. I have followed Apache's Directory Listing Configuration and deleted every mention of Indexes in the conf files in /etc/apache2/ and included Options -Indexes in the sites-enabled/opencpu.conf file (in the Location tags) without success. I also looked at the rApache documention without finding any pertinent entry. Does anyone know any

Suggestions needed for building R server REST API's that I can call from external app?

旧城冷巷雨未停 提交于 2019-11-30 11:33:25
问题 I've seen lots of articles about consuming data in R from other RESTful API services, but I have really struggled to find any articles about the reverse. I'm interested in R being the server, and not the client. I'd like a Node.js app to call a RESTful API of an R-server so I can leverage specific analytical functions such as multi-seasonality forecasting. Anyone have any ideas? 回答1: You can use httpuv to fire up a basic server then handle the GET / POST requests. The following isn't "REST"

Set locale to system default UTF-8

旧巷老猫 提交于 2019-11-26 22:22:55
When running R inside rApache, the locale is inherited from the Apache webserver, and therefore Sys.getlocale() is always equal to "C" . I would like my web application to use UTF8 , so I use: Sys.setlocale("LC_ALL", 'en_US.UTF-8') However this doesn't work on machines that do not have this locale available: 1: Setting LC_CTYPE failed, using "C" 2: Setting LC_COLLATE failed, using "C" 3: Setting LC_TIME failed, using "C" 4: Setting LC_MESSAGES failed, using "C" 5: Setting LC_MONETARY failed, using “C” Is there any way to use Sys.setlocale to set the locale to the system default UTF-8 ? I.e.