Page 1 of 1

s9y 1.1.2: Call to undefined function: assign_by_ref()-RSS

Posted: Tue Apr 03, 2007 12:46 pm
by Moritz
Hi,

I have a fresh (and hopefully clean ;-) install of s9y on my server (http://perl-6.de/blog/ if that helps you), and when I open an RSS feed the only output is

<b>Fatal error</b>: Call to undefined function: assign_by_ref() in <b>/home/moritz/src/moritz/perl-6.de/online/blog/rss.php</b> on line <b>243</b><br />

Now line 243 seems to be the first call to $serendipity['smarty'] in that file:
$serendipity['smarty']->assign_by_ref('metadata', $metadata);

I googled for the error message but I haven't found a clue what might cause the problem, and I don't know PHP myself.

What can I do to fix this?

To me this looks like a bug because I think I followed the install instructions step by step.

A few version:
s9y 1.1.2 (tarball from s9y.org)
PHP 4.3.10-19
Apache 2.2.3
Running on Debian GNU/Linux 3.1 "Sarge" or 4.0 "etch" (same error on both of them)

Any help is welcome ;-)

Moritz

Re: s9y 1.1.2: Call to undefined function: assign_by_ref()-

Posted: Tue Apr 03, 2007 1:09 pm
by garvinhicking
Hi!

Generally, serendipity tries to use local installations of bundled-libraries like PEAR and Smarty if existing on your server.

This seems to be the case with your installation, where s9y tries to use a locally existing Smarty installation that is outdated and does not yet have the 'assign_by_ref' method.

You can fix this in several ways:

1. Remove your global Smarty installation (supposedly in /usr/local/lib/php or something like that)

2. Update your global Smarty installation (recommended)

3. Edit the serendipity_config.inc.php file and set $serendipity['use_PEAR'] = false to force s9y to not use local libraries.

HTH,
Garvin

[Solved] s9y 1.1.2: Call to undefined function

Posted: Tue Apr 03, 2007 1:26 pm
by Moritz
Hi,

thanks for your fast reply.

[quote="garvinhicking"]Hi!
1. Remove your global Smarty installation (supposedly in /usr/local/lib/php or something like that)

2. Update your global Smarty installation (recommended)

3. Edit the serendipity_config.inc.php file and set $serendipity['use_PEAR'] = false to force s9y to not use local libraries.
[/quote]

1. and 2. are not possible for me because I don't have administrative access on the production server.

3. didn't work, but I found that removing the line
serendipity['smarty']->security = false;
from the config solved the problem. I found that line somewhere in the FAQ as a means to allow php code in the templates.
Now I use one of the other ways to use php code.

Thanks anyway,

Moritz

Re: [Solved] s9y 1.1.2: Call to undefined function

Posted: Tue Apr 03, 2007 2:05 pm
by garvinhicking
Hi!
3. didn't work, but I found that removing the line
serendipity['smarty']->security = false;
from the config solved the problem. I found that line somewhere in the FAQ as a means to allow php code in the templates.
Now I use one of the other ways to use php code.
Oh, that's strange. This setting should not be related at all to the 'assign_by_ref' problem! Strange.

Did you customize any template files of serendipity?

Best regards,
Garvin

Customized Template

Posted: Tue Apr 03, 2007 2:16 pm
by Moritz
I customized index.tpl (and the stylesheets, but I guess they are irrelevant ;-).

For reference I uploaded it here: http://moritz.faui2k3.org/tmp/index.tpl

HTH,
Moritz

Re: Customized Template

Posted: Tue Apr 03, 2007 2:26 pm
by garvinhicking
Hi!

Hm, that modification should not cause that. I really don't have a clue why setting the 'Security' value fixes the 'assign_by_ref' problem for you...but maybe I don'T need to understand it, as long as it works ;)

Best regards,
Garvin