PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: localhost works, http don't
   PostPosted: 20 Jun 2011, 06:23 
on my local windows computer works great, but on my remote linux server don't.

i use this code on linux
java -Xmx512m -Djava.awt.headless=true -cp pd4ml_demo.jar Pd4Cmd \'http://sierrasolutions.com.mx/cfdi/timbrada_cfdi.php?hola=65\' 1000 LETTER -debug -out 1.pdf


  Subject: Re: localhost works, http don't
   PostPosted: 20 Jun 2011, 21:56 
Do you call the command from shell or from PHP script?

How does the error expose itself?


  Subject: Re: localhost works, http don't
   PostPosted: 20 Jun 2011, 22:06 
<?
....
....
....
$evaluation = 1;
$java = "java";
$url = getUrlBase() . "timbrada_cfdi.php";
$file = "test1.pdf";

if ( $evaluation == 1 ) {
$jar = 'pdf/pd4ml_demo.jar';
} else {
$jar = "pdf/pd4ml.jar";
}


if ( strpos(php_uname(), 'Windows' ) !== FALSE) {
// server platform: Windows
$jar = preg_replace('/\//', "\\", $jar);
$cmdline = "$java -Xmx512m -cp $jar Pd4Cmd \'$url\' 1000 LETTER -debug -out $file";
echo $cmdline;
} else {
// server platform: UNIX-derived
$cmdline = "$java -Xmx512m -Djava.awt.headless=true -cp $jar Pd4Cmd \'$url\' 1000 LETTER -out $file";
echo $cmdline;
}

// see for more command-line parameters: http://pd4ml.com/html-to-pdf-command-line-tool.htm

passthru($cmdline, $result);

echo "<br />".$result;

....
....
....
....
?>



on my localhost i get $result = 1, but on my http i get $result = 127



[Reply]     [ 3 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share