Problem with images

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
fitus
Posts: 88
Joined: Sat 13. Dec 2003, 19:04

Problem with images

Post by fitus »

I want to make a image in my articel bit in the list of the images are no images displayed. i have uploaded some und made public. why could i not introduce a image?
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

plz, give us the error messege if you get one...
http://www.studmed.dk Portal for doctors and medical students in Denmark
fitus
Posts: 88
Joined: Sat 13. Dec 2003, 19:04

Post by fitus »

there is no errormsg
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

No thumbnail created?
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
fitus
Posts: 88
Joined: Sat 13. Dec 2003, 19:04

Post by fitus »

no i haven't tumbnail created. is that nessecary
fitus
Posts: 88
Joined: Sat 13. Dec 2003, 19:04

Post by fitus »

if i create thumbnails there is a errormsg
This function does not exist: ImageCreateFromJpeg
file=/var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
file=/var/www/html/phpwcms/phpwcms_filestorage/1/1_2.jpg
file=/var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------

Warning: Division by zero in /var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php on line 185

Warning: Division by zero in /var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php on line 186

Warning: Division by zero in /var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php on line 187

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

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

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

--------------------------------------------------------------------------------
Unable to output: /var/www/html/phpwcms/phpwcms_tmp/thumb_preview/1_2_CIHIwIp2yr.jpg
file=/var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------

Warning: getimagesize(/var/www/html/phpwcms/phpwcms_tmp/thumb_preview/1_2_CIHIwIp2yr.jpg): failed to open stream: No such file or directory in /var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php on line 298
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post by frold »

did you set the path to GD in conf.inc.php?

If so I guess the path is wrong.... plz, contact you webprovider for details about the path..

'Eg see this post http://www.phpwcms.de/forum/viewtopic.p ... highlight=
http://www.studmed.dk Portal for doctors and medical students in Denmark
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Use GD1 not GD2.

It's not neccessary to setup a GD path.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
fitus
Posts: 88
Joined: Sat 13. Dec 2003, 19:04

Post by fitus »

i hab installed imagemagick. how do i use this
fitus
Posts: 88
Joined: Sat 13. Dec 2003, 19:04

Post by fitus »

if i use gd1 there is an other errormsg
--------------------------------------------------------------------------------
This function does not exist: ImageCreateFromJpeg
file=/var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
file=/var/www/html/phpwcms/phpwcms_filestorage/1/1_2.jpg
file=/var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php
--------------------------------------------------------------------------------

Warning: Division by zero in /var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php on line 185

Warning: Division by zero in /var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php on line 186

Warning: Division by zero in /var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php on line 187

Fatal error: Call to undefined function: imagecreate() in /var/www/html/phpwcms/include/inc_lib/ext/hft_image/hft_image.php on line 255
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Enable ImageMagick in conf.inc.php
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

fitus wrote:i hab installed imagemagick. how do i use this
modify /include/inc_conf/conf.inc.php

Code: Select all

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

Code: Select all

$phpwcms["imagick_path"]      = "/path/to/imagemagick/"; //Path to ImageMagick (default="" - none)
windows:

Code: Select all

$phpwcms["imagick_path"]      = "drive:\\path\\to\\imagemagick\"; //Path to ImageMagick (default="" - none)
Edit:
I have edited my original Windows recommendation to reflect double backslashes (instead of single ones)
Sorry :oops: I didn't have a Window's version in use.
See Oliver's post below...
Last edited by DeXXus on Sun 14. Dec 2003, 16:39, edited 1 time in total.
User avatar
Oliver Georgi
Site Admin
Posts: 9892
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Windows:

Code: Select all

$phpwcms["imagick_path"]      = "drive:\\path\\to\\imagemagick\\"; //Path to ImageMagick
(default="" - none)
or
$phpwcms["imagick_path"]      = "drive:/path/to/imagemagick/";
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
fitus
Posts: 88
Joined: Sat 13. Dec 2003, 19:04

Post by fitus »

i have now the correct imagegick path in the config. i got the msg no thumbnail exists when i create the thumbs.
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

fitus wrote:i have now the correct imagegick path in the config. i got the msg no thumbnail exists when i create the thumbs.
I was having the same problem. My "local" installation has ImageMagick available, but phpWCMS wasn't handling paths with "drive letters" correctly. I modified file /include/inc_lib/default.inc.php as follows:

Code: Select all

// check which function should be used to create thumbnail images
// and if ImageMagick check if enabled or 1 or located at give path
$phpwcms["imagick_path"] = trim($phpwcms["imagick_path"]);
if($phpwcms["imagick_path"]) {
	define ("IMAGICK_PATH", str_replace("//", "/", "/".$phpwcms["imagick_path"]."/"));
} else {
	define ("IMAGICK_PATH", "");
}
and changed the code to this:

Code: Select all

// check which function should be used to create thumbnail images
// and if ImageMagick check if enabled or 1 or located at give path
$phpwcms["imagick_path"] = trim($phpwcms["imagick_path"]);
if(preg_match("/^([A-Za-z]:)/",$phpwcms["imagick_path"])) {
	define ("IMAGICK_PATH", "");
} else {
	define ("IMAGICK_PATH", str_replace("//", "/", "/".$phpwcms["imagick_path"]."/"));
}
Post Reply