2. Common Issues

Access Denied Error During Installation

SQLSTATE[28000] [1045] Access denied for user ‘root’@’localhost’ (using password: YES

if you are seeing this or similar error, it most likely means you entered your database credentials incorrect. Double check your credentials carefully to make sure you didn’t misspell anything, also check if you cleaned cache after changes in config files.

run:  php artisan config:cache from terminal in root of application

URL rewrite is not working

If you don’t have url rewrite enabled on server, application will not work. Check if:

  • You have file /public/.htaccess
  • Apache mod_rewrite is enabled on server. If you don’t have access to server configuration please contact your hosting provider.
  • Overrides via .htaccess field are enabled on server. If this is not allowed please contact your hosting provider.
  • You are using nginx or windows server insted of apache. You can find nginx rules here. Windows server has a module that allows to import .htaccess file or you can use online service that can convert .htaccess file to web.config.

Whoops, looks like something went wrong.

This is generic error and is displayed when there is issue on server side and application is in production mode (We don’t want to show our users waterfall of code, right ?).

You can change this setting to developer mode in .env file

 

ERROR: The directory [/storage/…] must be writable

If you see this error:

ERROR: The directory [/storage/app] must be writable by the web server.
ERROR: The directory [/storage/framework] must be writable by the web server.
ERROR: The directory [/storage/logs] must be writable by the web server.
ERROR: The directory [/bootstrap/cache] must be writable by the web server.

This means you have not set the right permissions to the storage and subfolders.  You need to give read and write permissions to folders recursively for all system users (755 or 777 recursively).

Can i install application in subfolder ?

You want to install application in “domain.com/crm” ? – Don’t do that.

It’s not common to do that, and it’s not secured!

It’s better to create subdomain and install in subdomain.

 

 

 

I see public folder in URL

If You see “public” folder in your url this means You have not mapped domain on application folders correct.

Application should be install and mapped on public folder.

correct mapping:

domain.com => …/crm/public

crm.domain.com => …/crm/public

wrong mapping:

domain.com => …/crm/

crm.domain.com => …/crm/

 

This is super important.  If You will map app on root application folder You are exposing .env file with app passwords.

 

Nginx – datatables are not working

Datatables uses very long GET URL in Nginx additional settings are required.

 

fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
client_body_buffer_size 128k;
client_header_buffer_size 5120k;
large_client_header_buffers 16 5120k;
http2_max_field_size 64k;
http2_max_header_size 64k;