CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 PHP & MSSQL - login failed error when connecting to the database

Print topic Send  topic

Author Message
Henry N. Manney
Posted: 02/17/2004, 11:05 AM

I am using CCS with W2K/IIS 5/MSSQL and I created a small Task Manager =
app with just the Tasks_list and the Tasks_maint screens. When I click =
on Live Page I get the following error msg:

Warning: mssql_pconnect(): message: Login failed for user 'admin'. =
Reason: Not associated with a trusted SQL Server connection. (severity =
14) in c:\inetpub\wwwroot\TaskManagerPHP\db_mssql.php on line 54

Warning: mssql_pconnect(): Unable to connect to server: localhost in =
c:\inetpub\wwwroot\TaskManagerPHP\db_mssql.php on line 54
DBDatabase error: Link-ID =3D=3D false, mssql_pconnect failed
MSSQL Error: 0 ()
Session halted.


I have tried a variety of logins but nothing seems to work. PHP is =
installed with the MSSQL dll and the Task Manager database & tables have =
been created with the sample SQL script.

Any ideas?
ramiro
Posted: 06/11/2004, 8:37 AM

please send to me the solution. I have the seem problem with the library...... the server is ISS 5.0

Por favor envienme la solucion a este problema de la libreria mssql.dll . mi servidor es ISS 5.0
Don Safar
Posted: 06/11/2004, 9:23 AM

This is a multi-part message in MIME format.

------=_NextPart_000_011C_01C44FA6.63747B00
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Is admin a valid user in the SQL Server logins, if not use a valid =
login? "Localhost" is probably not the name of you server (use sql =
server name or try IP address instead).=20
"Henry N. Manney" <lansharks@compuserve.com> wrote in message =
news:c0tomd$nse$1@news.codecharge.com...
I am using CCS with W2K/IIS 5/MSSQL and I created a small Task Manager =
app with just the Tasks_list and the Tasks_maint screens. When I click =
on Live Page I get the following error msg:

Warning: mssql_pconnect(): message: Login failed for user 'admin'. =
Reason: Not associated with a trusted SQL Server connection. (severity =
14) in c:\inetpub\wwwroot\TaskManagerPHP\db_mssql.php on line 54

Warning: mssql_pconnect(): Unable to connect to server: localhost in =
c:\inetpub\wwwroot\TaskManagerPHP\db_mssql.php on line 54
DBDatabase error: Link-ID =3D=3D false, mssql_pconnect failed
MSSQL Error: 0 ()
Session halted.


I have tried a variety of logins but nothing seems to work. PHP is =
installed with the MSSQL dll and the Task Manager database & tables have =
been created with the sample SQL script.

Any ideas?

--=20

Cheers,
Henry N. Manney
Irvine, CA USA
lansharks@compuserve.com

------=_NextPart_000_011C_01C44FA6.63747B00
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Is admin a valid user in the SQL Server =
logins, if=20
not use a valid login? "Localhost" is probably not the name of you =
server (use=20
sql server name or try IP address instead). </FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Henry N. Manney" <<A=20
=
href=3D"mailto:lansharks@compuserve.com">lansharks@compuserve.com</A>>=
wrote=20
in message <A=20
=
href=3D"news:c0tomd$nse$1@news.codecharge.com">news:c0tomd$nse$1@news.cod=
echarge.com</A>...</DIV>
<DIV><FONT face=3DArial size=3D2>I am using CCS with W2K/IIS 5/MSSQL =
and I created=20
a small Task Manager app with just the Tasks_list and the Tasks_maint=20
screens.  When I click on Live Page I get the following error=20
msg:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><STRONG>Warning</STRONG>: mssql_pconnect(): message: Login failed =
for=20
user 'admin'. Reason: Not associated with a trusted SQL Server =
connection.=20
(severity 14) in <B>c:\inetpub\wwwroot\TaskManagerPHP\db_mssql.php</B> =
on line=20
<B>54</B><BR><BR><B>Warning</B>: mssql_pconnect(): Unable to connect =
to=20
server: localhost in =
<B>c:\inetpub\wwwroot\TaskManagerPHP\db_mssql.php</B> on=20
line <B>54</B><BR></TD></TR></TABLE><B>DBDatabase error:</B> Link-ID =
=3D=3D false,=20
mssql_pconnect failed<BR><B>MSSQL Error</B>: 0 ()<BR>Session =
halted.</DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have tried a variety of logins but =
nothing=20
seems to work.  PHP is installed with the MSSQL dll and the Task =
Manager=20
database & tables have been created with the sample SQL=20
script.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Any ideas?</DIV>
<DIV><BR>-- <BR><BR>Cheers,<BR>Henry N. Manney<BR>Irvine, CA  =
USA<BR><A=20
=
href=3D"mailto:lansharks@compuserve.com">lansharks@compuserve.com</A><BR>=
</DIV></BLOCKQUOTE></FONT></BODY></HTML>

------=_NextPart_000_011C_01C44FA6.63747B00--
klwillis


Posts: 428
Posted: 06/11/2004, 10:18 AM

I would try writing a small test script outside of CodeCharge Studio
and see if you can get the connection to work that way.

If you get that to work, then it's a configuration issue within
CodeCharge.


_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
View profile  Send private message
carlo
Posted: 12/13/2004, 8:17 AM

Use "Windows NT authentication" in your ODBC MSSQL Driver and remember to insert a the user 'IUSR_SERVER_XP' (Internet Guest User) as MSSQL account.
klwillis


Posts: 428
Posted: 12/13/2004, 11:11 AM

Did you ever resolve the problem?

If so, let us know how you solved it. ;-)

Quote Henry N. Manney:
This is a multi-part message in MIME format.

------=_NextPart_000_02B9_01C3F546.055FDBF0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I am using CCS with W2K/IIS 5/MSSQL and I created a small Task Manager =
app with just the Tasks_list and the Tasks_maint screens. When I click =
on Live Page I get the following error msg:

Warning: mssql_pconnect(): message: Login failed for user 'admin'. =
Reason: Not associated with a trusted SQL Server connection. (severity =
14) in c:\inetpub\wwwroot\TaskManagerPHP\db_mssql.php on line 54

Warning: mssql_pconnect(): Unable to connect to server: localhost in =
c:\inetpub\wwwroot\TaskManagerPHP\db_mssql.php on line 54
DBDatabase error: Link-ID =3D=3D false, mssql_pconnect failed
MSSQL Error: 0 ()
Session halted.


I have tried a variety of logins but nothing seems to work. PHP is =
installed with the MSSQL dll and the Task Manager database & tables have =
been created with the sample SQL script.

Any ideas?

--=20

Cheers,
Henry N. Manney
Irvine, CA USA
lansharks@compuserve.com


------=_NextPart_000_02B9_01C3F546.055FDBF0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2712.300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I am using CCS with W2K/IIS 5/MSSQL and =
I created a=20
small Task Manager app with just the Tasks_list and the Tasks_maint=20
screens.  When I click on Live Page I get the following error=20
msg:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><STRONG>Warning</STRONG>: mssql_pconnect(): message: Login failed =
for user=20
'admin'. Reason: Not associated with a trusted SQL Server connection. =
(severity=20
14) in <B>c:\inetpub\wwwroot\TaskManagerPHP\db_mssql.php</B> on line=20
<B>54</B><BR><BR><B>Warning</B>: mssql_pconnect(): Unable to connect to =
server:=20
localhost in <B>c:\inetpub\wwwroot\TaskManagerPHP\db_mssql.php</B> on =
line=20
<B>54</B><BR></TD></TR></TABLE><B>DBDatabase error:</B> Link-ID =3D=3D =
false,=20
mssql_pconnect failed<BR><B>MSSQL Error</B>: 0 ()<BR>Session =
halted.</DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have tried a variety of logins but =
nothing seems=20
to work.  PHP is installed with the MSSQL dll and the Task Manager =
database=20
& tables have been created with the sample SQL script.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Any ideas?</DIV>
<DIV><BR>-- <BR><BR>Cheers,<BR>Henry N. Manney<BR>Irvine, CA  =
USA<BR><A=20
href=3D"mailto:lansharks@compuserve.com">lansharks@compuserve.com</A><BR>=
</DIV></FONT></BODY></HTML>

------=_NextPart_000_02B9_01C3F546.055FDBF0--


_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
View profile  Send private message
mrachow


Posts: 509
Posted: 09/01/2005, 3:52 AM

Having a client now whose SQL Server allows integrated Windows authentification only.

I'm using db_odbc.php actually (e.g. an ODBC data source.)

Usually all of the varaiables like user, database server and so on should not be used from commeo.php since everything shoukld be retrieved using the ODBC data source!?

Someone ever solved this?

Thanks!
_________________
Best regards,
Michael
View profile  Send private message
Michael Mikkelsen
Posted: 09/02/2005, 9:27 AM

In SQL Server Enterprise Manager, find your Server name, go to Security, Logins. Right click and select New Login. Choose SQL Server Authentication and put in the password. Go to the Database Access tab and put a checkmark next to the name on the database. Below under Dadbase Role check db_datareader and db_datawriter. Click ok and your done. You can now log in to the database using the new username and password.
mrachow


Posts: 509
Posted: 09/04/2005, 7:11 AM

Thanks Michael,
but I know that.

The client persists on using 'Integrated Windows Authorization' only. They have SQL Server installed/configured for using this kind of login only and don't want to active SQL Server Authorization.
_________________
Best regards,
Michael
View profile  Send private message
Benjamin Krajmalnik
Posted: 09/05/2005, 6:53 PM

There is one solution, but it is a HUGE security risk. If the SQL server is on the same machine as the web server, you can give privileges to the IUSR account. I do not like this at all. I prefer to place the webserver on a DMZ, where if it were to become compromised the internal network cannot be compromised.
It is MUCH safer to place the web server on a DMZ, open the SQL port only to the webserver on the DMZ, create a SQL account to be used by the webserver, and apply whatever security restrictions are necessary.

Many companies think they "lock down" the server by turning off SQL authentication when a properly configured SQL server and network makes SQL authentication 100% safe. Unfortunately, the majority of "Sys admins" are clueless when it comes to security.
mrachow


Posts: 509
Posted: 09/09/2005, 6:19 AM

Thanks Benjamin.
Your hints were helpful to me (or for me??).
_________________
Best regards,
Michael
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.