skip to Main Content

I’m very confusing what’s the matter?
I use :

xampp3.3
php 8.2
magento 2.4.6
elasticsearch 8.8.1

I did all the others said in forums and other questions in stackoverflow or magento stackexchange. but my problem didn’t resolve.

enter image description here

what I did:

  1. setting in the database core_config_data table:

INSERT INTO core_config_data (path, value) VALUES (‘dev/static/sign’,0) ON DUPLICATE KEY UPDATE value = 0;

and set ‘web/seo/use_rewrites’ to 0 due to an answer in forums.

  1. remove folders in ‘pubstatic’ and ‘var’.
  2. change owner and give permissions:

takeown /f . /r

this commands one by one:

icacls .pub /grant Everyone:F /t
icacls .var /grant Everyone:F /t
icacls .appetc /grant Everyone:F /t
  1. on httpd.conf the line below is active: LoadModule rewrite_module modules/mod_rewrite.so
  2. add this section to httpd.conf:

<Directory "C:xampphtdocsmagento2"> Options Indexes
SymLinksifOwnerMatch MultiViews AllowOverride All Require all granted

and

timeout 300

  1. in di.xml, change developerMaterialization value from symLink to Copy.

  2. run this commands one by one

    php bin/magento setup:upgrade
    php bin/magento setup:static-content:deploy -f
    php bin/magento indexer:reindex
    php bin/magento cache:flush

  3. delete cache folder under var and even clean cashe by:

    php binmagento cache:clean
    php binmagento cache:flush

I use localhost, and also use 127.0.0.1 in store url and admin url.
magento2 is loaded but without any css. and the admin panel not loaded at all (404 error).
I test on developer and also production mode.

my installation command for magento 2.4.6 is :

php bin/magento setup:install --base-url=http://localhost/magento2/  --db-host=localhost --db-name=magento --db-user=root --db-password=root  --admin-firstname=E --admin-lastname=R [email protected]  --admin-user=admin --admin-password=admin123 --language=en_US  --use-rewrites=1 --search-engine=elasticsearch8 --use-sample-data --cleanup-database

I spent much time but without any success.

2

Answers


  1. There are many reason for this, first at all, you need to open the 404 link in browser to see the actual issue, sometime It’s the issue with permission (need to check the Apache/Nginx log)

    Second, reason likely to happen because files did not generate properly, for this case, you need to enable the developer mode

    See here: https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-mode.html#change-to-developer-mode

    Then run command bin/magento setup:upgrade

    Hope this work for you.

    Login or Signup to reply.
  2. Some of you might getting css and js loading issue.

    INSERT INTO core_config_data (path, value) VALUES (‘dev/static/sign’,0) ON DUPLICATE KEY UPDATE value = 0;

    and set ‘web/seo/use_rewrites’ to 0 due to an answer in forums.

    php bin/magento indexer:reindex && php bin/magento se:up && php bin/magento se:s:d -f && php bin/magento c:f

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search