cancel
Showing results for 
Search instead for 
Did you mean: 

On fresh Magento 2.4.2. installation - 'Failed to set PHP CodeSniffer installed_paths Config'

On fresh Magento 2.4.2. installation - 'Failed to set PHP CodeSniffer installed_paths Config'

I have been trying all day to install a fresh copy of Magento 2.4.2 with no success. On the composer installation I get this error "Failed to set PHP CodeSniffer installed_paths Config". If I move on with bin/magento setup:install, localhost/magento shows a 404 Error "The requested URL was not found on this server."

 

I have installed PHP Code Sniffer with composer 

composer global require "squizlabs/php_codesniffer=*"

Then I run "composer global config bin-dir --absolute

 

I also tried installing PHP Codesniffer via pear but it still does not work.

 

Any ideas on how could I solve this?

 

Versions:

 - OS: MacOS 11.2.1
 - PHP: 7.4.16
- Local server: Apache/2.4.46
- MySql 8.0  
3 REPLIES 3

Re: On fresh Magento 2.4.2. installation - 'Failed to set PHP CodeSniffer installed_paths Config'

The same here. Any solution?

Re: On fresh Magento 2.4.2. installation - 'Failed to set PHP CodeSniffer installed_paths Config'

Could anyone help here? Thank you

Re: On fresh Magento 2.4.2. installation - 'Failed to set PHP CodeSniffer installed_paths Config'

same here. Need help.

 

--- I update my answer. ---

I did the following, it worked for me and was able to install the last version 2.4.2 of magento on a local machine: 

  • Virtual Box 6.1,
  • Ubuntu 20.04 - 2,
  • Apache 2.4.41 and
  • PHP 7.4.

 

Step 1: Check if the Apache rewrite is enabled in the file /ect/apache2/apache2.conf for /home/my-user/ directory. If not do as below.

 

Note: I am installing magento in /home/user-name/ directory, if some one use /var/www/html/ then change the following code.

 

 

<Directory /home/user-name/>
	Options Indexes FollowSymLinks
	AllowOverride All
	Require all granted
</Directory>

 

Step 2: I also needed to downgrade my composer to 1.10.20 by using the following commande.

sudo -H composer self-update 1.10.20

I was able to download the magento without any Failed to set PHP CodeSniffer error, changed the file permissions and used the commande line to install magento.