Samstag, 3. März 2018

XAMPP keeps showing Dashboard/Welcome Page / XAMPP zeigt Dashboard/Welcome Seite

After installing new xampp version it shows welcome page instead of local dev pages...


i forgot to put the VirtualHosts into the http-vhosts.conf file:

<VirtualHost *:80>
DocumentRoot "C:/workspace/xampp/htdocs/nnssf/public"
ServerName nnssf.local
</VirtualHost>

Montag, 5. Februar 2018

Laravel SQLSTATE[HY000] [1045] Access denied for user @ ip

i had this problem on my providers web server:
SQLSTATE[HY000] [1045] Access denied for user @ ip

i double checked .env and did php artisan conifg:cache , nothing helped

Solution: changed the password for the online db to something simpler . changed it in .env file too and cleared the cache again. suddenly no more problems.

it seems that some passwords dont work?!?

Samstag, 27. Januar 2018

Laravel phpunit test drops migration tables in local database

I have a reoccuring problem that sometimes when i start the phpunit test all of the tables of my local db get dropped.

There is quite a simple solution :
do
php artisan config:clear
before starting the test run

To automatically do this i did this before every testing by calling

Artisan::call('config:clear');

in setup method of the TestCase.php file:

  protected function setUp()
    {
        parent::setUp();
        Artisan::call('config:clear');
      
    }

An import of the Artisan Class is needed, so I put

use Illuminate\Support\Facades\Artisan;

in the top part of the TestCase.php class:

<?php
namespace Tests;

use Illuminate\Support\Facades\Artisan;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;