cancel
Showing results for 
Search instead for 
Did you mean: 

Cant access admin panel on new installation

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Cant access admin panel on new installation

I have just installed Magento 2.3, hosting on local server us XAMPP, i get the following message when i try to log on to admin.
Fatal error: Namespace declaration statement has to be the very first statement or after any declare call in the script in C:\xampp\htdocs\magento\vendor\magento\framework\View\Element\Template\File\Validator.php on line 2
My code in the file reads <?php namespace
I have no white space before <?php which is the only fix i can find?

2 REPLIES 2

Re: Cant access admin panel on new installation

Hey @mark_huyton,

Try once namespace in next line:

for example: 

<?php 
namespace/module 

Re: Cant access admin panel on new installation

Hi

 

Thanks for the advice, this still showed an error, so i Changed the Validator.php file from UTF-8 to ANSI and it seems to be working,

 

thanks