Symfony2 Doctrine2 MS SQL Server connection on WHM/CPanel - sql-server-2008

SEE UPDATE BELOW:
I'm using Symfony2/Doctrine2 on CPanel and I need to make a connection to a MS SQL Server database. I keep getting an error saying
could not find driver
I've tried to install FreeTDS on WHM/CPanel following these instructions:
http://forums.cpanel.net/f5/definitive-freetds-installation-instuctions-88561.html
I also added an additional option to the PHP compilation (all_php5) so it looks like this:
--with-mssql=/usr/local/freetds --with-pdo-dblib=/usr/local/freetds
I then also added an entry to my php.ini file (/usr/local/lib/php.ini) that says:
extension= "mssql.so"
I rebuilt Apache/PHP after making all these changes but I still get the error saying the driver cannot be found. Anybody have this setup and know what I'm missing?
UPDATE:
So, instead of compiling FreeTDS, I found some packages through yum which I installed. I did, however, compile .so files for both mssql.so and pdo_dblib.so. They are now both referenced in my php.ini that I know is getting loaded. I can successfully use the mssql_* functions but PDO is still not working for me. I still get the the "could not find driver" error. I no longer have an all_php5 file since I don't think I need it anymore since I just compiled the .so files. Is this correct? What else can I do to get PDO working? Here is a screenshot of my phpinfo() page:

Related

RMariaDB doesn't seem to allow me to connect to a MySQL server

I'm trying to connect to a MySQL server from R. I'm using the RMariaDB package and I keep getting the following error.
Error: Failed to connect: Plugin https could not be loaded: The specified module could not be found. Library path is '/mingw64/lib/mariadb/plugin/https.dll'
I've tried searching and got nothing. I've also tried looking for that dll on the system and can't seem to find it, so it'd appear that I'm missing some files. But I've tried reinstalling R and I still had the problem, so I'm really not sure how to proceed.
I don't even have a mariadb folder under mingw64, assuming it's the mingw64 folder under rtools I need to look in, so perhaps that's where my problem is.
I'm wondering if there perhaps is something else I need to install aside from the DBI and RMariaDB packages. I also installed ODBC just in case that was what was needed, but that didn't change anything.
Here's the code I used to connect to the database. I think it should be correct, but perhaps I made a mistake somewhere.
con <- DBI::dbConnect(RMariaDB::MariaDB(),
host = "URL_to_DB",
user = "user_name",
password = rstudioapi::askForPassword("Database password")
)

having issues getting php to talk to mysql set up on a mac -

My friend has a mac - we got AMPPS set up so he can run Apache, PHP and MySQL.
We got it up running. I can talk to mysql using phpMyAdmin.
I am running codeigniter - its working fine - but I'm getting an error when it tries connect to the database
Fatal error: Call to undefined function mysqli_init() in
mysqli_driver.php on line 126
I have a feeling that I'm missing the mysql.so extension or module in the Apache install or the PHP install.
How do I install that on a mac, or which config file do I need to modify?
That error indicates that the mysqli.so module is not loaded. Check the results of phpinfo() to see where the configuration file is, and make sure the module's being included properly. Often times there is a separate ini file for each module that's separately installed.
Personally I'd stay away from mysqli and use something higher level like PDO. I'd also recommend installing something maintainable like MacPorts or Homebrew to run Apache/MySQL/PHP instead of a pre-packaged solution.

Cannot connect to database via JDBC in Pehtaho Report Designer

So, while trying to connect to Pentaho in Pentaho Report Designer, I am getting an error which says:
Communication failure during handshake. Is there a server running on the host host_name?
using class org.gjt.mm.mysql.Driver
I have now included the jar file mentioned in the first answer and the connection says OK. But, when I preview or use a query using that connection, again I get the same error.
I am absolutely new to Pentaho. I got a few errors before which I could resolve. But, I have been stuck on this one for 2 days now. Cannot find anything regarding this.
May be Mysql connector is not there i think.
=> Before creating jdbc connection. Go to these location Eg:- C:\report-designer-3.9.1\lib and then check mysql-connector-java-5.1.26.jar file is their or not. If it's not their goto these (http://dev.mysql.com/downloads/connector/j/) location and download jar file and copy that file and paste it in C:\report-designer-3.9.1\lib location.
=> Restart Pehtaho Report Designer again and check it now.
=> May be you have lower version of mysql jar file remove old mysql jar file and paste higher version of mysql jar.
I think your problem will be solved.
Thank you..

Cannot Connect to Mysql Database From delpi Xe5 TSqlConnection

I am trying to connect to MySQL database using Delphi Xe5 and fire monkey mobile application.
I am using an TSQLConnection to connect to the database but i get an error DBX Error: Driver could not be properly initialized. Client library may be missing, not installed properly, of the wrong version, or the driver may be missing from the system path.
I have read the below articles of which none had a solution that worked.
Articles:
DBX Error: Driver could not be properly initialised
http://wiltonsoftware.com/posts/view/getting-embarcadero-dbexpress-mysql-working-dbx-error-driver-not-initialized
None of their solutions seem to work, i use delphi xe5 on Windows 64x.
I have tried downloading the zip file libmysql.dll and coppied into the following paths mentioned but to no avail.
C:\Users\Public\Documents\RAD Studio\12.0\Bpl
C:\Program Files (x86)\Embarcadero\RAD Studio\12.0\bin
Can anybody please assist me in understanding why i am not able to connect to my MySQL database?
Your error message
DBX Error: Driver could not be properly initialized. Client library may be missing,
not installed properly, of the wrong version, or the driver may be missing from the
system path.
is the standard generic one from DBX and just seems to mean "something went wrong somewhere". Error-reporting doesn't seem to be DBX's strong point; a couple of times recently I've had that error when the problem turned out to be quite different than it might lead you to expect. What's annoying about it is that I only found out because I happened to have "Break on exception" turned on in the IDE and could see that the initial exception came with quite different and more revealing info, but the DBX driver seems to re-raise with that text entirely replaced by its generic, info-free version, at least in the circumstances I ran into.
AS you've subsequently found out, a FireDAC connection may succeed in connecting where a DBX one fails, and even where it fails, its error messages are more specific than DBX's. It's a shame because I find FD more fidly to set up (like I always forget its SqlWait component and it doesn't tell me that I have until r/time). So, I'm not suggesting anyone should switch to FireDAC if they've already got DBX working on a given database, just that FD can be a useful diagnostic tool.

Yii doesn't find PDO MySQL driver

The yii requirements page says PDO extension + the mysql driver works, phpinfo() says that PDO and the MySQL driver is installed, I have configured the 'db' component in the main config file for my project generated with yiic webapp, checked and double checked that the settings are correct (and yes, I am using mysql).
I have made a new migration script in /[mywebapp]/protected/migrations and now I'm trying to run the ./protected/yiic migrate command, but i just get an exception:
exception 'CDbException' with message 'CDbConnection failed to open the DB connection: could not find driver'
I have no idea what is wrong. I have been googling for 2 hours now and i find a lot of other users experiencing the same problems, but usually they are missing the drivers or something obvious. Is there anything i'm completely overlooking?
Despite the real answer being in the comments for this question, I am answering it here so that it appears as an answer. Yiic.php migrate uses the configuration stored in console.php. You need to set your database connection in there to use yiic.