Installing PHP
Summary
The second component needed for Organizr to run is PHP.
Windows
Download and Install
Download PHP for Windows from here: http://windows.php.net/download (Non Thread Safe version used in this guide)
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
Install NSSM - Skip to Step 2 if already installed
Download NSSM from: https://nssm.cc/download
Copy the nssm.exe from the win32 or win64 folder depending on your system to
C:\Windows\System32
If you’ve got
nssm
already setup, open command prompt as admin.Type in the following
cmd nssm install php
Path =
C:\nginx\php\php-cgi.exe
Startup directory =
C:\nginx\php
Arguments =
-b 127.0.0.1:9000
See image below for Example
Install Service
On the opened cmd prompt type in
nssm start php
to start the PHP service.If the installed PHP service doesn’t start, then try manually running the
php-cgi.exe
file inC:\nginx\php\
If you get a missing ‘VCRUNTIME’ related error then follow the solution on this link: http://stackoverflow.com/questions/30811668/php-7-missing-vcruntime140-dll
Make a copy of one of the
php.ini-development
orphp.ini-production
files and rename it tophp.ini
Open the php.ini file and search for the following and uncomment each:
extension_dir = "ext"
extension=php_openssl.dll
extension=php_pdo_sqlite.dll
extension=php_curl.dll
extension=php_sqlite3.dll
Please note that if you are running PHP 7.2 or higher, look for the below lines and uncomment them instead:
extension_dir = "ext"
extension=openssl
extension=pdo_sqlite
extension=curl
extension=sqlite3
Also, uncomment the following line and add
ext
to the end of it:sqlite3.extension_dir =
So that is becomes:
sqlite3.extension_dir = ext
On the opened
cmd
prompt type innssm restart php
to restart the PHP service to apply the changes inphp.ini
.
Ubuntu & Debian
Download and Install
Add the repository
Install
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.
Last updated