RE: [INTERNALS-WIN] RE: [PHP-DEV] Differences in VC6 and VC9 Windows builds and MSSQL Driver.

[email protected] ("Uwe Schindler")
Newsgroups php.internals.win
Message-ID <06A200BF00984C5C82DDF857AC0B4CD5@VEGA>
> > > In "Windows speek" a good API (that is windows conform) does not use
> > symbols
> > > from CRTs, only symbols from Windows API. And APIs like NSAPI or
> Sybase
> > CT
> > > or ODBC are designed this way. This is why you can use an ODBC driver
> in
> > any
> > > application regardless if the driver itself uses whatever CRT it likes
> > (or
> > > none at all).
> >
> > I think we have covered this point in all possible ways. Our main
> > issue is the lack of control on what the various libraries, extensions
> > and part of php do, the same applies for 3rd parties extension (be
> > pecl or other). In an ideal world, I would say we should use whatever
> > we like and it will work, ... in an ideal world :) bugs.php.net is
> > full of cases where people mixed libraries/extensions, strictness will
> > help (at least for the extensions) to get rid of this problem.
> 
> You are right. I do not want to start a flamewar about windows here:
> 
> The problem of PHP is, that it connects the good old windows world with
> the
> other good old UNIX/Linux/BSD world.
> 
> A webserver like the Sun one was designed from the beginning with platform
> independence in mind. This why the NSAPI module can link to the webserver
> regardless if it uses VC6 or VC9 - many thanks to Rob McCool for that! For
> this webserver we can say: We do not have CRT problems, because the
> connection point between these two worlds is clearly: The SAPI module -
> there is no more interaction - it just works.

I forget something here: NSAPI is only clean until the time it was bought by
Iplanet and Sun, sorry. The last recent NSAPI version in SJSWS 6/7 was not
so clean regards to this. See my post to the Sun Web Server forum:
http://forums.sun.com/thread.jspa?threadID=5349826&tstart=0

But nevertheless: The NSAPI plugin for Sun Webserver uses only the good old
Rob McCool API with some dynamic linking of the new one.

Pierre: This is why I said: Pierre, just use the old NSAPI LIBS/INCLUDES for
the windows build...

> With Apache Webserver this is completely different. The Apache webserver
> was
> designed originally on Unix platform. Because of that, the public API of
> this webserver was designed using symbols and structs of the UNIX/POSIX
> libc. Because of that, the API is only compatible, as long as the
> webserver
> is linked with DLLs that use the same CRT. If you try to link an Apache
> linked with Cygwin and a module from VC9, it will crash. If you try to
> link
> a mingw Apache with Cygwin, it crashes. If you try to link an Apache from
> MSVCRT 6 with PHP with VCRT 9, it crashes. Very simple or not?
> 
> The same happens with extensions. But the problem is here is often very
> simple. If the public API of this extension uses symbols from the windows
> world, there is no problem, it just works (ODBC, Win32, Java, NSAPI,
> Sybase
> CT,...). If it uses symbols from the UNIX/POSIX world, the problems begin
> (not because of the word UNIX/POSIX in it - because of the different world
> in it).
> 
> Greetings from a person that used Windows and POSIX always next to each
> other in his mind...
> 
> Uwe

Again from me,

Uwe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.