Skip to content

Commit 9143e61

Browse files
committed
Update enabling a module info
1 parent 59ed689 commit 9143e61

File tree

1 file changed

+57
-43
lines changed

1 file changed

+57
-43
lines changed

docs/cloudlinuxos/alt-ea_packages/README.md

Lines changed: 57 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ When you deploy an updated version of PHP, using your system’s regular update
11271127
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.
11281128
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.
11291129

1130-
#### The bin files:
1130+
### The bin files:
11311131

11321132
<div class="notranslate">
11331133

@@ -1138,7 +1138,7 @@ dbunit lsphp peardev phar php
11381138
```
11391139
</div>
11401140

1141-
#### Modules and pecl extensions:
1141+
### Modules and pecl extensions:
11421142

11431143
<div class="notranslate">
11441144

@@ -1180,7 +1180,7 @@ igbinary.so oauth.so stats.so
11801180
```
11811181
</div>
11821182

1183-
#### Running code on a specific version through the CLI:
1183+
### Running code on a specific version through the CLI:
11841184

11851185
<div class="notranslate">
11861186

@@ -1190,7 +1190,7 @@ Hello, World!
11901190
```
11911191
</div>
11921192

1193-
#### Location of ini config files:
1193+
### Location of ini config files:
11941194

11951195
<div class="notranslate">
11961196

@@ -1232,7 +1232,7 @@ lzf.ini raphf.ini
12321232
```
12331233
</div>
12341234

1235-
#### Location of default.ini:
1235+
### Location of default.ini:
12361236

12371237
<div class="notranslate">
12381238

@@ -1241,7 +1241,7 @@ ls /opt/alt/phpXY/etc/php.d/default.ini
12411241
```
12421242
</div>
12431243

1244-
#### Listing enabled modules on a specific version:
1244+
### Listing enabled modules on a specific version:
12451245

12461246
<div class="notranslate">
12471247

@@ -1281,7 +1281,7 @@ zlib
12811281
```
12821282
</div>
12831283

1284-
#### Enabling a module through the CLI:
1284+
### Enabling a module through the CLI:
12851285

12861286
<div class="notranslate">
12871287

@@ -1326,66 +1326,80 @@ As you can see, each version is entirely self-contained,
13261326
and changing configurations in one will not impact the others,
13271327
a desired feature in hosting environments.
13281328

1329-
#### Enabling a module through the configuration files:
1329+
### Additional configurations (optional)
13301330

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.
13321332

1333-
- If each extension has its own ini file (e.g., memcached.ini),
1334-
open that file. Location of ini config files:
1333+
PHP extensions can be enabled or disabled in different configuration files.
1334+
* If you need to enable or disable an extension by *default* across all systems, list it by updating the `default.ini`.
1335+
* If you want to enable or disable an extension only for a *specific* PHP version or setup, start by editing that extension's individual `.ini` file.
13351336

1336-
<div class="notranslate">
1337+
#### Enabling a module through `default.ini`
13371338

1338-
```
1339-
/opt/alt/phpXY/etc/php.d.all/
1340-
```
1341-
</div>
1339+
To enable or disable extensions in your installed PHP version:
13421340

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.
1341+
1. Open the `default.ini` file, usually located in the PHP configuration directory, in an editor of your choice:
13451342

1346-
- Remove the `;` before the line with the extension name to activate it.
1343+
<div class="notranslate">
13471344

1348-
- Save the changes in the ini file.
1345+
```
1346+
/opt/alt/phpXY/etc/php.d/default.ini
1347+
```
13491348

1350-
If there is no such line:
1349+
</div>
13511350

1352-
- Inside the ini file, add line `extension=memcached.so`
1351+
2. Edit the list of extensions:
1352+
* To enable an extension, remove the semicolon `;` at the beginning of the line.
1353+
* To disable an extension, add a semicolon `;` at the beginning of the line.
1354+
* If the extension line is missing, add it in this format: `extension=extension_name.so` (replace `extension_name.so` with the actual extension name).
13531355

1354-
- Save the changes in the ini file.
1356+
3. Save the changes in the `default.ini` file.
13551357

1356-
**2. Enabling through default.ini:**
1358+
#### Enabling a module through the configuration files
13571359

1358-
- Open the default.ini file, usually located in the PHP configuration directory:
1360+
Typically, extensions with their own `.ini` files are enabled or disabled directly in those files, allowing more control for a specific PHP configuration.
1361+
* 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.
1362+
* If that does not work or you want to enable it on all systems by default, add it to `default.ini`.
13591363

1360-
<div class="notranslate">
1364+
1. Locate the extension’s `.ini` file (e.g., `memcached.ini`) in the directory:
13611365

1362-
```
1363-
/opt/alt/phpXY/etc/php.d/default.ini
1364-
```
1365-
</div>
1366+
<div class="notranslate">
13661367

1367-
- Find lines starting with `;` before the extension name. The `;` sign at the beginning of the line means that this extension is currently inactive.
1368+
```
1369+
/opt/alt/phpXY/etc/php.d.all/
1370+
```
1371+
</div>
13681372

1369-
- Remove the `;` before the line with the extension name to activate it.
1373+
2. Open the file and find the lines starting with a semicolon `;` before the extension name (e.g., `;extension=memcached.so`).
1374+
* The semicolon sign at the beginning of the line means that this extension is currently inactive. To enable an extension, remove the semicolon `;` at the beginning of the line.
1375+
* To disable an extension, add a semicolon `;` at the beginning of the line.
1376+
* If the extension line is missing, add the line:
1377+
<div class="notranslate">
1378+
1379+
```
1380+
extension=memcached.so
1381+
```
13701382
1371-
If there is no such line:
1383+
</div>
13721384
1373-
- Add line `extension=extension name.so`
1374-
(where `extension name.so` - name of extension you need).
1385+
3. Save the changes in the ini file.
13751386
1376-
- Save the changes in the default.ini file.
1387+
#### Increase Upload/Memory Limits
13771388
1378-
***Note:***
1389+
If you need to increase memory and upload size limits:
13791390
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.*
1391+
1. Open the `default.ini` file in an editor of your choice.
1392+
2. Set the limits as needed, e.g:
13821393
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.*
1394+
<div class="notranslate">
13851395
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.*
1396+
```text
1397+
upload_max_filesize=40M
1398+
post_max_size=40M
1399+
memory_limit=256M
1400+
```
13881401
1402+
</div>
13891403
13901404
13911405
## alt-python

0 commit comments

Comments
 (0)