PHP
-
June 08, 2023
Unable to install php-zip on server with Amazon Linux 2023 as well as unable to find.
-
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 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=
-
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:
-
June 17, 2017
Depending on your configuration it may also be unecessary. If you are in
default
ordev
mode you do not need it.You just need it on
production
modeFrom command line and from your Magento root path:
php bin/magento setup:di:compile
P.S: After installing your module make sure you ran:
php bin/magento setup:upgrade
-
June 17, 2017
- Delete the Module folder from
{folder path}\app\code
- Remove module entry from below tables
core_config_data
&setup_module
-
Run command
{magento project root path}>{php path}\php bin/magento setup:upgrade => Setup Upgrade
{magento project root path}>{php path}\php bin/magento cache:flush => Clear Cache
- Delete the Module folder from
-
June 17, 2017
Install phpunit
Installing phpunit package on Ubuntu 16.04 (Xenial Xerus) is as easy as running the following command on terminal:
sudo apt-get update sudo apt-get install phpunit
-
June 17, 2017
Updating/Upgrading to Magento 2.1.0 (via composer)
composer require magento/product-community-edition 2.1.0 --no-update
composer update
rm -rf var/di var/generation
sudo chmod -R 777 var/
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex
After upgrade, check your Magento version with the following command:
php bin/magento --version
Magento CLI version 2.1.0
-
June 17, 2017
Integrity constraint violation: 1062 Duplicate entry ‘4-Images’ for key ‘EAV_ATTRIBUTE_GROUP_ATTRIBUTE_SET_ID_ATTRIBUTE_GROUP_NAME’, query was: UPDATE `eav_attribute_group` SET `attribute_group_name` = ? WHERE (`attribute_group_id`=10)
This particular error presented itself while upgrading from Magento 2.0.2 to Magento 2.1.x and stops the upgrade process. We’ve discovered the issue is related to old data from the previous Magento 1.9.x installation. In order to over come this error, you’ll need to delete a row from the database.
Run the following MySQL query to find and delete the offending attribute.
delete
from eav_attribute_group WHERE attribute_group_name =
'Images'
;
After that then you can attempt to run the upgrade command again and the issue should be resolved.