Skip to content

Commit dc236d8

Browse files
committed
DP-460 Upgrade to PHP 8.1 / Laravel 9
1 parent eacf818 commit dc236d8

File tree

6 files changed

+512
-21
lines changed

6 files changed

+512
-21
lines changed

content/en/docs/Creating Scripted Services and Endpoints/_index.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ A sample output from this endpoint is below:
4949
]
5050
}
5151

52-
>The sandbox parameter means that the script execution is bound by memory and time and is not allowed access to other operating system functionalities outside of PHP's context. This is currently only the case for V8Js. Therefore, be aware that DreamFactory cannot control what is done inside scripts using non-sandboxed languages on a server.
52+
>The sandbox parameter means that the script execution is bound by memory and time and is not allowed access to other operating system functionalities outside of PHP's context. Therefore, be aware that DreamFactory cannot control what is done inside scripts using non-sandboxed languages on a server.
5353
5454
The following languages are typically supported on most DreamFactory installations:
5555

56-
* V8Js
5756
* Node.js
5857
* PHP
5958
* Python
@@ -66,7 +65,7 @@ Scripts can be used within two places in DreamFactory, ***Event Scripting*** and
6665

6766
When a script is executed, DreamFactory passes the script(s) two primary resources to allow the script to access many parts of the system including the state, configuration and even the ability call other internal APIs (services) or external APIs. They are the **event** and **platform** resources and are described below.
6867

69-
> The "resource" term is used generically in this context. Depending on the scripting language being used, the resource could be an object (V8js, Node.js, Python) or an array (PHP)
68+
> The "resource" term is used generically in this context. Depending on the scripting language being used, the resource could be an object (Node.js, Python) or an array (PHP)
7069
7170
### The Event Resource
7271

content/en/docs/Installing and Configuring DreamFactory/_index.md

+18-14
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Cloning DreamFactory's OSS repository has long been by far the most popular way
1717

1818
$ git clone https://github.com/dreamfactorysoftware/dreamfactory/
1919

20-
DreamFactory is built atop the very popular [Laravel Framework](https://www.laravel.com), which is in turn built atop PHP. This means DreamFactory is almost ubiquitously supported in all hosting environments; you'll just need to make sure your hosting environment is running PHP 7.2 or greater, a recent version of a web server such as Apache or NGINX, access to one of four databases for storing configuration data (MySQL/MariaDB, PostgreSQL, SQLite, and MS SQL Server are supported), and that you have adequate permissions to install a few requisite PHP extensions. You can learn more about the required software and extensions via our wiki:
20+
DreamFactory is built atop the very popular [Laravel Framework](https://www.laravel.com), which is in turn built atop PHP. This means DreamFactory is almost ubiquitously supported in all hosting environments; you'll just need to make sure your hosting environment is running PHP 8.1 or greater, a recent version of a web server such as Apache or NGINX, access to one of four databases for storing configuration data (MySQL/MariaDB, PostgreSQL, SQLite, and MS SQL Server are supported), and that you have adequate permissions to install a few requisite PHP extensions. You can learn more about the required software and extensions via our wiki:
2121

2222
[https://wiki.dreamfactory.com/DreamFactory/Installation#GitHub](https://wiki.dreamfactory.com/DreamFactory/Installation#GitHub)
2323

2424
### Docker
2525

26-
Our Docker container is increasingly popular, and includes everything you need to run DreamFactory including Ubuntu 16.04, PHP 7.1, and the NGINX web server. It also includes all of the required PHP extensions, meaning you should be able to begin experimenting with the latest DreamFactory version as quickly as you can spin up the container! To learn more about the container, head over to our df-docker repository:
26+
Our Docker container is increasingly popular, and includes everything you need to run DreamFactory including Ubuntu 22.04, PHP 8.1, and the NGINX web server. It also includes all of the required PHP extensions, meaning you should be able to begin experimenting with the latest DreamFactory version as quickly as you can spin up the container! To learn more about the container, head over to our df-docker repository:
2727

2828
[https://github.com/dreamfactorysoftware/df-docker](https://github.com/dreamfactorysoftware/df-docker)
2929

@@ -713,10 +713,10 @@ Once open, click **Add Module Mapping** on the right hand side. Enter the follow
713713

714714
| Variables | Values |
715715
| --------------------|------------------|
716-
| Request Path | *.php |
717-
| Module | FastCgiModule |
718-
| Executable | "C:\Program Files\PHP\v7.4\php-cgi.exe"|
719-
| Name | PHPviaFastCGI|
716+
| Request Path | *.php |
717+
| Module | FastCgiModule |
718+
| Executable | "C:\Program Files\PHP\v7.4\php-cgi.exe"|
719+
| Name | PHPviaFastCGI|
720720

721721
<img src="/images/02/fastcgi-php.png" width="500" alt="Setting fast-cgi in IIS">
722722

@@ -1043,7 +1043,7 @@ On Linux, our installer can handle the process of configuring Oracle with DreamF
10431043
10441044
1. The Oracle "Basic" Instant Client Package from [the Oracle Website](https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html) (for example `instantclient-basic-windows.x64-21.3.0.0.0.zip`).
10451045
2. The Oracle "SDK" Instant Client Package from [the Oracle Website](https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html) (for example `instantclient-sdk-windows.x64-21.3.0.0.0.zip`).
1046-
3. The PHP oci8 extension (DLL) available at [pecl.php.net](https://pecl.php.net/package/oci8). By default, DreamFactory runs on PHP 7.4 so you will want the x64 package of that (version 2.2.0). If you are running DreamFactory using IIS as your webserver you will most likely be using the non thread safe version of PHP.
1046+
3. The PHP oci8 extension (DLL) available at [pecl.php.net](https://pecl.php.net/package/oci8). By default, DreamFactory runs on PHP 8.1 so you will want the x64 package of that (version 3.2.1). If you are running DreamFactory using IIS as your webserver you will most likely be using the non thread safe version of PHP.
10471047
10481048
{{< alert color="success "title="TIP" >}}
10491049
On Windows you can run `php -i|findstr "Thread"` in a terminal to find out whether your PHP is the (Non) Thread Safe version.
@@ -1073,7 +1073,7 @@ Next, we need to add the full path of the Instant Client to the environment vari
10731073
10741074
<img src="/images/02/oracle-path.png" width="400" alt="Adding Oracle to the Windows PATH">
10751075
1076-
Almost there! Now, the last thing to do is to extract our PHP OCI8 extension package (It will be named along the lines of `php_oci8-2.2.0-7.4-nts-vc15-x64`) and move the `php_oci8.dll` file to the `ext` directory where PHP is located on your system (e.g `PHP\v7.4\ext`). Once that is done add `extension=php_oci8.dll` to your `php.ini` file and then restart the server. Congratulations!
1076+
Almost there! Now, the last thing to do is to extract our PHP OCI8 extension package (It will be named along the lines of `php_oci8-3.2.1-8.1-nts-vc15-x64`) and move the `php_oci8.dll` file to the `ext` directory where PHP is located on your system (e.g `PHP\v8.1\ext`). Once that is done add `extension=php_oci8.dll` to your `php.ini` file and then restart the server. Congratulations!
10771077
10781078
## Troubleshooting Oracle Connections
10791079
@@ -1119,11 +1119,11 @@ If PDO doesn't appear in the list of installed extensions, just search your pack
11191119
11201120
With the desired PHP version identified you can then install it:
11211121
1122-
$ yum install php72-php-pdo.x86_64
1122+
$ yum install php81-php-pdo.x86_64
11231123
11241124
Next you'll want to install the SQL Anywhere driver. Confusingly enough, this driver is often identified as "Sybase" because SAP SQL Anywhere was known as Sybase SQL Anywhere prior to SAP's 2010 Sybase acquisition, and the PHP community hasn't gotten around to updating the extension's name. On Debian/Ubuntu you can install the driver using this command:
11251125
1126-
$ sudo apt install php7.2-sybase
1126+
$ sudo apt install php8.1-sybase
11271127
11281128
On CentOS this driver is identified "pdo-dblib", because "dblib" is the name given to the library used to transfer data between the client and a database that supports a protocol known as tabular data stream (TDS - more about this in a bit). However as a convenience you can search the package manager for the term "sybase" and the desired drivers will be returned:
11291129
@@ -1136,7 +1136,7 @@ On CentOS this driver is identified "pdo-dblib", because "dblib" is the name giv
11361136
11371137
Now that you know the name you can install the desired version:
11381138
1139-
$ sudo yum install php72-php-pdo-dblib.x86_64
1139+
$ sudo yum install php81-php-pdo-dblib.x86_64
11401140
11411141
Once complete, run `php -m` again and confirm both PDO and the pdo_dblib extensions are installed:
11421142
@@ -1175,7 +1175,7 @@ Invoking PHP using the `-r` option will cause the command that follows to be exe
11751175
11761176
### Using the SAP PHP Extension
11771177
1178-
A few years ago SAP released their own native SQL Anywhere PHP extension, with little background information regarding why this extension should be used in preference of PHP's PDO-based approach. To be clear, DreamFactory does *not* support the SAP PHP modules; instead we rely upon PHP's longstanding support for SQL Anywhere via the PDO and PDO_DBLIB extensions.
1178+
A few years ago SAP released their own native SQL Anywhere PHP extension, with little background information regarding why this extension should be used in preference of PHP's PDO-based approach. **To be clear, DreamFactory does not support the SAP PHP modules**; instead we rely upon PHP's longstanding support for SQL Anywhere via the PDO and PDO_DBLIB extensions.
11791179
11801180
That said, we recognize you might wish to use PHP to interact with a SQL Anywhere database outside of the DreamFactory-generated APIs and so because documentation on this matter is so woefully lacking we thought it might be useful to include some guidance on the matter for the benefit of all PHP users. To configure and test this module within your *custom* PHP application (not DreamFactory), follow these instructions:
11811181
@@ -1242,7 +1242,7 @@ Once done, save the changes and restart your web server. Confirm PHP's CLI envir
12421242
$ php -m | grep sqlanywhere
12431243
sqlanywhere
12441244
1245-
Next, confirm PHP's web environment recognizes the module by creating a file named phpinfo.php in your web document root directory and adding the following
1245+
Next, confirm PHP's web environment recognizes the module by creating a file named phpinfo.php in your web document root directory and adding the following.
12461246
12471247
## Useful System Administration Notes
12481248
@@ -1311,7 +1311,11 @@ Once complete, be sure to copy the `dump.sql` file to a safe place just as was d
13111311
13121312
### Step #3. Prepare a New Host Serve and Run Installer
13131313
1314-
Earlier in this chapter we referred to the automated installers that are included with the platform ([learn more here](https://github.com/dreamfactorysoftware/dreamfactory/tree/master/installers)]. We recommend downloading one of these installers from the [DreamFactory repository](https://github.com/dreamfactorysoftware/dreamfactory) and running them in the manner previously described. Four operating systems are currently supported, including CentOS, Debian, Fedora, and Ubuntu. Ideally the operating system will be newly installed, ensuring the server is free of baggage.
1314+
{{< alert color="success" title="Tip" >}}
1315+
If you do not use our automated installers, please follow our [Update to PHP 8.1](../upgrade-to-php-8.1/) guide.
1316+
{{< /alert >}}
1317+
1318+
Earlier in this chapter we referred to the automated installers that are included with the platform [learn more here](https://github.com/dreamfactorysoftware/dreamfactory/tree/master/installers). We recommend downloading one of these installers from the [DreamFactory repository](https://github.com/dreamfactorysoftware/dreamfactory) and running them in the manner previously described. Four operating systems are currently supported, including CentOS, Debian, Fedora, and Ubuntu. Ideally the operating system will be newly installed, ensuring the server is free of baggage.
13151319
13161320
At the installer's conclusion you'll be prompted to create the first administration account. Go ahead and create one, however we'll soon be importing your existing administrator(s) from the production DreamFactory instance so ultimately the new account won't hold any importance.
13171321

content/en/docs/Integrating Salesforce Data/_index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Many DreamFactory users desire to synchronize Salesforce data with a database su
156156

157157
To do so, navigate to the `Scripts` tab inside your DreamFactory administration console, choose the `salesforce` API, and then drill down until you reach the `salesforce._table.Account.get.post_process` endpoint. The `post_process` event handler was chosen because the associated business logic will execute *after* the account data has been returned from Salesforce.
158158

159-
Here you'll be presented with the scripting interface. Four scripting engines are supported, including PHP, Python (2 and 3), NodeJS, and V8JS. You can link to a script found in a repository hosted on GitHub, GitLab, or BitBucket, however for the purposes of this example I'll just use the glorified text area included in the interface.
159+
Here you'll be presented with the scripting interface. Four scripting engines are supported, including PHP, Python (2 and 3), and NodeJS. You can link to a script found in a repository hosted on GitHub, GitLab, or BitBucket, however for the purposes of this example I'll just use the glorified text area included in the interface.
160160

161161
Returning to our earlier example, recall that this request:
162162

@@ -197,7 +197,7 @@ The JSON will automatically be converted into an array and made available to you
197197

198198
return $result;
199199

200-
Keep in mind the supported scripting engines (PHP, Python, NodeJS, V8JS) are not incomplete or hobbled versions. These are the very same engines installed on the same server as DreamFactory, and as such you are free to take advantage of any language-specific packages or libraries simply by installing them on the server.
200+
Keep in mind the supported scripting engines (PHP, Python, NodeJS) are not incomplete or hobbled versions. These are the very same engines installed on the same server as DreamFactory, and as such you are free to take advantage of any language-specific packages or libraries simply by installing them on the server.
201201

202202
## Conclusion
203203

content/en/docs/Modifying the Service Definition/_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Now you have a fully functioning developer portal for your API!
3535

3636
## Modifying Existing API Documentation
3737

38-
To modify existing API Documentation we will still need to donwload the Service Documentation. After we have the documentation we cannot modify it and change that existing Services documentation, but rather create a new Service with that documentation.
38+
To modify existing API Documentation we will still need to download the Service Documentation. After we have the documentation we cannot modify it and change that existing Services documentation, but rather create a new Service with that documentation.
3939

4040
### Customizing your Documentation
4141

0 commit comments

Comments
 (0)