Community Support for OpenDocMan (Deprecated)

Full Version: error after / during installation - parse errors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I'm new to OpenDocMan /PHP and tried to install it for the first time.

My webserver configuration:
  • Apache-versie 2.2.16
    PHP-versie 5.2.14
    MySQL-versie 5.0.96-community[/list:u]

    I filled out the questions concerning my database, location of the files and got to a screen where i had to choose "upgrade from ..." or "new installation". After that I had to go to the directory where ODM was to be found and there I got a first parse error...

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/******/public_html/opendocman/User_class.php on line 413 (**** is my webspace location)

    This is, I think, the code:
    public static function getAllUsers()
    {
    // query to get a list of available users
    $query = "SELECT id, last_name, first_name FROM {$GLOBALS['CONFIG']['db_prefix']}user ORDER BY last_name";
    $result = mysql_query($query, $GLOBALS['connection']) or die("Error in query: $query. " . mysql_error());
    while($row = mysql_fetch_assoc($result)){
    $userListArray[] = $row;
    }
    return $userListArray;
    }

    The database was created and there was 1 record in the table "user"...

    Can anyone help me? Thanx
installing version 1.2.7 : same problem
Line 413 does not match in my code with the code you listed. Can you verify the error message and line # for me again?
I've found the error on line 413 and fixed it by hardcoding the database table used in that line...

Next error in same php file...

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/xxxxx/public_html/ODM/User_class.php on line 428


424 /*
425 * getAllUsers - Returns an array of all the active users
426 * @returns array
427 */
428 public static function getAllUsers()
{
// query to get a list of available users
$query = "SELECT id, last_name, first_name FROM {$GLOBALS['CONFIG']['db_prefix']}user ORDER BY last_name";
$result = mysql_query($query, $GLOBALS['connection']) or die("Error in query: $query. " . mysql_error());
while($row = mysql_fetch_assoc($result)){
$userListArray[] = $row;
}
return $userListArray;
}
Make sure you have php 5+
My webserver configuration:
  • Apache-versie 2.2.16
    PHP-versie 5.2.14
    MySQL-versie 5.0.96-community[/list:u]
Is there a problem with line 413, or line 428?

This is line 413:
Code:
$llen = mysql_num_rows($result);

This is line 428:
Code:
public static function getAllUsers()

Have you made any changes to that file? Have you tried copying the original file from the zip archive?

What is your database name? What is your db prefix?