2024.8.23
Loading...
Searching...
No Matches
ajax.php.php File Reference

Go to the source code of this file.

Variables

global $bearsamppBins
 
global $bearsamppLang
 
foreach($bearsamppBins->getPhp() ->getVersionList() as $version) $exts = count($bearsamppBins->getPhp()->getExtensions())
 
 $extsLoaded = count($bearsamppBins->getPhp()->getExtensionsLoaded())
 
 $result
 
 $result ['extscount'] = '<span class="m-1 float-end badge text-bg-primary">' . $extsLoaded . ' / ' . $exts . '</span>'
 
 $result ['pearversion'] = '<span class="m-1 float-end badge text-bg-primary">' . $bearsamppBins->getPhp()->getPearVersion(true) . '</span>'
 
if($bearsamppBins->getPhp() ->isEnable()) else
 
 foreach ( $bearsamppBins->getPhp() ->getExtensionsFromConf() as $extName=> $extStatus)
 

Variable Documentation

◆ $bearsamppBins

global $bearsamppBins

Retrieves status, versions, extensions count, PEAR version, and extensions list information and returns it as a JSON-encoded array.

This script checks the status of PHP (enabled or disabled), lists all PHP versions available, counts the total and loaded PHP extensions, retrieves the PEAR version, and compiles a list of PHP extensions with their respective statuses and versions. The output is JSON-encoded, making it suitable for use in web applications where such information might be displayed to the user.

@global object $bearsamppBins Provides access to system binaries and their configurations. @global object $bearsamppLang Provides language support for retrieving language-specific values.

Returns
void Outputs a JSON string that can be parsed by JavaScript or other languages to display PHP configuration details.

Definition at line 24 of file ajax.php.php.

◆ $bearsamppLang

global $bearsamppLang

Definition at line 24 of file ajax.php.php.

◆ $exts

foreach ( $bearsamppBins->getPhp() ->getVersionList() as $version) $exts = count($bearsamppBins->getPhp()->getExtensions())

Retrieves the list of PHP versions and sets it in the result array. Counts the total and loaded PHP extensions and sets the count in the result array.

Definition at line 65 of file ajax.php.php.

◆ $extsLoaded

$extsLoaded = count($bearsamppBins->getPhp()->getExtensionsLoaded())

Definition at line 66 of file ajax.php.php.

◆ $result [1/3]

$result
Initial value:
= array(
'status' => '',
'versions' => '',
'extscount' => '',
'pearversion' => '',
'extslist' => '',
)

Generates a JSON-encoded array containing the status, versions, extension count, PEAR version, and a list of PHP extensions.

@global object $bearsamppBins Provides access to system binaries and their configurations. @global object $bearsamppLang Provides language support for retrieving language-specific values.

Returns
void Outputs a JSON string that can be parsed by JavaScript or other languages to display PHP configuration details.

Definition at line 34 of file ajax.php.php.

◆ $result [2/3]

$result[ 'extscount'] = '<span class="m-1 float-end badge text-bg-primary">' . $extsLoaded . ' / ' . $exts . '</span>'

Definition at line 67 of file ajax.php.php.

◆ $result [3/3]

$result[ 'pearversion'] = '<span class="m-1 float-end badge text-bg-primary">' . $bearsamppBins->getPhp()->getPearVersion(true) . '</span>'

Retrieves the PEAR version and sets it in the result array.

Definition at line 72 of file ajax.php.php.

◆ else

if ( $bearsamppBins->getPhp() ->isEnable()) else
Initial value:
{
$result['status'] = '<span class="float-end badge text-bg-danger">' . $bearsamppLang->getValue(Lang::DISABLED) . '</span>'
$result
Definition ajax.php.php:34
global $bearsamppLang
Definition ajax.php.php:24
const DISABLED

Checks if PHP is enabled and sets the status in the result array.

Definition at line 47 of file ajax.php.php.

◆ foreach

foreach($bearsamppBins->getPhp() ->getExtensionsFromConf() as $extName=> $extStatus) ( $bearsamppBins->getPhp() ->getExtensionsFromConf() as,
$extStatus )

Retrieves the list of PHP extensions from the configuration and sets it in the result array. Outputs the result array as a JSON-encoded string.

Definition at line 77 of file ajax.php.php.