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: docs/cloudlinuxos/alt-ea_packages/README.md
+52-43Lines changed: 52 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1127,7 +1127,7 @@ When you deploy an updated version of PHP, using your system’s regular update
1127
1127
the new version will be installed under `/opt/alt/php[version]/`. This means that all modules, configurations and additional files pertaining to this version will be contained inside that path.
1128
1128
Different versions of PHP will each have their own path and can coexist without issues on the same system. Below you will find the location of all the relevant files, should you want to make any changes.
####Running code on a specific version through the CLI:
1183
+
### Running code on a specific version through the CLI:
1184
1184
1185
1185
<divclass="notranslate">
1186
1186
@@ -1190,7 +1190,7 @@ Hello, World!
1190
1190
```
1191
1191
</div>
1192
1192
1193
-
####Location of ini config files:
1193
+
### Location of ini config files:
1194
1194
1195
1195
<divclass="notranslate">
1196
1196
@@ -1232,7 +1232,7 @@ lzf.ini raphf.ini
1232
1232
```
1233
1233
</div>
1234
1234
1235
-
####Location of default.ini:
1235
+
### Location of default.ini:
1236
1236
1237
1237
<divclass="notranslate">
1238
1238
@@ -1241,7 +1241,7 @@ ls /opt/alt/phpXY/etc/php.d/default.ini
1241
1241
```
1242
1242
</div>
1243
1243
1244
-
####Listing enabled modules on a specific version:
1244
+
### Listing enabled modules on a specific version:
1245
1245
1246
1246
<divclass="notranslate">
1247
1247
@@ -1281,7 +1281,7 @@ zlib
1281
1281
```
1282
1282
</div>
1283
1283
1284
-
####Enabling a module through the CLI:
1284
+
### Enabling a module through the CLI:
1285
1285
1286
1286
<divclass="notranslate">
1287
1287
@@ -1326,66 +1326,75 @@ As you can see, each version is entirely self-contained,
1326
1326
and changing configurations in one will not impact the others,
1327
1327
a desired feature in hosting environments.
1328
1328
1329
-
#### Enabling a module through the configuration files:
1329
+
###Additional configurations (optional)
1330
1330
1331
-
**1. Direct inclusion in the specific extension's ini file:**
1331
+
The **default.ini** file is important for configuring alt-php. It sets default PHP settings and can be used to enable default extensions. We do not modify this file on our side. You need to update **default.ini** yourself to adjust PHP settings based on your Endless Lifecycle Support (ELS) usage and specific requirements.
1332
1332
1333
-
- If each extension has its own ini file (e.g., memcached.ini),
1334
-
open that file. Location of ini config files:
1333
+
#### Enabling a module through `default.ini`
1335
1334
1336
-
<divclass="notranslate">
1335
+
To enable or disable extensions in your installed PHP version:
1337
1336
1338
-
```
1339
-
/opt/alt/phpXY/etc/php.d.all/
1340
-
```
1341
-
</div>
1337
+
1. Open the `default.ini` file, usually located in the PHP configuration directory, in an editor of your choice:
1342
1338
1343
-
- Inside the ini file, find lines starting with `;` before the extension name
1344
-
(e.g., `;extension=memcached.so`). The `;` sign at the beginning of the line means that this extension is currently inactive.
1339
+
<divclass="notranslate">
1345
1340
1346
-
- Remove the `;` before the line with the extension name to activate it.
1341
+
```
1342
+
/opt/alt/phpXY/etc/php.d/default.ini
1343
+
```
1347
1344
1348
-
- Save the changes in the ini file.
1345
+
</div>
1349
1346
1350
-
If there is no such line:
1347
+
2. Edit the list of extensions:
1348
+
* To enable an extension, remove the semicolon `;` at the beginning of the line.
1349
+
* To disable an extension, add a semicolon `;` at the beginning of the line.
1350
+
* If the extension line is missing, add it in this format: `extension=extension_name.so` (replace `extension_name.so` with the actual extension name).
1351
1351
1352
-
- Inside the ini file, add line `extension=memcached.so`
1352
+
3. Save the changes in the `default.ini` file.
1353
1353
1354
-
- Save the changes in the ini file.
1354
+
#### Enabling a module through the configuration files
1355
1355
1356
-
**2. Enabling through default.ini:**
1356
+
PHP extensions can also be enabled or disabled through their `.ini` configuration files. This method allows you to control which extensions are active for a specific PHP version or setup. If you're unsure which file to modify to enable a specific extension, start by checking the extension's own `.ini` file.
1357
1357
1358
-
- Open the default.ini file, usually located in the PHP configuration directory:
1358
+
1. Locate the extension’s `.ini` file (e.g., `memcached.ini`) in the directory:
1359
1359
1360
-
<divclass="notranslate">
1360
+
<divclass="notranslate">
1361
1361
1362
-
```
1363
-
/opt/alt/phpXY/etc/php.d/default.ini
1364
-
```
1365
-
</div>
1362
+
```
1363
+
/opt/alt/phpXY/etc/php.d.all/
1364
+
```
1365
+
1366
+
</div>
1367
+
1368
+
2. To enable the extension, copy the located `.ini` file to:
1366
1369
1367
-
- Find lines starting with `;` before the extension name. The `;` sign at the beginning of the line means that this extension is currently inactive.
1370
+
<divclass="notranslate">
1368
1371
1369
-
- Remove the `;` before the line with the extension name to activate it.
1372
+
```
1373
+
/opt/alt/phpXY/etc/php.d/
1374
+
```
1370
1375
1371
-
If there is no such line:
1376
+
</div>
1372
1377
1373
-
- Add line `extension=extension name.so`
1374
-
(where `extension name.so` - name of extension you need).
1378
+
:::warning
1379
+
If the same extension is present in multiple `.ini` configuration files within the `/opt/alt/phpXY/etc/php.d/` directory, you may see warnings in PHP logs and possibly on your site.
1380
+
:::
1375
1381
1376
-
- Save the changes in the default.ini file.
1382
+
#### Increase Upload/Memory Limits
1377
1383
1378
-
***Note:***
1384
+
If you need to increase memory and upload size limits:
1379
1385
1380
-
*- Typically, extensions with their own ini files are enabled or disabled directly in their respective ini files,
1381
-
allowing for more explicit specification of which extensions should be enabled for a specific PHP configuration.*
1386
+
1. Open the `default.ini` file in an editor of your choice.
1387
+
2. Set the limits as needed, e.g:
1382
1388
1383
-
*- On the other hand, extensions that should be enabled by default on all systems may be listed in default.ini.
1384
-
This file is used to set default settings for PHP and can be used to enable default extensions.*
1389
+
<divclass="notranslate">
1385
1390
1386
-
*- If you're unsure which file to modify to enable a specific extension, it's recommended to first try enabling it in the extension's own ini file.
1387
-
If you encounter issues or need to enable an extension on all systems by default, you can try adding it to default.ini.*
0 commit comments