This topic was marked solved by its starter, on May 16th, 2014, 08:08 AM
« [Notifications ] Impossible to change settings
[Install] Error 500

Pandos

  • Living on the edge of Wedge
  • Posts: 635
[Install] Error 500
« on May 15th, 2014, 11:59 AM »
Index will give a error 500 while trying to do a fresh install.
Quote
PHP Fatal error:  Can't use function return value in write context in /gz/app/Subs.php on line 2
# dpkg-reconfigure brain
error: brain is not installed or configured

Nao

  • Dadman with a boy
  • Posts: 16,078
[Install] Re: Error 500
« Reply #1, on May 15th, 2014, 11:44 PM »
Reinstalled this week, had no such problem..?

Leftie

  • Atomic Wedgie
  • I don't know what I'm doing, just roll with it.
  • Posts: 24
[Install] Re: Error 500
« Reply #2, on May 15th, 2014, 11:54 PM »
I'm not getting quite the same error, so it should perhaps go in another thread, but I simply uploaded the newest revision files (29fdcaa) via FTP, and now I'm getting the following error, trying to view the main page:

Code: [Select]
Fatal error: Can't use function return value in write context in <redacted>/gz/app/Subs.php on line 2344

Which refers to the middle of these three lines:

Code: [Select]
// Remove the home separator if not needed.
if (empty(reset($menu_items['home']['items'])))
array_shift($menu_items['home']['items']);

I'm using the "Wireless" skin, if that's important.
Never underestimate the power of stupid people in large groups

Nao

  • Dadman with a boy
  • Posts: 16,078
[Install] Re: Error 500
« Reply #3, on May 15th, 2014, 11:58 PM »
Oh, right.
That's because I'm using PHP 5.5 both here (IIRC) and locally, and empty() doesn't support function results before that.

Pandos

  • Living on the edge of Wedge
  • Posts: 635
[Install] Re: Error 500
« Reply #4, on May 16th, 2014, 08:08 AM »
Seems to be fixed.
But there are some errors remaining in the logs:
Quote
/viewremote/?filename=current-version.js
2: array_merge(): Argument #2 is not an array
Datei:/wedge/gz/app/Subs-Template.php
Zeile: 406
Also the same error for latest-news.js and search. :)

Nao

  • Dadman with a boy
  • Posts: 16,078
[Install] Re: Error 500
« Reply #5, on May 17th, 2014, 05:57 PM »
Okay, what's in your page_replacements setting..?
This is the thing you can fill up in the Pretty URLs admin page... But I'm more interested in the raw data in the settings table, than what the PURLs page tells you.
(It's probably an unserialize error.)

BTW, replacing lines 405 and 406 with this should work...
Code: [Select]
if (!empty($settings['page_replacements']) && ($extra_pr = unserialize($settings['page_replacements'])) !== false)
$pr = array_merge($pr, $extra_pr);

Pandos

  • Living on the edge of Wedge
  • Posts: 635
[Install] Re: Error 500
« Reply #6, on May 19th, 2014, 01:38 PM »
Your latest commit [bcd3d00] fixed this.
Great work!

« [Notifications ] Impossible to change settings