943,829 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 2550
  • PHP RSS
Jul 14th, 2009
0

PHP, APACHE and MSSQL

Expand Post »
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!
Similar Threads
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
php_noob is offline Offline
81 posts
since Jul 2007
Jul 14th, 2009
0

Re: PHP, APACHE and MSSQL

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)
Reputation Points: 49
Solved Threads: 22
Junior Poster
Menster is offline Offline
175 posts
since Jun 2009
Jul 14th, 2009
0

Re: PHP, APACHE and MSSQL

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
Reputation Points: 11
Solved Threads: 12
Junior Poster in Training
sikka_varun is offline Offline
94 posts
since Dec 2008
Jul 15th, 2009
0

Re: PHP, APACHE and MSSQL

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
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
php_noob is offline Offline
81 posts
since Jul 2007
Jul 15th, 2009
0

Re: PHP, APACHE and MSSQL

But if we use php with MSSQL, won't the syntax for connecting change???
Reputation Points: 8
Solved Threads: 13
Junior Poster
anuj576 is offline Offline
180 posts
since Jul 2008
Jul 15th, 2009
0

Re: PHP, APACHE and MSSQL

Click to Expand / Collapse  Quote originally posted by anuj576 ...
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.
Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
php_noob is offline Offline
81 posts
since Jul 2007
Jul 15th, 2009
0

Re: PHP, APACHE and MSSQL

I recommend that you go through all the syntax and not just of establishing connection.
Reputation Points: 8
Solved Threads: 13
Junior Poster
anuj576 is offline Offline
180 posts
since Jul 2008
Jul 15th, 2009
1

Re: PHP, APACHE and MSSQL

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/
Sponsor
Featured Poster
Reputation Points: 1048
Solved Threads: 948
Sarcastic Poster
ardav is offline Offline
6,687 posts
since Oct 2006
Jul 16th, 2009
0

Re: PHP, APACHE and MSSQL

Thanks guys for the advise, and I highly APPRECIATE IT.
THANKS man.


All are noted.

Reputation Points: 10
Solved Threads: 2
Junior Poster in Training
php_noob is offline Offline
81 posts
since Jul 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Image Uploading error??
Next Thread in PHP Forum Timeline: dynamic form issue





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC