We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Blank site/admin when enabling FieldFrame extension

Development and Programming

Matthew Pennell's avatar
Matthew Pennell
221 posts
16 years ago
Matthew Pennell's avatar Matthew Pennell

(This is possibly linked to this thread problem - similar symptoms.)

I’m developing on my local machine, everything going well; I checkin a bunch of files to Subversion and update the live site… and everything vanishes. Nothing works at all.

Three hours later, I’ve figured out what it is.

Brandon Kelly’s FieldFrame extension uses pass-by-reference inside a few foreach() loops in the extension file, e.g.

foreach ($vals as &$val)
{
    $val = $this->_array_ascii_to_entities($val);
}

This was causing my live server to choke, despite dev being fine. I’ve validated this by disabling extensions by editing config.php (site comes back), removing FieldFrame and trying again (all works), then re-adding FieldFrame and trying to enable extensions (site vanishes).

If I edit the offending lines of ext.fieldframe.php to remove the ‘&’, the site is accessible but trying to enable extensions throws a different error:

Warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, ‘fieldframe::show_full_control_panel_start’ was given in /path/to/my/site/system/core/core.extensions.php on line 278

What I don’t understand is why this is only happening on my live server. Dev is running PHP 5.2.5 (as part of MAMP). Live is PHP 5.2.6.

I also have that version of FieldFrame (1.3.3) running perfectly fine on another live server (also 5.2.6) from the same hosting company! The ‘broken’ one is MediaTemple (gs), but on MediaTemple (dv) it works fine.

I hope someone more clued up than me about pass-by-reference and PHP settings can suggest what might be causing this issue.

       
Brandon Kelly's avatar
Brandon Kelly
257 posts
16 years ago
Brandon Kelly's avatar Brandon Kelly

What leads you to think it’s the variable reference? That error doesn’t seem to speak to that.

       
Matthew Pennell's avatar
Matthew Pennell
221 posts
16 years ago
Matthew Pennell's avatar Matthew Pennell
What leads you to think it’s the variable reference? That error doesn’t seem to speak to that.

The fact that if I turn error reporting up full (with the non-edited version of the extension file), the Extensions page dies with errors relating to the lines with variable references, e.g.

Parse error: syntax error, unexpected ‘&’, expecting T_VARIABLE or ‘$’ in /path/to/my/site/system/extensions/ext.fieldframe.php on line 337

I get a parse error for each of the four places where references are used. By replacing them all with values, I can get the page to load.

       
Brandon Kelly's avatar
Brandon Kelly
257 posts
16 years ago
Brandon Kelly's avatar Brandon Kelly

Ok. I know you said you have PHP 5.2.6, but that’s definitely a PHP 4 error. Check Admin > Utilities > PHP Info to see for yourself.

       
Matthew Pennell's avatar
Matthew Pennell
221 posts
16 years ago
Matthew Pennell's avatar Matthew Pennell

WTFFF?!?!?! I could swear blind that I checked the PHP setting at least twice last night, I’m sure I did. But you’re right, it was 4.4.8. Switched it over and added an AddHandler to .htaccess and all is well.

I owe you a beer - see you at the conference in October. 😊

       
Johnny Walker's avatar
Johnny Walker
29 posts
16 years ago
Johnny Walker's avatar Johnny Walker

hey guys, it seems i’m running into the same problem. EE says i’m running PHP Version 4.3.11.

how do i change the php version?

       
Matthew Pennell's avatar
Matthew Pennell
221 posts
16 years ago
Matthew Pennell's avatar Matthew Pennell

You need to look at your web hosting admin, or talk to your hosting company.

Some accounts will let you change the PHP version on a per-domain basis (my host, MediaTemple, do this), but there is a chance that you will be locked in to a particular version on a server - in which case you’ll need to move to a host that provides PHP5.

       
Johnny Walker's avatar
Johnny Walker
29 posts
16 years ago
Johnny Walker's avatar Johnny Walker

I’ve looked at my hosting account and talked w/ the hosting company, and both show that i’ve got PHP 5…

EE says my loaded configuration file is php.ini, should it be php5.ini instead? if so, is there a way to change that?

       
Matthew Pennell's avatar
Matthew Pennell
221 posts
16 years ago
Matthew Pennell's avatar Matthew Pennell

Admin > Utilities > PHP Info

If that is telling you that it’s a version of PHP4, then that’s what you’re running. There’s nothing you can do within EE to change that - talk to your hosts. It might be that they have some weird requirement for .htaccess, or using .php5 file suffixes or something - whatever, it’s not something you can fix within EE itself.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.