Skip to content

Instantly share code, notes, and snippets.

@GitHub30
Last active December 18, 2022 07:51
Show Gist options
  • Save GitHub30/5f6399a9e7c909573513265557230262 to your computer and use it in GitHub Desktop.
Save GitHub30/5f6399a9e7c909573513265557230262 to your computer and use it in GitHub Desktop.
set -xe \
&& sudo dnf install -y libnsl \
&& curl -LO https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/7.1.33/xampp-linux-x64-7.1.33-1-installer.run \
&& chmod +x xampp-linux-x64-7.1.33-1-installer.run \
&& sudo ./xampp-linux-x64-7.1.33-1-installer.run --mode unattended \
&& echo 'PATH="/opt/lampp/bin:$PATH"' >> ~/.bashrc \
&& source ~/.bashrc \
&& sudo /opt/lampp/lampp start \
&& sudo systemctl stop firewalld \
&& sudo systemctl disable firewalld
set +xe
@GitHub30
Copy link
Author

sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

dnf module list php

@GitHub30
Copy link
Author

dnf module list php
Last metadata expiration check: 0:14:28 ago on Fri 16 Dec 2022 02:08:39 PM UTC.
Rocky Linux 8 - AppStream
Name                                             Stream                                                 Profiles                                                               Summary                                                           
php                                              7.2 [d][e]                                             common [d], devel, minimal                                             PHP scripting language                                            
php                                              7.3                                                    common [d], devel, minimal                                             PHP scripting language                                            
php                                              7.4                                                    common [d], devel, minimal                                             PHP scripting language                                            
php                                              8.0                                                    common [d], devel, minimal                                             PHP scripting language                                            

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[funaox@instance-1 ~]$ cat /etc/rocky-release
Rocky Linux release 8.7 (Green Obsidian)

@GitHub30
Copy link
Author

Last metadata expiration check: 0:00:01 ago on Fri 16 Dec 2022 02:25:09 PM UTC.
Rocky Linux 8 - AppStream
Name                                             Stream                                                 Profiles                                                               Summary                                                           
php                                              7.2 [d][e]                                             common [d], devel, minimal                                             PHP scripting language                                            
php                                              7.3                                                    common [d], devel, minimal                                             PHP scripting language                                            
php                                              7.4                                                    common [d], devel, minimal                                             PHP scripting language                                            
php                                              8.0                                                    common [d], devel, minimal                                             PHP scripting language                                            

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name                                             Stream                                                 Profiles                                                               Summary                                                           
php                                              remi-7.2                                               common [d], devel, minimal                                             PHP scripting language                                            
php                                              remi-7.3                                               common [d], devel, minimal                                             PHP scripting language                                            
php                                              remi-7.4                                               common [d], devel, minimal                                             PHP scripting language                                            
php                                              remi-8.0                                               common [d], devel, minimal                                             PHP scripting language                                            
php                                              remi-8.1                                               common [d], devel, minimal                                             PHP scripting language                                            
php                                              remi-8.2                                               common [d], devel, minimal                                             PHP scripting language                                            

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[funaox@instance-1 ~]$ cat /etc/rocky-release
Rocky Linux release 8.7 (Green Obsidian)

@GitHub30
Copy link
Author

[funaox@xampp ~]$ php-config
Usage: /opt/lampp/bin/php-config [OPTION]
Options:
  --prefix            [/opt/lampp]
  --includes          [-I/opt/lampp/include/php -I/opt/lampp/include/php/main -I/opt/lampp/include/php/TSRM -I/opt/lampp/include/php/Zend -I/opt/lampp/include/php/ext -I/opt/lampp/include/php/ext/date/lib]
  --ldflags           [ -L/opt/lampp/lib -L/bitnami/xamppunixinstaller71stack-linux-x64/src/imap-2007e/c-client -L/opt/lampp/postgresql/lib]
  --libs              [-lcrypt  -lc-client  -lcrypto -lssl -lcrypto -lz -lexslt -lresolv -lcrypt -lrt -lsqlite3 -lpq -lmcrypt -lltdl -lldap -llber -lstdc++ -lcrypto -lssl -lcrypto -lcrypt -liconv -lpng -lz -ljpeg -lcrypto -lssl -lcrypto -lgdbm -lcurl -lbz2 -lz -lsqlite3 -lcrypto -lssl -lcrypto -lrt -lm -ldl -lnsl  -lxml2 -lz -liconv -lm -ldl -lcurl -lxml2 -lz -liconv -lm -ldl -lfreetype -lz -lbz2 -licui18n -licuuc -licudata -licuio -lxml2 -lz -liconv -lm -ldl -lxml2 -lz -liconv -lm -ldl -lcrypt -lxml2 -lz -liconv -lm -ldl -lxml2 -lz -liconv -lm -ldl -lxml2 -lz -liconv -lm -ldl -lxml2 -lz -liconv -lm -ldl -lxml2 -lz -liconv -lm -ldl -lxslt -lxml2 -lz -liconv -ldl -lm -lcrypt ]
  --extension-dir     [/opt/lampp/lib/php/extensions/no-debug-non-zts-20160303]
  --include-dir       [/opt/lampp/include/php]
  --man-dir           [/opt/lampp/php/man]
  --php-binary        [/opt/lampp/bin/php]
  --php-sapis         [ apache2handler cli phpdbg cgi]
  --configure-options [--prefix=/opt/lampp --with-apxs2=/opt/lampp/bin/apxs --with-config-file-path=/opt/lampp/etc --with-mysql=mysqlnd --enable-inline-optimization --disable-debug --enable-bcmath --enable-calendar --enable-ctype --enable-ftp --enable-gd-native-ttf --enable-magic-quotes --enable-shmop --disable-sigchild --enable-sysvsem --enable-sysvshm --enable-wddx --with-gdbm=/opt/lampp --with-jpeg-dir=/opt/lampp --with-png-dir=/opt/lampp --with-freetype-dir=/opt/lampp --with-zlib=yes --with-zlib-dir=/opt/lampp --with-openssl=/opt/lampp --with-xsl=/opt/lampp --with-ldap=/opt/lampp --with-gd --with-imap=/bitnami/xamppunixinstaller71stack-linux-x64/src/imap-2007e --with-imap-ssl --with-gettext=/opt/lampp --with-mssql=shared,/opt/lampp --with-pdo-dblib=shared,/opt/lampp --with-sybase-ct=/opt/lampp --with-mysql-sock=/opt/lampp/var/mysql/mysql.sock --with-mcrypt=/opt/lampp --with-mhash=/opt/lampp --enable-sockets --enable-mbstring=all --with-curl=/opt/lampp --enable-mbregex --enable-zend-multibyte --enable-exif --with-bz2=/opt/lampp --with-sqlite=shared,/opt/lampp --with-sqlite3=/opt/lampp --with-libxml-dir=/opt/lampp --enable-soap --with-xmlrpc --enable-pcntl --with-mysqli=mysqlnd --with-pgsql=shared,/opt/lampp/ --with-iconv=/opt/lampp --with-pdo-mysql=mysqlnd --with-pdo-pgsql=/opt/lampp/postgresql --with-pdo_sqlite=/opt/lampp --with-icu-dir=/opt/lampp --enable-fileinfo --enable-phar --enable-zip --enable-intl --without-libzip --disable-huge-code-pages]
  --version           [7.1.33]
  --vernum            [70133]
[funaox@xampp ~]$ php-config --configure-options
--prefix=/opt/lampp --with-apxs2=/opt/lampp/bin/apxs --with-config-file-path=/opt/lampp/etc --with-mysql=mysqlnd --enable-inline-optimization --disable-debug --enable-bcmath --enable-calendar --enable-ctype --enable-ftp --enable-gd-native-ttf --enable-magic-quotes --enable-shmop --disable-sigchild --enable-sysvsem --enable-sysvshm --enable-wddx --with-gdbm=/opt/lampp --with-jpeg-dir=/opt/lampp --with-png-dir=/opt/lampp --with-freetype-dir=/opt/lampp --with-zlib=yes --with-zlib-dir=/opt/lampp --with-openssl=/opt/lampp --with-xsl=/opt/lampp --with-ldap=/opt/lampp --with-gd --with-imap=/bitnami/xamppunixinstaller71stack-linux-x64/src/imap-2007e --with-imap-ssl --with-gettext=/opt/lampp --with-mssql=shared,/opt/lampp --with-pdo-dblib=shared,/opt/lampp --with-sybase-ct=/opt/lampp --with-mysql-sock=/opt/lampp/var/mysql/mysql.sock --with-mcrypt=/opt/lampp --with-mhash=/opt/lampp --enable-sockets --enable-mbstring=all --with-curl=/opt/lampp --enable-mbregex --enable-zend-multibyte --enable-exif --with-bz2=/opt/lampp --with-sqlite=shared,/opt/lampp --with-sqlite3=/opt/lampp --with-libxml-dir=/opt/lampp --enable-soap --with-xmlrpc --enable-pcntl --with-mysqli=mysqlnd --with-pgsql=shared,/opt/lampp/ --with-iconv=/opt/lampp --with-pdo-mysql=mysqlnd --with-pdo-pgsql=/opt/lampp/postgresql --with-pdo_sqlite=/opt/lampp --with-icu-dir=/opt/lampp --enable-fileinfo --enable-phar --enable-zip --enable-intl --without-libzip --disable-huge-code-pages
[funaox@xampp ~]$

@GitHub30
Copy link
Author

$ php -r 'var_dump(PDO::MYSQL_ATTR_MAX_BUFFER_SIZE);'
PHP Fatal error:  Uncaught Error: Undefined class constant 'MYSQL_ATTR_MAX_BUFFER_SIZE' in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1

Fatal error: Uncaught Error: Undefined class constant 'MYSQL_ATTR_MAX_BUFFER_SIZE' in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment