Clandestinex337 Posted April 23, 2007 Share Posted April 23, 2007 How can I setup MSSQL to work with Apache? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/48367-setting-up-mssql-and-apache/ Share on other sites More sharing options...
marmite Posted April 25, 2007 Share Posted April 25, 2007 You need to be a bit more specific about what isn't working. MySQL works automatically with Apache, sort of... When you installed Apache, did PHPMyadmin install as well (check http://localhost/phpmyadmin if you installed this on your personal computer)? If so, MySQL is already working! Just go to "Create Database" or similar to get started. PHPMyadmin docos are great too. In order to code web pages which are viewed through Apache Server, and which use the MySQL DB for information, you need some connection info like $host = "localhost"; $username = "fred"; $db = "test"; $password = "freddie"; $conn = mysql_connect($host, $username, $password) or die("Error connecting to database " . mysql_error()); mysql_select_db($db) or die("Error connecting to database " . mysql_error()); This is often stored in a file called "db.inc.php", then in each webpage you code, instead of repeating the connection info, you write (at the top in php) "require 'db.inc.php';" Hope this helps Quote Link to comment https://forums.phpfreaks.com/topic/48367-setting-up-mssql-and-apache/#findComment-238579 Share on other sites More sharing options...
marmite Posted April 25, 2007 Share Posted April 25, 2007 SORRY I misread MSSQL for MySQL Doh! Well that was a waste of 10 minutes Quote Link to comment https://forums.phpfreaks.com/topic/48367-setting-up-mssql-and-apache/#findComment-238581 Share on other sites More sharing options...
Guest prozente Posted April 26, 2007 Share Posted April 26, 2007 How can I setup MSSQL to work with Apache? Thanks Do you mean PHP? If you meant Apache like you said what are you trying to accomplish? Quote Link to comment https://forums.phpfreaks.com/topic/48367-setting-up-mssql-and-apache/#findComment-238743 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.