#295 Fatal error: Call to undefined function: _() (IIS,1.3.9)

Installation
closed
Reini Urban
MySQL (31)
2
2014-07-29
2004-04-30
Mike Pullen
No

I installed the phpwiki 1.3.9 kit on Windows 2000 Server
using IIS and MySql. I downloaded the latest CVS
updates (4/30/2004) and any attempt to start the
index.php results in the following error messages:

Fatal error: Call to undefined function: () in
C:\Documents and Settings\Administrator\My
Documents\My Webs\myweb\phpwiki-1.3.9
\lib\WikiGroup.php on line 29
PHP Fatal error: Call to undefined function:
() in
C:\Documents and Settings\Administrator\My
Documents\My Webs\myweb\phpwiki-1.3.9
\lib\WikiGroup.php on line 29

I have attached my index.php content, if those
configuration settings might be causing this odd behavior.

I'd appreciate any guidance or advice you can offer on
this observation. Thanks!


Mike Pullen

Discussion

  • Mike Pullen
    Mike Pullen
    2004-04-30

    phpwiki-1.3.9/index.php

     
    Attachments
  • Reini Urban
    Reini Urban
    2004-05-02

    Logged In: YES
    user_id=13755

    Looks like your php doesn't have the _ =& gettext alias defined.
    Or even no gettext, but bindtextdomain.
    check it out.

    Please do this manually in config.php:
    function _($text) { return gettext($text); }

     
  • Mike Pullen
    Mike Pullen
    2004-05-02

    Logged In: YES
    user_id=1000289

    Thanks for the reply, Reini.

    That seemed to solve some problem. I restored the original
    index.php (not the one generated by configurator). Now the
    results are giving errors on the assert() function. I put in a
    debugging print statement ie. print "pagename=($pagename)
    \n";) in WikiDB.php at line 167 (function getpage) to see what
    the value coming into the function there contains and found
    the routine is working ok when there is a value in the
    argument, but gives the failure below when there is no value
    provided:

    pagename=(global_data) pagename=(phpwiki/index.php)
    C:\Documents and Settings\Administrator\My Documents\My
    Webs\myweb\phpwiki\lib\Request.php:445: Warning[2]:
    session_start(): Cannot send session cookie - headers
    already sent by (output started at C:\Documents and
    Settings\Administrator\My Documents\My
    Webs\myweb\phpwiki\lib\WikiDB.php:167)

    C:\Documents and Settings\Administrator\My Documents\My
    Webs\myweb\phpwiki\lib\Request.php:445: Warning[2]:
    session_start(): Cannot send session cache limiter - headers
    already sent (output started at C:\Documents and
    Settings\Administrator\My Documents\My
    Webs\myweb\phpwiki\lib\WikiDB.php:167)

    C:\Documents and Settings\Administrator\My Documents\My
    Webs\myweb\phpwiki\lib\Request.php:532: Warning[2]:
    Cannot modify header information - headers already sent by
    (output started at C:\Documents and
    Settings\Administrator\My Documents\My
    Webs\myweb\phpwiki\lib\WikiDB.php:167)

    C:\Documents and Settings\Administrator\My Documents\My
    Webs\myweb\phpwiki\lib\Request.php:533: Warning[2]:
    Cannot modify header information - headers already sent by
    (output started at C:\Documents and
    Settings\Administrator\My Documents\My
    Webs\myweb\phpwiki\lib\WikiDB.php:167)

    pagename=(phpwiki/index.php)
    C:\Documents and Settings\Administrator\My Documents\My
    Webs\myweb\phpwiki\lib\display.php:130: Warning[2]: Cannot
    modify header information - headers already sent by (output
    started at C:\Documents and Settings\Administrator\My
    Documents\My Webs\myweb\phpwiki\lib\WikiDB.php:167)

    pagename=(InterWikiMap) pagename=(InterWikiMap)
    pagename=()
    C:\Documents and Settings\Administrator\My Documents\My
    Webs\myweb\phpwiki\lib\WikiDB.php:168: Fatal[0]:

    C:\Documents and Settings\Administrator\My
    Documents\My Webs\myweb\phpwiki\lib\WikiDB.php:168: :
    Assertion failed

    My question is this: should the installation and setup out of
    the box be so difficult? The program (v1.3.9) seems to be
    very sensitive to settings in the config.ini file. I took the
    standard config-default.ini, copied it to config.ini, and edited
    the minimum to set the database type, name and login info.
    Initially that produced only a blank screen until I
    uncommented the include of main.php at the bottom of
    index.php (apparently the conditions in the complex IF
    statements right before were not met and main.php was
    never called... giving me a totally blank screen.

    Any advice with starting a new wiki on v1.3.9 would be
    appreciated (I'm a newby on this package; I have v1.2
    running ok, but I need better login controls of the latter
    release). Thanks in advance!


    Mike P

     
  • Reini Urban
    Reini Urban
    2004-05-02

    Logged In: YES
    user_id=13755

    Initially that produced only a blank screen until I
    uncommented the include of main.php at the bottom of
    index.php (apparently the conditions in the complex IF
    statements right before were not met and main.php was
    never called... giving me a totally blank screen.

    This was fixed today.

    Does it work now for you?
    I cannot test it with IIS.
    If you get empty pagenames, it is the same problem as on sf.net.

    change the
    print "pagename=($pagename) line in WikiDB to
    trigger_error("pagename...",E_USER_WARNING);
    to get rid of the header warnings.

     
  • Mike Pullen
    Mike Pullen
    2004-05-02

    Logged In: YES
    user_id=1000289

    Reini, I downloaded (via CVS) your latest change today into
    my system. I noted that you changed index, main, wikidb,
    config and others. I resolved conflicts (I had added more
    debugging junk) to make my files exactly like yours. I then
    emptied the database of all records (there were only three)
    and ran the index.php.

    It gave me a blank screen. So I commented out the IF
    statement near the bottom to force the use of main. It ran
    somewhat better and gave me a wiki screen, but did NOT load
    the initial required pages. Therefore, I can't do anything at
    all. Any action reports that no page can be found. The
    database has three records (two in pages, one in session
    table).

    I noted that there is no longer an admin.php. Is that normal?

    Here is the contents of my config.ini file if that will help in any
    way:

    ; $Id: config-default.ini,v 1.2 2004/04/27 16:16:26 rurban Exp
    $
    ; This is the default PhpWiki configuration for undefined
    config.ini entries.

    ADMIN_USER = administrator
    ADMIN_PASSWD = Connie01
    DEBUG = 0

    DATABASE_TYPE = adodb
    DATABASE_DSN = "mysql://root:mysql@localhost/phpwiki_13"
    DBAUTH_AUTH_DSN =
    mysql://root:mysql@localhost/phpwiki_13

    ENABLE_USER_NEW = true
    ENABLE_EDIT_TOOLBAR = true

    WIKI_NAME = PhpWiki
    ENABLE_REVERSE_DNS = true
    ENCRYPTED_PASSWD = true
    ZIPDUMP_AUTH = false
    ENABLE_RAW_HTML = false;
    STRICT_MAILABLE_PAGEDUMPS = false
    HTML_DUMP_SUFFIX = .html
    MAX_UPLOAD_SIZE = 16777216
    MINOR_EDIT_TIMEOUT = 604800
    ; DISABLED_ACTIONS = "dumpserial : loadfile"
    ;ACCESS_LOG = ""
    ; COMPRESS_OUTPUT = true
    CACHE_CONTROL = LOOSE
    CACHE_CONTROL_MAX_AGE = 600
    ; WIKIDB_NOCACHE_MARKUP = true
    ; DATABASE_PREFIX = ""
    ;DATABASE_DSN = "mysql://root:mysql@localhost/phpwiki_13"
    DATABASE_SESSION_TABLE = session
    DATABASE_DIRECTORY = /temp
    DATABASE_DBA_HANDLER = gdbm
    DATABASE_TIMEOUT = 20
    MAJOR_MAX_AGE = 32
    MAJOR_KEEP = 8
    MINOR_MAX_AGE = 7
    MINOR_KEEP = 4
    AUTHOR_MAX_AGE = 365
    AUTHOR_KEEP = 8
    AUTHOR_MIN_AGE = 7
    AUTHOR_MAX_KEEP = 20

    ALLOW_ANON_USER = true
    ALLOW_ANON_EDIT = true
    ALLOW_BOGO_LOGIN = true
    ALLOW_USER_PASSWORDS = true
    USER_AUTH_ORDER = PersonalPage : Db
    PASSWORD_LENGTH_MINIMUM = 2
    USER_AUTH_POLICY = strict
    LDAP_AUTH_HOST = "ldap://localhost:389"
    LDAP_BASE_DN
    = "ou=Users,o=Development,dc=mycompany.com"
    LDAP_SET_OPTION = ""
    LDAP_AUTH_USER = "CN=ldapuser,CN=Users"
    LDAP_AUTH_PASSWORD = ""
    LDAP_SEARCH_FIELD = "uid"
    IMAP_AUTH_HOST = "localhost:143/imap/notls"
    POP3_AUTH_HOST = localhost:110
    AUTH_USER_FILE =
    AUTH_USER_FILE_STORABLE = false
    AUTH_SESS_USER = userid
    AUTH_SESS_LEVEL = 2
    GROUP_METHOD = WIKIPAGE
    AUTH_GROUP_FILE = /etc/groups
    DBAUTH_AUTH_CHECK = "SELECT IF(passwd='$password',1,0)
    FROM user WHERE userid='$userid'"
    DBAUTH_AUTH_CRYPT_METHOD = plain
    DBAUTH_AUTH_USER_EXISTS = "SELECT userid FROM user
    WHERE userid='$userid'"
    DBAUTH_AUTH_CREATE = "INSERT INTO user SET
    passwd=PASSWORD('$password'),userid='$userid'"
    DBAUTH_PREF_SELECT = "SELECT prefs FROM pref WHERE
    userid='$userid'"
    DBAUTH_PREF_UPDATE = "REPLACE INTO pref SET
    prefs='$pref_blob',userid='$userid'"
    ; DBAUTH_IS_MEMBER = "SELECT user FROM user WHERE
    user='$userid' AND group='$groupname'"
    ; DBAUTH_GROUP_MEMBERS = "SELECT user FROM user
    WHERE group='$groupname'"
    ; DBAUTH_USER_GROUPS = "SELECT group FROM user WHERE
    user='$userid'"
    EDITING_POLICY = "EditingPolicy"

    THEME = default
    CHARSET = iso-8859-1
    DEFAULT_LANGUAGE = en
    WIKI_PGSRC = pgsrc
    DEFAULT_WIKI_PGSRC = pgsrc
    DEFAULT_WIKI_PAGES =
    ReleaseNotes:SteveWainstead:TestPage:PageDump

    ALLOWED_PROTOCOLS =
    http|https|mailto|ftp|news|nntp|ssh|gopher
    INLINE_IMAGES = png|jpg|gif
    WIKI_NAME_REGEXP = "(?<![[:alnum:]])(?:[[:upper:]]
    [[:lower:]]+){2,}(?![[:alnum:]])"
    SUBPAGE_SEPARATOR = /
    INTERWIKI_MAP_FILE = lib/interwiki.map
    WARN_NONPUBLIC_INTERWIKIMAP = false
    KEYWORDS = Category:Topic
    ; KEYWORD_LINK_REGEXP = "(?<=^\'. join(\'|^\',
    $keywords) . \')[[:upper:]].*$"
    COPYRIGHTPAGE_TITLE = GNU General Public License
    COPYRIGHTPAGE_URL =
    http://www.gnu.org/copyleft/gpl.html#SEC1
    AUTHORPAGE_TITLE = The PhpWiki Programming Team
    AUTHORPAGE_URL =
    http://phpwiki.sourceforge.net/phpwiki/ThePhpWikiProgrammin
    gTeam

    ; These not:
    ; SERVER_NAME =
    ; SERVER_PORT =
    ; SCRIPT_NAME =
    ; DATA_PATH =
    ; PHPWIKI_DIR =
    ; VIRTUAL_PATH =

    ; DISABLE_HTTP_REDIRECT = false

     
    • status: open --> closed
     
  • Closing very old bugs.