Table of Contents
Hi there. So, big disclaimer, I'm not tech literate at all. I barely know how to open Windows Command Prompt and download stuff off Github. Installing CollectiveAccess (CA) is daunting as hell, but here we are. Somehow with the power of the internet I managed to get it running locally.
If you are an unfortunate soul like me who is trying to install CA on a Windows laptop and have no idea what the heck they're doing, well, hopefully this guide will be helpful! Before you proceed, the first thing you should do is download Providence and Pawtucket from the official CollectiveAccess page, and open up the documentation. Give a cursory glance through the System Requirements and Installation section — we will be working through them in this guide. IMPORTANT: This guide is meant to be read in conjunction with the official documentation.
CA is developed for Linux and is notoriously finicky for Windows, so brace yourself.
I'm planning on using CollectiveAccess for a personal project, so I'll probably make some follow-up posts like adding more extensions/plugins and getting Pawtucket set up once I figure that out. Eventually this might end up getting its own dedicated page.
Official CollectiveAccess Documentation: System Requirements.
// Installing Apache
Follow this YouTube tutorial.
- Install the latest version of Visual C++ Redistributable for Visual Studio 2017-2026 and download the Apache binaries from Apache Lounge.
- Unzip and move the folder named "Apache24" into the C: drive so that the folder path should be
C:\Apache24. - Go to Windows start menu by pressing the Win key, open Command Prompt (cmd) and run as administrator.
Enter
cd C:\Apache24\bin- this will change the directory to the "bin" folder. - To instal Apache, enter
httpd.exe -k install. - Windows Start → Services → find Apache24 and hit Start the service. Alternatively, open
Services
by entering
services.mscinto the cmd. - Open your browser and go to
127.0.0.1. If it works, you should see a webpage that says "It works!".
// Installing MySQL
Follow this YouTube tutorial.
- Go to MySQL Community Downloads Windows Installer and download the second installer (the one that has a bigger file size).
- Double click the .msi file. Choose Custom setup. Navigate the drop downs and select these to be
installed:
MySQL Server 8.0.46 - X64,MySQL Workbench 8.0.47,X64, MySQL Shell 8.0.46 - X64by clicking on it and moving it to the right using the green arrow. Click Next then Execute. - Click Next and don't change anything until you get to Apply Configuration and click Execute. Do set your password at the Accounts and Roles page.
- Select Start the Workbench and Shell after setup then Finish, make sure that both actually opens.
- Locate this path in File Explorer:
C:\Program Files\MySQL\MySQL Server 8.0\bin. Start → Edit the system environment variables → Environment Variables → System Variables → double click Path → Click New and paste the path, then OK. - In cmd, enter
mysql --versionto verify that it's installed. Entermysql -u root -pto run MySQL.
// Installing PHP
PHP
Follow this YouTube Tutorial.
- Go to PHP Downloads, select version 8.3, and under Current Stable click Windows downloads. Under VS17 x64 Thread Safe, select Zip.
- Extract the folder, rename it to
php-8.3.32(or whatever version you have) and move it to C: drive. NOTE: this is the PHP folder I will be referencing from now on. Whatever it is that you named your folder to be, you should replace all code containing php-8.3.32 with that. - Copy the folder address
C:\php-8.3.32. Start → Edit the system environment variables → Environment Variables → System Variables → double click Path → Click New and paste the path, then OK. - To verify installation, open cmd and enter
php --version.
PHP packages containing extensions
Official Documentation can be found here.
For windows, the extensions are .dll files located in the ext folder at
C:\php-8.3.32\ext.
- The three required PHP packages that did not come installed with the PHP installation are:
php-cli,php-xml, andphp-bcmath - I'm pretty sure php-cli is this one but it's for Linux so IDK what to do for windows.
- Somehow
php-xmlandphp-bcmathcame with my installation because when I dophp -min cmd, they're there. - The two recommended extensions,
php-processandphp-posix, don't seem to be available for Windows.
// Media Processing Software
Composer
Official documentation here. Follow this YouTube tutorial.
- Download and run
Composer-Setup.exe. Install for all users. - No need to change anything, just Click Next until you get to Finish.
- To verify installation is successful, open cmd and enter
composer.
Git
Official documentation here.
- Download Git from here and run it.
- Follow the set up wizard to finish installation but you don't have to change anything. I personally use VS Code so I chose that as the default editor. I went with MinTTY (which is the default) instead cmd because supposed it has a better user experience but I don't think it really matters which one you pick.
Official Collective Access Documentation: Installation.
I find that
the official guide is written pretty clearly for the most part, so I'd say just try your best to follow it.
Below are some notes for parts that may be
confusing.
// Configuring PHP
- Open
C:\php-8.3.32. Renamephp.ini-developmenttophp.ini. This is the file that you will be editing. - Open
php.iniand follow the official guide to make changes as needed. Forupload_max_filesize, the default is 2M meaning 2 Megabytes. Per php.net, the available options are K (for Kilobytes), M (for Megabytes) and G (for Gigabytes), and are all case-insensitive. - In
php.ini, find;extension_dir = "ext"and replace withextension_dir = "C:\php-8.3.32\ext". - Remember that long list of PHP packages with extensions found under System
Requirements? Now find them in
php.iniand remove the semicolons in the front to activate them.
// Installing Providence
- For step 1 setting up an empty MySQL database, use the MySQL Workbench.
- In MySQL Workbench, open the local instance. From the top, click
Create a new schema in the connected server. Give the schema a name; I choseprovidence_database. - You can skip all the login information stuff since that was already done when installing Apache.
- The Apache local server
index.htmlcan be found here:C:\Apache24\htdocs. (To see it running in your browser, type127.0.0.1into the browser address bar.) Inside the folder, move the both the unzipped Providence and Pawtucket folders there. I renamed them toprovidenceandpawtucket, respectively.
- In MySQL Workbench, open the local instance. From the top, click
- You can skip step 2.
- Before doing step 3, make sure Apache is linked with PHP. Open
C:\Apache24\conf\httpd.conf. (See Stack Overflow Reference.) - Under the servername
section, put
ServerName localhost. ChangeDirectoryIndex index.htmltoDirectoryIndex index.php index.html. - At the very end of the file, add these each as its own line:
LoadModule php_module "C:/php-8.3.32/php8apache2_4.dll",<IfModule php_module>,AddHandler application/x-httpd-php .php,AddType application/x-httpd-php .php .html,PHPIniDir "C:/php-8.3.32",</IfModule> - For step 3, open the
providencefolder, which should be located atC:\Apache24\htdocs\providence.- Inside the folder, find
setup.php-distand rename it tosetup.php. - Then, open
setup.phpin Notepad (or VS Code or whatever program of your choosing) and make changes as needed. Be sure to changemy_database_user → root,my_database_password → Your_MySQL_Password_Here,name_of_my_database → providence_database, and add your admin email too. - At the end of all the
__CA_DB_stuff, add this:define('__CA_URL_ROOT__', '/providence');, because all the providence files are located inside the providence folder, which is inside theC:\Apache24\htdocsroot folder.
- Inside the folder, find
- You can skip step 4 because that's a Linux thing I think. Don't worry about it for Windows.
- For step 5, make sure that Apache is running by going into the cmd, enter
services.msc, and click on Apache and Start the service. In your browser, go tohttp://localhost/providence/install/. If luck is on your side it should just work. I recommended restarting Apache after you make changes to multiple files. - Soooo unfortunately the first time I tried to go to
http://localhost/providence/install/I got this error:
Fatal error: Uncaught RuntimeException: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.4.0". You are running 8.3.32.
- I think this is because the latest version of CollectiveAccess 2.0.11 somehow forces you to use PHP 8.4, even though the official documentation said it's not fully validated yet and imply that 8.2 and 8.3 should be compatible as well.
- A workaround is to open
C:\Apache24\htdocs\providence\vendor\composer\platform_check.phpand addreturn;right under<?php, forcing it to run. Not the best practice but it works... - Anyways that fixes it. For installation profile, I went with PastPerfect 5.0 because it's the only one I've heard of lol. Make sure you do research on which profile you want, because once you installed it, there is no way to change it.
- To access CollectiveAccess, you have to first start running Apache, which can be accessed by entering
services.mscinto cmd. Then, in your browser, go tohttp://localhost/providence/index.php. You can bookmark this link for easier access. - NOTE: All this is to get Providence working, which is the back-end of CollectiveAccess. The front-end, Pawtucket, is its own separate thing.
// Troubleshooting Providence
So, ideally, after all that trouble, Providence should be working just fine. Unfortunately that wasn't the case for me. The issue I encountered was that when I create a new object and try to upload a media representation, the image never gets processed. When I try to upload an image, it shows that the image is uploaded, but there's no thumbnail preview. And when I click save, it just turns blank, as if the image was never uploaded. From what I gathered from the CA forum, it seems like this might be a Windows issue. (Remember, CA isn't developed for Windows.) I haven't been able to figure out how to fix the issue, but I did find a workaround.
The Issue
- So, when I try to upload an image, a copy is successfully created in
C:\Apache24\htdocs\providence\uploads\~admin. Note that the last folder,~admin, is based on your username. I changed my username from the defaultadministratortoadmin; so if your username isblue, the folder should be called~blue. - When I click save, what should've happened was that a copy* of the image should've been created in
C:\Apache24\htdocs\providence\media\collectiveaccess\imagesas well. Instead, nothing happens. That folder remains blank. (* Note that when I say copy, it's not really an accurate description. Whatever image processor you're using should've made copies of the image and chopped it up into a bunch of different ones for the zoomable viewer built into CA.) - Some relevant files to investigate include:
setup.php,media_processing.conf,php.ini, andapp.config. - Again, I haven't figured out how to fix this. Someone take on the mantle from me PLEASE.
The Workaround
Thankfully, there's a pretty convenient workaround.
- Open up
C:\Apache24\htdocs\providence\uploads. Inside the folder titled~admin, copy and paste the images you want to upload there. (Again, the folder name depends on your username; mine isadmin.) - Inside CollectiveAccess, when you go to
IMPORT→Media, you should see the images listed underDirectory to import. Select the images you want to upload, and voilĂ , it works!
NOTE: You should finish installing CollectiveAccess BEFORE PROCEEDING WITH THE FOLLOWING STEPS. The PHP set ups will only make sense once you've completed the Install Providence section.
// GraphicsMagick - I COULDN'T GET THIS TO WORK THIS IS AS FAR AS I GOT
Official documentation here.
- Get GraphicsMagick here. Go into
graphicsmagick-binariesand download the newest release. I went withGraphicsMagick-1.3.46-Q16-win64-dll.exe. Run the installer; you don't need to change any of the default settings. - To verify successful installation, open cmd and enter
gm. You can also try enteringgm convert logo.jpg win:, which should display the GraphicsMagick logo in a window. - Now to install
php-gmagick, as far as I know the only way to get it is from PECL. It would seem like the latest Windows version is version 1.1.6RC1 from 2013. I went with5.6 Thread Safe (TS) x64so let's just hope and pray that it works. - Unzip the folder and copy
php_gmagick.dllinto theC:\php-8.3.32\extfolder. - Locate wherever you installed GMagick and copy the path. For me, it's located at:
C:\Program Files\GraphicsMagick-1.3.46-Q16. Go to Start → Edit the system environment variables → Environment Variables → System Variables → double click Path → Click New and paste the path, then OK. - Open
C:\Apache24\htdocs\providence\app\conf\external_applications.conf. Find and replacegraphicsmagick_app = [/usr/bin/gm, /usr/local/bin/gm]withgraphicsmagick_app = C:/Program Files/GraphicsMagick-1.3.46-Q16/gm.exe. (Reference.) - Open
C:\Apache24\htdocs\providence\app\helpers\mediaPluginHelpers.php. In any function pertaining to GraphicsMagick, change/dev/nullto/$null. - Open up
php.iniin the PHP folder and add this:extension=gmagick. In the file you'll find a big section ofextension=, I added it there. - Yeahhhh so I couldn't get this to work. My theory is that the windows php package is just way too old.
// ImageMagick - Works but Slower than GD
Tips:
- Without any additional extensions or plugins, CollectiveAccess should still be able to process still images with the native libGD plugin. It's just really slow.
- In
"C:\Apache24\htdocs\providence\app\conf\app.conf", you can changedont_use_imagick = 0to be equal to1to force CollectiveAccess to stop using imagick. This is a good way to troubleshoot and make sure that the media-processing-process itself is working fine. - You can see the status of your plugins by going
MANAGE→Administration→CONFIGURATION CHECK.
How to Imagick
- There are two components: ImageMagick and its PHP plugin Imagick. Get ImageMagick here
and the PHP package here.
Since I have PHP 8.3.32 built with Visual C++ 2019 Thread Safe x64, I went with
ImageMagick-7.1.2-27-Q16-HDRI-x64-dll.exeandphp_imagick-3.8.1-8.3-ts-vs16-x64. - Run the ImageMagick installer. After installation, locate where it was downloaded at (probably
C:\Program Files) and move folder to C: drive. Rename the folder toImageMagick. The final file path should beC:/ImageMagick. - Go to
C:/ImageMagick/module. Inside, you should see two more folders:codersandfilters. Move ALL contents ofcodersandfiltersinto the mainC:/ImageMagickfolder. Themodulesfolder should now be empty and you can delete it. - Go to Start
→ Edit the system environment variables → Environment Variables → System Variables →
New → set variable name to
MAGICK_CODER_MODULE_PATHand value toC:\ImageMagick. (See this for reference.) Under System Variables, open Path → New → enter the same pathC:\ImageMagick. - Open
C:\Apache24\htdocs\providence\app\conf\external_applications.conf. Find and replaceimagemagick_path = [/usr/bin, /usr/local/bin, /opt/homebrew/bin]withimagemagick_path = C:/ImageMagick. (See this for reference.) - Unzip and open the PHP package. Find
php_imagick.dlland copy it into theC:\php-8.3.32\extfolder. - Open
C:\php-8.3.32\php.iniand addextension=imagick. - That should be it. Open CollectiveAccess and go to
MANAGE→Administration→CONFIGURATION CHECK. For me, ImageMagick still showsDidn't load because ImageMagick executables cannot be found. No idea what's up with that because it works... kinda. Here's the thing, for some reason it takes really long to process an image. Like, 3 minutes and 34 seconds to process a 1.05 MB image. For a file about the size of 450 KB, GD took 4 seconds and Imagick took 24 seconds. No idea what's up with that. - To determine if an image is processed by GD, you can check the metadata. Go to
C:\Apache24\htdocs\providence\media\collectiveaccess\images\0. Find an image that ends withthumbnail, right click it, and open with Notepad. You'll see a bunch of gibberish which is normal. If the image is indeed processed by GD, then at the top of the file you should see something likeGD-JPEG. If you don't see it and you have Imagick available, then most likely the image was processed by Imagick.
NOTE: So I found this Stack
Overflow tutorial. When I followed it and replaced the original ImageMagick CORE files
with the
PHP ones, it didn't work. When I copied ALL .dll files from the PHP package and replaced the
original ImageMagick files, it worked. That didn't make any difference in image processing speed and I
honestly don't know what difference it made at all. So to play it safe, I
reverted all this. So basically what I'm saying is you probably shouldn't try this.