Symfony 2.4 - PDOException]could not find driver: pdo_sqlsrv - sql-server

For "reasons of fate", I need to build a small program, and to do it quickly, I will with symfony 2.4.
The program in question is connected to a SQLServer data base under a Windows 2008 server. But when trying to connect, I get error driver (with mysql never happened). My parameters.yml is like this (obviously there are important parameters modified)
database_driver: pdo_sqlsrv
database_host: 10.244.xxx.xxx
database_port: null
database_name: imasuperprodatabase
database_user: wololo
database_password: epicpassword
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
locale: en
secret: secrettokenplz
database_path: null
Any idea?

Related

Unable to launch IEDriverServer - Failed to start server with: port=xxxxx

We are trying to launch an IE browser using the RemoteWebDriver interface.
On the client side, we run the following command to start the selenium-standalone-server.jar
java -Dwebdriver.ie.driver=IEDriverServer.exe -jar selenium-standalone-server.jar
The selenium server starts fine, but there is an error when I try to create a session.
18:52:58. 128 INFO - Launching a standalone Selenium Server
18:52:58.236 INFO - Java: Oracle Corporation 25.251-608
18:52:58.236 INFO - OS: Windows Server 2016 10.amd64 18:52:58.266 INFO - V2.53.1, with core v2.53.1. Built from revision a36b8b1
18:52:58.391 INFO - Driver class not found: com.opera.core.systems. OperaDriver
18:52:58.391 INFO - Driver provider com.opera.core.systems. OperaDriver is not registered
18:52:58.426 INFO - Driver provider org.openda. selenium.safari.SafariDriver registration is skipped: registration capabilities Capabilities [{browserName=safari, version, platform-MAC}] does not match the current platforn XP
18:52:58.429 INFO - Driver class not found: org.openga.selenium.htmlunit.Htm UnitDriver
18:52:58.429 INFO - Driver provider org.openga.selenium.htmlunit.HtmlUnitDriver is not registered
18:52:58.551 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:5555/wd/hub
18:52:58.552 INFO - Selenium Server is up and running 18:53:03.425
INFO - Executing: [new session: Capabilities [{browserName-internet explorer}]]>
18:53:03.448 INFO . Creating a new session for Capabilities [{browserName-internet explorer}]
Failed to start the server with: port - '32956', host = '', log level = '', log file = '', whitelisted ips = ''.
The point to note here is the last line
Failed to start the server with: port - '32956', host = '', log level = '', log file = '', whitelisted ips = ''.
After this, the browser does not launch and throws a TimeoutException.
I tried to manually launch the IEDriverServer using the following command:
.\IEDriverServer.exe /host=127.0.0.1 /log-level=DEBUG
And I got the below output
2022-10-11 18:52:29:611 server.cC(86) Starting WebDriver server on port: *5555' on host: 127.0.0.1
2022-10-11 18:52:29:611 IEServer.cpp(32) Driver version: 2.53.1.2 (32-bit) D
2022-10-11 18:52:29:612 server.cc(148) Civetweb ACL is -e.e.e.e/e,+127.0.0.1 W
2022-10-11 18:52:29:614 server.cc(158) Failed to start Civetweb
Failed to start the server with: port - '32956', host = '', log level = '', log file = '', whitelisted ips = ''.
Since the error said Failed to start Civetweb, I tried googling what that was, but couldn't find out what the issue was.
Please help us out.
Below is our environment:
OS: Windows Server 2016
Selenium Version: 2.53.1
IEDriverServer Version: 2.53.1
IE Version (installed on the machine): Version 1067 (OS Build: 14393.5356)

Database driver not found in parameters.yml in Symfony 2

i am newbie at Symfony , i just created a new Symfony 2.8 project using this command
$ composer create-project symfony/framework-standard-edition ecommerce "2.8.*"
the project is successfully created but since i have to work with pdo_mysql
in the configuration file parameters.yml i didn't find the " database_driver: pdo_mysql "
the database driver is not mentioned at all ! should i just add it manually in parameters.yml or how can i automatically generate it ?
Notice : PDO_Mysql is already installed and my PHP version is 5.6.31
this my parameters.yml file :
parameters.yml :
# This file is auto-generated during the composer install
parameters:
database_host: 127.0.0.1
database_port: null
database_name: symfony
database_user: root
database_password: null
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
secret: ThisTokenIsNotSoSecretChangeIt

Connect to SQL Server in local machine (host) from docker using host.docker.internal

I'm trying to connect to my SQL Server instance running in my local computer using host.docker.internal (as recommended in https://docs.docker.com/docker-for-windows/networking/#use-cases-and-workarounds)
The host.docker.internal is successfully resolved to an IP, and it's ping-able
And I've opened up the port 1433 in my firewall configuration
Error message
Connection refused 192.168.65.2:1433
My connection string
Data Source=host.docker.internal,1433;Initial Catalog=;Persist Security Info=False;User ID=;Password=;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
docker version
Client:
Version: 18.03.1-ce
API version: 1.37
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:12:48 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.03.1-ce
API version: 1.37 (minimum version 1.12)
Go version: go1.9.5
Git commit: 9ee9f40
Built: Thu Apr 26 07:22:38 2018
OS/Arch: linux/amd64
Experimental: true
Docker for windows version
If anyone have similar problem, here's how I solve it
Open SQL Server Configuration Manager
Enable TCP/IP in Server Network Configuration
Restart SQL Service Service
If it's still not working, there are a few more things to check
Firewall (open port 1433)
Enable remote connections to your sql server

Symfony 2 SQLSTATE Connection refused

I have a problem with connecting my database online.
My site is hosted on one server, and connects to a remote database that is on another server.
But it sends me the following error:
SQLSTATE [HY000] [2002] Connection refused Error
I did, however, put the exact connection information .. I do not understand why the connection is refused ..
parameters.yml:
parameters:
database_host: **.**.**.**
database_port: 3306
database_name: zip
database_driver: pdo_mysql
database_user: root
database_password: null
mailer_transport: smtp
mailer_host:
mailer_user:
mailer_password:
secret: d87fdb6ecf4089df33360b187388e33c34e12f85
I thank you in advance
Make sure the user/password are the right ones. You can use the mysql command line cli to try to connect.

Laravel 5 homestead phpmyadmin

Recently I successfully installed laravels homestead VM. Now I want access to my db via PhpMyAdmin, ideally my PhpMyAdmin from my localhost setup (XAMPP).
Is this possible?
I've came across an article that's stated I can install phpmyadmin in my ubuntu VM but when I destroy the VM I need to reinstall PMA over and over.
Is there any way I can have a UI for databases in de VM homestead?
By default PhpMyAdmin runs on port 8000 so make sure to forward the port so you can access it from your host
either from Vagrantfile directly config.vm.network, add the following line
"forwarded_port", guest: 8000, host: 8000
or you can update `Homestead.yaml' and add the following
ports:
- send: 8000
to: 8000

Resources