Jump to content

Recommended Posts

Posted

Πλέον η PHP δεν δουλεύει το mssql αλλά το sqlsrv, οπότε πολλά scripts όπως και account managers που υπάρχουν εδώ στο forum δεν λειτουργούνε (εκτός αν βάλετε παλιότερη php). 

Πρέπει να εγκαταστήσετε τον driver της SQL για PHP, ODBC όπως επίσης και τα αντίστοιχα setting απ την μεριά του SQL server. 

 

<?php

	$serverName = "192.168.1.103\L2, 1433"; 
	
        $connectionInfo = array( 
		"Database"=>"lin2db", 
		"UID"=>"sa", 
		"PWD"=>"ASDfsaad548ASd5"
	);
	
	// Connect to MSSQL
	$conn = mssql_connect ( $ServerName, $connectionInfo );

	if( $conn ) {
		echo "Connection established.<br />";
	}else{
		echo "Connection could not be established.<br />";
		die( print_r( sqlsrv_errors(), true));
	}	
?>

Είναι ένας καλός και γρήγορος τρόπος να δείτε έχετε connect με τον SQL Server και επίσης σε περίπτωση που δεν έχετε τα error που δίνει βοηθάνε πολύ στην επίλυση του τι χρειάζεται - λείπει. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..