Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem z połączeniem z bazą danych oracle - oci
Tomekmar999
post
Post #1





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 13.11.2012

Ostrzeżenie: (0%)
-----


Witam

Tworzę strone w html i chce połączyć się z bazą oracle. Używam do tego oci, poniżej kod:
$host = "IP";
$port=1521;
$nazwa_uslugi = "XE"; // dbServiceName
$uzytkownik = "elin";
$haslo = "maleDUZE9";
$deskryptor = "(DESCRIPTION=(ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST=$host)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=XE)))";
echo "AAA2 deskryptor = $deskryptor ";

$polaczenie = oci_connect(elin1,maleDUZE9,$deskryptor, 'AL32UTF8');
echo "AAA3";

if(!$polaczenie)
{
$err = oci_error();
trigger_error('Nie mozna nawiazac polaczenia z baza danych: '. $err['message'], E_USER_ERROR);
echo "AAA4";
}
echo "AAA5";

Na stronie wyświetla się wszystko do echo "AAA2 deskryptor = $deskryptor ";
Potem nic się nie dzieje, nie ma żadnej informacji o błędzie.

W php.ini próbowałem z obydwoma opcjami (podobno jedna tylko może być aktywna):
extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client
i żadnych zmian.

Proszę o pomoc.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 559
Pomógł: 6315
Dołączył: 27.12.2004




php nie widzi oci. Już ci to pisałem (IMG:style_emoticons/default/smile.gif)
Nie pamiętam jak na windzie się to instaluje ale:
http://pl1.php.net/manual/pl/oci8.installation.php
Cytat
Installing OCI8 on Windows

On Windows, uncomment the php.ini line extension=php_oci8.dll when using Oracle 10gR2 client libraries. Uncomment extension=php_oci8_11g.dll when using Oracle 11g client libraries. These two DLLs contain equivalent functionality and only one may be enabled at a time. Make sure extension_dir is set to the directory containing the PHP extension DLLs.

If using Instant Client, set the system PATH environment variable to the Oracle library directory.

Czy te pliki .dll wrzuciłeś to właściwego katalogu? Zazwyczaj z tego co kojarze to z tym na windzie był zawsze problem
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 13.10.2025 - 15:06