Git Product home page Git Product logo

archon's Introduction

Archon

Archon is a content management system for archival information.


Quick Installation on Ubuntu for Advanced Users

Advanced users installing Archon on Ubuntu Linux with Apache and MySQL might want to use these instructions:

README.advanced.md


Installation Requirements

To install Archon you must have access to both a web server and a database server (either MySQL or Microsoft SQLServer). Specifically, you need the following in place before running the install packet. If you do not understand any of these requirements, check with your web host or systems administrator.

  1. A standard installation of MySQL (recommended) or Microsoft SQL Server (not recommended). We have tested the application with MySQL 5.0 and SQL Server 7 and 2000, but it should work with later releases of these platforms as well.

  2. A blank database on the database server. When creating the database, create a user with full (owner) privileges. You do not need to specify any table names, data definitions, or the like. They will be created or updated automatically when you run the install packet.

  3. A web server of any type with PHP 5.1 or higher installed. PHP 5.5 or 5.6 is strongly recommended. Depending on which database server you plan to use, the mysql or mssql library must be enabled. In addition, the PEAR/MDB2 libraries must be installed. (see instructions and information ). The gd library must be enabled if you plan to use the Digital Library Manager, and the zip library may be installed to allow zip files to be used by the import utilities, but neither of these are absolutely required.

Note: We do not recommend installing Archon on a Windows (IIS) server. Although it is possible to install it in a Windows environment or another operating system, it was developed and tested on a LAMP (Linux, Apache, MySQL, PHP) server. If you choose to use a Windows server, we strongly advise using Apache or Zend Server over IIS, but please be advised that we are not in a position to offer support or installation assistance.

Server Configuration Recommendations

Archon should work on most preexisting installations of PHP 5.1 or higher, with one of the database servers listed above. If Archon does not install properly or if you are having trouble using any of the features, we recommend the following minimum configuration settings for the php.ini file:

memory_limit=16M         ;(but more is better and will speed the application up)
file_uploads=on

max_execution_time=30    ;(or higher; Archon may attempt to increase the
                         ;execution time for certain scripts but will be
                         ;unable to do if safe mode is on.)

upload_max_filesize= 8M  ;(or a value larger than the largest files you
                         ;intend to upload through the digital library
                         ;manager

post_max_size=8M         ;(or a value greater than max_upload_filesize)

NOTE: A higher memory limit will be needed if you plan to record very, very lengthy finding aids or upload very large digital objects.

If you are having trouble uploading files, we recommend the following configuration for MySQL (in the my.ini or my.cnf file):

max_allowed_packet=8MB   ;(or a value equal to PHP's upload_max_filesize)

For more information regarding installation requirements, or do diagnose installation problems, please visit the Installation/Configuration section of the forum: http://forums.archon.org/viewforum.php?f=4.

Installing/upgrading overview

In order for the installer/upgrader to work correctly, you must provide valid credentials so that Archon's scripts can establish a connection to the MySQL or SQL Server where the data is stored. You must provide an accurate server address, database name, login, and passwords, in the file config.inc.php found in the root of the archon distribution.

Once information has been provided in the config.inc.php file, simply place the entire Archon distribution on a web server. If you open a browser to the base address of our installation, an automated installer will being working, and will guide you through the installation process.

If your attempt to install Archon fails, please check with your local system administrator or your web host, as needed, to ensure that you are supplying the correct connection credentials.

Detailed Installation Instructions

A: Prepare to Install Archon

Download the zip file from the project website. Save the file on a local drive.

Create a new blank database on a MySQL or MSSQL database server. The database can be given any name you like. If you do not have authority to create a database on your database server or web host, contact your systems administrator and request that they create a database.

Create a user/password combination for the blank database with ALL privileges to the database, including SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, and DROP. (Depending on how your database administrator defines ALL, it may be necessary to manually select each of these privileges.) Archon's web scripts will use this account to access the database, and Archon will not function if the user you create for Archon does not have these credentials.

Note the name of the database server, database name, user login, and user password.

B: Place the Archon files on a webserver

Copy or FTP the Archon folder from the zip file to your webserver. Open config.inc.php and provide the connection credentials.

C: Complete the Web-Based Installation Utility

The web-based installation utility includes 12 steps. The installer attempts to connect to the database, creates tables, and completes initial configuration for your installation of Archon.

To begin, simply navigate to the URL for the root of the archon installation, e.g. http://www.example.org/archon/

  1. Click through the welcome screen.

  2. Read and accept the open-source license agreement

  3. Read the information and click "Next" to continue

  4. Test database configuration. If everything is OK, click "Next," otherwise, reconfigure database or correct information supplied in initial (non-web-based) install utility, then run the web-based installation utility again.

  5. Installation utility creates database and table structure. After the structure has been created and the page loads completely into the web browser, scroll to the bottom of the screen and click "next."

  6. Create sa (Super Administrator) and Administrator user login credentials. NOTE: The sa account will allow full administrative access to Archon. Unlike the other passwords, the SA password is not stored in the user table. It is a 'failsafe' password allowing access to the Archon administrative (staff) interface in case the user table is corrupted. All passwords are stored as one-way hashes and cannot be read by humans or decrypted.

  7. Enter repository information. Only the name is required.

  8. Select the packages you wish to install. NOTE: you can install missing packages or uninstall unneeded packages later if desired.

  9. Depending on the options you selected, one or more package installers will run. Follow instructions on each screen carefully.

  10. Select languages for the administrative interface. Two languages are supplied: English and Spanish. If you are interested in translating Archon to another language, please contact us.

  11. The installer will import previously chosen language XML files. NOTE: The language import may take a long time. Do not interrupt the process (you will see a message that says "DONE" this when it is finished).

  12. Installation is complete. Follow the instructions on the screen carefully to finalize the installation. Archon will not run unless these instructions are completed.

D: Finalize the Installation

Delete or rename the file packages/core/install/install.php.

Your installation of Archon is complete! Go to the web address to start using Archon.


Archon Security

ModSecurity is an open-source web application firewall that detects and blocks malicious HTTP activity. You can improve Archon's security by running Archon with ModSecurity.

Please see the following document in this repository for more information:

Using ModSecurity with Archon

archon's People

Contributors

bitdeli-chef avatar bsl avatar chrisprom avatar connordelacruz avatar cvonkleist avatar gjerdery avatar graykr avatar jeffnm avatar jtgorman avatar mark-cooper avatar mindking avatar paulnsorensen avatar robert-andrews avatar smntb avatar wdmartin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

archon's Issues

EAD Archive Export Subject terms issue

We here at ISU have started to use the EAD Archive export regularly. We've found a major problem with the subject terms being incorrect when exporting all. This is happening with both of our installations of Archon. Each XML file in the exported ZIP file has the subject terms of the previous XML file and the correct terms. In other words the zip/xml tree looks like this:

  1. zip:
    • a.xml
      • subject terms
        • term A
        • term B
    • b.xml
      • subject terms
        • term A
        • term B
        • term C
    • c.xml
      • subject terms
        • term A
        • term B
        • term C
        • term D

Steps to reproduce:

  1. Select Export -> EAD Archive
  2. Click Launch
  3. Select any Repository(leave the classification on (Select One)
  4. Click Export

I was able to fix it(with a sledgehammer) via adding this on line 503 in packages/collections/templates/ead/collection.inc.php
$arrEADSubjects = null;

So that section would read like this:
`

  <?php
           if (!empty($objCollection->Subjects)) {
              $arrEADSubjects = null;
              foreach ($objCollection->Subjects as $objSubject) {
                 $arrTraversal = $_ARCHON->traverseSubject($objSubject->ID);
                 $objParent = reset($arrTraversal);

                 $arrEADSubjects[$objParent->SubjectType->ID][$objSubject->ID] = $objSubject->toString(LINK_NONE, true, ' -- ');
              }
           }

`
I'm not sure what other repercussions this fix will introduce though as I haven't done any testing other than the EAD export.

Confirmation window problems

We here at Illinois State have clone off our production Archon installations for testing the new code and have run into an issue with confirmation pop up winodows. They come up blank in Chrome or don't come up at all in Firefox and Internet Explorer. I'm not sure why yet. This is installed on RHEL7 running Apache 2.4.6 and php 5.6.30

http://my.ilstu.edu/~tpwals1/Archon.png

Has anyone else run into this?
-Tim Walsh.

Slow query makes collection detailed list view hang

I ran into this troubleshooting an Archon instance --

While accessing the detailed view of a collection, the app became completely unresponsive, with MySQL taking 100% of the CPU. A restart of the mysqld service was necessary to get the site functioning again.

The route that caused the database hang looked like this: archon-instance.com/index.php?p=collections/findingaid&id=249&q=video

I turned on the MySQL slow query log, and the following query showed up in the log, taking around 20 seconds per run. It seems to run forever:

SELECT ID,CollectionContentID FROM tblDigitalLibrary_DigitalContent WHERE CollectionContentID IN (SELECT CollectionContentID FROM tblDigitalLibrary_DigitalContent WHERE CollectionID = 249 AND CollectionContentID IN (1435) AND Browsable = 1 GROUP BY CollectionContentID HAVING COUNT(1) = 1);

Googling the query, I found this old thread on a discussion forum: http://forums.archon.org/viewtopic.php?f=5&t=960&start=15

Near the bottom of the thread, there was a patch suggested by user gordieschmitt for /packages/collections/lib/collection.inc.php:634, replacing:

$query = "SELECT ID,CollectionContentID FROM tblDigitalLibrary_DigitalContent WHERE CollectionContentID IN (SELECT CollectionContentID FROM tblDigitalLibrary_DigitalContent WHERE CollectionID = $this->ID AND CollectionContentID IN (" . implode(",", $contentKeys) . ") $browsable GROUP BY CollectionContentID HAVING COUNT(1) = 1)";

with

$query = "SELECT dd.ID,dd.CollectionContentID FROM tblDigitalLibrary_DigitalContent dd, (SELECT CollectionContentID FROM tblDigitalLibrary_DigitalContent WHERE CollectionID = $this->ID AND CollectionContentID IN (" . implode(",", $contentKeys) . ") $browsable GROUP BY CollectionContentID HAVING COUNT(1) = 1) a where dd.CollectionContentID = a.CollectionContentID";

I tried this patch, and it seems to resolve the issue in this case. This patch might be a good candidate for a future version.

XSS Vulnerability

Archon substitutes unescaped query strings into HTML at various places, making it vulnerable to cross-site scripting attacks. We found out through https://www.openbugbounty.org/incidents/202333/, which, if hope to have fixed the following, though a fgrep '\"$' -r * --include \*.php suggests there may be more cases.

--- packages/core/pub/contact.php       2017-02-23 18:00:19.289374542 +0100
+++ packages/core/pub/contact.php.orig  2014-01-17 21:24:06.000000000 +0100
@@ -67,7 +67,7 @@
 
     $in_referer = $_REQUEST['referer'] ? $_REQUEST['referer'] : urlencode($_REQUEST['HTTP_REFERER']);
 
-    $repositoryid = $_REQUEST['repositoryid'] ? int($_REQUEST['repositoryid']) : 0;
+    $repositoryid = $_REQUEST['repositoryid'] ? $_REQUEST['repositoryid'] : 0;
 
 
 
@@ -111,8 +111,8 @@
 
        $form = "<input type=\"hidden\" name=\"f\" value=\"sendemail\" />\n";
        $form .= "<input type=\"hidden\" name=\"p\" value=\"core/contact\" />\n";
-       $form .= "<input type=\"hidden\" name=\"referer\" value=\"".htmlspecialchars($in_referer)."\" />\n";
-       $form .= "<input type=\"hidden\" name=\"query_string\" value=\"".htmlspecialchars($query_string)."\" />\n";
+       $form .= "<input type=\"hidden\" name=\"referer\" value=\"$in_referer\" />\n";
+       $form .= "<input type=\"hidden\" name=\"query_string\" value=\"$query_string\" />\n";
        $form .= "<input type=\"hidden\" name=\"RepositoryID\" value=\"$repositoryid\" />\n";
 
        $strRequiredMarker = "<span style=\"color:red\">*</span>";

PHP 7.2 compatibility

Now that PHP5.6 and prior is deprecated, has anyone done any work to upgrade the code to be PHP7 compatible? I've done just the barest testing and see that 3.21 doesn't work on PHP 7.1.22. As we have no plans to upgrade to archivespace or any other package right now I'll need to update the code, but would like to coordinate this work if anyone else is doing the same.

-Tim Walsh
Illinois State University.

finding aid cache containing multiple entries for public view

It appears that when creating cache entries for the public finding aids multiple entries for a collection and rootcontent id can be created, but only one is used. This is on an Archon instance using Microsoft SQL Server.

You can verify by finding a large collection that doesn't properly load...then compare the speeds of...

query to get public that was causing issues

SELECT  Dirty,FindingAidText 
FROM webuser.tblCollections_FindingAidCache 
WHERE CollectionID = <collection_id> AND TemplateSet = <template_name>  AND ReadPermissions = 0 AND RootContentID = 0

query to get staff view that loads fine

SELECT  Dirty,FindingAidText 
FROM webuser.tblCollections_FindingAidCache 
WHERE CollectionID = <collection_id> AND TemplateSet = <template_name> AND ReadPermissions = 1 AND RootContentID = 0

First query was returning something like 19 results and taking the first one.

There's a soon-to-be coming pull request that fixes the symptom of this issue by doing a 'TOP 1' w/ an ordering by id descending, but there's an underlying issue that's causing more data than necessary to be stored.

Guessing the issues is with the write part of the findingaidcache.php file.

Discovered with troubleshooting w/ @leonelramirez and @graykr.

collections/eadlist returns 500

Admin setting is enabled but a visit to ?p=collections/eadlist returns

domain... is currently unable to handle this request.
HTTP ERROR 500

in chrome.

doesn't seem to matter if using my customized or default theme. We do have a handful of monkey patches /pub directory so hard for me to say if this is me, or a wider problem. Looking to see if anyone else can reproduce. On 3.21 rev3

MySQL 5.7 compatibility issue

After updating our mySQL server to version 5.7, we noticed that searches within the public Archon interface took a long time to complete. Most searches took around 6 minutes to complete, when the same search on an older version of mySQL was almost instantaneous.

Research led me to suspect the slowness was caused by how 5.7 now handles derived tables, and I was able to isolate a query in /packages/collections/lib/core/archon.inc.php as the one responsible for the slow-down. Slightly different versions of this query appear 4 times in this file (lines 1848, 2225, 2601, 3005).

A fix that worked for me was including the DISTINCT command with the internal SELECT for each query. E.G. at line 2225, I replaced:
$query = "SELECT tblCollections_Content.*, tblCollections_Collections.ClassificationID as ClassificationID FROM tblCollections_Content JOIN tblCollections_Collections ON tblCollections_Collections.ID = tblCollections_Content.CollectionID JOIN tblCollections_LevelContainers ON tblCollections_LevelContainers.ID = tblCollections_Content.LevelContainerID LEFT JOIN (SELECT ContentID FROM tblCollections_UserFields WHERE $userfieldquery) AS tblCollections_UserFields ON tblCollections_UserFields.ContentID = tblCollections_Content.ID WHERE ($textquery OR NOT (tblCollections_UserFields.ContentID IS NULL)) $subquery $enabledquery ORDER BY tblCollections_Content.SortOrder";

with:
$query = "SELECT tblCollections_Content.*, tblCollections_Collections.ClassificationID as ClassificationID FROM tblCollections_Content JOIN tblCollections_Collections ON tblCollections_Collections.ID = tblCollections_Content.CollectionID JOIN tblCollections_LevelContainers ON tblCollections_LevelContainers.ID = tblCollections_Content.LevelContainerID LEFT JOIN (SELECT DISTINCT ContentID FROM tblCollections_UserFields WHERE $userfieldquery) AS tblCollections_UserFields ON tblCollections_UserFields.ContentID = tblCollections_Content.ID WHERE ($textquery OR NOT (tblCollections_UserFields.ContentID IS NULL)) $subquery $enabledquery ORDER BY tblCollections_Content.SortOrder";

This has resolved my search speed issues, and I haven't discovered any knock-on consequences.

I have NOT been able to test backward compatibility with older versions of mySQL, and so haven't submitted it as a pull request yet.

Does it work on PHP 5.6?

I'm trying to move a working installation of Archon 3.21 rev. 1 to a new server. It's not working, and I'm wondering if it's due to the new server running PHP 5.6? Does Archon work with PHP 5.6?

Thanks,
Glenn

Adding french to archon

I'm trying to add french to the project , as I am new to programming can someone guide me to the right steps

PHP Fatal error upon EAD import attempt

Hello,

I came across the following error when attempting to upload an EAD file into an Archon test server. When I attempted to upload the file, the admin interface stuck at "Parsing file php..."

Screen Shot 2020-09-14 at 10 15 11 AM

Upon further inspection of the error.log file, I came across the following entry.

PHP Fatal error:  Call to undefined function mb_detect_encoding() in /var/www/archon/htdocs/packages/collections/db/import-ead.inc.php on line 67, referer: http://<ip-address-here>/index.php?p=admin/core/database

I checked the import-ead.inc.php file, and I could in fact find no instance of the mb_detect_encoding function defined elsewhere within the file. I also performed a grep -R for mb_detect_encoding on the /var/www/archon/htdocs directory, and the only line that came back from this search is the previously-mentioned line import-ead.inc.php. The context for this function call is as follows:

foreach ($arrFiles as $Filename => $strXML)
      {
         echo("<br/><br/>\n");

         echo("Parsing file $Filename...<br/>\n");

         $currEncoding = mb_detect_encoding($strXML, 'UTF-8, ISO-8859-1');
         if ($currEncoding != 'UTF-8')
         {
            echo("File encoded in $currEncoding. Converting to UTF-8...<br/>\n");
            $strXML = encoding_convert_encoding($strXML, 'UTF-8', $currEncoding);

Below are my current version details:

Server: Ubuntu 16.04 LTS (minimal image from Canonical on AWS Marketplace)
Apache Version: Apache/2.4.18
MySQL Version: Ver 14.14 Distrib 5.7.31, for Linux (x86_64)
PHP Version: PHP 5.6.40-30

Archon Version: 3.21-rev. 3

Has anyone else experienced this issue and/or produced a local fix for this problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.