(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.
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.
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.
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.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.