Flyff Sapphire Website ODBC

07/03/2016 18:08 Capt. Jack#1
Hello,
I want to use the Sapphire Website on my Server, but somehow it can not connect to my MSQL 2012 Server. It uses Windows Auth!
I tried some different connectionstrings and noticed the odbc_error():

EDIT:
I'm not sure but do I need a entry at the odbc-datasources?
I did it like the other dbs with "website" as name and WEBSITE_DBF as defaultdb.

EDIT2:
I heared that IIS dont want a Winauth.. so I set a password for sa. But it still give me that error :/
07/03/2016 19:20 Michi#2
Hello Capt. Jack,

you need to copy your servername from your SQL express.
Example:
Than paste it here:
Code:
$odbc_connect = odbc_connect('DRIVER={SQL Server};SERVER=MICHI-PC\SQLEXPRESS;', ODBC_USER, ODBC_PASS);
If you have a username or a password than paste it here:
Code:
define('ODBC_USER', 'HERE USERNAME');																
define('ODBC_PASS', 'HERE PASSWORD');
Please try it out and say us if its working or not.

Greets
'Dude'
07/03/2016 20:42 Capt. Jack#3
Quote:
Originally Posted by 'Dude' View Post
Hello Capt. Jack,

you need to copy your servername from your SQL express.
Example:
Than paste it here:
Code:
$odbc_connect = odbc_connect('DRIVER={SQL Server};SERVER=MICHI-PC\SQLEXPRESS;', ODBC_USER, ODBC_PASS);
If you have a username or a password than paste it here:
Code:
define('ODBC_USER', 'HERE USERNAME');																
define('ODBC_PASS', 'HERE PASSWORD');
Please try it out and say us if its working or not.

Greets
'Dude'
It tested it like this:
Code:
	$odbc_connect = odbc_connect('DRIVER={SQL Server};SERVER=H2596234\SQLEXPRESS;', ODBC_USER, ODBC_PASS);
It causes the errorcode: 08001 (Unable to connect to data source)

and
Code:
define('ODBC_USER', '');																
define('ODBC_PASS', '');
.. because I use Windows Auth
07/03/2016 22:24 Sedrika#4
If you're using IIS change user name to IUSR
07/04/2016 08:23 Chyukαsame#5
What is your PHP Version?
07/04/2016 10:42 xTwiLightx#6
Quote:
Originally Posted by Chyukαsame View Post
What is your PHP Version?
Bitte. Nein. Lass es...


If you're using windows auth with ODBC, you better create a system data source name (DSN) and reference it in your odbc_connection string (you can leave out user and password then).

As driver, SQL Server Native Client and SQL Server should both do it. But Native Client is always better in terms of PHP compabitlity.

Your DSN name can be any, you decide.

Your server should be [COMPUTER / SERVERNAME]\SQLEXPRESS (if you are using SQL Server Express version, this is your name), but this is always correct:
Quote:
localhost\SQLEXPRESS
If the user you are connecting to SQL Server is your active user, you can use builtin NT authentication (which is what you want, I guess).

Else you should reference your NT User and Password in the ODBC_USER and ODBC_PASS constants, of course.
If this is not working, you'll have to stick to SQL Server auth.
07/04/2016 14:01 Chyukαsame#7
Quote:
Originally Posted by xTwiLightx View Post
Bitte. Nein. Lass es...
Dir ist bekannt, dass die Sapphire FlyFF Webseite ab PHP 7 odbc_conntect Fehler ausgibt? :facepalm:

Abey hey, du weißt ja alles besser :*

Falls du es nicht wissen solltest (fk dann geht bestimmt auch die Welt unter)
Der Error Reporting gibt diesen Fehler ab PHP 7 aus: Call to undefined function odbc_connect()
07/04/2016 14:25 xTwiLightx#8
Quote:
Originally Posted by Chyukαsame View Post
Dir ist bekannt, dass die Sapphire FlyFF Webseite ab PHP 7 odbc_conntect Fehler ausgibt? :facepalm:

Abey hey, du weißt ja alles besser :*

Falls du es nicht wissen solltest (fk dann geht bestimmt auch die Welt unter)
Der Error Reporting gibt diesen Fehler ab PHP 7 aus: Call to undefined function odbc_connect()
Wenn das so wäre, würde gar kein Fehler wegen 'invalid credentials' oder 'cannot connect to server' ausgegeben, sondern der von dir besagte.
Ist das der Fall? Nein.

Und nein, Fehler gestackt wird nicht, weil ein nicht vorhandenes ODBC Modul keine ODBC-Fehler ("SQL Server 12345: Error XYZ") ausgeben kann.

Quote:
Originally Posted by Capt. Jack View Post
EDIT:
I'm not sure but do I need a entry at the odbc-datasources?
I did it like the other dbs with "website" as name and WEBSITE_DBF as defaultdb.

EDIT2:
I heared that IIS dont want a Winauth.. so I set a password for sa. But it still give me that error :/
First: Yes, that's what I mentioned with DSN.


Second: It should be possible, since IIS is a windows application - why shouldn't it use Win NT Auth? ;) It might be some configuration with it's FastCGI module or php.ini -> cgi settings.
07/04/2016 14:35 yazuka21#9
Offtopic sirs :( how to fix this error "Could not create output directory 'g:\program'. ??

Please help me!
07/04/2016 16:08 Capt. Jack#10
Quote:
Originally Posted by Sedrika View Post
If you're using IIS change user name to IUSR
Doesn't fix the issue.

Quote:
Originally Posted by Chyukαsame View Post
What is your PHP Version?
I use PHP 7 and I got at first the error. But I already fixed it with
Code:
extension=php_odbc.dll
Quote:
Originally Posted by xTwiLightx View Post
Wenn das so wäre, würde gar kein Fehler wegen 'invalid credentials' oder 'cannot connect to server' ausgegeben, sondern der von dir besagte.
Ist das der Fall? Nein.

Und nein, Fehler gestackt wird nicht, weil ein nicht vorhandenes ODBC Modul keine ODBC-Fehler ("SQL Server 12345: Error XYZ") ausgeben kann.

First: Yes, that's what I mentioned with DSN.

Second: It should be possible, since IIS is a windows application - why shouldn't it use Win NT Auth? ;) It might be some configuration with it's FastCGI module or php.ini -> cgi settings.
Chyukαsame is right there was an error. But I already fixed that error.
I tried many configs with other DSNs.. One configuration works now. The server still uses Win Auth, but the Website has an own User for MSQL.

Quote:
Originally Posted by yazuka21 View Post
Offtopic sirs :( how to fix this error "Could not create output directory 'g:\program'. ??
Please help me!
Check Solutionsettings or Projectfolder setup...
07/05/2016 01:58 Flogolo#11
Check the linker settings