Results 1 to 6 of 6

Thread: I think I may be stupid

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    I think I may be stupid

    Ok, so here's the situation:

    I have an MS SQL Server which is a test server for my development needs (as most of you know). I have Apache, PHP, MSSQL and some other things installed on there. A couple months ago, I started using a different server for the web server. PHP was also installed there and that is an IIS ( ) server. Everything has been working fine until my next move. I'm moving my tables/DTS/logins (the whole shebang) to a production MS SQL server.

    This is where we hit problems. I can move the data just fine and all that works. I've even made an ODBC connection to that server with a login/pass that was given to me. However, I cannot use the PHP calls to connect to the server.

    Here's where I get stupid, or so I think: Does PHP need to be installed on that server that houses the MS SQL Server? Currently it is not and I think that is the problem we are having. Can anyone confirm or deny the need for that action (installing PHP on the production server)?
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    No you don't need PHP on the server. PHP can pull the data from any odbc compliant device or server - and that device or server does not need php itself. Is your connection string okay? Can you even connect to the DB from php?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    The connection string is fine AFAIK. I used the same setup on my test server and it worked great. All I did was change the name of the server (IP), and use the username/password that was setup. I can use ODBC to connect to it, but PHP will not find it no matter what I do.

    The only other problem I could see is that the server is a cluster. I don't know that that would be a problem, but it's my only other guess at this point.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  4. #4

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Here is my connection file:
    PHP Code:
    Other than my built in errors via die statementno.

    Here is my code:

    [
    PHP]$myServer "xxx.xxx.xxx.xxx"
    //$myServer = "xxx.xxx.xxx.xxx"; 
    $myUser "labuser"
    $myPass "helab"
    $myDB "CellHours"

    $s mssql_connect($myServer$myUser$myPass
    or die(
    "<br/><br/><br/><p class=warn>Couldn't connect to SQL Server on $myServer<br/><br/><p class=other>Please contact system administrator or try again later."); 

    $d mssql_select_db($myDB$s
    or die(
    "<br/><br/><br/><p class=warn>Couldn't open database $myDB<br/><br/><p class=other>Please contact system administrator or try again later."); 
    Obviously, I've changed the IP to x's. [/PHP] This works on my test server just fine... I don't think there should be any reason that it doesn't work on the production server.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  5. #5
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Is that user added to that database in enterprise manager on your production server?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  6. #6

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    Yes, and like I said, I can use that login information with an ODBC connection and it works just fine.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width