PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

sybase_query> <sybase_num_rows
Last updated: Sun, 25 Nov 2007

view this page in

sybase_pconnect

(PHP 4, PHP 5)

sybase_pconnect — Sybase 서버로의 영속적인(persistent) 연결을 만든다.

Description

int sybase_pconnect ( string $servername , string $username , string $password [, string $ charset ] )

성공적으로 수행시 양수의 Sybase persistent link identifier(사이베이스 영속 연결 식별자)를 반환하고, 에러가 났을경우 FALSE를 반환한다.

sybase_pconnect()함수는 두가지 다른점을 제외하고는 sybase_connect()함수와 거의 같다.

첫째로 접속시 함수는 같은 host,username,password를 가진 열려있는 영속(persistent) 링크를 찾는다. 만약 발견되면 새로 연결하지 않고 발견된 연결의 identifier(식별자)가 반환된다.

두번째는 SQL 서버로의 연결이 스크립트가 끝났음에도 종료가 되지 않는다는 점이다. 대신에 그 연결은 나중에 사용된다. (sybase_pconnect()함수에 의해 생성된 연결은 sybase_close()함수에 의해 종료되지 않는다.)

그러므로 이러한 종류의 링크를 'persistent(영속적인)'이라고 표현한다.



add a note add a note User Contributed Notes
sybase_pconnect
verdy_p at wanadoo dot fr
24-Jul-1999 01:53
The servername specified in sybase_connect and sybase_pconnect is solved locally on the PHP3 server host, which should be configured with the appropriate Sybase client configuration. This includes setting the environment variables for the account that runs the PHP3 extension, i.e. if it runs as a Web server extension, it must be configured in the user account that runs the Web server. You may setup at least the SYBASE environment, and add $SYBASE/bin within the user's path that runs the Web server. Standard installations of Sybase clients include setting up either a $SYBASE/interfaces file under Unix, or %SYBASE%\ini\sql.ini under Windows. This file contains local aliasnames for the referenced server names. These names may be different than that really used on the host that run the Sybase SQL Server. What is important is that this Sybase client configuration file will specify the location of the SQL Server, i.e. the network protocol to use, and if it's through TCP/IP, the host name or IP address of the Sybase SQL Server host, and its listener port number. Newer versions of Sybase includes the option to setup the interfaces or SQL.INI file with a single server entry, with will be a Sybase naming service. If this is used, the Sybase OpenClient libraries will connect to this naming service, if the SERVER name specified can't be solved locally. This naming service will provide the SQL Server location for the specified SERVER name you use in the sybase_connect or sybase_pconnect function calls, allowinf naming resolution on sites that want to have a centralized administration of multiple Sybase OpenServer servers, including gateways to other SQL servers such as OpenServer compatible gateways to Oracle or Informix servers. But if you want faster accesses to your Sybase SQL server used by your PHP3 scripts, you should configure the host which runs the PHP3 extension so that servernames can be solved locally. All you need is to add server entries in your interfaces or SQL.INI Sybase OpenClient configuration file.

sybase_query> <sybase_num_rows
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites