I have created a local project that connects to a SQL2012 database. On my local machine I have Windows 7 64Bit enterprise, with MS SQL drivers with no problem at all. I moved the project over to a Windows Server 2012R2 production machine. I got the web server up and PHP working fine.
I checked the phpinfo() file and sql drivers are enabled and sqlsrv is a 'registered stream'
I have try & catch blocks for all my connections to the database. No errors
I have checked the Apache error logs and there is no indication of a problem connecting to the DB.
My project uses SQL authentication, using a Username and Password - not built in Windows Authentication. I tried to change the password to a incorrect one ---> still no error?!!
I even tried to disable Domain, Public, and Private Window Firewalls. Still nothing.
I'm totally stumped, perhaps someone here may have some ideas.
Does anyone know if the SQLSRV30 pack is compatible with Windows 2012R2?
OK I have figured out what the problem was, I needed to install Microsoft® SQL Server® 2012 Native Client located at: http://www.microsoft.com/en-us/download/confirmation.aspx?id=29065#
After that installed everything is working fine.
Related
In my company we are currently running a WAMP server with SQLSRV drivers for our BD query's, we are looking to use Windows Authentication for SQLSRV connection instead of SQL AUTH , But the default Windows User where the WAMP server is different from the user we need to access the SQLSRV host.
Im looking for a way to change the credentials from the default user to a new user when using Windows Authentication in PHP. I was wondering if is possible to do it from Apache configuration or other tool inside WAMP server.
I have tried starting Apache service as a different user, and the entire WAMP server as different user, but make no difference.
I am facing a problem pretty common, I have installed MySql Server because in the past I developed an CRUD app by using Java Swing and Maven, and now I am trying to create same thing, a CRUD app only this time with PHP.
I am following a tutorial from Udemy and this guy is using XAMPP to launch both an Apache Server and a MySQL. But somehow it's interfering with the one already installed on my laptop and cannot make the connection with XAMPP.
I opened my.ini and where says password i put my own from MySQL Workbench, and I see it's using the same port 3306 but still cannot work and I dont know why.
Is there any solution to modify my.ini and establish the connection without uninstalling the MySql Server installed before, because if I do that I ruin the other Java app using it.
Could you please provide the error logs? So the problem can be identified properly. By default, you can get the logs file for Apache in
\xampp\apache\logs\error.log
And for PHP here \xampp\php\logs
I have my Windows 7 desktop computer, and created php application which uses mysql database. I tried to run that after creating environment in my desktop with the help of XAMPP. It worked perfectly without any problem. I tested that same application in WAMP and it worked perfectly there also.
However, at the time of deployment to the Windows R2 2008 server, I used IIS to get the application run. Following is the description of firmware installed:
Installed mysql and mysql workbench
Installed IIS using Control panel-> add remove program-> turn on windows feature on off -> iis
Installed php 5.3 version using Microsoft Web platform installer (Web PI).
Activated FastCGI with the help of following link: on-iis#InstallPHP
Updated necessary changed in php.ini file. Activated port 3306 for mysql and port 80 for localhost.
Checked localhost and phpinfo.php file and both work fine.
Deployed application, and tried to run using localhost and 127.0.0.1 as well as from local IP address and it executed the first login page perfectly.
Everything works perfectly. However, I open the entry form in the application, and tried to fill up the form, and when clicked on submit, the data are not getting saved in database.
As a test, I checked by importing the old database and while searching the data in other application page, I am able to see the data coming from the database. But problem only happens when I do any insert any entry or try to submit data, I can't get the data saved in database.
This same thing works perfectly in WAMP and XAMPP however, does not work on IIS environment.
The MySQL user being used to interact with the database may not have the INSERT Grant for that database. WAMP and XAMPP are both using a mysql user with defined privileges. Have you created the same user with the same privileges on the newly created MySQL instance on your Windows 2008 server? You may consider reading over the MySQL Grant syntax. Utilizing mysql_error() for error trapping could prove useful for troubleshooting as well.
I'm trying to get ODBC to work on MAMP. I have tried many suggestions and solutions including those already on stackoverflow:
MAMP: Adding ODBC or SQL Server support ,
How do I add an ODBC driver to a MAMP environment?
None are successful so far.
This is the latest I tried.
I downloaded the latest ODBC connector:
http://dev.mysql.com/downloads/connector/odbc/
Installed it with the OSX DMG
I than added the driver in iODBC
I keep getting this message:
Specific driver could not be loaded
and
No suitable image found. Did find: /usr/local/lib/libmyodbc5w.so mach-o, but wrong architecture
Any suggestions?
Looks like you are right about the 32-bit only of iODBC.
You will need to download the Source, and compile from scratch. You will also need to download XCode through the AppStore first, so you have access to gcc and cmake.
Source Code Link: http://www.iodbc.org/downloads/iODBC/libiodbc-3.52.7.tar.gz
Note: From the CLI you can run the lipo -detailed_info /path/to/binary command. This would give you detailed information about a specified binary.
I struggled with this problem for MANY hours (I messed with msql/php, and for years ago, so I consider myself currently a total newbie!). My problem was I couldn't connect my PC to my new online server using ODBC (server was a mac mini running mavericks, trying to connect from a windows machine in my office via mysql odic connector). I finally found a solution that works. here is my situation and environment:
I am converting from Access to MySql/PHP. Application configured as front-end / back-end.
Put my server online so I could export my access back end tables to MYSQL. (some were online at another server, some were on my internal windows 2003 server. ) planning to change front end to php from access vba.
Installed ODBC Administrator on mac mini (mavericks) per google searches.
Went to drivers tab in ODBC Administrator. Set my drivers from USER to SYSTEM in the pulldown on the drivers page. This opened the drivers to appear on the SYSTEM tab of ODBC Administrator (prior to this, the drivers did not appear on the SYSTEM tab of ODBC Administrator).
Added the DSN, the USER, the PORT, and the PASSWORD variables.
I then went to my MAMP application that was running on the Mac. I clicked on [FILE], [EDIT] [TEMPLATE] [my.cnf]. This opened the configuration file. There is a warning - if this gets polluted, it screws up the entire MAMP app.
I made the following change (Inserted a comment above the change).
the bind address was just commented out. 9-5-14
bind-address = 127.0.0.1
This change does not tie MAMP to the localhost (I believe).
I kept scrolling through the file. I also made the next change, and then saved the .cnf file:
Just commented out the next line. Trying to get odbc to work. 9-5-14
MAMP_skip-networking_MAMP
This change I believe tells MAMP to allow remote connections.
On PC, under Data Sources, System DSN tab, using MYSQL ODBC 5.1 driver, I set the datasource name, I set the URL of the online server (which was registered with internic), I set the port, and I entered the User and password to be the same KEYS I set in the ODBC System DSN I added on the Mac server. Then, I pulled down the database tab, and miraculously - the databases in my mac server appeared!
Hope this is helpful to another newbie! I literally worked WAY too many hours trying to find a solution, and it wound up being pretty easy once I lucked into the answer!
.
I am new to servers and the command line, but I have successfully transfered my php files to the server and it appears that i have imported the mysql database successfully (at least i see it in /var/lib/mysql). I am using Linode as my host, I am locally using MAC terminal to connect to a ubuntu linux server.
Could anyone explain what I may be missing or how I should properly set things up?