Fatal error: Call to undefined function

Having trouble installing serendipity?
PG
Regular
Posts: 10
Joined: Wed Jan 02, 2008 1:32 am

Fatal error: Call to undefined function

Post by PG »

Hey there,

I just installed s9y again. After closing a former project I deleted it, but actually.... I can't live without it. :-)

But I've got a problem right after the installation process, where it tells me, that my new blog was created. After the click, there is the head with the title and subtitle of the blog and below the space for the main blog. But there is an error occured:

Fatal error: Call to undefined function: serendipity_mb() in [...]/include/functions.inc.php on line 206

Line 206 in this file:
return serendipity_mb('ucfirst', serendipity_strftime($cache[$format], (int)$time, $useOffset, $useDate));

Well, I don't think that's the problem. Especially, when I realised I had the same problem when I installed s9y for the first time about a year ago. I remember doing something there and there - but I can't remember the things I did exactly.

First I checked the mod_write thing - and I could imagine that there was a problem (maybe). The files and folders created on install - do they have to get a 777? I couldn't change these attributes directly, because my programm said there were deleted (don't know how this is possible). I overwrote the files and folders now to be the technical owner and then I could change the attributes.

Another question: How many DBs are created? I remember 23 while my first using of s9y. Now I have 22. Maybe I mixed something up in my mind.

Because I uses s9y already before I can say: There's no need to delete a file like .htaccess. It worked fine with all of them, after I figured out what was wrong. Certainly I didn't figure out, what was the mistake. I just tried and tried, and suddenly it worked (quite bad, I know).

Don't tell me to delete everything and see what happens while reinstalling - I did it three times already. :?

So, anybody out there, who can help me?
azel
Regular
Posts: 265
Joined: Thu Apr 21, 2005 4:28 am
Contact:

Post by azel »

Are you sure you have the correct database user/password?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Fatal error: Call to undefined function

Post by garvinhicking »

Hi!

This serendipity_mb function should be declared inside the include/lang.inc.php file. Do you have that one? Make sure all files you uploaded are there.

The only way that this file is not loaded properly, is if your serendipity user's "lang" is set to a language file that does not exist.

Check your serendipity_config table for which lang values are set:

Code: Select all

SELECT name, value, authorid WHERE name = 'lang'
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
PG
Regular
Posts: 10
Joined: Wed Jan 02, 2008 1:32 am

Post by PG »

I do have the lang.inc.php, but I checked the serendipity_config table and got a:

SELECT name, value, authorid
FROM `serendipity_config`
WHERE name = `lang`
LIMIT 0 , 30

#1054 - Unknown column 'lang' in 'where clause'

Sooo... what's wrong? :roll:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

You must use ' instead of `:

Code: Select all

SELECT name, value, authorid
FROM `serendipity_config`
WHERE name = 'lang'

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
PG
Regular
Posts: 10
Joined: Wed Jan 02, 2008 1:32 am

Post by PG »

:roll: whoops, my fault! Now I can see two entries:

Code: Select all

name 	value 	authorid 
lang	 de	    0
lang	 de	    1
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Hm, that's right as far as I can see. And the files lang/serendipity_lang_de.inc.php and lang/UTF-8/serendipity_lang_de.inc.php exist?

Which browser are you using? It *could* be a problem of your browser, if he sends an empty Accept-Language HTTP header. In that case, you could try if accessing the backend via serendipity_admin.php works, and if yes, enter the configuration and set the option "Autodetect user langauge" to false.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
PG
Regular
Posts: 10
Joined: Wed Jan 02, 2008 1:32 am

Post by PG »

Hi

all the language files exist.
I use Opera 9.25, but double-checked the problem using Firefox and IE.

I tried to open serendipity_admin.php directly. The login panel appears. But it's strange - every word is written in capital letters. Can't remember that! However, I can login perfectly. But when I try to make a "new entry" there is a blank panel for the titel, next to it the option for publish... and below the error again, but more specified:

Code: Select all

<input class="input_textbox" type="text" name="serendipity[new_timestamp]" id="serendipityNewTimestamp" value="
Fatal error: Call to undefined function: serendipity_mb() in [...]/include/functions.inc.php on line 206
So it really asks about the time, doesn't it?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

It seems that on your server, no language files can be loaded!

Please check if the lang/ directory and all of its files are readable (UNIX-Permissions).

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
PG
Regular
Posts: 10
Joined: Wed Jan 02, 2008 1:32 am

Post by PG »

Hi again

Makes sense what you're saying. All the language files and directories are set on 644, reading allowed for everyone, but "execute" is not allowed.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

The "lang" directory must have execute privileges!

You might be able to see an error message, if you edit the file include/lang.inc.php and change all "@include" and "@require" to "include" and "require", to see the errors.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
PG
Regular
Posts: 10
Joined: Wed Jan 02, 2008 1:32 am

Post by PG »

There was no error, I could change to 755 for all language files, folders and include/lang.inc.php. But the main error still exists. :cry:
PG
Regular
Posts: 10
Joined: Wed Jan 02, 2008 1:32 am

Post by PG »

Well,
I deleted line 206 (see above). Now I can see the blog with calender etc. - but you're completely right with the language problem. In the admin suite / configuration "german" is set. But obviously it's english. I don't know the english file - is there everything written in capital letters? If not, I would say not even english could be startet. I changed the language in the configuration to english, saved, and nothing was different. I checked again and the configuration says still "german" is set. Sooooo do you recommend to delete everything, install new, but say while first asking for installation to install in "englisch"? I set "german" before. Or wouldn't it change anything?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

No, the english file is serendipity_lang_en.inc.php - obviously, your server doesn't interpret any of the lang files and only shows constants.

Please contact your sysadmin and ask him to check the PHP and Apache errorlogs. There must be some notices about PHP files that cannot be interpreted!

Maybe the path to your s9y configuration is wrong, and thus s9y cannot find the language files?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
PG
Regular
Posts: 10
Joined: Wed Jan 02, 2008 1:32 am

Post by PG »

Hello again,

two days ago "client denied by server configuration: [...]serendipity_config.inc.php"

But I reinstalled again and after it there were no other errors logged.
What configuration path do you mean?
Post Reply