cancel
Showing results for 
Search instead for 
Did you mean: 

Error when Installing Magento using XAMPP

SOLVED

Error when Installing Magento using XAMPP

Hi everyone, 

 

I'm new here and just getting started with Magento.

 

I'm using XAMPP to install Magento locall, i've created db, download files etc but when i go to localhost/mystore i get the followinf error

Fatal error: Uncaught Exception: Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in C:\xampp\htdocs\mystore\vendor\zendframework\zend-stdlib\src\ArrayObject.php on line 426 in C:\xampp\htdocs\mystore\vendor\magento\framework\App\ErrorHandler.php:61 Stack trace: #0 C:\xampp\htdocs\mystore\vendor\composer\ClassLoader.php(444): Magento\Framework\App\ErrorHandler->handler(2, '"continue" targ...', 'C:\\xampp\\htdocs...', 426, Array) #1 C:\xampp\htdocs\mystore\vendor\composer\ClassLoader.php(444): include() #2 C:\xampp\htdocs\mystore\vendor\composer\ClassLoader.php(322): Composer\Autoload\includeFile('C:\\xampp\\htdocs...') #3 [internal function]: Composer\Autoload\ClassLoader->loadClass('Zend\\Stdlib\\Arr...') #4 C:\xampp\htdocs\mystore\vendor\zendframework\zend-stdlib\src\Parameters.php(29): spl_autoload_call('Zend\\Stdlib\\Arr...') #5 C:\xampp\htdocs\mystore\vendor\zendframework\zend-http\src\PhpEnvironment\Request.php(67): Zend\Stdlib\Parameters->__construct(Array) #6 C:\xamp in C:\xampp\htdocs\mystore\vendor\zendframework\zend-servicemanager\src\ServiceManager.php on line 941

 

 

Does anyone know what is this/ how can i fix it?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Error when Installing Magento using XAMPP

Hello @zoe_chatzivasil ,

 

Please run below command via terminal of git bash on magento root directory

php -dmemory_limit=6G bin/magento setup:static-content:deploy -f
chmod -Rf 777 pub/ var/ generated/

--
If my answer is useful, please Accept as Solution & give Kudos

View solution in original post

16 REPLIES 16

Re: Error when Installing Magento using XAMPP

I deleted everything and did the whole thing from scatch, i installed previous version of XAMPP (php 7.2 i think) and now i get this message

 

 

Fatal error: Uncaught Exception: Deprecated Functionality: The each() function is deprecated. This message will be suppressed on further calls in C:\xampp\htdocs\mystore\vendor\colinmollenhour\cache-backend-file\File.php on line 81 in C:\xampp\htdocs\mystore\vendor\magento\framework\App\ErrorHandler.php:61 Stack trace: #0 [internal function]: Magento\Framework\App\ErrorHandler->handler(8192, 'The each() func...', 'C:\\xampp\\htdocs...', 81, Array) #1 C:\xampp\htdocs\mystore\vendor\colinmollenhour\cache-backend-file\File.php(81): each(Array) #2 C:\xampp\htdocs\mystore\vendor\magento\zendframework1\library\Zend\Cache.php(153): Cm_Cache_Backend_File->__construct(Array) #3 C:\xampp\htdocs\mystore\vendor\magento\zendframework1\library\Zend\Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true) #4 C:\xampp\htdocs\mystore\vendor\magento\framework\App\Cache\Frontend\Factory.php(156): Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...', Array, Array, true, true, true) #5 C:\xampp\htdocs\mystor in C:\xampp\htdocs\mystore\vendor\magento\framework\App\ErrorHandler.php on line 61

Re: Error when Installing Magento using XAMPP

Hello @zoe_chatzivasil ,

 

Please install Wamp64 http://www.wampserver.com/en/

After install when you wamp server, Please open with run as administrator 

 

Make sure Magento 2.3 install with php 7.2 version. I hope that you didn't get any error.

 

--

If my answer is useful, please Accept as Solution & give Kudos

Re: Error when Installing Magento using XAMPP

Hi @gelanivishal 

Thank you for your reply.

 

Wampp gave me an 500 error 

 

I tried 2 more times with xampp, i finally managed to go one step further.

 

I am now on readiness check and it comes out there are 3 missing PHP extensions.

 

I do not have experience on such things, any suggestions on how to fix?

Re: Error when Installing Magento using XAMPP

Hi @zoe_chatzivasil 

What kind of php extensions are missing for you? 

If this is for example php-intl you need to simply enable it. You have some example here:
https://stackoverflow.com/questions/33869521/how-can-i-enable-php-extension-intl

BR

---
Problem solved? Click Kudos & Accept as Solution!

Re: Error when Installing Magento using XAMPP

Hello @zoe_chatzivasil ,

 

Please enable those extension in php.ini file and restart service and check it

 

--
If my answer is useful, please Accept as Solution & give Kudos

Re: Error when Installing Magento using XAMPP

@linczenson 

Thanks for the link. I did had a successful setup, i got my Success page but when i load my localohost/mystoreex and localhost/mystoreex/administrator none of them work

 

On frontend i get a blank page with something that looks like a footer and nothing else.

On backend i get just a black page. No login form, nothing. Just black

Re: Error when Installing Magento using XAMPP

As i am still experimenting with Magento, i started AGAIN the whole process.

 

Download XAMPP
Created db
Download Magento CE 2.3.0 Sample Data
Unzipped files to htdocs file

Started the setup process.

1st time: when trying to open backend/frontend i got Error 503. ServiceUnavailiable
I deleted the maintenance file and reload. It started the setup process again.

I got to the success page and load lbackend and frontend.

Backend: blank page - Console errors:

 

5
Refused to execute script from '<URL>' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
require.js:141 Uncaught Error: Script error for: js/theme
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
require.js:141 Uncaught Error: Script error for: Magento_Catalog/catalog/product
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
require.js:141 Uncaught Error: Script error for: mage/backend/bootstrap
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
require.js:141 Uncaught Error: Script error for: jquery
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
require.js:141 Uncaught Error: Script error for: mage/adminhtml/globals
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)


​

Frontend: Semi-blank page (i see only 5 greyscaled "tabs" on bottom of pages - something like a footer) - Console errors:

 

Refused to apply style from 'http://localhost/mystore/pub/static/version1549995628/frontend/Magento/luma/el_GR/css/styles-l.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
/mystore/mage/dataPost.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
require.js:141 Uncaught Error: Script error for: mage/dataPost
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
/mystore/mage/translate-inline.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
require.js:141 Uncaught Error: Script error for: mage/translate-inline
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
/mystore/jquery.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
require.js:141 Uncaught Error: Script error for: jquery
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
/mystore/jquery/jquery.mobile.custom.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
require.js:141 Uncaught Error: Script error for: jquery/jquery.mobile.custom
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
/mystore/mage/bootstrap.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
require.js:141 Uncaught Error: Script error for: mage/bootstrap
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
/mystore/Magento_Theme/js/responsive.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
require.js:141 Uncaught Error: Script error for: Magento_Theme/js/responsive
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)
/mystore/Magento_Theme/js/theme.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
require.js:141 Uncaught Error: Script error for: Magento_Theme/js/theme
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError (require.js:1681)

 

 

I am SO frustrated. I am trying to get this think work for 3 days and no progress. I am paying for an online course (that's why i am using localhost) and i cannot move on to the next phase.

 

Does anyone know what can i do??

P.S. I used WAMP as well but it did not work either. It returned error 500 , but on httpd.conf the line  LoadModule rewrite_module modules/mod_rewrite.so  had no "#"

Re: Error when Installing Magento using XAMPP

Don't worry. It's difficult in the beginning but will be easier later.

Please try to check if you have .htaccess file in pub/static directory. If not please download it from official repository and place in this location.
---
Problem solved? Click Kudos & Accept as Solution!

Re: Error when Installing Magento using XAMPP

@linczenson  Thanks for the support

 

I can see in xampp\htdocs/"mystore" there is an .htaccess and an .htaccess.sample file. 


There is also an .htaccess file in here xampp\htdocs\"mystore"\pub and xampp\htdocs\mystore\pub\static