Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

alternates to system() and exec() in order to use ImageMag..

 
   Database Help (Home) -> PHP RSS
Next:  Preview pane will not stay enabled in Outlook 200..  
Author Message
news74

External


Since: Dec 09, 2004
Posts: 5



(Msg. 1) Posted: Mon Feb 21, 2005 10:56 am
Post subject: alternates to system() and exec() in order to use ImageMagik
Archived from groups: comp>lang>php (more info?)

My Web host apepars to not allow exec() and system(), as a line in my
script:

system("convert -scale 100x100 $uploadfile $toimage");

gives the error:

"Warning: system() has been disabled for security reasons"

Is there some other way to use ImageMagik (or is it GhostScript?)'s
"convert" command in PHP that may be safer and generally allowed by Web
hosts?

Thanks for any suggestions.
Liam

 >> Stay informed about: alternates to system() and exec() in order to use ImageMag.. 
Back to top
Login to vote
Andy Hassall

External


Since: Jan 11, 2004
Posts: 318



(Msg. 2) Posted: Mon Feb 21, 2005 6:40 pm
Post subject: Re: alternates to system() and exec() in order to use ImageM [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 21 Feb 2005 09:56:46 -0800, news.RemoveThis@celticbear.com wrote:

 >My Web host apepars to not allow exec() and system(), as a line in my
 >script:
 >
 >system("convert -scale 100x100 $uploadfile $toimage");
 >
 >gives the error:
 >
 >"Warning: system() has been disabled for security reasons"
 >
 >Is there some other way to use ImageMagik (or is it GhostScript?)'s
 >"convert" command in PHP that may be safer and generally allowed by Web
 >hosts?

Should also mention that you may be able to use the GD functions, since
they're bundled with PHP - <a rel="nofollow" style='text-decoration: none;' href="http://uk2.php.net/image" target="_blank">http://uk2.php.net/image</a>

They're slower and not as good for photographic images as ImageMagick, but if
you haven't got an alternative...

--
Andy Hassall / / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool

 >> Stay informed about: alternates to system() and exec() in order to use ImageMag.. 
Back to top
Login to vote
Andy Hassall

External


Since: Jan 11, 2004
Posts: 318



(Msg. 3) Posted: Mon Feb 21, 2005 6:40 pm
Post subject: Re: alternates to system() and exec() in order to use ImageM [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 21 Feb 2005 09:56:46 -0800, news.DeleteThis@celticbear.com wrote:

 >My Web host apepars to not allow exec() and system(), as a line in my
 >script:
 >
 >system("convert -scale 100x100 $uploadfile $toimage");
 >
 >gives the error:
 >
 >"Warning: system() has been disabled for security reasons"
 >
 >Is there some other way to use ImageMagik (or is it GhostScript?)'s
 >"convert" command in PHP that may be safer and generally allowed by Web
 >hosts?

If system() and exec() are disabled, presumably proc_open() is too, so you're
out of luck. There's an ImageMagick PHP extension in PECL, you could ask your
host if they'd install that (but they probably won't!).

<a rel="nofollow" style='text-decoration: none;' href="http://pecl.php.net/package/imagick" target="_blank">http://pecl.php.net/package/imagick</a>

(GhostScript is a Postscript processor - ImageMagick is the image processor)

--
Andy Hassall / / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
 >> Stay informed about: alternates to system() and exec() in order to use ImageMag.. 
Back to top
Login to vote
news74

External


Since: Dec 09, 2004
Posts: 5



(Msg. 4) Posted: Tue Feb 22, 2005 10:18 am
Post subject: Re: alternates to system() and exec() in order to use ImageM [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Andy Hassall wrote:

 >
 > Should also mention that you may be able to use the GD functions,
since
<font color=purple> > they're bundled with PHP - <a rel="nofollow" style='text-decoration: none;' href="http://uk2.php.net/image</font" target="_blank">http://uk2.php.net/image</font</a>>
 >
 > They're slower and not as good for photographic images as
ImageMagick, but if
 > you haven't got an alternative...
 >

Wow! Thanks; I had no idea PHP had such built-in image manipulation
processes.
Thanks!
 >> Stay informed about: alternates to system() and exec() in order to use ImageMag.. 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
cannot do system() exec() or anything +cannot unlink - Hey I've been searching the internet and manuals for help for hours and I'm still clueless. I wanted to delete a file in /var/www/html/ lista from a script /var/www/html/lista-drop.php. Apache runs as user & group apache. I've chowned & chgrouped...

exec() on Windows - Hi all, this is my problem: I need to "exec" the following command: C:\Programmi\Soft\soft.exe -v -d C:\dati\$nomefile C:\dati\pdf\$filename and i tried to execute it in php with (one of) the following lines.... exec("C:\Programmi\Soft\...

exec and $_GET - Hi. If I execute a php script with exec exec("foo.php"); and foo.php reads the $_GET array (can't change that I must work with $_GET), how can I set values to $_GET array? Can I do it directly in foo.php? $_GET['foobar'] = 4; Or exec(foo.php?...

PHP exec - Hello All . . . I need some help about exec command. I have create an executable that return the System Drives. It is based on DOS and does not need any parameter. I have create my php script that executes the executable i've create and the source cod...

exec() with Linux - I have to execute vlc (Video Lan) using exec() function under Linux debian distribution. Running vlc from a shell works perfectly, but I have a lot of problems if it is executed with function exec: TEST 1 <php $command = "vlc"; exec ($co...
   Database Help (Home) -> PHP All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]