Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: w4tch3r on March 01, 2005, 04:37:50 PM
-
Hi,
Just wondering if anyone has tried this (http://www.infocentral.org/) and got it working. I have followed the instructions at http://kwtconsulting.com/infocentral/infocentral-howto.htm, but I am gettng php errors on the login page. Just wondering if there is a more recent newbie guide,
thanks,
w4tch3r
-
can you post the php errors. maybe someone can help in getting those resolved.
-
ok sure, thanks for the reply. Ok here it is (sorry for the long post).
If I try to go to: http://smeserver/infocentral
then I get:
-----------------------------------------------------------------------------------
InfoCentral will not operate with PHP's register_globals option turned on.
"; echo "This is for your own protection as the use of this setting could entirely undermine
"; echo "all security. You need to either turn off register_globals in your php.ini or else
"; echo "configure your web server to turn off register_globals for the InfoCentral directory."; exit; } // Include the function library require
"Include/Config.php"; $bSuppressSessionTests = true; require "Include/Functions.php"; // Get the UserID out of the form results if
(isset($_POST["User"])) { $iUserID = FilterInput($_POST["User"],'int'); } else { $iUserID = 0; } // Is the user requesting to logoff or timed out?
if (isset($_GET["Logoff"]) || isset($_GET['timeout'])) { $_COOKIE = array(); $_SESSION = array(); session_destroy(); } // Initialize the variables
$sErrorText = ""; // Has the form been submitted? if ($iUserID > 0) { // Get the information for the selected user $sSQL = "SELECT * FROM user_usr
INNER JOIN person_per ON usr_per_ID = per_ID WHERE usr_per_ID = " . $iUserID; $rsQueryResult = RunQuery($sSQL);
extract(mysql_fetch_array($rsQueryResult)); // Block the login if a maximum login failure count has been reached if ($iMaxFailedLogins > 0 &&
$usr_FailedLogins >= $iMaxFailedLogins) { $sErrorText = "
" . gettext("Too many failed logins: your account has been locked. Please contact an administrator."); } // Does the password match? elseif
($usr_Password != md5(strtolower($_POST["Password"]))) { // Increment the FailedLogins $sSQL = "UPDATE user_usr SET usr_FailedLogins =
usr_FailedLogins + 1 WHERE usr_per_ID = " . $iUserID; RunQuery($sSQL); // Set the error text $sErrorText = " " . gettext("Invalid password"); }
else { // Set the LastLogin and Increment the LoginCount $sSQL = "UPDATE user_usr SET usr_LastLogin = '" . date("Y-m-d H:i:s") . "',
usr_LoginCount = usr_LoginCount + 1, usr_FailedLogins = 0 WHERE usr_per_ID = " . $iUserID; RunQuery($sSQL); // Set the UserID $_SESSION['iUserID']
= $usr_per_ID; // Set the Actual Name for use in the sidebar $_SESSION['UserFirstName'] = $per_FirstName; // Set the Actual Name for use in the
sidebar $_SESSION['UserLastName'] = $per_LastName; // Set the pagination Search Limit $_SESSION['SearchLimit'] = $usr_SearchLimit; // If user has
administrator privilege, override other settings and enable all permissions. if ($usr_Admin) { $_SESSION['bAddRecords'] = true;
$_SESSION['bEditRecords'] = true; $_SESSION['bDeleteRecords'] = true; $_SESSION['bMenuOptions'] = true; $_SESSION['bManageGroups'] = true;
$_SESSION['bFinance'] = true; $_SESSION['bNotes'] = true; $_SESSION['bCommunication'] = true; $_SESSION['bAdmin'] = true; } // Otherwise, set the
individual permissions. else { // Set the Add permission $_SESSION['bAddRecords'] = $usr_AddRecords; // Set the Edit permission
$_SESSION['bEditRecords'] = $usr_EditRecords; // Set the Delete permission $_SESSION['bDeleteRecords'] = $usr_DeleteRecords; // Set the Menu
Option permission $_SESSION['bMenuOptions'] = $usr_MenuOptions; // Set the ManageGroups permission $_SESSION['bManageGroups'] = $usr_ManageGroups;
// Set the Donations and Finance permission $_SESSION['bFinance'] = $usr_Finance; // Set the Notes permission $_SESSION['bNotes'] = $usr_Notes; //
Set the Communications permission $_SESSION['bCommunication'] = $usr_Communication; // Set the Admin permission $_SESSION['bAdmin'] = false; } //
Set the FailedLogins $_SESSION['iFailedLogins'] = $usr_FailedLogins; // Set the LoginCount $_SESSION['iLoginCount'] = $usr_LoginCount; // Set the
Last Login $_SESSION['dLastLogin'] = ConvertMySQLDate($usr_LastLogin); // Set the Workspace Width $_SESSION['iWorkspaceWidth'] =
$usr_WorkspaceWidth; // Set the Base Font Size $_SESSION['iBaseFontSize'] = $usr_BaseFontSize; // Set the Style Sheet $_SESSION['sStyle'] =
$usr_Style; // Create the Cart $_SESSION['aPeopleCart'] = array(); // Create the variable for the Global Message $_SESSION['sGlobalMessage'] = "";
// Set whether or not we need a password change $_SESSION['bNeedPasswordChange'] = $usr_NeedPasswordChange; // Initialize the last operation time
$_SESSION['tLastOperation'] = time(); $aHTTPports = explode(',', $aHTTPports); $aHTTPSports = explode(',', $aHTTPSports); if
(in_array($_SERVER['SERVER_PORT'],$aHTTPports)) { $_SESSION['bSecureServer'] = false; } elseif (in_array($_SERVER['SERVER_PORT'],$aHTTPSports)) {
$_SESSION['bSecureServer'] = true; } else { echo "Invalid server port number. Check Config.php"; exit; } $_SESSION['iServerPort'] =
$_SERVER['SERVER_PORT']; // If PHP's magic quotes setting is turned off, we want to use a workaround to ensure security.
$_SESSION['bHasMagicQuotes'] = get_magic_quotes_gpc(); // Redirect to the Menu Redirect("Menu.php"); } } // Get all the users in the system $sSQL
= "SELECT per_FirstName, per_LastName, per_Title, per_Suffix, per_MiddleName, user_usr.* FROM user_usr, person_per WHERE per_ID = usr_per_ID ORDER
BY per_LastName"; $rsUsers = RunQuery($sSQL); // Set the page title and include HTML header ?>
Your previous session timed out. Please login again.
[_______________________________________________________________________________________________________________________________________________________
.....................................................................................................................................]
__________
<?php>
-----------------------------------------------------------------------------------
NB register_globals is definitely off. That was my first problem, for which I followed the recommendations in the Infocentral forum.
And when I go diretly to: http://smeserver/infocentral/Default.php
then I get:
-----------------------------------------------------------------------------------
Cannot execute query.
SELECT per_FirstName, per_LastName, per_Title, per_Suffix, per_MiddleName, user_usr.* FROM user_usr, person_per WHERE per_ID = usr_per_ID ORDER BY
per_LastName
Access denied for user: 'www@localhost' (Using password: NO)
-----------------------------------------------------------------------------------
I am using SME Server 6.5 RC1, fresh install with no mods and 2 users. And also using InfoCentral-1.2.6.tar.gz
thanks again,
w4tch3r
-
This bit here:
Access denied for user: 'www@localhost' (Using password: NO)
tells me it is a mysql problem.
does the user www exist on your mysql?
if not create it in mysql
I would also recommend changing your root mysql password. alot safer
let me know
-
thanks for prompt reply!
I added www user. Now http://smeserver/infocentral still gives me the same long page, but http://smeserver/infocentral/Default.php just says:
----------
Cannot execute query.
SELECT per_FirstName, per_LastName, per_Title, per_Suffix, per_MiddleName, user_usr.* FROM user_usr, person_per WHERE per_ID = usr_per_ID ORDER BY
per_LastName
----------
w4tch3r
-
the user you created: does it have access to the db? and from where, ie localhost, %, ip addr, hostname
-
I created the mysql user with:
GRANT ALL PRIVILEGES ON *.* TO 'www'@'localhost';
notwithstanding security issues (which I address when its working), should that be enough to get it working?
and I am testing on localhost in a root shell account with:
lynx http://smeserver/infocentral/Default.php
-
just an idea
can you log in to mysql and run the qurey?
SELECT per_FirstName, per_LastName, per_Title, per_Suffix, per_MiddleName, user_usr.* FROM user_usr, person_per WHERE per_ID = usr_per_ID ORDER BY
per_LastName
-
good idea. ok I got this:
mysql> use infocentral
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> SELECT per_FirstName, per_LastName, per_Title, per_Suffix, per_MiddleName, user_usr.* FROM user_usr, person_per WHERE per_ID = usr_per_ID ORDER BY
-> per_LastName;
+---------------+--------------+-----------+------------+----------------+------------+----------------------------------+------------------------+--------+
| per_FirstName | per_LastName | per_Title | per_Suffix | per_MiddleName | usr_per_ID | usr_Password | usr_NeedPasswordChange | usr_Las|
+---------------+--------------+-----------+------------+----------------+------------+----------------------------------+------------------------+--------+
| InfoCentral | Admin | NULL | NULL | NULL | 1 | c0937163b677904e6df31a77c7c12fda | 1 | 0000-00|
+---------------+--------------+-----------+------------+----------------+------------+----------------------------------+------------------------+--------+
1 row in set (0.02 sec)
mysql> quit
-
I see a lot of Too many failed logins: your account has been locked. Please contact an administrator in the second post. Maybe the password need changing?
I might be touching at straws here as I have never used or even looked at info central. Hope these posts help.
-
Many thanks for your continued suggestions. I can report back this morning that I made lots of progress last night. Its pretty much working now but I still have not got the original /infocentral page working (but its working fully using /infocentral/Default.php), and I still need to consider security. What I have done so far is:
- started with a fresh SME Server 6.5 RC1
- updated PHP (followed SME Contrib)
- installed PHP Accelerator (followed SME Contrib)
- updated MySql (followed SME Contrib)
- installed infocentral (followed SME Contrib)
- I also added heaps of permissions to the database (like 'www', 'root', 'www@local', 'root@local' etc)
- needed to do chmod 744 -R * on the whole of the /opt/info directory.
Not sure if the last one needs to stay, maybe I can put them back to how they were and change the group memership to www.
Anyway that is enough now to at least show the system to the church committee to whom I have suggested its use. I also use a ddns account to redirect it to my place so they can get a feel of how it will look if they book a domain.
Thanks again
w4tch3r
-
as a complete aside, prob not for this forum, but hey it is a community
where u from?
what church?
I am from the uk
go to charismatic church in berkshire
-
I am from the Greek Orthodox Church in Brisbane Australia. I don't believe they have any website yet!
-
Hi W4tch3r...I don't know if you have had a look at
https://sourceforge.net/projects/churchinfo/
however, it is a 'mod' of infocentral that you maybe interested in since you appear to be setting it up for church use. I set a couple of them up last year with no major conifig issues.
-
Hi Paul_sc,
Thanks for that! I will definitely try it out. May I ask you a few questions?
Which verison of SME Server have you installed it on?
Have you tried it with any recent releases 6.x?
Have you found it to be stable?
Why does churchinfo exist? From the webpage, it would appear to add features only, not remove any. Why are the features just added to the infocentral project?
Any idea which of the 2 projects is most active (has the most developers/still having features added etc)?
Do you ever update the program? If so, then how do you manage updates? do you follow the infocentral releases or the churchinfo releases? and lastly,
Any other comments comparing the two?
thanks,
w4tch3r
-
Wow..that was odd..>i replied the other day and now it is gone :-?
<Which verison of SME Server have you installed it on?
stock and update script 6.0.1-1
<Have you tried it with any recent releases 6.x?>
will be trying with 6.5rc w/i next week but expect no problems as it is a standard mysql/php script
<Have you found it to be stable?
As stable as a linux/mysql/php/apache solution can be. Which is very stable.
<Why does churchinfo exist? From the webpage, it would appear to add features only, not remove any. Why are the features just added to the infocentral project?>
Other than what Mike, the project leader, has posted...i would have to assume because info central as ceased development of php and moving to a new framework, although it does not look like it has had much activity since mid last year.
"development has basicly ceased because the existing PHP code is not worth overhauling."
InfoCentral was formerly a PHP-based project. We are now in the process of switching to Java, employing the lightweight J2EE framework, Spring, and the persistence layer, Hibernate.
https://www.openserve.org/board/viewtopic.php?t=516
<Any idea which of the 2 projects is most active (has the most developers/still having features added etc)? >
from the looks churchinfo has had a release about monthly since mid last year
<Do you ever update the program? If so, then how do you manage updates? do you follow the infocentral releases or the churchinfo releases? >
yes. Just replace the .php files in the server direcotry...nothing else. Infocentral has had no releases that I know of since mid last year so, i just keep track of churchinfo.
-
ok good. Thank-you very much for taking the time to give a detailed reply. Installing churchinfo next...
-
I am the autor of the original How-To, I had almost forgotten it existed. Churchinfo looks good, I will play with it when I get a chance. If I can be of any help feel free to PM or email me
--
Kevin