login me PHP se MS-SQL server 7

Spiros Bolis sbolis at freemail.gr
Wed Dec 8 13:32:09 EET 1999


On Wed, 8 Dec 1999, Panayotis Vryonis wrote:

> Spiros Bolis wrote:
> > Debuging ston kwdika edei3e pws h ektelesh kolaei sth grammh
> >
> > $iConnect = odbc_connect("DSN=xxx;Uid=".$USERNAME.";Pwd=".$PASSWORD.";",$USERNAM
> > E,$PASSWORD);
> >
> > opoy xxx to DSN entry sto arxeio /etc/udbc.ini (einai to shmeio poy pataei o ODBC drivers an telospantwn exw katalabei kala). Edw na shmeiwsw pws epeidh h openlink dinei dwrean toys drivers ths, to documentation einai apo anyparkto ews aisxro. to na g
inoy
> > n ta entries gia na bainei me to swsto password sth bash htan ena paixnidi sta tyfla.
> > Kleinei to istoriko : h katastash loipon exei ws e3hs. An brethei kapoios mhxanismos toy styl
> >
> > try
> > ....
> > except
> >
> > (opws exei  h Object Pascal ths Borland Delphi poy 3erw) to thema tha lythei giati h ektelesh ths PHP  odbc_connect poy apotygxanei me to lathos password-username kai de gyrnaei sthn iConnect timh tha parakamfthei.
> 
> Den kserw an einai auto pou 8eleis, alla giati den dokimazeis
> 
> if (!$iConnect) { echo "<P>Pou einai to connection palio-NT?\n" ;}
> else {
>         ....
> }
> 
> Panayotis.

Ma to gamwto Panagiwth kai ayto poy den borw na katalabw einai oti h grammh me to odbc_connect DEN epistrefei kamia timh sth metablhth $iConnect kai h ektelesh toy kwdika stamataei ekei. 

Isws den perigrapsa akribws to problhma alla to apolyta antistoixo einai to try..except poy 3erw sigoyra oti doyleyei kai exw doylepsei sth Delphi me epityxia se paromoies katastaseis. opws :

try
	open to arxeio lala.ini 
	diabase to arxeio lala.ini

except {den yparxei to lala.ini}
	ftia3e to lala.ini
	....
end;

An yparxei kati antistoixo h tropos parakampsh ths entolhs ekeinhs tha ithela poly na to mathw..
Eyxaristw poly pantws gia thn apanthsh

Spiros D. Bolis

--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at hellug.gr
Ta archives tis listas einai sto http://lists.hellug.gr/lgu.html
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users at hellug.gr
====================================================================



More information about the Linux-greek-users mailing list