https://www.apachelounge.com/viewtopic.php?t=6359
https://windows.php.net/downloads/releases/
https://www.apachelounge.com/viewtopic.php?t=6359
https://windows.php.net/downloads/releases/
sudo yum install php-cli php-zip wget unzip
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
composer
To install with single command:
pecl install xdebug
Or Follow the instructions below:
https://xdebug.org/wizard
brew install php && brew install autoconf
should pull in the right packages.tar -xvzf xdebug-3.2.2.tgz
cd xdebug-3.2.2
Run: phpize
(See the FAQ if you don't have phpize
).
As part of its output it should show:
Configuring for: ... Zend Module Api No: 20220829 Zend Extension Api No: 420220829
If it does not, you are using the wrong phpize
. Please follow this FAQ entry and skip the next step.
./configure
make
cp modules/xdebug.so /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20220829
/Applications/XAMPP/xamppfiles/etc/php.ini
and add the line:zend_extension = xdebug
Now Xdebug is installed, you can enable its features. Please refer to the dedicated sections in the documentation about information on how to enable and configure these Xdebug features. Where these sections refer to php.ini
or similar, please remember to use /Applications/XAMPP/xamppfiles/etc/php.ini
:
You should put PHP version as you need:
Comands are as follows for shell:
--
dnf install oniguruma oniguruma-devel gcc make gcc-c++ cpp kernel-headers.x86_64 libxml2-devel openssl-devel bzip2-devel libjpeg-devel libpng-devel freetype-devel openldap-devel postgresql-devel aspell-devel net-snmp-devel libxslt-devel libc-client-devel libicu-devel gmp-devel curl-devel libmcrypt-devel pcre-devel sqlite-devel libdb-devel enchant-devel libXpm-devel mysql-devel readline-devel libedit-devel recode-devel libtidy-devel libtool-ltdl-devel libwebp libwebp-devel expat expat-devel libmemcached libmemcached-devel
--
dnf install libzip libzip-devel
dnf install cmake zlib-devel
--
cd /usr/local/src
rm -rf libzip*
wget https://libzip.org/download/libzip-1.9.2.tar.gz
tar zxvf libzip*
cd libzip*/
mkdir build
cd build
/usr/bin/cmake3 ..
make && make install
--
cd /usr/local/src
rm -rf pcre2*
wget https://github.com/PhilipHazel/pcre2/releases/download/pcre2-10.41/pcre2-10.41.zip -O pcre2.zip
unzip pcre2.zip
cd pcre2-*/
./configure
make && make install
--
cd /usr/local/src
rm -rf master* libavif-master*
wget https://github.com/AOMediaCodec/libavif/archive/refs/heads/master.zip
unzip master.zip
cd libavif-main
mkdir build-dir
cd build-dir
cmake ..
make
make install
--
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig
--
mkdir -p /usr/local/php-82
cd /usr/local/php-82
wget http://php.net/distributions/php-8.2.0.tar.gz
tar zxvf php-8.2.0.tar.gz
cd php-8.2.0
./configure --with-config-file-path=/usr/local/php --enable-cgi --with-config-file-scan-dir=/usr/local/php/php.d --with-zlib=/usr --enable-mbstring --with-zip --enable-bcmath --enable-pcntl --enable-ftp --enable-exif --enable-calendar --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy --with-curl --with-iconv --with-gmp --with-pspell --enable-gd --with-avif --with-jpeg --with-freetype --enable-gd-jis-conv --with-webp --with-zlib-dir=/usr --with-xpm --with-openssl --with-pdo-mysql=mysqlnd --with-gettext=/usr --with-bz2=/usr --with-mysqli --enable-soap --enable-phar --with-xsl --with-kerberos --enable-posix --enable-sockets --with-external-pcre --with-libdir=lib64 --with-mysql-sock=/var/lib/mysql/mysql.sock --enable-intl --with-password-argon2 --enable-litespeed --with-ldap=/usr --with-ldap-sasl=/usr
make
make install
--
php -v
You should see (if all went well):
PHP 8.2.0 (cli) (built: Dec 12 2022 17:57:50) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.0, Copyright (c) Zend Technologies
Error: 503 Service Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Solution:
systemctl start php80-php-fpm (if face the error follow the next command )systemctl status php80-php-fpm.service
ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98)
netstat -tulpn | grep -w 9000
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 884/php-fpm: master
kill 884
systemctl start php80-php-fpm
Note: Use your PHP version, PID and Port in the command. if netstat not works install net-tools first: yum install net-tools
Error 1: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.4.0"
Solution: composer install --ignore-platform-reqs
$payStub=new mPDF();
$payStub->SetTitle('My title');
$payStub->WriteHTML($pcTableRows);
$payStub->Output('yourFileName.pdf', 'I');
Install PHP for Nginx with PHP-FPM:
sudo apt update
sudo apt install --no-install-recommends php8.1 [Apache HTTP server and its httpd process]
sudo apt-get install php8.1-fpm -y [For PHP-FPM works with nginx]
php -v
sudo apt-get install -y php8.1-cli php8.1-common php8.1-mysql php8.1-zip php8.1-gd php8.1-mbstring php8.1-curl php8.1-xml php8.1-bcmath php8.1-imap
php -m
Check if PHP-FPM is running:
sudo systemctl status php8.1-fpm
Add PHP support to Nginx:
sudo nano /etc/nginx/sites-available/default
Enable PHP in Nginx’s config file:
server {
# Example PHP Nginx FPM config file
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
# Add index.php to setup Nginx, PHP & PHP-FPM config
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
# pass PHP scripts on Nginx to FastCGI (PHP-FPM) server
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# Nginx php-fpm sock config:
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
# Nginx php-cgi config :
# Nginx PHP fastcgi_pass 127.0.0.1:9000;
}
# deny access to Apache .htaccess on Nginx with PHP,
# if Apache and Nginx document roots concur
location ~ /\.ht {
deny all;
}
} # End of PHP FPM Nginx config example
sudo nginx -t
sudo systemctl restart nginx
Enable ondrej/php repository
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php && apt-get update
Install additional PHP packagesapt-get install php*-{cgi,cli,fpm,pdo,gd,mbstring,mysqlnd,opcache,xml,zip}
Note: php* should be replaced with a specific PHP version, i.e. php7.4, unless you really need to install all available additional PHP versions.
Configuring the second PHP Version in Virtualmin
The following PHP execution modes are available : fpm The following PHP-FPM versions are available : 8.0.13 (php-fpm) 7.4.30 (php74-php-fpm) 8.2.0 (php82-php-fpm)
You can configure which one is the default PHP version used on new Virtual Servers. The default is to use the newest available. You can change that default in System Settings → Server Templates → Default → PHP Options page.
Configuring Individual Virtual Servers
You can configure the PHP version being used for a specific Virtual Server by selecting Server Configuration → PHP Options.
=RANK(number,ref,[order]) To rank in descending order, we will use the formula =RANK(B2,($C$5:$C$10),0) If we want unique ranks, we can use...