We have a client who's on RedHat Enterprise Linux, which ships with PHP 5.1.6, and isn't eager to upgrade (which would sacrifice their support terms with RedHat).

I noticed that in the Drupal 5 version of this module, there are these lines:

define('IMAGEAPI_MINIMUM_PHP', '5.1');
define('IMAGEAPI_RECOMMENDED_PHP', '5.2');

During the 6.x port, this got translated to php = 5.2 in the .info file.

CVS annotate unfortunately isn't that helpful, as it points me to the following commit message:

"#256687 by drewish, Clean up requirement/install errors.
by dopry, relax php version requirements
by dopry, remove gd version reporting since core does it already."

Unfortunately, the patch attached to #256687: Fix a bunch of warnings with the imageapi_gd.install file doesn't contain any of this.

After hacking the .info file to change it to 5.1, things seem to be working okay.

So how about it? Can we reduce this requirement to 5.1?

CommentFileSizeAuthor
#11 imageapi.info.patch453 bytesseanr
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aaron’s picture

We have the identical issue. However, we have problems getting it to work even with the aforementioned .info file hack. I'd assumed there were some function(s) in the new version of PHP, and was about to track that down when I saw this issue.

nrambeck’s picture

I just ran across this issue as well. Company servers are Redhat Enterprise Linux running PHP 5.1.2. After hacking the .info file to allow for PHP 5.1.x, ImageCache is not working. Any insight into the code/functions requiring 5.2.x would be helpful. Thanks.

nrambeck’s picture

Actually this now seems to be working fine in PHP 5.1.2 (although I am only using image scaling actions with ImageCache). The problem above stemmed from not having the files directory explicitly set in the File System settings.

I would concur with webchick on reducing the requirement to 5.1 unless there are specific issues developers are aware of.

drewish’s picture

Status: Active » Fixed

dopry reported problems in earlier versions but i'm not sure what the they were. since then he and i have only been developing against php 5.2. people are welcome to try it with previous versions but it's unsupported and untested.

Status: Fixed » Closed (fixed)

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

pixelite’s picture

I'm using ImageAPI in conjunction with GD2 on a few projects and haven't come across any issues with using PHP 5.1. It is kind of a hassle to have to hack the module just to remove the dependency on 5.2.

temmermon’s picture

Status: Closed (fixed) » Active

agreed. This is the same issue as with Filefield and it was changed accordingly. See that discussion: http://drupal.org/node/411560

drewish’s picture

Category: support » task

If someone with PHP 5.0 or 5.1 wants to roll a patch and can verify that the module works on that version I'll commit it.

worldcoast’s picture

working on 5.1.6, really though it's an easy thing to just go into the file and change it to read 5.1

I have no idea how to make a patch file for you =)

suit4’s picture

seems to work (with a little code fix) on php 5.0.4 as well

seanr’s picture

Status: Active » Needs review
FileSize
453 bytes

Here's the patch; works fine on my server with PHP 5.1.6

drewish’s picture

Title: Is PHP 5.2 *really* required? » List ImageAPI as compatible with PHP 5.1
Status: Needs review » Fixed

looks good to me. committed to DRUPAL-6--1.

Status: Fixed » Closed (fixed)

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