HEX
Server: LiteSpeed
System: Linux php-prod-3.spaceapp.ru 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: sarli3128 (1010)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/local/lsws/admin/html/lib/util/build_php/build_install_ext.template
###########################################
EXTENSION_NAME="__extension_name__"
EXTENSION_DIR=__extension_dir__
EXTENSION_EXTRA_CONFIG="__extension_extra_config__"
###########################################


echo ""
echo "=============================================="
main_msg "Start building ${EXTENSION_NAME} Extension"
echo "=============================================="
echo `date`
echo ""

main_msg "Changing to build directory ${PHP_BUILD_DIR}/php-${PHP_VERSION}/${EXTENSION_DIR}" 
cd ${PHP_BUILD_DIR}/php-${PHP_VERSION}/${EXTENSION_DIR}
check_errs $? "Could not get into build directory"

main_msg "Running PHPize for ${EXTENSION_NAME} extension" 
${INSTALL_DIR}/bin/phpize 
check_errs $? "Could not run PHPize for ${EXTENSION_NAME}"

main_msg "Configuring ${EXTENSION_NAME} extension build" 
./configure ${EXTENSION_EXTRA_CONFIG} --with-php-config=${INSTALL_DIR}/bin/php-config
check_errs $? "Could not configure ${EXTENSION_NAME} extension build"

main_msg "Compiling ${EXTENSION_NAME} extension" 
make
check_errs $? "Could not compile ${EXTENSION_NAME} extension"

main_msg "Installing ${EXTENSION_NAME} extension" 
make install
check_errs $? "Could not install ${EXTENSION_NAME} extension"

if [  "${INST_USER}" = "root" ]; then
    echo "chown -R ${PHP_USR}:${PHP_USRGROUP} ${PHP_BUILD_DIR}/php-${PHP_VERSION}/${EXTENSION_DIR} "
	chown -R ${PHP_USR}:${PHP_USRGROUP} ${PHP_BUILD_DIR}/php-${PHP_VERSION}/${EXTENSION_DIR} 
	check_errs $? "Could not chown to ${PHP_USR}:${PHP_USRGROUP} for direcotry ${PHP_BUILD_DIR}/php-${PHP_VERSION}/${EXTENSION_DIR}"
fi

echo ""
echo "=============================================="
main_msg "${EXTENSION_NAME} extension build complete"
echo "=============================================="
echo `date`
echo ""