Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2017/05/08)20170509 
Zadik hi11:31.36 
ghostbot Welcome to #ghostscript, the channel for Ghostscript and MuPDF. If you have a question, please ask it, don't ask to ask it. Do be prepared to wait for a reply as devs will check the logs and reply when they come on line.11:31.36 
Zadik Hi all, i try to run ghostscript in my terminal, that part is working, when a run it in a PHP script. i get: *** Unable to open the initial device, quitting. 11:33.09 
  looks like a permission issue or something11:33.31 
Robin_Watts Zadik: no, it's down to you not specifying the device correctly.11:34.49 
  What is the exact command you are feeding to gs?11:34.59 
  Normally there will be a "-sDEVICE=something" in the command. This tells gs what sort of output to use.11:35.47 
  Like, if you want to generate full color PNGs, you'd use -sDEVICE=png16m11:36.05 
  If you call gs without specifying a command, you get the default device (which will vary according to how you built it).11:36.52 
  s/command/device/11:37.01 
  You might get away with the default device when running from a terminal, but not from a PHP script. it all depends.11:37.31 
Zadik i run it on a debian system, apache2: command: /usr/bin/gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=/var/www/html/pdfgen/concatzzz.pdf /var/www/html/pdfgen/test.pdf11:38.59 
Robin_Watts Zadik: OK. We should talk about the AGPL3 then :)11:40.37 
  That sounds like you're correctly specifying the pdfwrite device, but it's refusing to open.11:41.32 
  Which may be due to a permissions problem on it not being able to open the /var/www/html/pdfgen/concatzzz.pdf file for writing.11:42.05 
  So yes, it might be a permissions problem.11:42.23 
Zadik yes i already think about that, because it runs normale if i run it from the terminal11:42.39 
Robin_Watts Zadik: Before we continue though, are you aware of the difference between the GPL and the AGPL ?11:42.43 
Zadik no, i read it now 11:42.55 
  but i cant see if there is a problem with that AGPL license?11:43.52 
Robin_Watts The GPL says (basically) that if you distribute our software as part of another software package, the whole package must be GPL licensed.11:43.52 
  The AGPL says (basically) that "if you make a service available on a server, then that whole server set up counts as "distribution"."11:45.00 
Zadik also if you use it for your own stuff? local machine?11:46.00 
Robin_Watts No, local machine is fine.11:46.20 
  It's the moment you let other people log in to do stuff that the AGPL kicks in, AIUI. Cos that counts as 'distribution'.11:46.42 
Zadik i know what you mean, like there are services like websites, that can do the same, but if i do that, than i understrand it. that can damage that ghostscript company11:48.11 
  but good that you say that, i have one question about that AGPL license, because it interest. like i have a invoice system, in that invoice system there are some customers. i want to merge that invoices. is that still under AGPL license?11:49.42 
  i mean with customers, to get the merged pdfs?11:50.11 
  invoices11:50.18 
  @Robin_Watts: new question if possible: that permission error, how can i locate it. is it the current directory, or does ghostscript use a other directory?11:53.01 
Robin_Watts Zadik: I am not a lawyer.11:53.44 
  So I can't advise you on what's allowed/not allowed, other than through my own flawed understanding.11:54.18 
Zadik okey thanks, i will research it :) 11:54.45 
Robin_Watts As to permissions, you're specifying an absolute path, not a relative one, so current directory or not is not a problem.11:55.08 
kens pdfwrite needs to make temporary files11:55.30 
Robin_Watts I suspect the problem is simply that the PHP script is being invoked as an unprivileged user.11:56.11 
  On ubuntu it's www-data, IIRC.11:56.18 
  so you need to make sure that any paths you use are writable from that user.11:56.35 
Zadik i dont know where the ghostscript make the tmp folder.11:57.00 
  maybe i need to chown that11:57.05 
  is it /tmp11:57.14 
  i can try it11:57.18 
  solved :)12:00.26 
  the current directory has do www-data permission.12:01.19 
  do = no 12:01.58 
  @Robin_Watts and @kens Thanks for helping me :)13:35.14 
kens NP13:35.31 
Robin_Watts Zadik: no worries.13:49.17 
 Forward 1 day (to 2017/05/10)>>> 
ghostscript.com #mupdf
Search: