Blog
-
June 08, 2023
Unable to install php-zip on server with Amazon Linux 2023 as well as unable to find.
-
September 18, 2022
The default MySQL 8 auth plugin is
auth_socket
, which causes the error "SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client" when an application is attempting to log in to the database with a password. Let's go through the steps to fix this.Step 1
Login to the
mysql
server in sudo mode as the root user and supply any required passwords.sudo mysql -u root -p
Step 2
Now run the following
ALTER USER
command, replacing root with your database user and password if your password.ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Now run:
FLUSH PRIVILEGES;
Now exit the MySQL server:
exit;
-
June 22, 2022
Problem
I am working with Magento 2.3. Recently I've configured the xdebug in my local to identify some process flow. But it does not help me to check the flow.
Then I hit the website in local, I am facing the Uncaught Error: Call to undefined function xdebug_disable() in vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php on line 73
Solution
Open the file
vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/_bootstrap.php
From :-
if (!(bool)$debugMode && extension_loaded('xdebug')) { xdebug_disable(); }
To:-
-
June 15, 2021
How can I select a random row using Eloquent or Fluent in the Laravel framework?
I know that by using SQL, you can do order by RAND(). However, I would like to get the random row without doing a count on the number of records prior to the initial query.
-
May 22, 2021
Once again, I have a problem with my apache virtual host configuration. (The default configuration is used instead of my specific one).
The problem is not really the misconfiguration but how to solve it.
Does anyone have good advice to do resolve this kind of problem quickly?
Some more pieces of information.
The default conf file is this one:
NameVirtualHost * <VirtualHost *> ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin">
-
May 22, 2021
I tried to install an extension from the Magento market place but I got an incompatibility error...
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on the current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- laminas/laminas-dependency-plugin is locked to version 1.0.3 and an update of this package was not requested.
- laminas/laminas-dependency-plugin 1.0.3 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
Problem 2
- magento/magento-composer-installer
-
May 18, 2021
I ran into this error when doing a
pecl install imagick
on a Mac.
$ pecl install imagick [...] checking for pkg-config... no pkg-config not found configure: error: Please reinstall the pkg-config distribution ERROR: `/private/tmp/pear/temp/imagick/configure --with-php-config=/usr/local/opt/php/bin/php-config --with-imagick' failed
By default, the needed
pkg-config
binary isn’t installed. You can install it via Homebrew.$ brew instal pkg-config ==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2.catalina.bottle.1.tar.gz ==> Downloading from https://akamai.bintray.com/c0/c0a6927c8e404f6db8b14d6644a218b22ddb0d27be1fa0a69d15bf0d9a6875ae?__gda__=exp=1571254410~hmac=2e306f9876b2de0ae458dcbf1e05bc609777305eb8ad5e25125e9467e8bfcfeb&response-content-disposition=
-
May 18, 2021
I have error when i add module..
Please re-run Magento compile command
so i run below command but also display error that below when run command from root,
php magento setup:di:compile
-
April 02, 2021
Recently, I updated the PHP on my machine to version 7.4 using homebrew for Mac OS only to then realise that one of my older projects that I still needed to maintain, made on version 7.2 would no longer work due to using depreciated PHP functions such as array_key_exists.
The long term solution to this would be to update the project so it’s compatible with PHP version 7.4, but for the sake of time, and potential fixes that needed to go out immediately, I needed to be able to develop this project in the environment it’s running in. Fortunately, I use valet to develop all my PHP applications a tool I can only recommend for PHP developers. Valet allows you to develop PHP applications on your local machine with a much higher level of ease than I’ve found using other services such as dockers or XAMP/MAMP.
Valet, with the use of homebrew, supports switching your system PHP version at will to any version installable via homebrew. So switching versions can be as simple as the following:
-
October 18, 2020
HTTP Strict Transport Security (HSTS) instructs web browsers to only use secure connections (https://) for all future requests when communicating with a web site. Doing so helps prevent SSL protocol attacks, SSL stripping, cookie hijacking, and other attempts to circumvent SSL protection.