TokenMismatchException error after dockerizing laravel project - php

I have a laravel4 project with php5.4 and apache up and running with no problems after dockerizing it, it hits
Illuminate \ Session \ TokenMismatchException
Is there any dependency or module or anything I should lookup for to overcome this problem ??
PS: I enabled mod_session and i don't know if it is relevant or not and I'm using docker-compose for mysql

Related

Cloning a Laravel project into VSCode

I am trying to clone a Laravel project into VSCode and run the project on a local server. I have imported Remote - WSL, but it won't let me set up a composer. I get: this error message when using php command in the terminal
I don't know what to do from here. Is there any other way to simply clone a project?
A popular option is to use a pre-configured program like MAMP / WAMP / XAMP which gives you the stack you need to run php code locally.
Alternatively you can set up you local environment for php and solve the error you are getting...
The error suggests you need to install php globally on your system :
https://www.php.net/manual/en/install.windows.php
https://www.php.net/manual/en/install.macosx.php
And to install composer:
https://www.hostinger.co.uk/tutorials/how-to-install-composer

Twig_Error_Runtime ; the "core" extension is not enabled ; symfony

I've inherited a Symfony/PHP web app codebase with zero documentation. I'm a nodejs dev so you can image the fun...! Anyway I'm getting there, my focus atm is to be able to run the project locally.
Here's the Symfony version:
Symfony version 2.7.16 - app/dev/debug
I've installed packages via composer install.
I can start the web app locally via CLI:
php app/console server:run
Server running on http://127.0.0.1:8000
Quit the server with CONTROL-C.
However when I try to access this URL I'm seeing the following error in browser. Have google'd around but couldn't work it out so am hoping someone here can point me in the right direction.
I think this is due to trying to run a new version of twig on an old version of Symfony
as you can see here: https://github.com/symfony/symfony/issues/20284
They mention something similar, perhaps try to include an older version of twig in composer?
composer require twig/twig 1.23

Browser Testing on AppVeyor using Laravel Dusk

I've been trying to set up my CI environment on AppVeyor since I need SQL Server. I can't seem to get laravel dusk working with it. I've managed to
Install PHP
Setup SQL Server 2012
Install Composer and all the packages
Install all my npm packages
Install the PDO SQLSRV drivers
and run a small script to create the .env file for testing but when I finally run
php artisan dusk
there's like 4 errors and 1 failure out of my 5 assertions
Here's an image of the tests failing: https://i.gyazo.com/98f3bc4ae979793eb4af62e97d90080d.png
The tests work on my local machine and I'm trying to automate it. I have no idea how to access my app while it's being tested so I've just put a localhost in the APP_URL of my environment configuration file(Laravel specific).
I'm trying to figure out how to get browser testing working on it. I've also installed chrome for chromedriver to be used in Dusk. Any help would be appreciated

I can not make yii migration

I tried to work with yii basic migrations. yii migrate/create is working, yii migrate - not.
I use command php yii migrate. I get the following message:
Exception 'yii\db\Exception' with message 'could not find driver'
in ../basic/vendor/yiisoft/yii2/db/Connection.php:547
I have found advice that I need to add some files from advanced yii to my basic. I do not know what should be done exactly.
You should install extension to your php of DB, which you are using. In case it is already installed, make sure that it is properly turned on in your php-cli settings.
For example, in case you are using Ubuntu and php5-fpm you can run
sudo apt-get install php5-mysql

Memcached on Windows (wamp) with Laravel

I'm developing locally with laravel under wamp, i want to use memcached (not memcache) and after hours and days of searching i could find only memcache for windows but no memcached.
laravel support only memcached, and the trick $memcached = new memcache doesn't work like in other frameworks
if i try to run a page that contains caching code the debugger will throw an error like
Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN) HELP
Class 'Memcached' not found
i'm struggling with this since a long time i really need to stimulate load speed with cache as close as web servers locally (without installing vagrant)

Categories