Problem with sql

07/23/2012 17:04 8holyavenger8#1
Hi guys , i have been installed slq 2012 and i use appserv to my register page, but safety policy of the SQL does not allow apache to connect to the database, the setting in the conf.php file is correct, since I created a new User, put the permissions still access SQL blocks.
07/23/2012 18:21 Vake24#2
may be u have some closed ports?
check 1433 port
07/23/2012 18:29 8holyavenger8#3
i need put port 1433
07/23/2012 18:38 Vake24#4
U use apache on your computer? if yes u dont must open ports check apache configs or use hosting^^
07/23/2012 19:02 8holyavenger8#5
i use appserv and he use port 8090
07/23/2012 19:07 Vake24#6
u have screens with problem?
07/23/2012 19:55 8holyavenger8#7
Warning: mssql_select_db() [function.mssql-select-db]: message: A entidade de seguran�a de servidor "AUTORIDADE NT\SISTEMA" n�o pode acessar o banco de dados "auth" no contexto de seguran�a atual. (severity 14) in C:\AppServ\www\register\index.php on line 27

Warning: mssql_select_db() [function.mssql-select-db]: Unable to select database: auth in C:\AppServ\www\register\index.php on line 27
Couldn't open database auth

Don't use special char in your password or username, it will be deleted by our internal security system
07/23/2012 20:25 Vake24#8
i cant read first part of error

check index.php on line 27
it error with database select
07/23/2012 20:31 8holyavenger8#9
Warning: mssql_select_db () [function.mssql-select-db]: message: The server principal "NT AUTHORITY \ SYSTEM" can not access the database "auth" in the current security context. (severity 14) in C: \ AppServ \ www \ register \ index.php on line 27

1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <title>Arcadia Test Server</title>
5<?php
6require("conf.php");
7if ($registration ==0){
8?>
9 <h1>Registrations closed</h1>
10 </div>
11 </div>
12<?php
13exit;
14}
15if(isset($_SERVER['HTTP_REFERER'])
16 && $_SERVER['HTTP_REFERER']!=''
17 && substr($_SERVER['HTTP_REFERER'], 7, strlen($_SERVER['SERVER_NAME'])) != $_SERVER['SERVER_NAME'])
18 {
19 $_POST = array();
20 $_GET = array();
21 }
22function connect(){
23 require("conf.php");
24 $db = $Auth_db;
25 $connect = mssql_connect($sql_host, $sql_user, $sql_password);
26 if (!$connect) {echo 'connection error'; exit;}
27 mssql_select_db($db, $connect) or die("Couldn't open database $db");
28 return $connect;
}
$do = $_POST['do'];
switch($do){




and my other archive

<?php
$sql_host="LEONARDO-TI\SQLEXPRESS"; // It can be : localhost\sqlexpress
$sql_user="sa";
$sql_password="";
$Auth_db="auth";
$md5_key="2011";
$registration = "1";
$max_accounts = "50";
?>
07/23/2012 21:07 Vake24#10
try to change
$sql_host="LEONARDO-TI\SQLEXPRESS"; // It can be : localhost\sqlexpress
to
$sql_host="localhost"; // It can be : localhost\sqlexpress

i know 10% php i think that here missed SQL_port in config and script ^^ but i dont sure 100%
07/23/2012 21:17 8holyavenger8#11
not work,
I believe that SQL has security policy, ie, it authenticates the server, but not allow the database seje modivicado AUTH not due to some blockage in the User SA or NT Authority \ System.
07/23/2012 21:21 Vake24#12
HMM i Try to find fix and help u with u problem but it can take 1-3 days
07/23/2012 21:22 8holyavenger8#13
not work.
I believe that SQL has security policy, ie, it authenticates the server, but not allow the database seje modivicado AUTH not due to some blockage in the User SA or NT Authority \ System.

ok ty