virtualcook Posted October 26, 2004 Report Share Posted October 26, 2004 ... daru kā jau minēts manuālī: <?php$conn = Ora_Logon("user@TNSNAME", "pass");?> kur user - system TNSNAME - oradb (ņemu no tnsnames.ora) "pass" - "system" <?php$conn = Ora_Logon("system@oradb", "system");?> bet nekas nesanāk - vai ir kāds padoms? Link to comment Share on other sites More sharing options...
bubu Posted October 26, 2004 Report Share Posted October 26, 2004 starp <?php un $conn nevjag atstarpi? Link to comment Share on other sites More sharing options...
Roze Posted October 27, 2004 Report Share Posted October 27, 2004 No kurienes konnects tiek taisiits? Vai no Windows? Vai linux? Jaanjem veeraa ka php uz servera (vai arii ja taa ir tava lokaalaa darbstacija) vajag Oracle clientu (gan uz linux, gan windows) un ar extensijas eneibloshana kaa tas ir mysql tikai nepietiek. Klientam jaabuut nokonfigureetam t.i. ieksh tnsnames.ora jaabuut ierakstiitam attieciigajam serverim. Piemeeram SOMESERVER.LV = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (Host = 10.10.10.1) (Port = 1527) ) ) (CONNECT_DATA = (SID = SERVERIS) ) ) Ja tas ir linux tad apaches profilaa ir jaabuut veel dazhaadiem envirounment parametriem (parasti var ielikt ieksh apachctl startup scripta) piem: export ORACLE_HOME=/usr/oracle/ora817 export ORACLE_TERM=$TERM export NLS_LANG=Latvian_Latvia.BLT8CP921 export ORA_NLS=$ORACLE_HOME/ocommon/nls/admin/data export ORA_NLS32=$ORA_NLS export ORA_NLS33=$ORA_NLS export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib:/usr/lib export LIBPATH=$ORACLE_HOME/lib export TMPDIR=/tmp export TNS_ADMIN=/etc PATH=$PATH:/usr/java/jdk118_v3/bin:$ORACLE_HOME/bin export PATH unset USERNAME unset TWO_TASK Konekteejoties no windozes parasti der kaut kas shaads: <? putenv("ORACLE_HOME=c:/orant"); $or=ora_logon("useris@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = SERVERIS)(PORT = 1525)) (CONNECT_DATA = (SID = SERVERASIDS)))","parole"); ?> kur ORACLE_HOME ir oracle klienta atrashanaas vieta. useris - userneims SERVERIS - servera hosts vai IP SERVERASIDS - Oracle sids parole - pati par sevi :) Link to comment Share on other sites More sharing options...
virtualcook Posted October 31, 2004 Author Report Share Posted October 31, 2004 Oracle ir uz windows, pameegjinaaju Roze tavu paplashinaato ora_logon versiju - nedarbojaas, ar tnsnames.ora ir ok, jo citaadi es jau nevareetu ar SQLNavigatoru piesleegties varbuut kljuuda ir ka nav "extensijas eneibloshana" - kaa to izdariit? Link to comment Share on other sites More sharing options...
bubu Posted October 31, 2004 Report Share Posted October 31, 2004 Ja nebūtu ekstensija pareizi eneiblota, tad tev uz ora_logon mestu kļūdu ka invalid or non-existing function (vai kautkā tā). Link to comment Share on other sites More sharing options...
virtualcook Posted November 1, 2004 Author Report Share Posted November 1, 2004 es drukaaju informaaciju pirms funkcijas ora_logon taa paraadaas, bet peec taas nee - nu luuk taa i nezinu kaa piekonekteeties? Link to comment Share on other sites More sharing options...
bubu Posted November 1, 2004 Report Share Posted November 1, 2004 uzliec koda sākumā error_reporting(E_ALL); un tad pasaki kādu kļūdu izmet uz to ora_longon funkciju? Link to comment Share on other sites More sharing options...
virtualcook Posted November 4, 2004 Author Report Share Posted November 4, 2004 ...es nezinu kaa error_reporting(E_ALL) ir jaaizmanto - vari man paskaidrot ar nelielu piemeeru? ... es vienkaarshi iekopeeju pirms visaam konekt funkcijaam un gaidiju kad kaut kaadas kljuudas raadiis, bet nekas jau neraadaas Link to comment Share on other sites More sharing options...
virtualcook Posted November 23, 2004 Author Report Share Posted November 23, 2004 ... pigori bija tādi, ka nebija eneiblots extension=php_oracle.dll php.ini failaa :-)) ... bet man vēl tāds jautājums, kāpēc ar šo te garo pierakstu pierakstu var iekonektēties <? $or=ora_logon("useris@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = SERVERIS)(PORT = 1525)) (CONNECT_DATA = (SID = SERVERASIDS)))","parole"); ?> bet ar šo te īso ne? <? $or=ora_logon("useris@TNSNAME","parole"); ?> Link to comment Share on other sites More sharing options...
Roze Posted November 24, 2004 Report Share Posted November 24, 2004 Iespeejams ka vinsh (klients) kaut kaa nekorekti vai vispaar nenolasa tnsnames.ora ar attieciigaa servera aprakstiem (neesmu mekleejis ceelonjus / iemeslus). Tas gan taa ir tikai uz windows platformas, uz *ix straadaa korekti arii vienkaarshais ora_logon("useris@TNSNAME","parole"); variants. Link to comment Share on other sites More sharing options...
virtualcook Posted November 24, 2004 Author Report Share Posted November 24, 2004 ... tad jau varbuut php.ini failaa kaut kaadaa veidaa ir jaanoraada vieta, kur atrodas tnsnames.ora? Link to comment Share on other sites More sharing options...
Recommended Posts