cancel
Showing results for 
Search instead for 
Did you mean: 

PHP Automation Client

xesar_
Champ in-the-making
Champ in-the-making

Hi, since i got the version 5.4.2 i can't use blob.get of php automation client to open files, it shows me 'Error Server is not set', is there another way?

1 ACCEPTED ANSWER

Alain_ESCAFFRE
Star Contributor
Star Contributor

maybe what was posted on this forum would solve your problem: http://forum.nuxeo.com/t/5537/

Quote: "Hello Thanks a lot for your response, i had a mistake configuration on the remote server, after enable the "allow_url_fopen" directive in the php.ini file now it works fine"

View answer in original post

3 REPLIES 3

Alain_ESCAFFRE
Star Contributor
Star Contributor

Hi,

xesar_
Champ in-the-making
Champ in-the-making

Hi, i'm using the php automatin client with version 5.4.2, my example:

include ('../NuxeoAutomationClient/NuxeoAutomationAPI.php');
$path="/path/..."; //valid path
$client = new PhpAutomationClient('http://ip:8080/nuxeo/site/automation');
 
$session = $client->GetSession('Administrator','Administrator');
 
$answer = $session->NewRequest("Blob.Get")->Set('input', 'doc: ' . $path)->SendRequest();
 
if (!isset($answer) OR $answer == false)
    echo $answer.' is not set';
else{
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename='.$filename.'.pdf');
    readfile('tempstream');
}

It returns me "Error Server is not set"

Alain_ESCAFFRE
Star Contributor
Star Contributor

maybe what was posted on this forum would solve your problem: http://forum.nuxeo.com/t/5537/

Quote: "Hello Thanks a lot for your response, i had a mistake configuration on the remote server, after enable the "allow_url_fopen" directive in the php.ini file now it works fine"

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.