Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Commit 9a1c300

Browse files
author
Daryl Lozupone
committed
#133 Document PHP architecture
1 parent 6b88556 commit 9a1c300

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

FAQ.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- [How do I Use WPLib Box on Pre-Existing Projects?](#existing-projects)
1515
- [How do I Configure Composer to Work with WPLib Box?](#composer)
1616
- [How do I Import a MySQL Database?](#import-db)
17+
- [What PHP versions are available?](#php)
1718
- [How do I Switch PHP Versions?](#php-versions)
1819
- [How do I Install PhpMyAdmin?](#phpmyadmin)
1920
- [How do I Get a URL to Provide Access to My Box's Site From the Internet?](#access)
@@ -138,11 +139,30 @@ For this we use the convention that the `default.sql` file is the file used to i
138139

139140
If you have a live database you may want to dump the database to the `/sql/` directory in your project root `default.sql` and then the above command run within `vagrant ssh` will support importing your default database.
140141

142+
<a href="php"></a>
143+
### Which PHP Versions are Available?
144+
Currently, the box has PHP 5.6, PHP 7.0, and HHVM. The PHP is installed from the `ondrej/php` [repository](https://launchpad.net/~ondrej/+archive/ubuntu/php). _(Please note: most answers one might find on the internet regarding `How do I install X module on Ubuntu` are based on previous versions of this repository which only installed one version of PHP on the OS. As such, they will be of no use in this use case.)_
145+
This results in both php5.6-fpm and php7.0-fpm services running concurrently, as well as making three versions of each PHP executable available: e.g. `php` (a symlink to `php7.0`), `php7.0`, and `php5.6`. This is true for `phpize` as well.
146+
147+
The configuration directory structure is as follows:
148+
- /etc
149+
- /php
150+
- /5.6
151+
- /cli
152+
- /fpm
153+
- /mods-available
154+
- /7.0
155+
- /cli
156+
- /fpm
157+
- /mods-available
158+
159+
All modules installed are configured for both versions of PHP.
160+
141161
<a id="php-versions"></a>
142162
### How do I Switch PHP Versions?
143-
The PHP version in use by the site is set in the Nginx vhost configuration. Our intention is to provide a control panel to simplify this process, but currently
144-
you must edit this file manually. This file is located at `/etc/nginx/sites-available/default`.
145-
To change to PHP 7, you must change the line `set $sock php5.6-fpm.sock;` to `set $sock php7.0-fpm.sock;`.
163+
The PHP version in use by the site is set in the Nginx vhost configuration. Our intention is to provide a control panel to simplify this process, but currently you must edit this file manually. This file is located at `/etc/nginx/sites-available/default`.
164+
To change to PHP 7, you must change the line `set $sock php/php5.6-fpm.sock;` to `set $sock php/php7.0-fpm.sock;`. To use HHVM, change it to `set $sock hhvm/sock`.
165+
146166
This can be accomplished by connecting to the guest machine via ssh:
147167

148168
cd project-directory

0 commit comments

Comments
 (0)