ImageAPI PHP 5.2 Version Question and Requirements Documentation Request

ethanw - September 11, 2008 - 16:59
Project:ImageAPI
Version:6.x-1.0-alpha2
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hello,

Thanks to everyone working on this project, excited to see Drupal's image library given the respect it deserves!

I have two three questions relating the requirement of PHP 5.2 and the relationship between ImageAPI and ImageAPI GD, etc. I've seen some similar questions elsewhere but hope I'm right in thinking that mine are different enough to warrant a new thread (ImageAPI vs. ImageAPI GD : http://drupal.org/node/298505, PHP 5.2 requirements http://drupal.org/node/242628 and http://drupal.org/node/257525).

As background: I'm building a Drupal 6 site, including the current release of the ImageField module for Drupal 6 CCK, which requires ImageAPI. Because our server is running PHP 5.1.6, I am unable to enable the ImageAPI module using the included.

This brings me to the questions:

1) What functions are needed by Image API which are not provided prior to version 5.2? I know dobry mentioned that ImageAPI has been able to run on 5.1 boxes but has not been tested. Greping through the module source I don't see references to the `image_type_to_extension` function, added in 5.2 or the `imagettftext` function which was modified. I do see a number of calls to `imageconvolution`, added in 5.1, however. Are there other functions I've missed (I just searched the changelog for php5 for 'image')? Do we have sufficient test coverage to run tests for ImageAPI on 5.1 boxes to verify it works? If needed I'd be happy to help writing or running tests if it looked like there was a good likelyhood of getting this restriction lifted.

2) I am also unclear about the relationship of the ImageAPI GD amd ImageAPI imagemagick modules to the ImageAPI module itself. Why is ImageAPI not a requirement for both these modules? I believe an INSTALL.txt file or other documentation could be useful in clarifiying the relationship between these modules and the above discussed PHP requirements.

3) This one just occurred to me: if one uses imagemagick instead of GD, does the above-mentioned PHP version restriction still apply?

As a final thought, while my knowledge of matrix manipulation is embarrassingly lacking (haven't really touched that stuff since high school), if it is indeed the convolution function which necessitates the PHP 5.1/5.2 requirement, would it be possible to recode those functions to use convolution where available and use resizing, reflection and other routines when the more efficient option is not possible?

Again, thanks for all the great work!

#1

drewish - September 11, 2008 - 20:43
Status:active» fixed

As maintainers of the module we're not interested in providing any support for versions of PHP prior to 5.2. I'm sure you could make some adjustments to the module to get it working but we're not going to commit them or support them. That said if you'd like to post the patch for others to use you'd be welcome to.

ImageAPI depends on either ImageAPI GD or ImageAPI ImageMagick, not the other way around. Drupal's requirements don't allow us to specify this requirement.

#2

Anonymous (not verified) - September 25, 2008 - 20:52
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#3

Alex_2 - February 20, 2009 - 08:56

The problem is still live
"This module requires PHP version 5.2.* and is incompatible with PHP version 5.1.6."

#4

pwyll2x - June 7, 2009 - 14:05

I understand the maintainers have undertaken to require php 5.2 and are not interested in supporting 5.1.6 I'm wondering if they realize how many people are affected running CentOS5. Speaking for myself, I need to run on enterprise-level LAMP distribution. Investigating the PHP 5.2 upgrade led me to understand that the cascade effect of updating PHP is significant.

Since there is no RHEL/CentOS support for php 5.2 at this time, that classes me out of using all these features. In at least one circumstance I know of, module maintainers were inclined to reconsider a php 5.2 requirement because of these factors. Might you?

 
 

Drupal is a registered trademark of Dries Buytaert.