Laravel 5.7 Driver [] is not supported - php

Laravel version: 5.7
//filesystem.php
return [
'default' => 'local',
'cloud' => 's3',
'disks' => [
// ....
'ftp' => [
"driver" => env("ftp"),
"host" => env("FTP_SERVER"),
"username" => env("FTP_USER"),
"password" => env("FTP_PASSWORD")
],
],
];
//Controller
use Illuminate\Support\Facades\Storage;
public function test(){
dd(Storage::disk("ftp"));
}
But return error Driver [] is not suppoted
Tried to use commands to clear cache and cofig
php artisan config:clear
php artisan cache:clear
Also installed league/flysystem-sftp ~1.0 I think it is not neccesary, and clear cache and config after install, but same. If I use local it works.

It should be "driver" => "ftp" – i.e. no env.
(unless you really intended to have the ftp variable set, but failed to do so).

Related

The 'username' key is missing from the given credentials array

Laravel Version: 9.11
Adldap2-Laravel Version: 6.1.6
PHP Version: 6.1.6
LDAP Type: ActiveDirectory
Description:
I'm trying to Authenticate to my Active Directory with Laravel project. But i faced to this error message The 'username' key is missing from the given credentials array when i try to log in.
Steps i've followed:
composer require adldap2/adldap2-laravel
Adldap\Laravel\AdldapServiceProvider::class,
Adldap\Laravel\AdldapAuthServiceProvider::class,
'Adldap' => Adldap\Laravel\Facades\Adldap::class,
php artisan vendor:publish
in the file ldap.php i made this changes
'hosts' => explode(' ', env('LDAP_HOSTS', '...')),
'base_dn' => env('LDAP_BASE_DN', 'DC=host,DC=com'),
'username' => env('LDAP_USERNAME', 'Admin_username'),
'password' => env('LDAP_PASSWORD', 'Admin_password''),
auth.php
'providers' => [
'users' => [
'driver' => 'ldap', // Was 'eloquent'.
'model' => App\User::class,
],
also ENV.
LDAP_LOGGING=true
LDAP_CONNECTION=default
LDAP_HOST='...'
LDAP_USERNAME=''
LDAP_PASSWORD=''
LDAP_PORT=389
LDAP_BASE_DN="DC=*,DC="
LDAP_TIMEOUT=5
LDAP_SSL=false
LDAP_TLS=false
then i use the command php artisan adldap:import it shows me that
Found 418 user and when i want to import them successfully imported
/ synchronized 0 user(s) also i tested if the connexion is working
with php native and that's worked.
Can someone help me ?
Thanks

Created laravel symlink on webserver still can't access the file without app/public

The project is running fine on local but on web server (running on sub domain) when I created symlink using php artisan storage:link or even ln -s full_path/storage/app/public full_path/public/storage through ssh, the symlink got created but I still can't access images inside my storage/app/public without "app/public"
eg: I can access http://xyz.abc.com/storage/app/public/35/conversions/retro1-thumb.jpg
but I can't access http://xyz.abc.com/storage/35/conversions/retro1-thumb.jpg
What I have already tried:
Deleted storage and ran php artisan storage:link - no help
Updated htaccess to follow symlink in root and public - no help
Run php artisan config:clear , php artisan config:cache, php artisan cache:clear - no help
Updated config/filesystem.php with real path as storage and url - no help
Approached host support - no help
Did extensive google search - no help
Here's my config/filesystems.php disk conf-
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
],
],
Hope it can be resolved.
try the following:
1.) config/filesystems.php change root
2.) in public folder , remove storege folder and run php artisan storage:link
3.) Check if symbolic link is enabled in your server

How i can integrate spatie/laravel-backup with Postgres DB?

I'm using laravel 5.7 and integrating spatie/laravel-backup with postgresql Database.
Settings of backup.php:
`'source' => [
'files' => [
'include' => [
base_path(),
],
'exclude' => [
base_path('vendor'),
base_path('node_modules'),
],
'follow_links' => false,
],
'databases' => 'pgsql'
],`
After run php artisan backup:run in terminal I'm getting following error :-
Starting backup...
Backup failed because: Cannot create a dumper for db driver ``. Use mysql, pgsql, mongodb or sqlite..
If You need any another snippet of code then let me know.

Laravel - Driver [] is Not Supported

I haven't found an example like mine, the others appear to be missing what I already have but anyways, I'm trying to upload to an external FTP site, to which I have the following in my filesystem.php file:
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
],
'fourkites-ftp' => [
'driver' => 'ftp',
'host' => 'ftp.site.com',
'username' => 'my-username',
'password' => 'my-password',
],
And I'm trying to send the file along with the following in one of my controllers:
Storage::disk('fourkites-ftp')->put('new/afnloads.csv', $temp);
And as I'm trying testing it, it gives me this error:
(1/1) InvalidArgumentException
Driver [] is not supported.
in FilesystemManager.php line 126
Are there any suggestions? Thanks!
Most probably config cached.
Try clear using
php artisan config:clear
I have solved my problem by following commands
php artisan cache:clear
php artisan config:clear
php artisan clear-compiled
It helped me adding this line to bootstrap/app.php (in 'Create The Application' section)
$app->configure('filesystems');

How to enable mount network disk in elfinder laravel for google drive

I have question of elfinder, how to enable 'Mount Network Disk' on elfinder for use google drive in laravel 5.2. Could tell you me, which are steps to follow.
The steps i followed were:
Installation with composer.
composer require barryvdh/laravel-elfinder
Add the ServiceProvider to the providers array in app/config/app.php
Barryvdh\Elfinder\ElfinderServiceProvider::class
Copy the assets to the public folder, using the following artisan command:
php artisan elfinder:publish
Run command.
composer update
I used the default configuration, I created the folder 'files' in the public folder.
With the command
php artisan vendor:publish --provider='Barryvdh\Elfinder\ElfinderServiceProvider' --tag=config
and
php artisan vendor:publish --provider='Barryvdh\Elfinder\ElfinderServiceProvider' --tag=views
In the file elfinder.php with the route
'vendor/barryvdh/laravel-elfinder/config/elfinder.php'
In the section route use
'route' => [
'prefix' => 'elfinder',
'middleware' => null, //Set to null to disable middleware filter
]
In the file filesystems.php with the route
'/config/filesystems.php'.
In the section disk in the option public, add the line
'root' => base_path().'app/public',
after of the line
'driver' => 'local',
Example:
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => base_path().'app/public',
'root' => storage_path('app/public'),
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => 'your-key',
'secret' => 'your-secret',
'region' => 'your-region',
'bucket' => 'your-bucket',
],
],
This is how i solved the error that occurs when you use the copy option, open folder, etc.
Error, Unable to connect to backend. HTTP error 0
But I do not know, what is needed to use the mount network disk.And
how to give the folder(example: Reading)
This is link of the project
https://github.com/AlonsoCauich/driveOne

Categories