PHP Automation Client

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?

0 votes

2 answers

1039 views

ANSWER

Hi,

Do you mean that you were using the php automation client with an earlier version than the 5.4.2 ? can you give a sample of how you are using the php automation client ?

10/11/2011



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”

1 votes



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”

0 votes