[Solved] (ERROR_TOOLKIT_FAILURE)

kacheng

Joined: 2003-07-20
Posts: 28
Posted: Wed, 2005-02-09 22:05

I added items using the local server option using Gallery2-2005-02-09 CVS.

When I selected the items and hit the button, I got the following error message:

Quote:
array(GalleryStatus::success(), @imageSx($res)); } /** * Get image height * * @return int the height of the image */ function imageSy($res) { return array(GalleryStatus::success(), @imageSy($res)); } /** * Copy and merge part of an image * * Requires: * - PHP 4 >= 4.3.0 or PHP 5 * * @return array object GalleryStatus * resource new gd resource */ function imageRotate($srcRes, $angle, $bgdColor) { if (! function_exists('imageRotate')) { return array(GalleryStatus::error(ERROR_TOOLKIT_FAILURE | ERROR_UNSUPPORTED_OPERATION, __FILE__, __LINE__), null); } $res = @imageRotate($srcRes, $angle, $bgdColor); if ($res) { return array(GalleryStatus::success(), $res); } else { return array(GalleryStatus::error(ERROR_TOOLKIT_FAILURE, __FILE__, __LINE__), null); } } } ?>
Warning: Cannot modify header information - headers already sent by (output started at /home/kacheng/public_html/photos/modules/gd/classes/GdFunctionality.class:545) in /home/kacheng/public_html/photos/main.php on line 378

In fact, I got it twice, since Gallery opened another window for me and decided to let me know again.

When I go back to my gallery page, all seems to be okay. Is this something to do with thumbnails?

<TYPE YOUR MESSAGE HERE, ENTER SYSTEM DETAILS BELOW>
<Please check the G2 FAQ (sticky topic in this forum) before posting!>
----

Gallery URL (optional):
Gallery version:
Webserver (with version):
Datatabase (with version):
PHP version (eg 4.2.1):
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system:
Web browser/version:

 
kacheng

Joined: 2003-07-20
Posts: 28
Posted: Wed, 2005-02-09 22:12

I also get the same message again when I try to uninstall and reinstall the GD Toolkit.

 
kacheng

Joined: 2003-07-20
Posts: 28
Posted: Wed, 2005-02-09 22:18

Ok, so I deactivate the GD Toolkit and I get:

Quote:
array(GalleryStatus::success(), @imageSx($res)); } /** * Get image height * * @return int the height of the image */ function imageSy($res) { return array(GalleryStatus::success(), @imageSy($res)); } /** * Copy and merge part of an image * * Requires: * - PHP 4 >= 4.3.0 or PHP 5 * * @return array object GalleryStatus * resource new gd resource */ function imageRotate($srcRes, $angle, $bgdColor) { if (! function_exists('imageRotate')) { return array(GalleryStatus::error(ERROR_TOOLKIT_FAILURE | ERROR_UNSUPPORTED_OPERATION, __FILE__, __LINE__), null); } $res = @imageRotate($srcRes, $angle, $bgdColor); if ($res) { return array(GalleryStatus::success(), $res); } else { return array(GalleryStatus::error(ERROR_TOOLKIT_FAILURE, __FILE__, __LINE__), null); } } } ?>

Uninstall and I get the confirmation dialog, then a successful uninstall message.

I try to reinstall and I get:

Quote:
array(GalleryStatus::success(), @imageSx($res)); } /** * Get image height * * @return int the height of the image */ function imageSy($res) { return array(GalleryStatus::success(), @imageSy($res)); } /** * Copy and merge part of an image * * Requires: * - PHP 4 >= 4.3.0 or PHP 5 * * @return array object GalleryStatus * resource new gd resource */ function imageRotate($srcRes, $angle, $bgdColor) { if (! function_exists('imageRotate')) { return array(GalleryStatus::error(ERROR_TOOLKIT_FAILURE | ERROR_UNSUPPORTED_OPERATION, __FILE__, __LINE__), null); } $res = @imageRotate($srcRes, $angle, $bgdColor); if ($res) { return array(GalleryStatus::success(), $res); } else { return array(GalleryStatus::error(ERROR_TOOLKIT_FAILURE, __FILE__, __LINE__), null); } } } ?>
Warning: Cannot modify header information - headers already sent by (output started at /home/kacheng/public_html/photos/modules/gd/classes/GdFunctionality.class:545) in /home/kacheng/public_html/photos/main.php on line 378

If I reinstall and activate GD, I get the errors again, but it eventually appears to be activated.

 
kacheng

Joined: 2003-07-20
Posts: 28
Posted: Wed, 2005-02-09 22:28

SOLVED

I re-uploaded the GD module files and that seemed to solve the problem. It seems that my original FTP upload must have corrupted a few GD files.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2005-02-10 18:10

Oh, good -- I wasjust about to suggest that you check for file corruption. Any time you see PHP code appearing in the output, it's a good bet that something went wrong and there's a missing <?php in one of the files.