[PHP-DB] MS SQL connect

2002-03-28 Thread CID

I'm trying to connect to an MS SQL Server but I'll receive permanetly
this message:

Warning: MS SQL message: Login failed for user 'mirela'. Reason: Not
associated with a trusted SQL Server connection. (severity 14) in
d:\inetpub\wwwroot\roslocal\registrums.php on line 24

Warning: MS SQL: Unable to connect to server: aserver in
d:\inetpub\wwwroot\roslocal\registrums.php on line 24
Nu am reusit sa ma conectez


If I run an ASP code it works fine.

Can anyone help me.


The cod is:
..
?php
$nume1=ereg_replace(,,;,$HTTP_POST_VARS['nume']);
$prenume1=ereg_replace(,,;,$HTTP_POST_VARS['prenume']);
$orasp1=ereg_replace(,,;,$HTTP_POST_VARS['orasp']);
$dataa=getdate();
$zi = $dataa['mday'];
if (strlen($zi)2) {
$zi=0.$zi;
}
$luna = $dataa['mon'];
if (strlen($luna)2) {
$luna=0.$luna;
}
$an = $dataa['year'];
$datar1=$zi./.$luna./.$an;
$conex=mssql_connect(aserver,mirela,mirela);
if (!$conex)
{
die(Nu am reusit sa ma conectez);
}
$baza=mssql_select_db(registru);
if (!$baza) {
die(Nu am reusit sa ma conecte la baza registru);
}






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP-DB] MS SQL connect by ODBC

2001-08-09 Thread Andrew Hill

Sommai,

Yes, you want to compile PHP --with-iodbc per the HOWTO at www.iodbc.org.
This will give PHP the ability to use ODBC drivers. You will still need to
install an ODBC driver on your linux box, and configure the DSN connection
attributes in your odbc.ini.

You may use OpenLink's Multi-Tier Drivers if you like, which download with a
free 2-connection license and do not expire.
They are available at our website, and free support is available at
http://www.openlinksw.com/support/suppindx.htm if you need assistance.

Hope this helps!

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers

 -Original Message-
 From: Sommai Fongnamthip [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 08, 2001 10:33 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] MS SQL connect by ODBC


 Hi,
   Did someone ever connect PHP (on Linux box) to MS SQL (on
 NT box) via ODBC
 (iODBC or unixODBC)? How to config and writing code in PHP?

 thanks
 SF


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] MS SQL connect by ODBC

2001-08-08 Thread Sommai Fongnamthip

Hi,
Did someone ever connect PHP (on Linux box) to MS SQL (on NT box) via ODBC 
(iODBC or unixODBC)? How to config and writing code in PHP?

thanks
SF


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] ms sql connect

2001-08-06 Thread Sommai Fongnamthip

Hello,
 I'd like to use MS SQL 6.5 on NT from PHP-4.0.6 from Linux.  I was 
config FreeTDS (use ver 4.2) and setup interfaces file already.  I'm still 
cannot login to MS SQL 6.5.  Here is my config.
 - Linux Red Hat 6.2 (use different IP with NT-Box)
 - Apache 1.3.20
 - PHP 4.0.6
 - FreeTDS 0.51 (config ver 4.2)
 - NT 4.0 (service pack 5)
 - MS SQL 6.5

 interface file in /usr/local/freetds
 myserver
 query tcp tds4.2 127.0.0.1 1433
 master tcp tds4.2 127.0.0.1 1433

 php code

?

$host = myserver;
$myuser = sa;
$mypass = ;

$numero=mssql_connect($host, $myuser, $mypass) or die (Unable to connect 
to database.);
echo (ConnectID: $numerobr\n);

?

Regards,
Sommai Fongnamthip


RE: [PHP-DB] ms sql connect

2001-08-06 Thread Mark Roedel

 -Original Message-
 From: Sommai Fongnamthip [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 06, 2001 2:45 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] ms sql connect
 
 
 Hello,
 I'd like to use MS SQL 6.5 on NT from PHP-4.0.6 from Linux. 
 I was config FreeTDS (use ver 4.2) and setup interfaces file 
 already.  I'm still cannot login to MS SQL 6.5.

 [snip]

  interface file in /usr/local/freetds
  myserver
  query tcp tds4.2 127.0.0.1 1433
  master tcp tds4.2 127.0.0.1 1433

Is '127.0.0.1' actually what you have in your file, or is that just a
placeholder because you don't want to give out the real IP?  (If that's
actually what's in the file, then FreeTDS will be trying to connect to a
copy of MS SQL Server running on your Linux box, which seems like sort
of a futile exercise.  Try changing it to the IP of the NT machine.)


---
Mark Roedel   | The most overlooked advantage to owning a
Systems Programmer|  computer is that if they foul up there's no
LeTourneau University |  law against whacking them around a little.
Longview, Texas, USA  |  -- Owen Porterfield 

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]