Images are not being handled right. The album folder icon takes forever to load but at least it is the proper size, when you enter an album the icons are gigantic no matter what I choose in settings. And you always get the full size image when you do click on one of the icons. The image icons are not even the whole image, they are like half the image.
acidfree settings says how many images remain to be resized after upload and then after running cron is says 0 to resize. But still see the same issue even after refreshing the page to avoid a cache.
I had Acid Free working before the update on the 15th, it seems since then I have been unable to do an upload without encountering this problem. I have done a completely new install of drupal with new database and everything just to see if I had dorked something up on my old configuration which I had been using as a test bed.
Created new db
Loaded Drupal
Loaded filemanager
applied the patch
enabled and set up filemanager
enabled and set up acidfree
using drupal 4.6.5
php 4.4
mysql 5
acidfree 4.6.0
Filemanager 4.6.0 with patch applied.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | toolkit_test.php.txt | 1.37 KB | vhmauery |
Comments
Comment #1
vhmauery commentedThis sounds like an image toolkit problem. Are you sure your toolkit is set up correctly? Go to admin/settings and check. Which toolkit are you using?
Comment #2
Tmortn commentedFor Image Handler it says.
The built-in GD2 toolkit is installed and working properly.
This setup has worked properly before which is Why I am really confused. I did change the post size in PHP.ini but that should only affect what can be posted... not the image handling issues. There anything else in the ini that could affect this ?
The image manipulation paths are good in the acid free settings as well.
Comment #3
vhmauery commentedDo your apache logs give you any errors? Maybe you are running out of memory?
Comment #4
NukeHavoc commentedI'm having the exact same problem on the Linux production box I'm setting up (I didn't see this earlier Mac OS X box I used for experimenting.)
I'm running Drupal 4.6.5 on a Redhat Linux Box with Apache 1.3.3, PHP 4.3.11, and MySQL 4.1.12. I've got filemanager.module, the Acidfree patch for that module, and Acidfree installed. Everything has plenty of memory -- although PHP had been set to 8MB max memory for a script, upping it to 32 made no difference. Also, no errors were written to the Apache error log, so it looks like it thinks everything is cool.
The program does create the three files (thumb, small, large) in my /files/private/active/0 directory, but they are all the same size. On my previous install, I was running PHP 5.0.4 -- not sure if that would make a difference. THe other big change (aside from the underlying OS) is who "owns" the files; on the Mac box I cheated and set the permissions to 777 and didn't change the owner; on the live box, the Apache user and group owns the /files directory and its contents. Given that the files *are* being created, I don't think the problem lies there though.
I'm inclined to think it has something to do with the GD install, but I'm not sure how to go about testing that (never having worked with that tool before).
Here are the results of my acidtest config report:
Acidfree self-test checklist
Filemanager module enabled
Latest version of Filemanager module installed
filemanager-private.patch applied
Filemanager private path set and permissions OK
Filemanager public path set and permissions OK
Filemanager database table created
Acidfree class definition files found for album, photo, video
Drupal 'Temporary directory' path set and permissions OK
Acidfree database tables created
gd image toolkit installed and properly configured
No errors were detected. But this doesn't mean that Acidfree is guaranteed to work flawlessly. It is a complex system and still under development. Please be patient while all the wrinkles are found and ironed out.
PHP configuration
Maximum file upload size is 2M (upload_max_filesize)
Maximum POST size is 8M (post_max_size)
Maximum execution time is 30 seconds (max_execution_time)
Maximum memory usage is (32MB memory_limit)
If these limits are smaller than the files you plan on uploading, you should change the settings in your php.ini file
Comment #5
NukeHavoc commentedI'm 99% sure I've figured out this problem. It lies with the way the GD module was compiled; namely it did not include JPEG support. In order to determine what support your GD module has, create a PHP page with this code:
$gd = var_dump(gd_info());
print_r($gd);
Doing so on my machine created this dump:
array(10) {
["GD Version"]=>
string(27) "bundled (2.0.28 compatible)"
["FreeType Support"]=>
bool(false)
["T1Lib Support"]=>
bool(false)
["GIF Read Support"]=>
bool(true)
["GIF Create Support"]=>
bool(true)
["JPG Support"]=>
bool(false)
["PNG Support"]=>
bool(true)
["WBMP Support"]=>
bool(true)
["XBM Support"]=>
bool(true)
["JIS-mapped Japanese Font Support"]=>
bool(false)
}
To test my theory, I tried uploading a PNG file and it worked perfectly -- everything resized just fine. It's odd that GD doesn't throw any errors when it encounters a file it's not configured to handle.
vhmauery -- perhaps this is something worth adding to your acid free config test? In addition to testing for the GD module, you could execute that function and dump a list of "GD supported formats". I'm going to add JPEG support to the GD module and see what happens, but I'm certain that's the fix that's needed.
Ken
Comment #6
vhmauery commentedI am not sure that including that information is my responsibility. I think that kind of information should be listed when the toolkit is enabled on the admin/settings page. Each toolkit should have code for determining the supported image formats.
While you were determining that, I wrote up a little ditty for testing the current toolkit (be it GD, imagemagick, or whatever) So I am attaching that test file.
Tmortn, does any of this help you?
Comment #7
Tmortn commentedK I saw that my images are also all the same size. I am pretty sure I compiled jpg support in. Had to do that a few times before it found the libraries... and untill I did and got the directories pointed right it complained on the acid free settings after that it worked like a champ until I loaded on an acidfree update.
Hmmmm. Well will go back to banging my head on this. Been working and dealing with some wedding stuff last couple weeks, not to mention the holidays.
Thanks for the info guys.
Comment #8
vhmauery commentedTmortn:
Test out the toolkit_test.php file I posted. It will check to see if the toolkit is actually the problem so we can better determine where the error lies. Put it in your drupal root dir and point your browser at it. Without any args, it will print out the syntax. Try something like:
http://yourhost.dom/toolkit_test.php?img=path/to/image.jpg&resize=200
or
http://yourhost.dom/toolkit_test.php?img=path/to/image.jpg&resize=200&ro...
The path to the image should be a relative or absolute path to an imagefile on the server. Without the resize or rotate commands, it will simply stream the image.
Comment #9
Tmortn commentedOk... Reconfigured/Compiled/installed GD and PHP4.4. I explicitly made sure libjpeg was there. GD saw it. PHP saw it. I saw it.
loaded your script and I am getting failed msg's for both resize and rotate. But even when I intentionally put in a bad image directory I am getting a failed msg.... not the usage msg.
PNG's work so GD is there..... so odd as it seems to me I guess it has to be a libjpeg problem.... But what. I mean PHP chokes during configure if I don't give it the libjpeg directory and one for zlib. I put in both along with axps2, mysql, and gd.
ack this is ticking me off. Its something STUPID. I know its something stupid.
Comment #10
vhmauery commentedif you do something like:
and scroll down to the major subheading GD, you should see something that looks like
Does it say that JPG support is enabled there? Another way to check is to do something like:
This is what phpinfo() is calling.
Comment #11
Tmortn commentedWell I'll be damned. GD isn't there. That would explain it.... but what the hell is handling the png function ? Well at last I have my stupid thing. Course it is in my configure options.... ah well. Least I know what needs fixin now.
Thanks for sticking with this.
Comment #12
Tmortn commentedOk. Gd is now there. But looks like one final gotcha for me.
In the list of elements it only lists png and giff. To correct this I stopped the apaceh server.
Recompiled GD, make, make install. It said it knew where libjpg was, as png.
** Configuration summary for gd 2.0.33:
Support for PNG library: yes
Support for JPEG library: yes
Support for Freetype 2.x library: no
Support for Fontconfig library: no
Support for Xpm library: no
Support for pthreads: yes
Configured-Recompiled-Installed PHP
./configure --with-jpeg-dir=/usr/local/lib/ --with-zlib-dir=/usr/local/lib --with-png-dir=/usr/local/lib/ --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql-dir=/usr/local/mysql/bin --with-gd | grep -i location
configure: warning: You will need bison 1.28
checking if the location of ZLIB install directory is defined... /usr/local/lib
checking for the location of libjpeg... /usr/local/lib/
checking for the location of libpng... /usr/local/lib/
checking for the location of libXpm... no
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /tmp/mysql.sock
checking for the location of libtiff... no
Rebuilt apache2 with
./configure --enable-so
make
make install
Restarted the server.
GD shows up in PHPinfo now but only
gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
Anybody spot what I missed ? I am stumped.
Comment #13
vhmauery commented/me being the debian snob, says apt-get install debian
Aside from that, from what I could tell, you were doing things right...
Sorry I am not much more help.
Comment #14
vhmauery commented