Filecenter: PDF handling

Please post all install related problems here. Visit this forum first for troubleshooting.
Post Reply
Baran
Posts: 8
Joined: Mon 27. Feb 2006, 14:51
Location: germany / karlsruhe
Contact:

Filecenter: PDF handling

Post by Baran »

System:
WinXP Pro SP2
IIS V5.1
MySQL 5.0.18
PHP 4.4.2

ImageMagick runs in error during creating a thumbnail for "pdf" files.
The errors looks like that:

Code: Select all

convert.exe - Application Error
The exception unknown software exception(0xc00000fd) occurred in the application at location 0x102122a7
 
after that, i added pdf to the ignore list in the config/phpwcms/conf.inc.php:

Code: Select all

$phpwcms["imgext_disabled"]   = "pdf"; //comma seperated list of imagetypes which should not be handled "pdf,ps"
but the error still occures.
I have tried also to create a thumbnail self, via console, but their also the error occures.
But why I can't dissable creating thumbnails for pdf's?
A part of my include/inc_lib/general.inc.php looks like this:

Code: Select all

function is_ext_true($extension) {
	$ext = false;
	if(IMAGICK_ON) {
		// if ImageMagick for thumbnail creation
		switch($extension) {
			case "jpg":		$ext="jpg"; break;
			case "jpeg":	$ext="jpg"; break;
			case "tif":		$ext="jpg"; break;
			case "tiff":	$ext="jpg"; break;
			case "psd":		$ext="jpg"; break;
			case "bmp":		$ext="jpg"; break;
			case "pic":		$ext="jpg"; break;
			case "eps":		$ext="jpg"; break;
			case "ps":		$ext="jpg"; break;
			case "ai":		$ext="jpg"; break;
			case "ps2":		$ext="jpg"; break;
			case "ps3":		$ext="jpg"; break;
			case "pn":		$ext="jpg"; break;
			case "wmf":		$ext="jpg"; break;
			case "gif":		$ext="gif"; break;
			case "png":		$ext="png"; break;
			case "tga":		$ext="jpg"; break;
			case "pdf":		$ext="jpg"; break;
			case "pict":	$ext="jpg"; break;
			case "jp2":		$ext="jpg"; break;
			case "jpc":		$ext="jpg"; break;
			case "ico":		$ext="jpg"; break;
			case "fax":		$ext="jpg"; break;
		}
	} else {
		// if GD is used
		switch($extension) {
			case "jpg":		$ext="jpg"; break;
			case "jpeg":	$ext="jpg"; break;
			case "gif":		$ext=(imagetypes() & IMG_GIF) ? "gif" : "png";
							break;
			case "png":		$ext="png"; break;
		}
	}

	if($ext && !empty($GLOBALS['phpwcms']["imgext_disabled"])) {
		$GLOBALS['phpwcms']["imgext_disabled"] = str_replace(' ', '', $GLOBALS['phpwcms']["imgext_disabled"]);
		$GLOBALS['phpwcms']["imgext_disabled"] = strtolower($GLOBALS['phpwcms']["imgext_disabled"]);
		$disabled_ext = explode(',', $GLOBALS['phpwcms']["imgext_disabled"]);
		echo "extension: ".$ext."<br />";
		foreach ($disabled_ext as $val) echo "disabled: ".$val;
		if(in_array($ext, $disabled_ext)) {
			$ext = false;
		}
	}
	return $ext;
}
if i change

Code: Select all

case "pdf":		$ext="jpg"; break;
to

Code: Select all

case "pdf":		$ext="pdf"; break;
pdf's will ignored.
I dont know if this is a realy bug, but i think at least the description of the "ignore list" is wrong.

I hope my english is understandable...
Many greetings from Karlsruhe / Germany
Henning aka Baran
Baran
Posts: 8
Joined: Mon 27. Feb 2006, 14:51
Location: germany / karlsruhe
Contact:

Post by Baran »

I'm feeling so stupid :oops:

Now ImageMagick creates Thumbnails. The Problem was, tha GhostScript was installed to "C:/Program Files/gs", but the good old comanndline don't like the space in the path. Now i had installed it to "C:/gs" and it works fine.

But the problem with the "ignore list" still exists.
Deleted the Thumbnails, set pdf to ignore list and get again a thumbnail.

Maybe a Admin/Moderator can move this topic to "phpwcms Installation Troubleshooting" or something like that.

I'm so sorry...
Henning aka Baran
Post Reply