[PHP] Mssql Connection

2005-01-19 Thread Pablo D Marotta
Hi there..
I´m connecting to a Ms Sql Server 2000, with the system administrator´s name,
and its password.
It always works fine, but... I know it´s not the safest way of connecting, so I
want to use some ordinary user names and passwords.

The problem is that I just can´t make it work, it always throws username
errors.

How should I configure this, in order to connect to mssql with ordinary
usernames and passwords from php code?

Here is my function code:

function conectar ()
{
  $conexion = mssql_connect(localhost,sa,apr);
  if (!$conexion)
  {
?
DIV align=center
  FONT face=Arial color=FF size=3
B# Can´t establish connection with database server pc./B
  /FONT
/DIV
?php
exit (0);
  }
  if (!mssql_select_db(GES_WEB))
  {
?
DIV align=center
  FONT face=Arial color=FF size=3
B# Can´t establish connection with the specified database./B
  /FONT
/DIV
?php
exit (0);
  }
  return $conexion;
}

Thanks!!

Pablo



American Express made the following
 annotations on 01/19/05 13:57:56
--
**

 This message and any attachments are solely for the intended recipient 
and may contain confidential or privileged information. If you are not the 
intended recipient, any disclosure, copying, use, or distribution of the 
information included in this message and any attachments is prohibited.  If you 
have received this communication in error, please notify us by reply e-mail and 
immediately and permanently delete this message and any attachments.  Thank 
you.

**

==

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



Re: [PHP] Mssql Connection

2005-01-19 Thread Jochem Maas
Pablo D Marotta wrote:
Hi there..
I´m connecting to a Ms Sql Server 2000, with the system administrator´s name,
and its password.
It always works fine, but... I know it´s not the safest way of connecting, so I
want to use some ordinary user names and passwords.
The problem is that I just can´t make it work, it always throws username
errors.
How should I configure this, in order to connect to mssql with ordinary
usernames and passwords from php code?
Here is my function code:
function conectar ()
{
  $conexion = mssql_connect(localhost,sa,apr);
  if (!$conexion)
  {
?
DIV align=center
  FONT face=Arial color=FF size=3
B# Can´t establish connection with database server pc./B
  /FONT
FONT face=Arial color=FF size=3font/FONT
FONT face=Arial color=FF size=3tags/FONT
FONT face=Arial color=FF size=3suck/FONT
I know nothing about MSSQL - thankgod (sorry I really can't help you 
there) - but I can recommend eradicating all font tags... everywhere... 
take no prisoners... death to frontpage (oh sorry got carried away :-). 
try this instead:

p style=color: #f00; font: large Arial; text-align: center;
# Can´t establish connection with database server pc.
/p
rgds,
Jochem
/DIV
?php
exit (0);
  }
  if (!mssql_select_db(GES_WEB))
  {
?
DIV align=center
  FONT face=Arial color=FF size=3
B# Can´t establish connection with the specified database./B
  /FONT
/DIV
?php
exit (0);
  }
  return $conexion;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Mssql Connection

2005-01-19 Thread Richard Lynch
Jochem Maas wrote:
 FONT face=Arial color=FF size=3font/FONT
 FONT face=Arial color=FF size=3tags/FONT
 FONT face=Arial color=FF size=3suck/FONT

 I know nothing about MSSQL - thankgod (sorry I really can't help you
 there) - but I can recommend eradicating all font tags... everywhere...
 take no prisoners... death to frontpage (oh sorry got carried away :-).
 try this instead:

 p style=color: #f00; font: large Arial; text-align: center;
 # Can´t establish connection with database server pc.
 /p

Unless, of course, your user base includes the very poor who are (still)
using ancient browsers (because they have ancient hardware) that don't
support CSS, and you want to use font tags which actually work on *ALL*
browsers...

I can't count the number of CSS sites I've skipped because their links
don't work (in my browser) due to CSS.  Buh-bye.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



Re: [PHP] Mssql Connection

2005-01-19 Thread Jochem Maas
Richard Lynch wrote:
Jochem Maas wrote:
FONT face=Arial color=FF size=3font/FONT
FONT face=Arial color=FF size=3tags/FONT
FONT face=Arial color=FF size=3suck/FONT
I know nothing about MSSQL - thankgod (sorry I really can't help you
there) - but I can recommend eradicating all font tags... everywhere...
take no prisoners... death to frontpage (oh sorry got carried away :-).
try this instead:
p style=color: #f00; font: large Arial; text-align: center;
# Can´t establish connection with database server pc.
/p

Unless, of course, your user base includes the very poor who are (still)
using ancient browsers (because they have ancient hardware) that don't
support CSS, and you want to use font tags which actually work on *ALL*
browsers...
you have a point - but even Netscape4 and IE4 support rudimentary CSS 
AFAICR. I dont think his userbase is too poor though, considering he 
works for American Express :-)

having said that any HTML in production envs should degrade nicely for 
older browsers. it doesn't have to look the same but it should be 
accessible.

I can't count the number of CSS sites I've skipped because their links
don't work (in my browser) due to CSS.  Buh-bye.
exactly what browser do you use? and how does CSS break links? (let me 
guess you disable background images?) besides you can turn off 
stylesheets completely if you want.

CSS is a good thing. semantic mark and decoupling of style is a good 
ting too.

its a bit weird if you consider that you seem to be willing to view an 
all image page with loads of nested tables for positioning and tons of 
font tags. but the same page written in a 10th of the HTML with a nifty 
stylesheet which references a number of bg images is told to bugger off.



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


Re: [PHP] Mssql Connection

2005-01-19 Thread Richard Lynch
 having said that any HTML in production envs should degrade nicely for
 older browsers. it doesn't have to look the same but it should be
 accessible.

It won't be if you use CSS.

 I can't count the number of CSS sites I've skipped because their links
 don't work (in my browser) due to CSS.  Buh-bye.

 exactly what browser do you use? and how does CSS break links? (let me
 guess you disable background images?) besides you can turn off
 stylesheets completely if you want.

Until the hard drive crashed a few months ago, I was using a Mac PPC
9100/100 with OS 8.6, the most stable OS for that hardware.

I was using IE 4.01 (?) the most stable browser for that OS -- Though even
that meant at least one crash a day :-(

But nobody was buying me a new computer, so there it stayed.

Randomly selected links would simply NOT WORK in HTML that was perfectly
valid, if that HTML used CSS extensively.

If I really wanted the content, I'd view the source and copy/paste the
link.  But if I was just surfing?  I'd just go on to a different site.

 CSS is a good thing. semantic mark and decoupling of style is a good
 ting too.

Sure, up to a point.

But since I generally use PHP to de-couple my business logic from my
output, enough to make it easy to alter the look-and-feel any time I want,
I don't see the need to use CSS to do the same thing, and then not be
degrading nicely on ancient browsers.

I've also seen a TON of man-hours wasted separating interface logic from
interface, which seems kind of silly to me...

I mean, if your interface elements change, your interface logic is going
to HAVE to change, if you're going to have any decent scrubbing/validation
at all, or any kind of nice layout that isn't all generic looking.  Not
that I'm a good enough designer to actually achieve that :-)

I guess I've always seen the separation more along the lines of:

Interface Elements (HTML) and Input/Output to Interface Elements
-- layer ---
Business Logic
-- layer ---
Underlying Libraries of common code
-- layer ---
.
.
.
-- layer ---
Operating System

I know I'm a heretic to leave the I/O to Interface with the actual
interface, but I've never yet seen a case where separating them in the
real world caused anything but wastage.  YMMV.

 its a bit weird if you consider that you seem to be willing to view an
 all image page with loads of nested tables for positioning and tons of
 font tags. but the same page written in a 10th of the HTML with a nifty
 stylesheet which references a number of bg images is told to bugger off.

I don't know about the all image page, as they tend to be awfully slow
sometimes, but I've never had a problem with tables -- writing them or
having them work, and since my font tags all come from a single PHP
function, it's not like a big hairy deal to do the exact same thing you'd
do with CSS -- I change the font in one place for the whole site, and I'm
done.

And the CSS positioning in older browsers invariably ends up being
completely whack.  You get some image floating right on top of, and
obscuring, the text content I want to read, and I'm not a happy surfer.

So I achieve the same goals as CSS, only it actually degrades nicely on
those older browsers.  [shrug]

Yes, CSS sites look much nicer, and have cleaner-looking text, and that
image placement with text wrapping around it is really pretty...

But I'm simply not (yet) willing to abandon that .01% == hundreds of
thousands of users who can't view CSS sites.

Maybe in a year or so, and already for sites where I have prior knowledge
of the userbase/browser not being *that* old.

-- 
Like Music?
http://l-i-e.com/artists.htm

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



[PHP] MSSQL connection

2004-01-22 Thread Alex Hogan
Hi All,

 

I have a question about connecting to a MSSQL back end.  I keep getting the
error that the php_mssql.dll wont load because it isn't present.

 

From what I can see so far is that php needs to be compiled with that
extension uncommented in order to get the dll.  Is that correct?

 

 

 

alex hogan

 



** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 




Re: [PHP] MSSQL connection

2004-01-22 Thread Raditha Dissanayake
I assume you are working on a win32 platform, if so uncomment that 
relevent line in the php.ini file and copy the dll to the win folders. 
(all this is explained in great detail in teh installation guide)

If you are working on linux this approach will not work with mssql.

Alex Hogan wrote:

Hi All,



I have a question about connecting to a MSSQL back end.  I keep getting the
error that the php_mssql.dll wont load because it isn't present.


From what I can see so far is that php needs to be compiled with that
extension uncommented in order to get the dll.  Is that correct?






alex hogan





** 
The contents of this e-mail and any files transmitted with it are 
confidential and intended solely for the use of the individual or 
entity to whom it is addressed.  The views stated herein do not 
necessarily represent the view of the company.  If you are not the 
intended recipient of this e-mail you may not copy, forward, 
disclose, or otherwise use it or any part of it in any form 
whatsoever.  If you have received this e-mail in error please 
e-mail the sender. 
** 



 



--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] MSSQL connection

2004-01-22 Thread Ben Ramsey
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
If your Web server is running on a machine that is separate from your
database server, then you'll also need to copy the file ntwdblib.dll
from the database server to your C:\WINDOWS\system32 folder.  PHP needs
that DLL for the mssql functions to work correctly.
Raditha Dissanayake wrote:
| I assume you are working on a win32 platform, if so uncomment that
| relevent line in the php.ini file and copy the dll to the win folders.
| (all this is explained in great detail in teh installation guide)
|
| If you are working on linux this approach will not work with mssql.
|
|
| Alex Hogan wrote:
|
| Hi All,
|
|
|
| I have a question about connecting to a MSSQL back end.  I keep
| getting the
| error that the php_mssql.dll wont load because it isn't present.
|
|
|
| From what I can see so far is that php needs to be compiled with that
| extension uncommented in order to get the dll.  Is that correct?
|
|
|
|
|
|
|
| alex hogan
|
|
|
|
|
| ** The
| contents of this e-mail and any files transmitted with it are
| confidential and intended solely for the use of the individual or
| entity to whom it is addressed.  The views stated herein do not
| necessarily represent the view of the company.  If you are not the
| intended recipient of this e-mail you may not copy, forward, disclose,
| or otherwise use it or any part of it in any form whatsoever.  If you
| have received this e-mail in error please e-mail the sender.
| **
|
|
|
|
|
|
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAEAvYIcIs3CP5DxwRAu1RAKCqeaSzCbHHO8Aibw9L9UwbErnK5QCcDqcN
zWleSmyn3J+gwxvzT59VSWw=
=GCyj
-END PGP SIGNATURE-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] MSSQL connection

2003-06-17 Thread Wim Paulussen
LS,

I am trying to get a connection to a remote MSSQL server.
This is what I found in the online manual :
quote
mssql_connect() establishes a connection to a MS SQL server. The servername
argument has to be a valid servername that is defined in the 'interfaces'
file.
/quote
This is the command given :
quote
$test = mssql_connect(SQL-001,whoever,whatever);
/quote
This is the output of the code snippet
quote
Fatal error: Call to undefined function: mssql_connect() in c:\program
files\apache\htdocs\pestest\axtest.php on line 5
/quote

The error message seems to be out of line with the manual . I was wondering
whether this is related to the definition in the 'interfaces' file (whatever
that may be).

All help  highly appreciated.

Wim


Re: [PHP] MSSQL connection

2003-06-17 Thread Adam Voigt
You need to turn on the MSSQL extension in your php.ini,
under Windows this file is probably in:

c:\winnt\php.ini



On Tue, 2003-06-17 at 11:01, Wim Paulussen wrote:
 LS,
 
 I am trying to get a connection to a remote MSSQL server.
 This is what I found in the online manual :
 quote
 mssql_connect() establishes a connection to a MS SQL server. The servername
 argument has to be a valid servername that is defined in the 'interfaces'
 file.
 /quote
 This is the command given :
 quote
 $test = mssql_connect(SQL-001,whoever,whatever);
 /quote
 This is the output of the code snippet
 quote
 Fatal error: Call to undefined function: mssql_connect() in c:\program
 files\apache\htdocs\pestest\axtest.php on line 5
 /quote
 
 The error message seems to be out of line with the manual . I was wondering
 whether this is related to the definition in the 'interfaces' file (whatever
 that may be).
 
 All help  highly appreciated.
 
 Wim
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



RE: [PHP] MSSQL connection

2003-06-17 Thread Wim Paulussen
That's it . Thank you very much !

-Oorspronkelijk bericht-
Van: Adam Voigt [mailto:[EMAIL PROTECTED]
Verzonden: Tuesday, June 17, 2003 5:10 PM
Aan: Wim Paulussen
CC: [EMAIL PROTECTED]
Onderwerp: Re: [PHP] MSSQL connection


You need to turn on the MSSQL extension in your php.ini,
under Windows this file is probably in:

c:\winnt\php.ini



On Tue, 2003-06-17 at 11:01, Wim Paulussen wrote:
 LS,

 I am trying to get a connection to a remote MSSQL server.
 This is what I found in the online manual :
 quote
 mssql_connect() establishes a connection to a MS SQL server. The
servername
 argument has to be a valid servername that is defined in the 'interfaces'
 file.
 /quote
 This is the command given :
 quote
 $test = mssql_connect(SQL-001,whoever,whatever);
 /quote
 This is the output of the code snippet
 quote
 Fatal error: Call to undefined function: mssql_connect() in c:\program
 files\apache\htdocs\pestest\axtest.php on line 5
 /quote

 The error message seems to be out of line with the manual . I was
wondering
 whether this is related to the definition in the 'interfaces' file
(whatever
 that may be).

 All help  highly appreciated.

 Wim
--
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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




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



RE: [PHP] MSSQL connection

2003-06-17 Thread Wim Paulussen
At least : step 1.
Does anyone know what is meant by the 'interfaces' file ?
quote
 The servername  argument has to be a valid servername that is defined in
the 'interfaces'  file.
/quote

-Oorspronkelijk bericht-
Van: Wim Paulussen [mailto:[EMAIL PROTECTED]
Verzonden: Tuesday, June 17, 2003 5:14 PM
Aan: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Onderwerp: RE: [PHP] MSSQL connection


That's it . Thank you very much !

-Oorspronkelijk bericht-
Van: Adam Voigt [mailto:[EMAIL PROTECTED]
Verzonden: Tuesday, June 17, 2003 5:10 PM
Aan: Wim Paulussen
CC: [EMAIL PROTECTED]
Onderwerp: Re: [PHP] MSSQL connection


You need to turn on the MSSQL extension in your php.ini,
under Windows this file is probably in:

c:\winnt\php.ini



On Tue, 2003-06-17 at 11:01, Wim Paulussen wrote:
 LS,

 I am trying to get a connection to a remote MSSQL server.
 This is what I found in the online manual :
 quote
 mssql_connect() establishes a connection to a MS SQL server. The
servername
 argument has to be a valid servername that is defined in the 'interfaces'
 file.
 /quote
 This is the command given :
 quote
 $test = mssql_connect(SQL-001,whoever,whatever);
 /quote
 This is the output of the code snippet
 quote
 Fatal error: Call to undefined function: mssql_connect() in c:\program
 files\apache\htdocs\pestest\axtest.php on line 5
 /quote

 The error message seems to be out of line with the manual . I was
wondering
 whether this is related to the definition in the 'interfaces' file
(whatever
 that may be).

 All help  highly appreciated.

 Wim
--
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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




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




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



[PHP] MsSQL connection !!! HELP !

2002-07-16 Thread Djurovski Dejan

I can't connect to mssql!
When I start PHP page with MsSQL connection, PHP craches and I receive this:

PHP caused an invalid page fault in
module NTWDBLIB.DLL at 0167:73330fde.
Registers:
EAX=0020 CS=0167 EIP=73330fde EFLGS=00010246
EBX=0010 SS=016f ESP=0063f600 EBP=0063f610
ECX=00797fe0 DS=016f ESI=0012 FS=4b5f
EDX= ES=016f EDI=00797fe0 GS=
Bytes at CS:EIP:
c6 04 01 00 8b 45 f4 d1 e0 8b e5 5d c2 14 00 cc
Stack dump:
760014d7 0010  0010 0063f67c 7333165e 014d7980 00797fe0
0010   00797fe0 0012 000b 7335a294 0030

What is the problem?
lease help!



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