LogoLogo
APIDemoOfficial SiteDiscord
  • Introduction
  • Want to help?
  • 💾Installation
    • Prerequisites
      • Installing Webservers
        • Organizr & Dependency Installer
        • Nginx
        • Apache
        • Caddy
      • Installing PHP
    • Installing Organizr
  • 📌Getting started
  • First Time Setup
  • Tab Management
  • 🤖Features
    • Authentication Backend
      • Plex Backend
      • LDAP Backend
    • Server Authentication
      • Nginx Server Authentication
      • Caddy Server Authentication
      • Traefik Server Authentication
    • SSO
      • Plex SSO
      • Tautulli SSO
      • Overseerr SSO
      • Petio SSO
      • Ombi SSO
      • Jellyfin SSO
      • Komga SSO
      • Proxy Auth SSO
        • Grafana SSO
        • NZBHydra2 SSO
        • Calibre SSO
      • Troubleshooting SSO
    • Homepage
      • Sonarr Homepage Item
      • Plex Homepage Item
      • HealthChecks Homepage Item
    • API Socks
    • Backup & Restore
    • Custom Error Pages
    • Fail2Ban Integration
  • 🧪Tweaks
    • Tweaks
    • Hide custom text from specific groups
    • Optimizing PHP-FPM
  • 🆘Help
    • Custom Work
      • Custom Pages
    • Tutorials
      • Reverse Proxies
    • FAQ
      • Organizr Requirements
      • Forgot my password
      • Organizr Login Error
      • Login Looping - SameSite Errors
      • Auth cookie is not used by other subdomains
      • Update available even though up to date
      • Migration Guide
  • 🌍 Development
    • Plugin Development
Powered by GitBook
On this page
  • Summary
  • Windows
  • Download and Install
  • Running PHP as a service
  • Ubuntu & Debian
  • Download and Install

Was this helpful?

Export as PDF
  1. Installation
  2. Prerequisites

Installing PHP

PreviousCaddyNextInstalling Organizr

Last updated 1 year ago

Was this helpful?

Summary

The second component needed for Organizr to run is PHP.

Windows

Download and Install

  1. Download PHP for Windows from here: (Non Thread Safe version used in this guide)

  2. Create a folder called PHP under your Nginx directory e.g. C:\nginx\php and copy the downloaded files to this folder

Running PHP as a service

  1. Install NSSM - Skip to Step 2 if already installed

    1. Download NSSM from:

    2. Copy the nssm.exe from the win32 or win64 folder depending on your system to C:\Windows\System32

  2. If you’ve got nssm already setup, open command prompt as admin.

  3. Type in the following cmd nssm install php

    1. Path = C:\nginx\php\php-cgi.exe

    2. Startup directory = C:\nginx\php

    3. Arguments = -b 127.0.0.1:9000

    4. See image below for Example

  4. Install Service

  5. On the opened cmd prompt type in nssm start php to start the PHP service.

  6. If the installed PHP service doesn’t start, then try manually running the php-cgi.exe file in C:\nginx\php\

    1. If you get a missing ‘VCRUNTIME’ related error then follow the solution on this link:

  7. Make a copy of one of the php.ini-development or php.ini-production files and rename it to php.ini

  8. Open the php.ini file and search for the following and uncomment each:

    1. extension_dir = "ext"

    2. extension=php_openssl.dll

    3. extension=php_pdo_sqlite.dll

    4. extension=php_curl.dll

    5. extension=php_sqlite3.dll

  9. Please note that if you are running PHP 7.2 or higher, look for the below lines and uncomment them instead:

    1. extension_dir = "ext"

    2. extension=openssl

    3. extension=pdo_sqlite

    4. extension=curl

    5. extension=sqlite3

  10. Also, uncomment the following line and add ext to the end of it:

    1. sqlite3.extension_dir =

      1. So that is becomes: sqlite3.extension_dir = ext

  11. On the opened cmdprompt type in nssm restart php to restart the PHP service to apply the changes in php.ini.

Ubuntu & Debian

Download and Install

Add the repository

apt-get install software-properties-common
add-apt-repository ppa:ondrej/php
apt-get update

Install

apt-get install php7.1-fpm

Then, to be sure all of the PHP packages are installed, run the following command with your package manager. Some of these may also require other dependencies, so select "Yes" to install those as well.

apt-get install php7.1-mysql php7.1-sqlite3 sqlite3 php7.1-xml php7.1-zip openssl php7.1-curl
💾
http://windows.php.net/download
https://nssm.cc/download
http://stackoverflow.com/questions/30811668/php-7-missing-vcruntime140-dll