|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-04-24 06:20 UTC] fritz at lateral dot net
If the name of the database has a dash in it, e.g. php-bugs-list, php running under apache is not able to connect - I can connect using ASP in IIS. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 02:00:01 2025 UTC |
my my my... what a nice attitude we have again. From the "How to report a bug" page: * Provide code that demonstrates the problem, it should almost never be more than ten lines long. Anything longer probably contains a lot of code that has nothing to do with the problem, which just makes it take longer to figure out the real problem. (But don't forget to make sure that your code still demonstrates the bug you're reporting and doesn't have some other problem because you've accidently trimmed out something you thought wasn't important but was!) The URL for this is: http://bugs.php.net/how-to-report.php Don't forget we're volunteers and are not particulary fond of people who start shouting and demand a fix while they are not willing to produce a useful bugreport.Try creating a database called php-bugs-list and one called php_bugs_list. mssql_connect('localhost','username','pwd') or die 'mssql_connect error'; mssql_select_db('php-bugs-list') or die 'mssql_select_db error'; mssql_connect('localhost','username','pwd') or die 'mssql_connect error'; mssql_select_db('php_bugs_list') or die 'mssql_select_db error'; I am not 'demanding' a fix - I have learnt that I will avoid errors by having no dashes in the database name. My problem is solved. I tried to share this with other php users, If you want to use this information to improve php you are welcome to it - but please don't waste my time by being anal about how the bug is reported. And that's the end of it, AFAIAC.This bug still exists in 5.2.6, code to reproduce remains the same. mssql_select_db('mysilly-database'); will result in an error claiming that mysilly does not exist within sysdatabases (a mssql system table).Problem exists also when trying to use odbc+freetds with any method (odbc_connect, new PDO("odbc:...")) under linux, php 5.2.4. Connecting using external programs works.