1.4.1 RC2 problem on Mac X 10.3 w/Apache 1.3.28

jlangdale

Joined: 2003-11-09
Posts: 38
Posted: Sun, 2003-11-09 20:28

<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

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Sun, 2003-11-09 20:40

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

 
jlangdale

Joined: 2003-11-09
Posts: 38
Posted: Sun, 2003-11-09 20:45
joan wrote:
Weird. You are the second report of this today. . . .

Try this solution:

http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=10850#48954

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;
}
}
}

 
jlangdale

Joined: 2003-11-09
Posts: 38
Posted: Sun, 2003-11-09 20:54

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.

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Sun, 2003-11-09 21:21

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

 
MKrivanek

Joined: 2003-11-09
Posts: 1
Posted: Sun, 2003-11-09 22:45

I too have had this problem

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Sun, 2003-11-09 23:15

MKrivanek,

Try using the above version of util.php

 
diomark
diomark's picture

Joined: 2003-03-14
Posts: 90
Posted: Mon, 2003-11-10 07:50
joan wrote:
No, it's something more fundamental than that.

Try this version of util.php

Joan, the new version of the util.php works..
-m

 
greg72
greg72's picture

Joined: 2002-11-18
Posts: 23
Posted: Mon, 2003-11-10 09:37
diomark wrote:
joan wrote:
No, it's something more fundamental than that.

Try this version of util.php

Joan, the new version of the util.php works..
-m

New version of util.php worked for me too!! I had the same problems..