You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cloud-services-php-create-web-role.md
-47Lines changed: 0 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,53 +54,6 @@ For a worker role, use this command:
54
54
>
55
55
>
56
56
57
-
## Specify the built-in PHP version
58
-
59
-
When you add a PHP web or worker role to a project, the project's configuration files are modified so that PHP will be installed on each web or worker instance of your application when it is deployed. To see the version of PHP that will be installed by default, run the following command:
The output from the command above will look similar to what is shown below. In this example, the `IsDefault` flag is set to `true` for PHP 5.3.17, indicating that it will be the default PHP version installed.
64
-
65
-
```
66
-
Runtime Version PackageUri IsDefault
67
-
------- ------- ---------- ---------
68
-
Node 0.6.17 http://nodertncu.blob.core... False
69
-
Node 0.6.20 http://nodertncu.blob.core... True
70
-
Node 0.8.4 http://nodertncu.blob.core... False
71
-
IISNode 0.1.21 http://nodertncu.blob.core... True
72
-
Cache 1.8.0 http://nodertncu.blob.core... True
73
-
PHP 5.3.17 http://nodertncu.blob.core... True
74
-
PHP 5.4.0 http://nodertncu.blob.core... False
75
-
```
76
-
77
-
You can set the PHP runtime version to any of the PHP versions that are listed. For example, to set the PHP version (for a role with the name `roleName`) to 5.4.0, use the following command:
> Available PHP versions may change in the future.
83
-
>
84
-
>
85
-
86
-
## Customize the built-in PHP runtime
87
-
88
-
You have complete control over the configuration of the PHP runtime that is installed when you follow the steps above, including modification of `php.ini` settings and enabling of extensions.
89
-
90
-
To customize the built-in PHP runtime, follow these steps:
91
-
92
-
1. Add a new folder, named `php`, to the `bin` directory of your web role. For a worker role, add it to the role's root directory.
93
-
2. In the `php` folder, create another folder called `ext`. Put any `.dll` extension files (e.g., `php_mongo.dll`) that you want to enable in this folder.
94
-
3. Add a `php.ini` file to the `php` folder. Enable any custom extensions and set any PHP directives in this file. For example, if you wanted to turn `display_errors` on and enable the `php_mongo.dll` extension, the contents of your `php.ini` file would be as follows:
95
-
96
-
display_errors=On
97
-
extension=php_mongo.dll
98
-
99
-
> [!NOTE]
100
-
> Any settings that you don't explicitly set in the `php.ini` file that you provide will automatically be set to their default values. However, keep in mind that you can add a complete `php.ini` file.
101
-
>
102
-
>
103
-
104
57
## Use your own PHP runtime
105
58
106
59
In some cases, instead of selecting a built-in PHP runtime and configuring it as described above, you may want to provide your own PHP runtime. For example, you can use the same PHP runtime in a web or worker role that you use in your development environment. This makes it easier to ensure that the application will not change behavior in your production environment.
0 commit comments