I have on a Linux server the file 'convert.php', containing :
<?php
$output=array();
$command = "../pdf2swf -t -o Notre_participation.pdf.swf
Notre_participation.pdf";
$return_var=0;
$s=exec($command,$output,$return_var);
array_push ($output, "EXEC RETURN VALUE : " . $return_var);
print_r($output);
?>
If I type via SSH the following code
(uiserver):u44819199:~/swftest/script > <b>php convert.php</b>
I have the following response
Array
(
[0] => NOTICE processing PDF page 1 (595x842:0:0) (move:0:0)
[1] => NOTICE File contains jpeg pictures
[2] => NOTICE processing PDF page 2 (595x842:0:0) (move:0:0)
[3] => NOTICE processing PDF page 3 (595x842:0:0) (move:0:0)
[4] => NOTICE processing PDF page 4 (595x842:0:0) (move:0:0)
[5] => NOTICE Writing SWF file Notre_participation.pdf.swf
[6] => EXEC RETURN VALUE : 0
)
and the file 'Notre_participation.pdf.swf' is generated.
But if open the same file via a navigator (ie http://mysite/convert.php),
I have the following response
[0] => NOTICE processing PDF page 1 (595x842:0:0) (move:0:0)
[1] => NOTICE File contains jpeg pictures
[2] => EXEC RETURN VALUE : 6
the process stops and the file "Notre_participation.pdf.swf" is not created.
I have an other file with a return value of 1, and many files where the process
ends correctly, with file generation and a return
code of 0.
Have an idea ?
____________________________________________________
Un max d’humour, un max de sensation, un max de tendresse ! C’est
video.voila.fr