swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] running PDF2SWF via php on linux issue


From: peter kostov
Subject: Re: [Swftools-common] running PDF2SWF via php on linux issue
Date: Wed, 27 Aug 2008 12:07:52 +0300
User-agent: Thunderbird 2.0.0.14 (X11/20080621)

Mark A. Lowe wrote:
Hey guys,

I've been using PDF2SWF via my command line in Windows for a while now.

For the last week or so, I've been trying to get it to work via a php script
on my Linux box.

It's installed fine, and when I run it via ssh (under the 'root' user) it
works fine.

I'm using this simple command, without any extras obviously : pdf2swf
myPDF.pdf

I put this same command in a PHP file but was getting no result - no .swf
file nor response.

I've now changed it to give the full location of the pdf2swf command, as in:

<?php

$output =
`/var/www/vhosts/mydomain.com.au/httpdocs/pdf2swf/swftools-2008-08-21-2105/s
rc/pdf2swf myPDF.pdf -o myPDF.swf`;

echo "Output pdf2swf: <pre>$output</pre>";

?>

This is now giving me the following output:

NOTICE  processing PDF page 1 (450x600:0:0) (move:0:0)

NOTICE  Writing SWF file degani.swf

FATAL   Could not create "degani.swf".

So it is running fine, but it just can't write out the .swf file.

I've chmod 777 my php file.
Hi Mark,
you shouldn't chmod your php file (it should be 755), but instead you should chmod recursively 777 the directory where the script will write the output file. Or a better solution is to run PHP as CGI script, not as Apache module in which case PHP will run on behalf of your user, not the Apache server and will have access to all of your files without need to chmod them at all. And if you do not want troubles, please do not do anything (!) as root except the system administration (eg. installing/uninstalling applications system wide, configuring services, adding/removing users, etc.)

I've tried to set up a sudoers file like so :

apache rushmore = NOPASSWD:
/var/www/vhosts/mydomain.com.au/httpdocs/pdf2swf/swftools-2008-08-21-2105/sr
c/pdf2swf

and use "sudo -u apache /var./pdf2swf/. etc" but I get no output.
You don't need sudo/sudoers for this at all.

So the root user can run it, but my webserver (apache) can't.

Do I need to change the owner/group of the install  files?
No.

Do I need to use a sudo command and run it as root?
No.

Any help with this would be massively appreciated - I'm so close!

Cheers,

Mark.

Greetings,
Peter

_____

mark lowe
multimedia director


multimedia resource australia


t:

+61 3 9281 3235

m:

+61 424257967


e:

 <mailto:address@hidden> address@hidden


w:

 <http://www.mmr.com.au/> www.mmr.com.au

 MMR, Suite 409, 434 St. Kilda Road, Melbourne, 3004




--

-------
Boryana & Peter Kostovi,
web design & webdevelopment
home site: http://bgwebdeveloper.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]