-------------------------------- Scalar Installation Instructions -------------------------------- Scalar is a PHP and MySQL application built with CodeIgniter. *** An important note on .htaccess: For Scalar to work properly, it is essential that mod_rewrite -- .htaccess -- be enabled in your Apache config. If .htaccess is not enabled, Scalar's URL rewriting will not operate; you'll know this is the case because clicking on links such as 'sign in' or 'register' will not take you to those pages (rather, the home page will reload). In addition, some FTP clients will interpret .htaccess as a hidden file and not copy them to the server by default. There are a few .htaccess files included in the Scalar build, therefore please make sure that these files are copied. *** *** If PHP's short_open_tag ( Import/Export. Enjoy! ------------------------------------- Setting up a local development server ------------------------------------- DDEV is a helpful resource for setting up and managing a local development environment with Docker containers. Prerequisites: - Docker(https://docs.docker.com/get-docker/) - Git(https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) - DDEV(https://ddev.readthedocs.io/en/stable/users/install/ddev-installation/) From your terminal, clone the Scalar codebase and enter the directory git clone https://github.com/anvc/scalar cd scalar Configure your local development for Scalar ddev config --project-type php --php-version 7.4 --webserver-type apache-fpm --database mysql:5.7 --web-environment="SCALAR_ENCRYPTION_KEY=scalar, SCALAR_DB_HOSTNAME=db,SCALAR_DB_USERNAME=db,SCALAR_DB_PASSWORD=db, SCALAR_DB_DATABASE=db" DDEV will create a new folder titled `.ddev`, where additional configurations can be made. Update PHP's configuration to enable open short tags. mkdir .ddev/php && echo 'short_open_tag = ON;' > .ddev/php/my-php.ini Start the DDEV containers ddev start Import the Scalar SQL database ddev import-db --src=system/application/config/scalar_store.sql Create an admin user echo 'INSERT INTO db.scalar_db_users (email, fullname, password, is_super) VALUES ("admin@scalar.dev", "admin", SHA2("password", 512), 1)' | ddev mysql Launch your browser to access the development server ddev launch ------------------------------------------------------------------------------------------- Updates we've made to incorporated libraries, kept here for reference if they need updating ------------------------------------------------------------------------------------------- CodeIgniter: 1) In system/core/Input.php->_clean_input_keys(), change regex "/^[a-z0-9:_\/-]+$/i" to "/^[a-z0-9:_\/\-~@]+$/i" ARC2 (updated 2021-01-27 from https://github.com/semsol/arc2): 1) ARC2_Resource.php->getProps(): comment out "if (!isset($this->index[$s])) $this->fetchData($s);" 2) ARC2_Store.php->hasHashColumn(): look for 'false' rather than 'null' from fetchRow() to keep the id2val table in check 3) ARC2_StoreLoadQueryHandler.php->getStoredTermID(): replace "if (false !== empty($binaryValue))" with "if (1)" to keep the id2val table in check Template (libraries/Template.php): 1) Added add_meta() and supporting updates to regions arrays rdfQuery (views/arbors/HTML5_RDFa/js/jquery.rdfquery.rules-1.0.js): 1) Replaced "elem.contents().each(function () {" with "elem.contents(':not(iframe)').each(function () {" CKEditor (views/widgets/ckeditor/.../): A few updates to core/htmlparser files, found by searching for 'Updated by Craig Dietrich' Annotorious: 1) Replaced "Add a Comment..." with "Enter annotation title..." (views/widgets/mediaelement/annotorious.debug.js) 2) Replaced the "canvas" selector with "canvas.annotorious-item" and the "canvas.hidden" selector with "canvas.annotorious-item.hidden" (views/widgets/mediaelement/css/annotorious.css) 3) Updated a line in annotorious.debug.js that seems to resolve a touch event problem on Win10 without disrupting touch events on iOS