clueless Posted April 23, 2017 Posted April 23, 2017 I am on the Tommy server, which supposedly has ImageMagick installed like all the other servers. I installed a Coppermine photo gallery. I *think* I remember during the insatallation it said that an ImageMagick installation was not found on the server, so it set up using GD 2.x instead. so now Coppermine won't upload .bmp files. it is using GD 2.x, and gives an error: "the image you have uploaded is corrupted or can't be handled by the GD library" jpg and png do work, but if I want it to upload bmp files, it seems the solution is to have Coppermine use ImageMagick instead. so I tell it to do that, but the path is wrong. it is set to /usr/bin (correct for GD 2.x) and elsewhere on this forum the path to ImageMagick was supposedly /usr/local/bin/convert but Coppermine says that path is wrong also. now nothing will upload. it gives an error: "unable to create thumbnail or reduced size image." I need to get Coppermine to use ImageMagick. what is the path to ImageMagick?
Krydos Posted April 23, 2017 Posted April 23, 2017 The confusion is probably coming from the fact that Tommy has 5 different versions of php installed that you can choose from. PHP 5.4 = https://krydos.heliohost.org/54/phpinfo.php has imagick PHP 5.5 = https://krydos.heliohost.org/55/phpinfo.php doesn't PHP 5.6 = https://krydos.heliohost.org/56/phpinfo.php doesn't PHP 7.0 = https://krydos.heliohost.org/70/phpinfo.php has imagick PHP 7.1 = https://krydos.heliohost.org/71/phpinfo.php doesn't Which version of php are you using? You can change it with https://tommy.heliohost.org:2083/frontend/paper_lantern/multiphp_manager/index.html ImageMagick 6.7.8-9 binary is located at /bin/convert
clueless Posted April 23, 2017 Author Posted April 23, 2017 thanks. phpinfo.php says the current version is 5.6.30, going to your link the MultiPHP Manager says it is set to PHP 5.6 went into Coppermine, set it to ImageMagick, set the path to /bin/convert and it said: "The value you have set for <<Path to ImageMagick 'convert' utility>> is invalid, please review it." so in MultiPHP Manager I set it to PHP 7.0 ..and Coppermine is broke. must not support PHP 7.0 so in MultiPHP Manager I set it to PHP 5.4 Coppermine has the same error about the path. looked in their help file, got these pointers: 1. you don't include "convert" in the path, because that is the name of the executable and not part of the path. Linux executables don't have an .exe extension. so /bin/convert would be wrong, /bin/ would be right. 2. must have the trailing slash. so /bin/ would be right, /bin would be wrong, and /bin/convert would be wrong anyways. tried these paths, didn't give an error about the path because they the trailing backslash. /usr/bin//usr/local/bin//usr//bin/ but none of these worked for any format of picture, gave the error about "unable to create thumbnail or reduced size image." phpinfo.php confirms that the installation of PHP ver 5.6 does not have ImageMagick, and PHP 5.4 does. doesn't say what the path is.tried another installation of Coppermine from the webhost built-in installer, that has the same parameters and the same problems. (GD 2.x does not upload .bmp, and ImageMagick does not work at all) that path was /usr/bin/ does anybody have an installation of Coppermine that does have ImageMagick enabled and working? if so what is the path
Krydos Posted April 23, 2017 Posted April 23, 2017 Your real problem is coppermine wants to use the convert executable instead of the php imagick. The way coppermine does this is by using the php exec() function Error message: Exec() has been disabled Detailed error message Exec() has been disabled Possible cause php.ini allows the server administrator to disable certain functions. Usually this is the case if your server is running in safe_mode. This is not a soft error triggered by Coppermine, but a hard error from PHP that shines through Coppermine from PHP. Suggested fix If the server administrator has disabled exec() you will not be able to use ImageMagick. You may try to replace exec() with passthru() in the entire core code of coppermine (not recommended) if it has not been disabled as well. Otherwise, you can't use ImageMagick and must use GD. Change Method for resizing images in config accordingly.Source: http://documentation.coppermine-gallery.net/en/upload_troubleshooting.htm Since this is shared hosting exec() cannot be enabled because it would allow malicious users to break the entire server. So, what you need to do is convert the .bmp files to anything else on your computer using photoshop, the gimp, ms paint, imagemagick, or whatever, and then upload them. Bmp files are terrible on the internet anyways. You can get the same quality picture with .png that takes up maybe an eighth the space. https://zoompf.com/blog/2012/04/unsuitable-image-formats-for-websites
clueless Posted April 24, 2017 Author Posted April 24, 2017 there is a reason I want to upload .bmp files. goto C:\ProgramData\Microsoft\User Account Pictures\Default Pictures, and what format are they? .bmp so if Coppermine uses a method to implement ImageMagick which is disabled on the server, it can use GD 2.x instead. but that throws an error. "the image you have uploaded is corrupted or can't be handled by the GD library" is there a way to get GD 2.x to work with .bmp files?
Krydos Posted April 24, 2017 Posted April 24, 2017 clueless, on 23 Apr 2017 - 8:44 PM, said:there is a reason I want to upload .bmp files. goto C:\ProgramData\Microsoft\User Account Pictures\Default Pictures, and what format are they? .bmpI.... don't understand. How about this? 14 lines of php/html<?php if (isset($_FILES['bmpimage'])) { move_uploaded_file($_FILES['bmpimage']['tmp_name'], "temp.bmp"); $image = new Imagick(); $image->readImage("temp.bmp"); $image->setImageFormat("jpg"); $image->writeImage("temp.jpeg"); echo "<img src='temp.jpeg'>"; } else { ?> <form action="convert.php" method="post" enctype="multipart/form-data"> <input type="file" name="bmpimage"> <input type="submit" value="Convert to Jpeg" name="submit"> </form> <?php } http://krydos.heliohost.org/70/convert.php
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now