Category Archives: PHP

[SOLVED] cURL error 3: malformed

This happened on GuzzleHttp

Below code give me that error

The quick solve is to reformat above code to below

https://stackoverflow.com/a/53831345 🙂

[SOLVED] [Composer\Downloader\TransportException] Content-Length mismatch, received bytes out of the expected

[Composer\Downloader\TransportException]
Content-Length mismatch, received 66345 bytes out of the expected 354982

Just change the default repo url to:

Ref: https://shoutech.wordpress.com/2017/05/04/composer-content-length-mismatch-httppackagist-org-could-not-be-fully-loaded/

How To Force Log Out all Logged In User in Laravel

In some case there is situation where you have to change the main business process in your application. To ensure all user must follow new rule, you have to force logout all logged in user.

In Laravel, you can do this with less pain. In Laravel, your environment settings are stored in one file called .env. This file contains APP_KEY that used for session stuff. So all you have to do is generate new key in your .env file.

 

Laravel Homestead Different PHP Version

If you are a Laravel developer and always follow php development, you must be in situation where you like to try new feature of latest php version but your project has to use older php version.

Don’t worry because since version 6.0 Laravel Homestead has convenient way to handle this.

All you need to do is put a specific php version in your Homestead.yaml file like below:

 

Than, you need to provision your homestead.

$ vagrant --provision

https://laravel.com/docs/5.4/homestead#multiple-php-versions

https://github.com/laravel/homestead/issues/604