We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

REST API & file_get_contents on Server Error

Received Response
21
Views
4
Comments
edited Jan 13, 2017 2:50PM in Integrations and APIs 4 comments

Content

Hi,

I'm trying to use PHP's function file_get_contents to pull in REST API data but stumbling across the errors shown. Is there anyway around this using standard PHP?

Tried cURL, same issue.

Thanks

Code Snippet

             A PHP Error was encountered

Severity: Warning
Message: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?
Filename: development/views
Line Number: 18
A PHP Error was encountered

Severity: Warning
Message: file_get_contents(): open_basedir restriction in effect. File(https://****.custhelp.com/services/rest/connect/v1.3/answers/) is not within the allowed path(s): (/cgi-bin/es_one_stop_shop.cfg/scripts/cp/core/:/cgi-bin/es_one_stop_shop.cfg/scripts/cp/customer/development/:/cgi-bin/es_one_stop_shop.cfg/scripts/cp/src/core/framework/3.3.3/:/cgi-bin/es_one_stop_shop.cfg/scripts/cp/generated/:/cgi-bin/es_one_stop_shop.cfg/scripts/ma/util.phph:/cgi-bin/es_one_stop_shop.cfg/scripts/ma/cci/head.phph:/cgi-bin/es_one_stop_shop.cfg/scripts/ma/cci/top.phph:/cgi-bin/es_one_stop_shop.cfg/scripts/ma/cci/bottom.phph:/cgi-bin/es_one_stop_shop.cfg/scripts/views/view_utils.phph:/vhosts/es_one_stop_shop/euf/:/vhosts/es_one_stop_shop/rnt/rnw/yui_2.7:/vhosts/es_one_stop_shop/rnt/rnw/yui_3.17/:/cgi-bin/es_one_stop_shop.cfg/scripts/../log/:/cgi-bin/es_one_stop_shop.cfg/scripts/include/ConnectPHP/:/cgi-bin/es_one_stop_shop.cfg/scripts/ConnectPHP/:/cgi-bin/es_one_stop_shop.cfg/scripts/cp/mod_info.phph:/tmp/:/cgi-bin/es_one_stop_shop.cfg/webindex/:/cgi-bin/es_one_stop_shop.cfg/scripts/../configs:/configs:/cgi-bin/es_one_stop_shop.cfg/scripts/euf/config:/prod_tmp/:/vhosts/es_one_stop_shop:/vhosts/es_one_stop_shop/rnt/rnw/:/cgi-bin/es_one_stop_shop.cfg/scripts/include/src/:/cgi-bin/es_one_stop_shop.cfg/scripts/cp/src/mod_info.phph)
Filename: development/views
Line Number: 18
A PHP Error was encountered

Severity: Warning
Message: file_get_contents(https://****.custhelp.com/services/rest/connect/v1.3/answers/): failed to open stream: Operation not permitted
Filename: development/views
Line Number: 18 
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!