php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32531 Sybase extension contains aliases to mssql functions that can never be used
Submitted: 2005-04-01 12:52 UTC Modified: 2005-08-06 07:43 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: daniel dot beet at accuratesoftware dot com Assigned: fmk (profile)
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 5.0.4, 4.3.11 OS: Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: daniel dot beet at accuratesoftware dot com
New email:
PHP Version: OS:

 

 [2005-04-01 12:52 UTC] daniel dot beet at accuratesoftware dot com
Description:
------------
php_mssql.dll and php_sybase_ct.dll have conflicting function alias, meaning that they cannot be used at the same time.

Since (on Windows at least) you cannot use the Sybase CT client to connect to MSSQL, and you always have the Microsoft DB-lib available, there is no current reason for the function aliases in the Sybase CT extension.

On UNIX, PHP can now use FreeTDS instead of the MS DB-lib, so again the aliases seem to no longer be required.

Could these aliases be removed, either only for Windows or totally, removing this conflict. Or if backwards compatability is required, the aliases be disabled via a php.ini setting?

We have an application that does require access to both databases at once, and while I have recompiled the PHP Sybase CT dll, removing the aliases - our clients prefer to use the official PHP source and builds.

Related bug reports are #13819, #23318 and #24023.

Thanks


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-20 16:38 UTC] frodelangvik at hotmail dot com
Removed the current ALIAS handling and insert the following, and the compile the file again.

#ifdef PHP_WIN32
	function_entry sybase_functions[] = {
		PHP_FE(sybase_connect, NULL)
		PHP_FE(sybase_pconnect, NULL)
		PHP_FE(sybase_close, NULL)
		PHP_FE(sybase_select_db, NULL)
		PHP_FE(sybase_query, NULL)
		PHP_FE(sybase_unbuffered_query, NULL)
		PHP_FE(sybase_free_result, NULL)
		PHP_FE(sybase_get_last_message, NULL)
		PHP_FE(sybase_num_rows, NULL)
		PHP_FE(sybase_num_fields, NULL)
		PHP_FE(sybase_fetch_row, NULL)
		PHP_FE(sybase_fetch_array, NULL)
		PHP_FE(sybase_fetch_assoc, NULL)
		PHP_FE(sybase_fetch_object, NULL)
		PHP_FE(sybase_data_seek, NULL)
		PHP_FE(sybase_fetch_field, NULL)
		PHP_FE(sybase_field_seek, NULL)
		PHP_FE(sybase_result, NULL)
		PHP_FE(sybase_affected_rows, NULL)
		PHP_FE(sybase_min_client_severity, NULL)
		PHP_FE(sybase_min_server_severity, NULL)
		PHP_FE(sybase_set_message_handler, NULL)
		PHP_FE(sybase_deadlock_retry_count, NULL)
	
		{NULL, NULL, NULL}
	};
#else
	function_entry sybase_functions[] = {
		PHP_FE(sybase_connect, NULL)
		PHP_FE(sybase_pconnect, NULL)
		PHP_FE(sybase_close, NULL)
		PHP_FE(sybase_select_db, NULL)
		PHP_FE(sybase_query, NULL)
		PHP_FE(sybase_unbuffered_query, NULL)
		PHP_FE(sybase_free_result, NULL)
		PHP_FE(sybase_get_last_message, NULL)
		PHP_FE(sybase_num_rows, NULL)
		PHP_FE(sybase_num_fields, NULL)
		PHP_FE(sybase_fetch_row, NULL)
		PHP_FE(sybase_fetch_array, NULL)
		PHP_FE(sybase_fetch_assoc, NULL)
		PHP_FE(sybase_fetch_object, NULL)
		PHP_FE(sybase_data_seek, NULL)
		PHP_FE(sybase_fetch_field, NULL)
		PHP_FE(sybase_field_seek, NULL)
		PHP_FE(sybase_result, NULL)
		PHP_FE(sybase_affected_rows, NULL)
		PHP_FE(sybase_min_client_severity, NULL)
		PHP_FE(sybase_min_server_severity, NULL)
		PHP_FE(sybase_set_message_handler, NULL)
		PHP_FE(sybase_deadlock_retry_count, NULL)
	
		PHP_FALIAS(mssql_connect, sybase_connect, NULL)
		PHP_FALIAS(mssql_pconnect, sybase_pconnect, NULL)
		PHP_FALIAS(mssql_close, sybase_close, NULL)
		PHP_FALIAS(mssql_select_db, sybase_select_db, NULL)
		PHP_FALIAS(mssql_query, sybase_query, NULL)
		PHP_FALIAS(mssql_unbuffered_query, sybase_unbuffered_query, NULL)
		PHP_FALIAS(mssql_free_result, sybase_free_result, NULL)
		PHP_FALIAS(mssql_get_last_message, sybase_get_last_message, NULL)
		PHP_FALIAS(mssql_num_rows, sybase_num_rows, NULL)
		PHP_FALIAS(mssql_num_fields, sybase_num_fields, NULL)
		PHP_FALIAS(mssql_fetch_row, sybase_fetch_row, NULL)
		PHP_FALIAS(mssql_fetch_array, sybase_fetch_array, NULL)
		PHP_FALIAS(mssql_fetch_assoc, sybase_fetch_assoc, NULL)
		PHP_FALIAS(mssql_fetch_object, sybase_fetch_object, NULL)
		PHP_FALIAS(mssql_data_seek, sybase_data_seek, NULL)
		PHP_FALIAS(mssql_fetch_field, sybase_fetch_field, NULL)
		PHP_FALIAS(mssql_field_seek, sybase_field_seek, NULL)
		PHP_FALIAS(mssql_result, sybase_result, NULL)
		PHP_FALIAS(mssql_affected_rows, sybase_affected_rows, NULL)
		PHP_FALIAS(mssql_min_client_severity,   sybase_min_client_severity, NULL)
		PHP_FALIAS(mssql_min_server_severity, sybase_min_server_severity, NULL)
		PHP_FALIAS(mssql_set_message_handler, sybase_set_message_handler, NULL)
		PHP_FALIAS(mssql_deadlock_retry_count, sybase_deadlock_retry_count, NULL)
	
		{NULL, NULL, NULL}
	};
#endif

Best regards,
Frode Langvik
 [2005-08-06 01:36 UTC] sniper@php.net
Frank, do you have any opinions about this?
(just make ext/mssql shared ext in windows maybe? :)

 [2005-08-06 07:43 UTC] fmk@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 07 21:01:27 2024 UTC