3 hours ago3 hr AlphaGNU Standalone CWP PHP Build ManagerManaging multiple PHP versions on CWP can sometimes be difficult, especially when dependency issues involving zlib, libzip, PCRE2, GD, or other libraries cause normal PHP builds to fail.The AlphaGNU Standalone CLI CWP PHP Build Manager provides a simple alternative: build PHP directly from official PHP source while maintaining CWP-compatible PHP layouts.Why use it?If PHP installation is failing on a server because of dependency or repository problems, this manager can be used to quickly build and install the required PHP version without relying on CWP's PHP build scripts or Remi PHP packages.It supports:PHP 7.4.x through PHP 8.5.xPHP SelectorPHP-FPMPHP SwitcherMultiple PHP versions in one commandOne-line CLI installationPIE extension installationDedicated PHP 8.5 runtime for PIEAutomatic dependencies for extensions such as Redis, Memcached and ImagickInstallation/UpdateThis script will install the latest PHP even if it is not released in the CWP repository; it will download it from php.net when you specify the version during installation.Download the latest package:Install it:rm -rf /root/php-manager mkdir -p /root/php-manager cd /root/php-manager wget https://www.alphagnu.com/upload/cwp_php_manager_alphagnu.zip unzip cwp_php_manager_alphagnu.zip chmod +x install.sh bin/* ./install.sh sed -i -E '/^[[:space:]]*extension_dir[[:space:]]*=[[:space:]]*["'\'']\/usr\/local\/lib\/php\/extensions\/no-debug-non-zts-[0-9]+["'\''][[:space:]]*$/ s/^/;/' /usr/local/php/php.ini Verify:php-manager --help Start the interactive menu:php-manager Build PHP VersionsPHP SelectorBuild multiple versions:php-manager selector 7.4.33 8.2.29 8.3.8 8.4.25 8.5.10 Installed under:/opt/alt/phpXY/usr/ PHP-FPMphp-manager fpm 7.4.33 8.2.29 8.3.8 8.4.25 8.5.10 Installed under:/opt/alt/php-fpmXY/usr/ PHP SwitcherSwitcher uses one exact version:php-manager switcher 8.5.10 Installed under:/usr/local/php/ Dedicated PHP Runtime for PIEThe manager includes a separate PHP 8.5 CLI runtime exclusively for PIE.It is installed at:/usr/local/php-pie/ Build or verify it with:php-manager pie-runtime 8.5.10 Verify:/usr/local/php-pie/bin/php -v This runtime does not replace the server's default PHP and does not create an FPM service.Install PHP Extensions with PIEYou can find the package names by going to this URL and searching https://packagist.org/extensionsFor example, install Memcached for PHP-FPM 7.4:php-manager pie 7.4.33 php-memcached/php-memcached fpm Redis:php-manager pie 7.4.33 redis/redis fpm Imagick:php-manager pie 7.4.33 imagick/imagick fpm APCu:php-manager pie 7.4.33 apcu/apcu fpm PIE runs using:/usr/local/php-pie/bin/php while the extension is compiled against the selected target PHP using its own phpize and php-config.Quick PHP Recovery / Alternative Build MethodOn some servers, the standard CWP PHP build process can fail because of dependency problems such as:zliblibzipPCRE2GD librariesincompatible system development packagesInstead of spending time troubleshooting the CWP build wrapper, you can use AlphaGNU PHP Manager to build the required PHP version directly from the official PHP source.For example:php-manager fpm 8.3.8 or:php-manager selector 8.3.8 This makes the manager useful not only for installing additional PHP versions, but also as a quick alternative when the normal CWP PHP build process is blocked by dependency issues.SummaryAlphaGNU PHP Manager provides a standalone way to manage PHP versions on CWP-compatible servers without depending on CWP's PHP build wrapper scripts or Remi repositories.It supports:PHP Selector PHP-FPM PHP Switcher PIE Extensions Dedicated PHP 8.5 PIE Runtime Multiple PHP Versions One-Line Builds For servers where normal PHP builds are failing due to dependency problems, it provides a practical and faster alternative for getting the required PHP version installed.
Create an account or sign in to comment