tonyeveland Posted July 28, 2010 Share Posted July 28, 2010 I want to use PHP and SQL Server and I have a web server which contains both SQL Server 2005 and PHP.To use PHP with SQL Server, I need to install SQL Server Driver for PHP on my server. This is no problem.Two questions:1. I have to have SQL Server Native Client on the server. Is this part of SQL Server 2005 (and I have it) or something I have to add.2. Do I need to have Windows Azure Platform to use the SQL Server Driver for PHP?Thanks for your help. I know this is probably pretty basic, but I'm just a humble application developer. Link to comment Share on other sites More sharing options...
VideoRipper Posted July 28, 2010 Share Posted July 28, 2010 (edited) I don't use SQL-Server, but MySQL, but I guess the setup should be nearlythe same for all supported database engines. First make sure PHP is properly installed: your PHP.INI file should at leastbe configured to use (and find) the SQL-driver.Some settings to take a look at:Make sure the extension-directory is correctly set:;;;;;;;;;;;;;;;;;;;;;;;;;; Paths and Directories ;;;;;;;;;;;;;;;;;;;;;;;;;;// SOME LINES REMOVED; Directory in which the loadable extensions (modules) reside.; extension_dir = "./"extension_dir = "C:\php\ext\" <======== Path to driversThe correct driver is enabled (remove semi-colon):;;;;;;;;;;;;;;;;;;;;;;; Dynamic Extensions ;;;;;;;;;;;;;;;;;;;;;;;// SOME LINES REMOVED;Windows Extensions// SOME LINES REMOVED;extension=php_mssql.dll;extension=php_msql.dllextension=php_mysql.dll <======== Remove semi-colon for YOUR driver;extension=php_oci8.dll;extension=php_openssl.dll// SOME LINES REMOVEDSee all other options that might need to be setAfter that, make sure PHP is configured as an extension in your webserver(I use Apache, so I don't know how to do that on Windows Server) and restartthe webserver-service (have a lookout for any warnings and errors).That *should* help you on your way... I hope. Greetz,Peter. Edited July 28, 2010 by VideoRipper Link to comment Share on other sites More sharing options...
CoffeeFiend Posted July 28, 2010 Share Posted July 28, 2010 I would just use WebPI. It'll install everything for you in a couple clicks, including the latest PHP and SQL Server Express (ready to use) and more. Link to comment Share on other sites More sharing options...
VideoRipper Posted July 28, 2010 Share Posted July 28, 2010 You see: the easiest answer is always just around the corner Thanks CoffeeFriend, again I've learned something today. Link to comment Share on other sites More sharing options...
tonyeveland Posted July 29, 2010 Author Share Posted July 29, 2010 Coffee,I have SQL Server 2005, not Express. Will WebPi work with SQL Server 2005? Link to comment Share on other sites More sharing options...
CoffeeFiend Posted July 30, 2010 Share Posted July 30, 2010 It won't force you to install the latest SQL Server.Go under the "Web Platform" tab on the left, then under "Database" click "Customize". You'll see the necessary driver listed. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now