Loading...
 
Architecture / Installation

Architecture / Installation


Culprit found: PHP 4.4.0 / 5.0.5 Fatal error 'Only variables can be passed by reference' Error

posts: 4

I see some rumbling about ADODB being an issue, but this is wholly separate.

If you are getting "Fatal error: Only variables can be passed by reference in Xxxxxxxxxx" it is a problem with the latest bug-fix from the PHP group. In 4.4.0 and 5.0.5 they have eliminated passing temp references to functions in order to solve a memory corruption problem. Fix one thing, break another. The problem arises whenever you send references to temporary variables on the stack.

Supposedly its fixed in the CVS and newest RCs. However, I will be downgrading instead. Seems to me that scary things are afoot with the new PHP builds. The older versions work fine for my purposes.

So think whenever you nest functions inside each other PHP throw a Fatal Error instead of a Warning now.
Now Fatal:
$value = strtolower(array_shift'/\n/',trim($value));

  1. from the internap PHP developers example


I pulled some hair out doing a new install of 1.9.1 with php 5.0.5. Smarty seems to be using a nested function in one of their pieces. Here is the links and rants regarding it.

Rants:
http://phplens.com/phpeverywhere/?q=node/view/214 (Where one php developer says "stfu rewrite your code"... I'm sure every Tiki developer just cried a little inside :] )
http://blog.thepimp.net/index.php/2005/09/12/19-505-oops-i-did-it-again

PHP Bug tracking:
http://bugs.php.net/bug.php?id=34468
http://news.php.net/php.internals/18794

posts: 2881 United Kingdom

Hi,

Just be-careful using the older PHP builds as some do contain some wild security issues.

The current status is that the smarty people actually dont feel its enough to warrant a new release just yet. I have been speaking to them in smarty channels for some days now. Im a heavy smarty user and its causing problems. However if your brave you can use the CVS smarty version. I believe the last ADODB release has fixed the issues relating to that layer.

Hope that helps a little too.