Magento 2.3 PHP7.2

Hi I was wondering if anybody is having the same problems as me? I have tried installing M2 2.3 both with SSH and manually via ftp, and I seem to get the same errors each time. All of the CSS seems to break in both the front end and back end, and I can see the resources are showing error 403. I’ve Googled for an answer (it’s a popular problem!), but so far have found nothing that works for me.

There’s a few reasons for this issue to occur. The simplest and most overlooked reason is that mod_rewrite has not been enabled for apache. You’ll want to try running the following as either root or superuser:

  • sudo a2enmod rewrite
  • sudo systemctl restart apache2

Then just refresh your browser.

The second most overlooked issue, is that your .htaccess files (that help control rewrites) aren’t being read my apache. Make sure that this file /etc/apache2/sites-available/000-default.conf has the below lines added to the very bottom of it:

<Directory "/var/www/html">
AllowOverride All
</Directory>

Once you’re happy they are, just run:

  • sudo systemctl restart apache2

I’ve reset permissions via SSH, flushed cache. Deleted everything in pub/static and redeployed. Tried altering the file di.xml as suggested in a thread (whose link escaped me).

Mod_rewrite is enabled as it’s the same server that I run a production M1 site from. I do have a list of disabled functions within my php setup, if they are relevant?

system,system_exec,shell,shell_exec,symlink,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,show_source,proc_get_status,proc_nice,proc_terminate,highlight_file,define_syslog_variables,posix_uname,posix_getpwuid,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,ini_restore,inject_code,syslog,openlog,define_syslog_variables,apache_setenv,eval,phpAds_XmlRpc,phpAds_remoteInfo,phpAds_xmlrpcEncode,phpAds_xmlrpcDecode,xmlrpc_entity_decode

I don’t have root ssh access to the server to use sudo commands sadly.

You should only need the following php_modules:

  • ctype
  • curl
  • dom
  • gd
  • intl
  • mbstring
  • hash
  • openssl
  • PDO/MySQL
  • SimpleXML
  • soap
  • spl
  • libxml
  • xsl
  • zip
  • json
  • iconv

(Ref: Magento 2 Official Documentation)

If you were missing any of these, then the Web Setup Wizard (assuming you used this) would likely have not allowed you to proceed with the installation.

If you’re using vhosts to run multiple web applications on a single server, then you’ll need to amend the below directory to ensure it points to the web folder that you have Magento 2 installed:

<Directory "/path/to/magento2">
AllowOverride All
</Directory>

Superuser access would suffice. If are unable to edit your apache files, then I think you might be stuck.