skip to Main Content

Looping multyple DB connections in Laravel

I am summing the columns from different tables each in a different database. Created the models for each of the 8 connections and added them to the controller. use AppModelsobjectMapping1; use AppModelsobjectMapping2; use AppModelsobjectMapping3; use AppModelsobjectMapping4; use AppModelsobjectMapping5; use AppModelsobjectMapping6;…

VIEW QUESTION

React php connecting with a different port

I have two files opening a new socket and want them to connect to each other using React PHP. The following two files are the sockets: First file test1.php <?php include 'vendor/autoload.php'; $socket = new ReactSocketSocketServer('127.0.0.1:3030'); $socket->on('connection', function(ReactSocketConnectionInterface $connection) {…

VIEW QUESTION

Mongodb – MongoServerSelectionError: connection <monitor> to xx.xxx.xxx.xxx:27017 closed (whitelisting IP and opening the port didn't work)

i'm learning MongoDB and i'm sorry to bother you but i'm getting this error: MongoServerSelectionError: connection <monitor> to xx.xxx.xxx.xxx:27017 closed at Timeout._onTimeout (C:...node_modulesmongodblibsdamtopology.js:305:38) at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7) { reason: TopologyDescription { type: 'ReplicaSetNoPrimary', servers: Map(3) { 'ac-c9obg9r-shard-00-00.onq7cwz.mongodb.net:27017' =>…

VIEW QUESTION

Connecting to MongoDB database

I am trying to connect to a MongoDB database.I have followed all the steps here https://youtu.be/EcJERV3IiLM but am getting an error. The index.js file looks like this, const dotenv = require('dotenv') dotenv.config() const mongodb = require('mongodb') mongodb.connect(process.env.CONNECTIONSTRING, async function(err,client){ const…

VIEW QUESTION
Back To Top
Search