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.
Related
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
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).
Trying to use Yii2 memcached but it's not working. Here is a connection part in config/web.php file.
When trying to check cache in controller it's not working instead working simple php memcached connection so all required settings are correct.
Result is
Is anyone faced this problem and what can be a reason of this issue ?
My port was wrong, should be 11211
'cache' => [
'class' => 'yii\caching\MemCache',
'useMemcached' => true,
'servers' => [
[
'host' => 'memcached',
'port' => 11212,
'weight'=>60
]
],
],
I am running DynamoDB Local on port 8080. This is the command used to start the DB:
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -port 8080
Going to localhost:8080/shell/ yields the DynamoDB Javascript Shell. The shell works and allows operations to be performed on a local db file. The db file created by using the shell is named cUniqueSessionID_us-west-2.db.
In a PHP project, I have the following code for creating a table using DynamoDB
$db = new \Aws\DynamoDb\DynamoDbClient([
'region' => 'us-west-2',
'version' => 'latest',
'endpoint' => 'http://localhost:8080/',
'credentials' => [
'key' => 'not-a-real-key',
'secret' => 'not-a-real-secret',
],
]);
$db->createTable([
'TableName' =>'SampleTable',
'AttributeDefinitions' => [
[ 'AttributeName' => 'Id', 'AttributeType' => 'N' ]
],
'KeySchema' => [
[ 'AttributeName' => 'Id', 'KeyType' => 'HASH' ]
],
'ProvisionedThroughput' => [
'ReadCapacityUnits' => 5,
'WriteCapacityUnits' => 6
]
]);
But running this yields Error executing "CreateTable" on "http://localhost:8080/"; AWS HTTP error: cURL error 7: Failed to connect to localhost port 8080: Connection refused
I've tried turning off my firewall without success. What could be causing this error?
I found the issue.
My PHP project is running in a Vagrant virtual machine, but I was running DynamoDB on my local machine. Thus, the localhost in my PHP code refered to the vagrant localhost but DynamoDB was running on my machine's localhost.
To solve the problem, I ran DynamoDB from within Vagrant.
I am currently creating an app with Laravel and Redis. Almost everything is working fine. I extended the Authentication as explained in the documentation, users can subscribe, login, logout ... I can create content and everything is stored in Redis.
But I have one issue. I can't run commands like "php artisan route:list", I have an error message : "[InvalidArgumentException] Database [redis] not configured.".
Th question is, is there anything special to do to make Artisan commands work when you set Redis as you database ? (basic configurations explained in the documention have been done and almost everything else is working fine).
Config:
In config/database.php I have:
return [
...
'default' => 'redis',
...
'redis' => [
'cluster' => false,
//'connection' => 'default',
'default' => [
'host' => '127.0.0.1',
'port' => 6379,
'database' => 7,
],
],
...
PS : You have the same error when you try to access the /password/email (password reset url).
InvalidArgumentException in DatabaseManager.php line 246:
Database [redis] not configured.
As Robert says in the comments, it looks like there is this error because there is no support for Redis as database for laravel.