Articles in this section

How to run the Caldera web server manually on macOS?

  Warning

This is a temporary workaround to use at your own risk. It will install "homebrew", a non-Apple official package manager, the only option since Apple decided to stop installing PHP by default on their OS.

The Caldera web server is not installed when there is no PHP and this is an issue with macOS Monterey and newer as Apple no longer installs PHP as part of the macOS installation.

This article explains how to install Homebrew, and PHP, and configure the Apache web server to use PHP 7.0 and the Caldera-specific folders. The instructions vary depending on the processor of your Mac: Intel processor or M1/M2.

The following items are required and installed using this article:

  1. Xcode
  2. Homebrew
  3. Homebrew tests (to ensure proper installation)
  4. Monterey-specific libraries (OpenSSL)
  5. Disabling MacOS built-in Apache web server
  6. Brew PHP

 

Select the tab corresponding to your processor to get the related information and download the correct httpd.conf file.

Intel processor M1/M2 processor

Commands are to be entered using Terminal, which can be opened from the Finder pulldown menu: /Applications/Utilities/Terminal

You can directly copy/paste the commands indicated in this article (in bold format).

 

1. Installing Xcode

  • Installing Xcode command line tools (be patient as the download can be slow): xcode-select --install

Screen_Shot_2021-11-12_at_4.53.23_PM.png

Screen_Shot_2021-11-12_at_4.50.30_PM.png

Screen_Shot_2021-11-12_at_4.56.30_PM.png

2. Installing Homebrew

  • Use the following command line: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Screen_Shot_2021-11-12_at_4.57.06_PM.png

Screen_Shot_2021-11-12_at_4.57.15_PM.png

Screen_Shot_2021-11-12_at_4.59.31_PM.png

Follow any additional recommended instructions at the end of the Homebrew installation which are visible at the end of the installation.

 

3. Test the Homebrew installation

  • To test the Homebrew installation and check the version more than likely 3.3.x or newer:

eval"$(/usr/local/bin/brew shellenv)"

brew --version

Screen_Shot_2021-11-12_at_5.00.51_PM.png

brew doctor

Screen_Shot_2021-11-12_at_5.01.11_PM.png

4. Installating Monterey required libraries

brew install openssl

Screen_Shot_2021-11-12_at_5.10.57_PM.pngScreen Shot 2021-11-12 at 5.11.52 PM.png

5. macOS built-in Apache web server

  • Disable the Apache web server:

sudo apachectl stop

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null

Screen_Shot_2021-11-12_at_5.12.32_PM.png

  • Install the Homebrew Apache server:

brew install httpd

Screen_Shot_2021-11-12_at_5.13.18_PM.png

Screen Shot 2021-11-12 at 5.14.13 PM.png

  • Upon completion of the installation, it should show something like this (subject to change as it is specific to the homebrew version): 🍺 /usr/local/Cellar/httpd/2.4.51: 1,660 files, 32.0MB
  • Auto-start the Homebrew Apache server: brew services start httpd

Screen_Shot_2021-11-12_at_5.15.39_PM.png

  • Test the server. To do that, enter in a web browser: http://localhost:8080. It should show a web page with "It works!".

Screen_Shot_2021-11-12_at_5.16.11_PM.png

Troubleshooting suggestions when it doesn't show "It works!"
  • To check if the server is up: ps -aef | grep httpd
  • To restart the Apache server: brew services restart httpd
  • To check the error log of the Apache server, for clues on why it doesn't work: tail -f /usr/local/var/log/httpd/error_log
  • Useful commands:
    • Stop Apache: brew services stop httpd
    • Start Apache: brew services start httpd
    • Restart Apache: brew services restart httpd
  • Once the Homebrew web server is operational, it can be configured. Copy the attached httpd.conf (Intel specific) to: /usr/local/etc/httpd/

 

6. Installing PHP version 7.0 (used by Caldera)

brew tap shivammathur/php

brew install shivammathur/php/php@7.0

Screen_Shot_2021-11-12_at_5.26.12_PM.png

Screen_Shot_2021-11-12_at_5.22.17_PM.png

  • (optional) In case of date and time zone issues: open -e /opt/homebrew/etc/php/7.0/php.ini
  •  Now close all instances of Terminal because we need to start a brand new Terminal session. Using an existing session could cause issues related to the path.

 

7. Use Homebrew with PHP version 7.0

With a newly opened Terminal, copy the following commands:

  • Force brew to use php version 7.0: brew unlink php & brew link --overwrite --force php@7.0

Screen_Shot_2021-11-12_at_5.28.51_PM.png

  • To check if version 7.0 is now being used: php -v

mceclip0.png

 

If you get a "zsh: command not found error" when executing php -v

Add the zshrcfile in the user directory. To do that:

  • Use the command: touch .zshrc
  • Edit using nano: nano .zshrc 
  • And add: export PATH=$PATH:/usr/local/Cellar/php@7.0/7.0.33_3/bin

mceclip0__1_.png

  • Press ctrl+x to save.
  • Now close Terminal and after reopening try again: php -v

 

8. Checking

  • Check if all works correctly:

brew services stop httpd

brew services start httpd

Screen_Shot_2021-11-12_at_5.34.03_PM.png

  • You can check if the Caldera web server works by entering the following information into the web browser: http://localhost. It should show:

mceclip0__2_.png

If this doesn't show or /Library/Webserver/Caldera is not existing

It would require the installation of the Caldera web server. CalderaRIP V15.0 or later doesn't install the web server when it doesn't see PHP being installed:

  • Mount the CalderaRIP disk image.
  • Download the attached patched: patch-WebServer.diff
  • In Terminal and have CalderaRIP V15.0 mounted (make sure to change the mount path accordingly as commands assume version 15.0 is being mounted)

$ mkdir /tmp/DISTRIB_TOOLS

$ cp -vr /Volumes/CALDERA_150/DISTRIB/TOOLS /tmp/DISTRIB_TOOLS

$ (cd /tmp/DISTRIB_TOOLS/TOOLS/DarwinUpdate/SCRIPTS/ && patch < _path_to_patch.diff)

$ sudo /tmp/DISTRIB_TOOLS/TOOLS/DarwinUpdate/SCRIPTS/Start18WebServer

Was this article helpful?
1 out of 1 found this helpful