PHP, APACHE and MSSQL

Thread Solved

Join Date: Jul 2007
Posts: 68
Reputation: php_noob is an unknown quantity at this point 
Solved Threads: 2
php_noob's Avatar
php_noob php_noob is offline Offline
Junior Poster in Training

PHP, APACHE and MSSQL

 
0
  #1
Jul 14th, 2009
Guys,

I need Help in making PHP APACHE and MS SQL SERVER 2000 to run.
I search a lot but still can not get the logic behind it. All that I understand is that I need to configure something in the PHP INI.

Is it possible in XAMPP? or I need to install PHP APACHE and MS SQL SERVER2000 separately? I am lost!

Thanks Guys!
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 172
Reputation: Menster is an unknown quantity at this point 
Solved Threads: 22
Menster's Avatar
Menster Menster is offline Offline
Junior Poster

Re: PHP, APACHE and MSSQL

 
0
  #2
Jul 14th, 2009
I would recommend using XAMPP, however, it uses MySQL not MS SQL. Im not even sure if you can get apache and php to work with MS SQL (well, you probably can but I'll guarantee it's more effort than it is worth).

XAMPP is an all-in-one wunderkind php development kit. (without an IDE unfortunately)
$me = new Person();
if (isset($_COOKIE)){
$me->eat($_COOKIE);
} else { $me->starve(); }
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 94
Reputation: sikka_varun is an unknown quantity at this point 
Solved Threads: 11
sikka_varun's Avatar
sikka_varun sikka_varun is offline Offline
Junior Poster in Training

Re: PHP, APACHE and MSSQL

 
0
  #3
Jul 14th, 2009
Hi,

You can use XAMPP.. No issues..
But yes you need to setup and install MSSQL Server separately.
Make sure yyou create a tble in MS SQL and then run queries in MS SQL.

XAMPP contains an extension for MSSQL and usually its enabled by default.
You can check php.ini file to ensure this (<dir>\xampp\apache\bin\php.ini). Open this file and make sure extension=php_mssql.dll and extension=php_pdo_mssql.dll are enabled (there is no ; in front of these extensions).

This will enable you to access mssql server database.
Refer this link for more info: http://www.php.net/manual/en/ref.mssql.php
VâRûN
---Happy to Help---
sikka_varun@yahoo.com
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 68
Reputation: php_noob is an unknown quantity at this point 
Solved Threads: 2
php_noob's Avatar
php_noob php_noob is offline Offline
Junior Poster in Training

Re: PHP, APACHE and MSSQL

 
0
  #4
Jul 15th, 2009
Originally Posted by sikka_varun View Post
Hi,

You can use XAMPP.. No issues..
But yes you need to setup and install MSSQL Server separately.
Make sure yyou create a tble in MS SQL and then run queries in MS SQL.

XAMPP contains an extension for MSSQL and usually its enabled by default.
You can check php.ini file to ensure this (<dir>\xampp\apache\bin\php.ini). Open this file and make sure extension=php_mssql.dll and extension=php_pdo_mssql.dll are enabled (there is no ; in front of these extensions).

This will enable you to access mssql server database.
Refer this link for more info: http://www.php.net/manual/en/ref.mssql.php
Just as easy as that? ok thanks I will try it immediately! Thanks Man
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 147
Reputation: anuj576 is an unknown quantity at this point 
Solved Threads: 10
anuj576 anuj576 is offline Offline
Junior Poster

Re: PHP, APACHE and MSSQL

 
0
  #5
Jul 15th, 2009
But if we use php with MSSQL, won't the syntax for connecting change???
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 68
Reputation: php_noob is an unknown quantity at this point 
Solved Threads: 2
php_noob's Avatar
php_noob php_noob is offline Offline
Junior Poster in Training

Re: PHP, APACHE and MSSQL

 
0
  #6
Jul 15th, 2009
Originally Posted by anuj576 View Post
But if we use php with MSSQL, won't the syntax for connecting change???
I haven't tried it yet really but I think there are slight changes on the syntax (I THINK). I saw the functions used, its quite similar. except for the MSSQL_ prefix. follow the link by sikka_varun.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 147
Reputation: anuj576 is an unknown quantity at this point 
Solved Threads: 10
anuj576 anuj576 is offline Offline
Junior Poster

Re: PHP, APACHE and MSSQL

 
0
  #7
Jul 15th, 2009
I recommend that you go through all the syntax and not just of establishing connection.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,102
Reputation: ardav will become famous soon enough ardav will become famous soon enough 
Solved Threads: 139
ardav's Avatar
ardav ardav is offline Offline
Veteran Poster

Re: PHP, APACHE and MSSQL

 
1
  #8
Jul 15th, 2009
There are definitely differences in SQL language between MySQL and MS SQL (just as there are between other dbs). You must check all statements thoroughly. If you've used one of the PEAR/PECL database extensions, ensure that the one you've used can be configured for MSSQL. If you're not using a data abstraction layer, the changes should be quite straightforward.

e.g.
MS SQL: SELECT TOP(7) * FROM table1 ORDER BY field3

MYSQL: SELECT * FROM table1 ORDER BY field3 LIMIT 7

MS SQL doesn't support batch updates either as far as I know (you'll have to write individual statements or use a php loop).

Due to this, if you've got some php code that builds SQL clauses and then puts them together just before running them, you'll have to sort through this code as well, just in case.


An interesting article here:
http://troels.arvin.dk/db/rdbms/
If you don't reply to your own thread or you can't find the solved link - you're off my Christmas list - permanently! Bah humbug!
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 68
Reputation: php_noob is an unknown quantity at this point 
Solved Threads: 2
php_noob's Avatar
php_noob php_noob is offline Offline
Junior Poster in Training

Re: PHP, APACHE and MSSQL

 
0
  #9
Jul 16th, 2009
Thanks guys for the advise, and I highly APPRECIATE IT.
THANKS man.


All are noted.

Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:




Views: 716 | Replies: 8
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC