I had a weird experience connecting to oracle database using PHP.
Firstly, from the past 3 years I am connecting to oracle using easy connection string. I had the code on my windows 7 machine.
A week ago I got a new windows 7 machine and when I tried to connect to oracle. It gave me the following error
ORA-12154: TNS:could not resolve the connect identifier specified
Later I figured out oci_connect is only accepting SID and not the easy connect string.
Now I didn't understand why is it behaving weirdly in my new machine. Can anyone please help me to figure out if it is some problem with windows software settings?
Thanks,
Sri
Have you enable oci8 extantions in your wamp....or just use phpinfo() to check this
If it is working fine then on which server you are connection database
If it is Local then you need to Start services of Oracle from your machine
which are as mention in my snap
also you need to start your database service which you want tot connect to your database.
Related
When the application tried to connect to the SQL Server database, it returns this error [Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small]. The application uses Laravel as the framework and ODBC 17 to connect to the SQL Server database.
For context, since this seems like an SSL problem, the app is trying to connect to a database in a different server, and the application is connecting from a local domain. The server is using Centos 8 as the OS and uses OpenSSL. I have tried searching in the internet but what I found was answers to configure the OpenSSL ciphers, I do not know if that is a safe option.
Please if anyone has solved a problem like this, I need your help, thank you beforehand.
**Note: If further information regarding the conditions are needed please inform me.*
A colleague of mine helped me find an unusual fix for this problem, FYI this is not the proper way to fix this problem in production otherwise.
The application that I had to deploy apparently was connecting to a legacy database (Even though the database was a SQL Server 2016) and the crypto policies was not letting the application connect to the database. The dh key on the database was the one that is too small so we ran this and voila! The application is running.
sudo update-crypto-policies --set LEGACY
This command allows 1024 bit dh-keys to be allowed.
Don't try this, I am using this in a development environment, please migrate your database to something safer.
This was our source:
https://yoku0825.blogspot.com/2019/12/centos-80url-error141a318assl.html
I have problem with connection to Vertica database from PHP code.
The situation is this:
I'm working on Windows 7,
I installed ODBC driver for Vertica, set it up and test connection was successful,
Vertica is running on virtual machine in VirtualBox, I can connect to it via ssh dbadmin#192.168.56.102.
I have tried all possibilities I've found but nothing worked. PDO cannot find server, odbc_connect is saying no driver exists.
Has anybody have idea please?
Thanks you very much.
J.
I am trying to connect to a MS Access Db that I have made from my apache server using PHP. I keep coming up with the error "could not find driver". I have searched through just about every web page on the internet and have found nothing of importance. I have undocumented the parts of the php.ini file to allow the odbc drivers to work. I also have tried to list all of the working drivers using the PDO::getAvailableDrivers() code yet nothing shows up no matter how many drivers I undocument from the php.ini file. I've created the DNS connection and linked it to the database yet I'm not sure how to connect to it.
Any help would be greatly appreciated.
For everyone else that needs an answer to this:
MS Access has stopped updating and hosting their odbc connection to php in 2010 (approximately). It will still work if you make sure you're using a 32-bit system. I'm now using 32-bit Apache and PHP. It works flawlessly now.
Does anyone know if it's possible to connect and query an MS Access database from a Linux Server using PHP?
If it is possible I'm thinking install ODBC driver on the Linux server, but will it work to connect to Access is the question. I've read it's possible with MSSQL.
My knowledge is very limited when it comes to any Windows related DBs so any advice much appreciated.
Yes, it's possible. I've done it using ODBTP, which took advantage of the ODBC driver on the (Windows) machine that hosted the Access database file.
It's also theoretically possible to use an ODBC driver on the Linux server to read an Access database on a Windows networking share if the Linux box can "see" it. However, I've never had very good luck with Access ODBC on Linux so I wouldn't recommend spending too much time trying to get it working.
Does anyone know if it's possible to connect and query an MS Access database from a Linux Server using PHP?
If it is possible I'm thinking install ODBC driver on the Linux server, but will it work to connect to Access is the question. I've read it's possible with MSSQL.
My knowledge is very limited when it comes to any Windows related DBs so any advice much appreciated.
Yes, it's possible. I've done it using ODBTP, which took advantage of the ODBC driver on the (Windows) machine that hosted the Access database file.
It's also theoretically possible to use an ODBC driver on the Linux server to read an Access database on a Windows networking share if the Linux box can "see" it. However, I've never had very good luck with Access ODBC on Linux so I wouldn't recommend spending too much time trying to get it working.