라이브러리

[PHP_CONFIG] oci8.privileged_connect - OCI8의 권한 있는 연결 사용 여부




PHP CONFIG 에서 oci8.privileged_connect

PHP CONFIG는 PHP의 설정 파일로, PHP의 동작을 제어하는 데 사용됩니다. oci8.privileged_connect는 Oracle Database와의 연결을 위한 설정입니다.

oci8.privileged_connect란?


oci8.privileged_connect는 Oracle Database와의 연결을 위한 설정입니다. 이 설정은 Oracle Database에 연결할 때 사용하는 사용자 계정의 권한을 결정하는 데 사용됩니다.

- false (기본값): 일반 사용자 계정으로 Oracle Database에 연결합니다.
- true: 특권 사용자 계정으로 Oracle Database에 연결합니다.

oci8.privileged_connect 사용 예제


# 1. 일반 사용자 계정으로 Oracle Database에 연결


#hostingforum.kr
php

<?php

$host = 'localhost';

$port = 1521;

$service_name = 'ORCL';



$dsn = "oci8:host=$host;port=$port;service_name=$service_name";

$username = 'your_username';

$password = 'your_password';



$conn = oci_connect($username, $password, $dsn);



if (!$conn) {

    $e = oci_error();

    print "Connection failed: " . $e['message'];

    exit;

}



print "Connected to Oracle Database!";

?>



# 2. 특권 사용자 계정으로 Oracle Database에 연결


#hostingforum.kr
php

<?php

$host = 'localhost';

$port = 1521;

$service_name = 'ORCL';



$dsn = "oci8:host=$host;port=$port;service_name=$service_name";

$username = 'your_username';

$password = 'your_password';



$conn = oci_connect($username, $password, $dsn, 'oci8.privileged_connect' => true);



if (!$conn) {

    $e = oci_error();

    print "Connection failed: " . $e['message'];

    exit;

}



print "Connected to Oracle Database as privileged user!";

?>



oci8.privileged_connect 설정 방법


1. PHP CONFIG 파일을 열고, `oci8.privileged_connect` 설정을 추가합니다.
2. `oci8.privileged_connect` 설정을 `true`로 설정합니다.

#hostingforum.kr
ini

[oci8]

oci8.privileged_connect = true



참고


- Oracle Database와의 연결을 위한 설정은 `oci8` 설정 섹션에 포함됩니다.
- `oci8.privileged_connect` 설정은 Oracle Database에 연결할 때 사용하는 사용자 계정의 권한을 결정하는 데 사용됩니다.
- 특권 사용자 계정으로 Oracle Database에 연결하려면 `oci8.privileged_connect` 설정을 `true`로 설정해야 합니다.
  • profile_image
    나우호스팅 @pcs8404 

    호스팅포럼 화이팅!

    댓글목록

    등록된 댓글이 없습니다.

  • 전체 10,077건 / 1 페이지

검색

게시물 검색