<your message here>
----
Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful):
Gallery version: gallery-1.4.1-RC2.tar
Apache version: Apache/1.3.28
PHP version (don't just say PHP 4, please): PHP Version 4.3.0
Graphics Toolkit: NetPBM 10.18
Operating system: Mac X 10.3 panther
Web browser/version (if applicable): Safari
Getting this error on stock/new installation:
Fatal error: Call to undefined function: _() in /Library/WebServer/Documents/gallery/albums.php on line 102
Posts: 3473
Weird. You are the second report of this today. . . .
Try this solution:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=49220#49220
Posts: 38
Added that function to util.php and got this:
Parse error: parse error, unexpected T_STRING in /Library/WebServer/Documents/gallery/util.php on line 3139
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /Library/WebServer/Documents/gallery/util.php:3139) in /Library/WebServer/Documents/gallery/session.php on line 60
Fatal error: Call to undefined function: _() in /Library/WebServer/Documents/gallery/albums.php on line 102
Line 3139 in my util.php is:
LINE 3138 function _($search) {
LINE 3139 return $search;
LINE 3140 }
A function _() {} definition appears in:
function emulate_gettext() {
global $translation;
global $GALLERY_BASEDIR, $gallery;
if (in_array($gallery->language,array_keys(gallery_languages())) &&
$gallery->language != 'en_US') {
$filename=$GALLERY_BASEDIR ."locale/". $gallery->language ."/". $gallery->language ."-gallery_". where_i_am() .".po";
$lines=file($filename);
foreach ($lines as $key => $value) {
if (stristr($value, "msgid") && ! stristr($lines[$key-1],"fuzzy")) {
$new_key=substr($value, 7,-2);
$translation[$new_key]=substr($lines[$key+1],8,-2);
}
}
// Substitute _() gettext function
function _($search) {
if (! empty($GLOBALS['translation'][$search])) {
return $GLOBALS['translation'][$search] ;
}
else {
return $search;
}
}
}
// There is no translation file or we are using original (en_US), so just return what we got
else {
function _($search) {
return $search;
}
}
}
Posts: 38
Might this relate to language or looking up the english variable? The Rc1 download didn't seem to have any language and it reported warnings on configure.
Posts: 3473
No, it's something more fundamental than that.
Try this version of util.php
***EDITED again!!*** get util.zip fromhttp://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&p=49220#49220
Posts: 1
I too have had this problem
Posts: 3473
MKrivanek,
Try using the above version of util.php
Posts: 90
Joan, the new version of the util.php works..
-m
Posts: 23
New version of util.php worked for me too!! I had the same problems..