<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
#!/bin/sh
alt_php_dir="/opt/alt/php85"
if [ `getconf LONG_BIT` = "64" ]
then
    libdir="lib64"
else
    libdir="lib"
fi

FIRST_RUN=`${alt_php_dir}/usr/bin/php -C -q \
    -d include_path=${alt_php_dir}/usr/share/pear \
    -d date.timezone=UTC \
    -d output_buffering=1 \
    -d variables_order=EGPCS \
    -d safe_mode=0 \
    -d register_argc_argv="On" \
    -d open_basedir="" \
    -d auto_prepend_file="" \
    -d auto_append_file=""  \
    ${alt_php_dir}/usr/share/pear/pearcmd.php "$@"`

if `echo "${FIRST_RUN}" | grep -q "requires PHP extension"`; then
    EXTENSIONS=`echo "${FIRST_RUN}" | grep -o 'requires PHP extension "[a-z]*"' | sed 's/requires PHP extension //' | sed 's/"//g'`
    INCLUDE=""
    for ext in ${EXTENSIONS}; do
        if [ -e ${alt_php_dir}/usr/${libdir}/php/modules/${ext}.so ]; then
            INCLUDE="${INCLUDE} -d extension=${ext}.so"
        else
            echo "$FIRST_RUN"
            echo "alt-PHP extension ${ext} is required."
            exit 1
        fi
    done
    ${alt_php_dir}/usr/bin/php -C -q -n \
        -d include_path=${alt_php_dir}/usr/share/pear \
        -d date.timezone=UTC \
        -d output_buffering=1 \
        -d variables_order=EGPCS \
        -d safe_mode=0 \
        -d register_argc_argv="On" \
        -d open_basedir="" \
        -d auto_prepend_file="" \
        -d auto_append_file=""  \
        ${INCLUDE} \
        ${alt_php_dir}/usr/share/pear/pearcmd.php "$@"
else
        echo "$FIRST_RUN"
fi
