I am trying to install 7.x-2.0-beta4 and getting the following error

Fatal error: require_once() [function.require]: Failed opening required '__DIR__/juicebox.field.inc' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/XXX/public_html/sites/all/modules/juicebox/juicebox.module on line 14

Comments

rjacobs’s picture

Hi bherring,

Can you confirm which version of php you are using? I just realized that the magic php constant "__DIR__" (which I first used here in beta4) may only work in php versions 5.3 or greater, so I'm guessing you have a version that's below v5.3.

According to the Drupal requirements, the PHP requirement for Drupal 7 is "PHP 5.2.5 or higher (5.3 recommended)", So I may have made a mistake by introducing a construct that's not compatible with some php versions that Drupal 7 still supports. I'll need to fix this, but either way if you can confirm your php version that would be very helpful.

bherring’s picture

php version 5.2.17

rjacobs’s picture

Status: Active » Fixed

Ok, that explains it then. This was an honest oversight. I've committed a change to address it (http://drupalcode.org/project/juicebox.git/commit/a42d3d4).

I've also pushed a "hotfix" release (7.x-2.0-beta5) that contains the fix.

Thanks for immediately reporting the full php error so that this could be addressed quickly.

Status: Fixed » Closed (fixed)

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