Bootstrap is the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.
Continue reading “How to enable Bootstrap in Symfony 6 project”
How to implement Facebook login with Symfony 5
Allowing your users to register and login on to your website with Facebook is pretty useful and quite standard nowadays.
Fortunately, doing this with Symfony is quite simple and we will see how to do it in a few steps.
Continue reading “How to implement Facebook login with Symfony 5”
Install PHP 7.4 ZTS with ext-parallel on Debian 10
apt-get install build-essential pkg-config autoconf bison re2c libxml2-dev libssl-dev libsqlite3-dev libcurl4-openssl-dev libpng-dev libjpeg-dev libonig-dev libfreetype6-dev libxslt1-dev libzip-dev libtidy-dev libmysqlclient-dev cd /usr/local/src VERSION=7.4.21 wget -qO- https://www.php.net/distributions/php-${VERSION}.tar.gz | tar -xz cd php-${VERSION}/ext git clone --depth 1 --branch v1.1.4 https://github.com/krakjoe/parallel.git cd .. ./buildconf --force ./configure \ --prefix=/etc/php/7.4z \ --with-config-file-path=/etc/php/7.4z \ --with-config-file-scan-dir=/etc/php/7.4z/conf.d \ --disable-cgi \ --with-zlib \ --with-zip \ --enable-soap \ --enable-intl \ --with-openssl \ --with-curl \ --enable-mysqlnd \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --enable-pcntl \ --enable-gd \ --enable-exif \ --with-jpeg \ --with-freetype \ --with-xsl \ --with-gettext \ --enable-bcmath \ --enable-mbstring \ --enable-calendar \ --with-tidy \ --enable-maintainer-zts \ --enable-parallel \ --enable-ftp \ --enable-sockets make -j$(nproc) make install cp php.ini-production /etc/php/7.4z/php.ini ln -s /etc/php/7.4z/bin/php /usr/bin/php74z
Additional config: OPCache needs to be turned on, otherwise may run to memory corruption error in parallel extension.
mkdir /etc/php/7.4z/conf.d nano /etc/php/7.4z/conf.d/additional.ini
memory_limit=-1 [opcache] zend_extension=opcache opcache.enable=1 opcache.enable_cli=1 opcache.memory_consumption=512 opcache.interned_strings_buffer=128 extension=amqp.so pdo_mysql.default_socket="/var/run/mysqld/mysqld.sock"
Disable ONLY_FULL_GROUP_BY in doctrine
Anxious from getting an exception of ONLY_FULL_GROUP_BY with the Symfony project?
[2021-06-11T21:17:30.912452+03:00] request.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred while executing ... which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by at /var/www/project/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112)"} []
There is a best and simple solution if you want to get rid of this exception from a particular Symfony project, all you need to do is, you have to update the configuration of the doctrine.
You need to add 1002 key inside the options key with the value ‘SET sql_mode=(SELECT REPLACE(@@sql_mode, “ONLY_FULL_GROUP_BY”, “”))’ under the dbal configuration.
Like this:-
doctrine: dbal: url: '%env(resolve:DATABASE_URL)%' options: 1002: 'SET sql_mode=(SELECT REPLACE(@@sql_mode, "ONLY_FULL_GROUP_BY", ""))' # ...
That’s it. Now clear the cache if you’re having any trouble otherwise you’re ready to go.
That’s how you could disable ONLY_FULL_GROUP_BY in doctrine.
New in Symfony 5.3: Notifier Integrations
The Notifier component was introduced in Symfony 5.2 as the best way to send notifications via one or more channels (email, SMS, chats, etc.) The component is already integrated with dozens of services, but in Symfony 5.3 we’ve added many more integrations:
Chatting services
- Microsoft Teams added by Edouard Lescot in PR 39007
- Gitter added by Christin Gruber in PR 39838
- Mercure added by Mathias Arlaud in PR 39342
SMS services
- SMS Biuras added by Vasilij Duško in PR 40691
- LightSMS added by Vasilij Duško in PR 40607
- iqsms added by Oleksandr B. in PR 39096
- AllMySMS added by Quentin Dequippe in PR 39617
- MessageBird added by Vasilij Duško in PR 40646
- Spot-Hit added by James Hemery in PR 39948
- Octopush added by Aurélien Martin in PR 39702
- GatewayAPI added by Piergiuseppe Longo in PR 39568
- Clickatell added by Kevin Auvinet in PR 38922
Other
We’ve also added some fake SMS and chat services so you can use them to debug features while developing them:
- FakeSms added by James Hemery in PR 39949
- FakeChat added by Oskar Stark in PR 40647
Source: Symfony Blog
How to setup MikroTik guest WiFi network
Depending on the setup, there are various ways to configure a MikroTik’s Wi-Fi for guest access. In this example, I will be using the MikroTik hAP ac2 router, which has built-in Wi-Fi. I will be using MikroTik’s Virtual AP feature to create a second SSID for guest access.
How to install Wine on Ubuntu 20.04 LTS (Focal Fossa)
What is Wine?
Wine (originally an acronym for “Wine Is Not an Emulator”) is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, such as Linux, macOS, & BSD. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly, eliminating the performance and memory penalties of other methods and allowing you to cleanly integrate Windows applications into your desktop.
Continue reading “How to install Wine on Ubuntu 20.04 LTS (Focal Fossa)”
NO_PUBKEY B188E2B695BD4743
Sometimes you may see this error “The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743”
You can solve this issue by running the following commands.
apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys B188E2B695BD4743 # apt-get update
Install libssh2 for curl on DirectAdmin server
libssh2 is a client-side C library implementing the SSH2 protocol.
Continue reading “Install libssh2 for curl on DirectAdmin server”
How to install PHP 7.4 on CentOS 8
This guide let you learn how install the latest PHP version 7.4 on your CentOS system or your CentOS server on any VPS or any Dedicated hosting and configure it with Apache and Nginx.