note 56929 added to function.mssql-connect
| From: | dale dot liszka at gmail dot com | Date: | Mon, 19 Sep 2005 19:28:46 +0000 |
| Subject: | note 56929 added to function.mssql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-95426@lists.php.net to get a copy of this message | ||
If you are trying to use Sybase and MSSQL on the same WIN32 box you will probably have headaches.
There are multiple declaration errors when you enable php_sybase_ct.dll and php_mssql.dll in the
php.ini at the same time.
The specific error for all functions starts like this:
PHP Warning: Function registration failed - duplicate name - mssql_connect
There is a way around this! On a windows box I have done this successfully several times.
1. Make a backup copy of php_sybase_ct.dll (never hurts!)
2. Open php_sybase_ct.dll in a HEX editor (fhred is a nice free one http://www.kibria.de/frhed.html )
3. Replace all instances of 'mssql' with 'sysql'. It doesn't have to be
'sysql', just anything but 'mssql' or 'sybase'.
4. Save the file. (Alternately you could save as something like php_sybase_ct_modified.dll and cite
that in your php.ini)
All the constructs are still declared for the sybase_* functions and now you can use MSSQL and
Sybase instead of switching php.ini files, etc. I have had this work under php 4.3+ and php 5.0.5.
PS. I decided to place this under mssql_connect because its the first error thrown in this case. I
believe it should make the information easier to find via google/search/browsing.
----
Manual Page -- http://www.php.net/manual/en/function.mssql-connect.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56929
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56929&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56929&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56929&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56929&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56929&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+56929&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56929&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56929&report=yes
Search -- http://master.php.net/manage/user-notes.php