Feedback

Installing PHP 8.1 - macOS

This documentation will cover how installing PHP 8.1 and ScriptCase manually on macOS. Performing this type of installation is your responsible for configuring your entire environment as well as database extensions.

Listed below are versions of macOS approved for use by Scriptcase.

Compatibility Table

Scriptcase Automatic Installer is compatible with the following macOS versions

Version Codename
macOS 14.2 “Sonoma”
macOS 13.0 “Ventura”
macOS 12.0 “Monterey”
macOS 11.0 “Big Sur”
macOS 10.15 “Catalina”
macOS v10.14 “Mojave”
macOS v10.13 “High Sierra”
macOS v10.12 “Sierra”
OS X v10.11 “El Capitan”

You can install the Scriptcase with PHP 7.3 or PHP 7.0:
See how to install with PHP 7.3 See how to install with PHP 7.0

Requirements

If you already have a Web Server with Apache and PHP 8.1 configured, just go to the SourceGuardia configuration and proceed to manual installation.

To proceed with the installation, you need to download some files.

Required Files:

Before proceeding with the installation it is recommended not to have any other web environments (such as XAMP, Zend Server, etc.) installed on the operating system. Knowledge of Unix environment is recommended to use terminal.

PHP configuration

Listed below are the commands required for the manual installation of PHP 8.1 on macOS. Check the package naming on your macOS terminal correctly.

1 - You’ll need to install Homebrew to be able to access PHP 8.1 and other packages. Install Brew with the following commands in the macOS terminal:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2 - In the macOS terminal, execute brew update to update Brew.

3 - Use the command brew install shivammathur/php/php@8.1 for installing PHP 8.1.

4 - After the installation proccess completes, execute brew info php@8.1 to get the information that we need to proceed with environment setting up.

Brew info PHP 8.1

5 - You need to configure Apache so that PHP 8.1 that was installed in the previous steps will be used as default on your system.

To use PHP on MacOS native Apache, we will need to create a certificate that authorizes its use. Until Monterey this process was optional, but now PHP Code Signed is required. Follow this post to do the code signing

5.1 - Edit the Apache file httpd.conf, find the “Loadmodule” line block and add the line according to your equipment:

Exemple:

sudo nano /etc/apache2/httpd.conf

Chip Intel

LoadModule php_module /usr/local/opt/php@8.1/lib/httpd/modules/libphp.so

Chip da Apple

LoadModule php_module/opt/homebrew/opt/php@8.1/lib/httpd/modules/libphp.so

At the end of the file add:

<FilesMatch .php$>
SetHandler application/x-httpd-php
</FilesMatch>

6 - Add path to PHP 8.1 module installed after last line LoadModule in httpd.conf.

Exemple:

LoadModule php_module /usr/local/opt/php@8.1/lib/httpd/modules/libphp.so

PHP module configuration`

After performing this action, save the file and restart the apache service.

sudo apachectl restart

7 - Add the path to the installation of PHP 8.1 in the ~ /.zshrc file with the following commands:

echo 'export PATH="/opt/homebrew/opt/php@8.1/bin:$PATH"' >> ~/.zshrc echo 'exportPATH="/opt/homebrew/opt/php@8.1/sbin:$PATH"' >> ~/.zshrc

8 - Edit the file ~/.bash_profile and add PHP 8.1 path with these following commands:

echo 'export PATH="/opt/homebrew/opt/php@8.1/bin:$PATH"'

9 - Verify PHP version by running command: php -v

Exemple:

PHP version

10 - Access the php.ini file in the directory. /opt/homebrew/etc/php/8.1/ and set the recommended minimum value correctly of these PHP directives listed below for Scriptcase work properly.

Search for the directives and assign the value according to this example:

  • max_execution_time = 3600
  • max_input_time = 3600
  • max_input_vars = 10000
  • memory_limit = 1024M
  • post_max_size = 1024M
  • upload_max_filesize = 1024M
  • max_file_uploads = 200
  • short_open_tag = On

11 - By default, PHP disables some functions that are important to Scriptcase. Click here to access the necessary functions list for ScriptCase

  • Change item line disable_functions as example below:

disable_functions =

Exemple:

PHP disable_functions setting

12 - Set PHP TimeZone according to your region. Use the value available in the PHP documentation. Searh for date.timezone in your php.ini file, uncomment it and edit according to the selected TimeZone.

Exemple:

date.timezone = America/Recife

13 - Set the folder where temporary files will be stored. search for ;session.save_path, uncoment it and inform your temporary folder path.

Exemple:

session.save_path = "/tmp"

14 - Save all modifications made and restart the Apache service using the following command in terminal:

sudo apachectl restart

15 - Verify changes made through the file info.php. You need to create this file and put it in the directory. /Library/WebServer/Documents/with the following content:

<?php
phpinfo();  
?>

After that, check in your browser the page generated by accessing the URL 127.0.0.1/info.php.

Check PHP

NOTE: For more information about the function phpinfo(), verify our PHP documentation.

Enable SourceGuardian Loader

Before you start installing Scriptcase, you need to enable the loader responsible for encrypting Scriptcase in PHP. Follow the steps below to perform this action successfully.

1 - Access the Downloads folder and extract the downloaded file referring to SourceGuardian Loader at the beginning of this documentation.

If you have not yet downloaded the SourceGuardian Loader click here and download the file according to the architecture used.

Exemple:

cd /Users/usuario/Downloads

sudo chmod 777 loaders.macosx-arm64.zip && unzip loaders.macosx-arm64.zip

cd loaders.macosx-arm64

2 - Copy the file ixed.8.1.dar and paste it into your PHP extension_dir directory. We’ll use /opt/homebrew/lib/php/pecl/20210902 for this example.

Exemple:

sudo cp ixed.8.1.dar /opt/homebrew/lib/php/pecl/20210902

3 - Edit the php.ini file and below the last line enter the path to the extension within the parameter zend_extension:

Exemple:

sudo bash -c 'echo "zend_extension=/opt/homebrew/lib/php/pecl/20210902/ixed.8.1.dar" > /opt/homebrew/etc/php/8.1/conf.d/sourceguardian.ini'

4 - Restart the Apache service with the following terminal command:

sudo apachectl restart

Manual ScriptCase installation

Listed below are the steps needed to do a Scriptcase manual installation. To do the steps, it is needed that you have a web server configured in your machine.

1 - Download the Scriptcase (.zip) directly from the download page from our website.

2 - Extract the .zip file and rename the extracted folder to scriptcase.

3 - Move the scriptcase to your server root. Depending of your operating system and the installation the path can be different from the example. However, by default the paths are:

Windows Server
C:\Apache24\htdocs\ Apache
C:\inetpub\wwwroot\ IIS
Linux Server
/var/www/html/ Linux Local
/home/$(whoami)/public_html/ Linux Server
macOS Server
/Library/WebServer/Documents Apache

4 - Access the Scriptcase using your browser:

127.0.0.1/scriptcase

  • By default the selected language is English.

Setup Screen

5 - Check the extensions required for Scriptcase to function and database connection modules that are enabled.

Screen with list of active extensions

Typical installation

Check the steps below to complete the manual installation of Scriptcase in a typical way.

NOTE: By selecting this installation, Scriptcase will set your environment by default. Defining the installation database and the login user in Scriptcase.

Installation Type Selection Screen

After clicking proceed, you will be redirected to the Scriptcase Login page.

Scriptcase access screen

User

In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin.

Password

In this field, you must enter the password to login to Scriptcase. By default, the password is admin.

Keep me connected

This option keeps the user logged in until they log out through the Scriptcase interface.

Forgot your password?

By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps.

Important: You can only perform password recovery if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here.

Custom installation

Check the steps below to complete the manual installation of Scriptcase in a custom manner.

NOTE: By selecting this installation, you will be responsible for setting up your environment. Defining the installation database and the login user for Scriptcase.

Installation type selection screen

1- Verify that the directories required by Scriptcase have the correct permissions. If any directory listed does not have the active check icon Active_icon, correct permission for this directory.

System Directories Display Screen

Clique em prosseguir para avançar no processo de instalação.

2- Choose the database where the Scriptcase database will be installed. By default, Scriptcase recommends that it be installed with the SQLite database.

Installation Database Choice Screen

  • You can change the default database by clicking the Change Database button. By clicking this option you will need to set the following options:

Default database change

DBMS

In this option, you will select the Driver to connect to your database.

Server

In this option, you will inform the server to connect to the desired database.

User

You need to inform a user who has access to the database you want Scriptcase to be installed on.

Password

You must enter the authentication password corresponding to the entered user.

Database

You must enter the name of the database where Scriptcase will be installed.

Example:

scriptcase

Clique em prosseguir para avançar no processo de instalação.

3 - Verifique se a criação das tabelas da base de dados do Scriptcase ocorreu com sucesso. As tabelas serão marcadas com o ícone de sucesso ativo_icon na lateral.

Tela de exibição das tabelas do sistema

Click proceed to proceed with the installation process.

_4 -__ Set the default user who will have access to Scriptcase.

User setup screen

Login

In this option, you will enter the default Scriptcase User Login.

Password

In this option, you must enter the password that will correspond to the user informed.

Confirmation

You must repeat the previously entered password for successful user creation.

Click proceed to proceed with the installation process.

5 - Complete Scriptcase custom installation on your web server.

Finish screen of installation

After clicking proceed, you will be redirected to the Scriptcase Login page.

Scriptcase access screen

User

In this field, it is necessary to inform the user to login to Scriptcase. By default, the user is admin.

Password

In this field, you must enter the password to login to Scriptcase. By default, the password is admin.

Keep me connected

This option keeps the user logged in until they log out through the Scriptcase interface.

Forgot your password?

By clicking this option, it is possible to recover the password of the informed user. An email will be sent to the user in question so they can access the recovery steps.

Important: You can only perform password recovery if you have configured your SMTP information. To access our documentation showing how to perform this configuration click here.


Needing register your ScriptCase?

VYou can access our knowledge base to understand all the steps for registering Scriptcase license.