Jump to content

zleviticus

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Posts posted by zleviticus

  1. I am having an issue with php and my 2005 sql server. When i connect to the database via visual basic through an excel macro i can connect just fine and do whatever i want to get the data i need.  When i try to connect using php code i am getting the "Could not locate entry in sysdatabases for database 'mydb'/ No entry found with that name.

     

    I have tried connecting using windows autentication and SQL. Same issue. I did have to replace a dlll for php because of a known issue with mssql and php 5. I am also connecting using the port address of the server in the sql_connect.  Also the server is an named instance and not the default instance.  I am at a loss as to what is causing the issue.  The same code worked on a sql 2000 server with php 5. This 2000 sql is on the same server as the 2005 in another instance.

     

    Here is what i am using to connect to the server:

     

    $server = "192.168.1.9\\instance,1433";
    $username = "someuser";
    $password = "somepassword";
    $sqlconnect = mssql_connect($server, $username, $password) or DIE("Can't Connect to server.");
    $sqldb = mssql_select_db('MyDB', $sqlconnect);
    

     

    oh on a side note when i run a  sp_helpdb against master i can see the DB i am trying to connect to listed.

  2. Ok this is a weird issue and has me perplexed....I have search the forums but can not find anything related. maybe i can't search right....

     

    Running a windows 2003 server with sp2

    mssql 2000

    php 5.2.1

     

    The mssql server is on a different machine than the iis 6 server and php5.

     

    I am connecting to the mssql using the basic msconnect function via ip address. When i try to run the php via IE it give a can't connect to server error.

     

    The script was working prior to the installation of sp 2. Uninstalling sp2 is not a viable option.  If i run the script in my editing program from my workstation it works and connects to the server fine. If i run the script from the iis server it fails.

     

    Thanks for any insight you can give on this issue.

    Z

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.