SOLVED "Cannot create references" error

  • Hello. I am trying to upgrade a Fog server from 3412 to the latest from git. (This is on a RHEL 7 server.) But the database update seems to fail. The installer prompts me to visit to update the database schema. But that page is just blank. In the Apache error_log I see this:
    PHP Fatal error: Cannot create references to elements of a temporary array expression in /var/www/html/fog/lib/fog/foggetset.class.php on line 5

    After searching for solutions to this problem I tried 2 specific things. I set these in /opt/fog/.fogsettings:
    (I didn’t touch snmysqlpass as it was already set correctly.) I also tried removing /var/www/html/fog and letting the installer recreate it. But when i re-run the installer I get the same problem, with the same message in Apache’s log. Any ideas?

  • @Tom-Elliott Yes, thank you.


  • @Rico so you’re good now?

  • Just need to update /etc/yum.repos.d/remi.repo




  • This post is deleted!

  • This post is deleted!

  • @Rico can you try the workaround steps @dramaley described? Your version of php is likely incorrect.

  • Hello,
    I have the same error, just after the step :

    [root@fog fog]# tail /var/log/httpd/error_log -fn1
    [Tue Feb 16 18:12:40 2016] [error] [client] PHP Fatal error: Cannot create references to elements of a temporary array expression in /var/www/html/fog/lib/fog/fogbase.class.php on line 134

    [root@fog fogproject]# git describe --tags

    [root@fog fogproject]# git log -1
    commit 2db42ffc1d9ce960389ddcf4a2bd37e4d3443417
    Merge: 9e9f7d3 0916fbd
    Author: Tom Elliott
    Date: Tue Feb 16 19:13:53 2016 -0500

    Merge svn with dev-branch

    [root@fog fogproject]# git rev-parse HEAD

  • Here is what i do to install Fog:

    # cd fogproject
    # git pull
    # cd bin
    # ./

    Is this what you mean by the hash?

    # git rev-parse HEAD

    That was run in the fogproject directory.

  • Also, if possible the current hash of the git pull?

  • @dramaley,

    As you’re using git, can you output the exact commands being used?

  • I got the latest Fog installed! The work-around that i described a few minutes ago worked.

  • OK, so i stopped Apache, erased all php* packages, installed the php56-* packages in their place, and restarted Apache. Then i re-ran the Fog installer. And… it installed the original php* packages! So now i have 2 versions of PHP installed. And the old one takes precedence, so Fog is still not working.

    I’ll try running the Fog installer again, but from a second terminal i’ll erase all the php* packages that the installer mistakenly installs and see if i can work around it that way.

  • @dramaley You didn’t do anything wrong. It’s only worrying me that if you’re running git pull and it’s NOT updating php to what I’m forcing, that something else is amiss and I don’t know what.

  • Doh! When i originally installed Fog i was careful to check requirements, but have not rechecked those recently. I’ll look into getting PHP updated and report back if that fixes it.

  • @dramaley What version of fog are you running?

    the Git tree, forces you to at least have 5.6.

  • It is the standard PHP on RHEL 7:

    $ php --version
    PHP 5.4.45 (cli) (built: Jan 6 2016 16:48:34)
    Copyright © 1997-2014 The PHP Group
    Zend Engine v2.4.0, Copyright © 1998-2014 Zend Technologies

  • @dramaley What version of PHP are you running?

  • Thanks for the patch! I did another “git pull” and tried the install again. I now get the same error, but in a different spot:

    PHP Fatal error: Cannot create references to elements of a temporary array expression in /var/www/html/fog/lib/fog/fogbase.class.php on line 134

  • @dramaley Do we have any word on the status of this now?