Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Cross-platform and Portable Development With PHP
Cross-Platform Issues
We already had PHP and MySQL happily running on Linux. The PHP download for NT was no problem and after telling the SQL Server installation that it had to be prepared to speak TCP/IP to clients (an option buried amongst the numerous dialog boxes), it was responding to local requests from PHP too. We persuaded the PHP code to talk across our network to MySQL without the slightest difficulty. The reverse was another matter.
Building a version of PHP that would run on Linux and talk to SQL Server was not proving to be easy. After quite a lot of digging around the PHP website and reading what various people had to say in mailing lists, we'd found that a) SQL Server talks the same protocol as Sybase (no surprise, since SQL Server is/was based on a Sybase core) and that b) we would need some special libraries to make it work. Those libraries are not part of standard PHP distributions for Linux/Unix. We chose to use the freetds library.
It took a lot of cursing and sweating to get PHP working with freetds - we'd have been well advised to have spent our time looking around for the guidance that is actually out there, but sadly hadn't found it first time around. At least one useful starting point is: Michael Peceny's site and of course, after all the struggling, others came to light as well. You do need to be happy compiling applications from source to make it work. If there are any packaged installations of PHP and freetds, then we didn't find them.
Eventually PHP4 running on Linux was talking to SQL Server running on NT.
Being used to the mature and powerful Perl DBI:: interface for accessing databases, PHP's insistence on using a different set of function calls per database seemed terribly retrograde. Whilst there are probably thousands of similar solutions to what we did (and most of them probably better), we built our own extremely simple interface so that the bulk of the software wouldn't have to call functions conditionally depending on the target database.
[ Next Page ]

[Page 1]  [Page 2]  


Comments:
RE: how i can unblock the websitesMatt05/13/07 05:28
RE: how i can unblock the websiteshvh11/16/05 11:17
how to connect mysql from java using DSNsree09/15/05 06:53
RE: How to unblock sites?Zack07/21/05 16:54
Unblock Sites Set by AdministratorCourtney 07/06/05 02:09
RE: how i can unblock the websitesstevo106/14/05 10:50
RE: how i can unblock the websitesjohn05/06/05 19:48
help me chris03/07/05 06:28
RE: MySQL's <-> MSSQL limit clauseemin02/28/05 09:34
how can i run my php file in Linuxsanjeet maharana02/11/05 05:35
RE: how i can unblock the websitesAngie01/28/05 11:38
RE: About integration PHP with JAVAnajla01/12/05 06:22
RE: how i can unblock the websitesdavis bryson12/07/04 16:24
What Hardware and Software to buy?Dana11/16/04 17:47
RE: MySQL >>limit<< equivalent in MSSQL?John07/04/03 15:31
RE: MySQL >>limit<< equivalent in MSSQL?Ben01/24/03 18:33
Happy Happy Joy Joy!!!!Pooter Usbueno01/08/03 16:00
RE: MySQL >>limit<< equivalent in MSSQL?Balazs12/20/02 03:30
PHP connect to MSSQL using mssql_connectRajini Kanth D10/29/02 02:41
RE: MySQL >>limit<< equivalent in MSSQL?Sarah10/18/02 13:35
RE: Can I run 2 Web servers in a single PC?algorythm10/08/02 17:58
how i can unblock the websiteskenny10/01/02 23:19
RE: Legacy PHP code conversionPeter Somers09/17/02 08:52
Legacy PHP code conversionPeter Somers08/28/02 11:15
RE: MySQL >>limit<< equivalent in MSSQL?syannic06/24/02 08:00
RE: Can I run 2 Web servers in a single PC?rollyn06/24/02 03:51
RE: MySQL >>limit<< equivalent in MSSQL?Eduardo Ramírez06/18/02 01:35
RE: How to run PHP file in UNIXAntony Nawaz06/07/02 02:14
RE: How to make PHP connect to MSSQLMinh Nguyen06/06/02 10:59
Why not use PEAR::DB?Philippe Langlois05/17/02 13:27
RE: How to make PHP connect to MSSQLSteven05/16/02 18:29
How to make PHP connect to MSSQLBilly Lau04/30/02 00:36
can I run a program in webpageRingi04/29/02 03:51
How to run PHP file in UNIXGirish04/19/02 07:57
RE: MySQL >>limit<< equivalent in MSSQL?Chain Smoking Monkey04/18/02 13:41
how to run vb done .exe in linux (pine)Balamurale04/12/02 11:38
RE: Can I run 2 Web servers in a single PC?Joerg v:04/11/02 04:12
RE: Can I run 2 Web servers in a single PC?VaL G.03/18/02 21:28
RE: Can I run 2 Web servers in a single PC?chiongbian03/11/02 10:52
RE: Using PHP with Pws ?Jack Goral03/10/02 17:55
RE: How to run PHP files on an IIS Server.Frank02/23/02 20:41
mysql on NTJosiah02/18/02 03:40
RE: Using PHP with Pws ?Chris01/25/02 10:25
RE: How to run PHP files on an IIS Server.chris ward01/25/02 04:24
Apache -> IISAxel Steinbach01/12/02 16:01
ProblemsAxel Steinbach01/12/02 16:00
RE: Why msSQL Dem Chuasieng01/02/02 09:18
Using PHP with Pws ?Didier01/02/02 04:45
RE: How to run PHP files on an IIS Server.Bruce Pierson12/13/01 17:31
config.php in the above example?Mario Splivalo12/10/01 06:57
mcrypt is missingFabio A Mazzarino11/29/01 13:19
Why msSQL firepages11/28/01 20:52
RE: querykeith11/20/01 23:09
RE: MySQL >>limit<< equivalent in MSSQL?Richard Borrie11/15/01 15:00
RE: How to run PHP files on an IIS Server.Charles W. Lowe11/06/01 23:07
How to run PHP files on an IIS Server.Ganesh Krishnan10/25/01 17:43
A blackjack website in PHPchip d. 10/19/01 14:52
RE: MySQL >>limit<< equivalent in MSSQL?Jason10/10/01 14:18
RE: MySQL >>limit<< equivalent in MSSQL?philippe10/05/01 12:33
RE: Database abstractionLiron Levy10/03/01 03:15
queryNarayanaswamy09/19/01 06:13
RE: MySQL >>limit<< equivalent in MSSQL?bunny09/06/01 21:55
RE: About integration PHP with JAVALila09/06/01 16:46
Article - very impressiveMel Pihura08/22/01 09:33
MySQL >>limit<< equivalent in MSSQL?* rolis *08/16/01 06:56
PHP on IIS/NTArup Bhanja08/09/01 04:10
why does this site suck now?bob neil08/08/01 10:04
Request!!Thomas08/08/01 09:05
"Portable" DevelopmentMiles Leadlem08/07/01 08:23
Need URL of Site ?Ritesh08/07/01 04:02
MySQL's <-> MSSQL limit clauseodd08/04/01 07:32
nice db abstractiondan008/02/01 16:25
Database AbstractionAskama07/31/01 07:07
Paging in SQL ServerGjalt Wijma07/30/01 23:34
Interesting !Mayuresh Kadu07/30/01 09:55
Turn db abstraction into a class...Paul Meagher07/30/01 04:54
Reinventing the weel...Emerson Ribeiro07/28/01 23:18
SQL 2000 / PHPPhil Greenway07/26/01 20:33
SQL Server equivalent of MySQL limitJared Smith07/26/01 18:05
The *real* annoying database incompatibilityMichael Chaney07/26/01 06:42
Re: Non technical questionAwesome07/25/01 08:52
ADODBScott07/24/01 12:23
Database abstractionJustin Grant07/24/01 09:19
simplificationJustin Grant07/24/01 09:07
Can I run 2 Web servers in a single PC?Zishan07/23/01 00:26
SQL's lack of minimum standards is a problempeter Moulding07/22/01 23:23
Easier multi-server config filesDigital Wokan07/22/01 01:03
About integration PHP with JAVAVenu Gopal Burra07/21/01 04:12
Rubbish lahEric Lee07/21/01 00:53
Happy Happy Joy Joy!!!!Brett J.07/20/01 18:49
connection on the sql server with phppat07/20/01 13:40
cart code?dietrich07/20/01 13:29
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.