Jump to content


Welcome to IPS!

Feel free to browse our community to get a feel for how our community software operates. Post in the pre-sales forum with any questions you have before purchasing or use the Test Posting forum to post a few messages yourself! You can also get a free demo to try the IPS Community Suite yourself.

Already an active IPS client?

Login with the same email address and password you use for the client area to access client-only areas.





Photo - - - - -

Microsoft and PHP are engaged?

Posted by W1lz0r, 02 January 2008 · 97 views


It was with great joy that I read the news about the cooperation between Zend and Microsoft into making the Microsoft platform more suitable for PHP and vice versa. There are two (beta) releases coming from this cooperation that got my particular interest:
- FastCGI module for IIS
- SQL Server 2005 driver for PHP

FastCGI module for IIS
What is the big deal a user might think, but this in fact is very good news for all those users running PHP on their IIS server. With standard PHP running on IIS you basically have two options; run PHP as CGI or as ISAPI.
Running PHP in CGI mode, means that all calls to a PHP script means starting PHP, compiling the script, executing it. This can become pretty slow on high load.
Running PHP in ISAPI mode is a lot better, PHP is kept into memory and an x number of threads are made that proces all requests. This is a lot faster, but has the disadvantage that the current PHP ISAPI module can become unstable on some systems.

So now we have the IIS FastCGI module that gives is the best of both worlds. FastCGI is used a lot on Apache servers, and now we can do the same on our IIS. This also brings speeds to IIS compared with Apache for instance.

I have installed the FastCGI module on both my PC's (it comes with Vista SP1 or you can download it for IIS 6 at Microsoft). It works a treat. I did not encounter any problems at all. For all those running PHP on IIS, it is sure worth the try.

SQL Server 2005 driver for PHP
For those who don't know already; I wrote the MSSQL driver for IP.Board. This driver uses the PHP MSSQL extension or ADODB over COM to connect to SQL Server. The first uses a no longer supported SQL Server dll (ntwdblib.dll) and the latter requires COM which has incompatibilities between PHP 4 and 5. Needless to say I was very much excited that Microsoft now will be supporting MSSQL in PHP. I downloaded their pre-release driver, which is an extension in PHP called SQLSRV.

Obviously I tried it and I got mixed results. First of all there are some functions missing that I have come accustomed to. To name a few (mssql_select_db, mssql_num_rows, mssql_data_seek). For all there are workarounds, but still I kinda miss them; especially mssql_num_rows. I have to run a count(*) query to be able to do this now.
Secondly the handling of TEXT fields. This has always been a pain in SQL Server. Why does it have to be so difficult to get more then 64k of data? In the MSSQL extension you have to set the textlimit setting to be able to get more. In IPB we need more, so it is set on connect. This setting does not exist in the new sqlsrv extension. I have not been able to confirm yet, but I believe it will return a max of 64k data in one field. The only way to get more is to read it as a stream. But this is not how the IPB drivers work. I have not been the only one running into this problem, so chances are this will be changed before the final release (fingers crossed).
I also ran into some bugs (at least I feel they are). Delete queries seem to return no resource id, causing the script to incorrectly detect a query error. And the SET commands do not seem to have effect on any preceding queries.
I was able to get the IPB MSSQL driver working using this extension. Apart for some small issues (mentioned above) this actually works. In fact there are some advantages too (better error handling).

I am not so excited about this driver as when I first heard about it. But in theory this has great potential. I hope Microsoft will listen to their users so this will make SQL Server an as easy choice to use in combination with PHP as MySQL. I will be answering questions if they want me to.

To conclude, Microsoft has made a remarkable yet very powerful move to start supporting PHP on their platform. I chear them for it.




Thank You,Really helped to me !
But I can't install phpmyadmin and there is another problem-
when i want to enter 127.0.0.1/forum it shows me a error-

Quote

HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.

This need to me the index.php file..
It sent this post twice..I am sorry I had a db driver error

Disclaimer

This blog contains my personal views and does not represent IPS, Inc. in any way.

February 2012

S M T W T F S
   1234
56789 10 11
12131415161718
19202122232425
26272829   

Search My Blog

Recent Entries

Latest Visitors

0 user(s) viewing

0 members, 0 guests, 0 anonymous users

Recent Comments