Creating thumbnail error

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Denis Parshutin
Posts: 15
Joined: Wed 7. Jan 2004, 07:23
Contact:

Creating thumbnail error

Post by Denis Parshutin »

Hi All!

I've uploaded 3 pics (in JPEG format) to my phpwcms and trying to make thumbnails.

As result -

This function does not exist: ImageCreateFromJpeg
file=/usr/local/www/*myaddress*/html/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
file=/usr/local/www/*myaddress*/html/phpwcms_filestorage/1/1_6.jpg
file=/usr/local/www/*myaddress*/html/include/inc_lib/ext/hft_image/hft_image.php

ImageMagic library is NOT installed on my hosters server :(
And hoster will not planned to make it :(
Thumbnails are nesessary for text/with/images article.
Help me please, what should I do with my configs?

Thanks in advance.
Denis.
Pappnase

Post by Pappnase »

Hello

Did you know if GD 1 or 2 is installed!?

Or try it!

look at the conf.inc.php an test it.
maybe it could run.

Code: Select all

$phpwcms["imagick"]           = 0; //0 = GD,  1 = ImageMagick convert
$phpwcms["imagick_path"]      = ""; //Path to ImageMagick (default="" - none)
$phpwcms["use_gd2"]           = 1; //0 = GD1, 1 = GD2 
Pappnase
Denis Parshutin
Posts: 15
Joined: Wed 7. Jan 2004, 07:23
Contact:

Post by Denis Parshutin »

so. more information, maybe it will be usefull.

___________________________
if I trying to use in config

$phpwcms["imagick"] = 1; //0 = GD, 1 = ImageMagick convert


then error with creating thumbnail is
"no thumbnail exists".
______________________


if I trying to use in config

$phpwcms["imagick"] = 0; //0 = GD, 1 = ImageMagick convert
$phpwcms["imagick_path"] = ""; //Path to ImageMagick (default="" - none)
$phpwcms["use_gd2"] = 1; //0 = GD1, 1 = GD2
result is -
This function does not exist: ImageCreateFromJpeg
file=/usr/local/www/********/html/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
file=/usr/local/www/********/html/phpwcms_filestorage/1/1_6.jpg
file=/usr/local/www/********/html/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
You specified to use GD2, but not all GD2 functions are present. ImageCreateTruecolor()
file=/usr/local/www/********/html/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
You specified to use GD2, but not all GD2 functions are present. ImageCopyResampled()
file=/usr/local/www/********/html/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Image you are trying to output does not exist.
file=/usr/local/www/********/html/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Unable to output: /usr/local/www/********/html/phpwcms_tmp/thumb_preview/1_6_UvzDmBJR5L.jpg
file=/usr/local/www/********/html/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------
no thumbnail exists
___________

if I use

$phpwcms["imagick"] = 0; //0 = GD, 1 = ImageMagick convert
$phpwcms["imagick_path"] = ""; //Path to ImageMagick (default="" - none)
$phpwcms["use_gd2"] = 0; //0 = GD1, 1 = GD2

then result is
This function does not exist: ImageCreateFromJpeg
file=/usr/local/www/********/html/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
file=/usr/local/www/********/html/phpwcms_filestorage/1/1_6.jpg
file=/usr/local/www/********/html/include/inc_lib/ext/hft_image/hft_image.php

i.e. it seems to me GD1 is presented but not working properly? or wrong?
User avatar
Oliver Georgi
Site Admin
Posts: 9949
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

That means - no GD support ;-)

To check create new php file in your web root with following content:

Code: Select all

<?php
phpinfo();
?>
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
Denis Parshutin
Posts: 15
Joined: Wed 7. Jan 2004, 07:23
Contact:

Post by Denis Parshutin »

Yes. My hoster gine me clear response that no GD, no ImageMagic...

But he promise me to install it! So after all this I have plans to finish my work and then I promise show my results.

thanks Pappnase
thanks Oliver, You are Great!!! Your work is super!!!
Denis Parshutin
Posts: 15
Joined: Wed 7. Jan 2004, 07:23
Contact:

Post by Denis Parshutin »

so. please more help.

so, I have ImageMagick-5.5.7 now.
its work ok in shell, i've testet it.

but in phpwcms i failed again.
on file /include/inc_act/act_imagick.php?thumb=6&ext=jpg&fcat=1...
it hangs....
then I've read this file and found call from /include/inc_lib/imagick.convert.inc.php...
then I open it and read in line 76

$imagick["command"] .= "\"".$imagick["thumb_dir"].$imagick["image_thumb_name"]."\" ";

@exec($imagick["command"], $imagick_return);


and much more....


then I insert this line
$imagick["command"] .= "\"".$imagick["thumb_dir"].$imagick["image_thumb_name"]."\" ";

print $imagick["command"];
exec($imagick["command"], $imagick_return);
and here is result:
opt/ImageMagick/ImageMagick-5.5.7/bin/convert -colorspace RGB -type TrueColor -sharpen 1x10 -geometry "538x400>" -quality 75 -density 72x72 "/usr/local/www/***********/html/phpwcms_filestorage/1/1_6.jpg[0]" +profile "*" "/usr/local/www/***********/html/phpwcms_tmp/thumb_preview/1_6_QcKXbJqYCN.jpg"
it seems to me very strange this:
"538x400>"
and this
html/phpwcms_filestorage/1/1_6.jpg[0]"

so I've tryed run this line in shell...

and result is
convert: Unable to open file (*).
_______
end of experement
_______


Ou, my Lords!!! Please tell me, what should I fixed in configs or somewhere.....

btw OS platform = Solaris 8 on sparc. ie Sol 2.8


Thanks a lot in advance.
User avatar
Oliver Georgi
Site Admin
Posts: 9949
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

seems that you do not have read/write permission for that file
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
Denis Parshutin
Posts: 15
Joined: Wed 7. Jan 2004, 07:23
Contact:

Post by Denis Parshutin »

First at all, THANKS to All who help me to solve this problem!
Thanks, it works now.

Here is list what I've done for my PHPWCMS to be working with ImaheMagick.

1. By call phpinfo() I discovered that LD_LIBRARY_PATH for apache is null.

I have several choises for solving it (Solaris OS).
- crle + /var/ld/ld.config but it should be done by Administrator (root)
or
- correct file /usr/local/apache/bin/envvars

both need to call Administrator person. And then NEED TO RESTART APACHE.
This is not the best solution....

2. I can do something like this in any file where phpwcms use exec of ImageMagick:
$saved = getenv("LD_LIBRARY_PATH"); // save old value
$newld = "/extra/library/dir:/another/path/to/lib"; // extra paths to add
if ($saved) { $newld .= ":$saved"; } // append old paths if any
putenv("LD_LIBRARY_PATH=$newld"); // set new value
system("mycommand -with args"); // do system command;
exec("my external libs etc"); // do any external libs call;
// mycommand is loaded using
// libs in the new path list
putenv("LD_LIBRARY_PATH=$saved"); // restore old value
Please note, in this case you SHOULDNT call in Support servise your hoster.


to Oliver Georgi
Is it possible to include something like this and add in conf.inc.php variable $ImageMagich_LIB_PATH and use this var as I propose above?

Thanks.
User avatar
Oliver Georgi
Site Admin
Posts: 9949
Joined: Fri 3. Oct 2003, 22:22
Location: Dessau-Roßlau
Contact:

Post by Oliver Georgi »

Have you tried to fill in the right path to your ImageMagick dir in conf.inc.php

$phpwcms["imagick_path"] = "/usr/bin/dir/";

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn
Denis Parshutin
Posts: 15
Joined: Wed 7. Jan 2004, 07:23
Contact:

Post by Denis Parshutin »

sure. But I think path to their library should be point too.
Post Reply