FAQ
Hola,

Con PHP me puedo conectar a una base Oracle remota?
Porque en el manual de php, las funciones para conectarse a Oracle
dicen solamente 'user' y 'pass'.

http://us3.php.net/manual/en/function.ora-plogon.php
http://us3.php.net/manual/en/function.oci-connect.php

Gracias.
Saludos,
pancarne.

Search Discussions

  • Denyl Meneses Guillén at Aug 11, 2005 at 6:42 pm
    claro que si se puede , hay una forma de poner la IP .

    $db = " (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.x)(PORT
    =1521)) (CONNECT_DATA = (SID = dbrack)) )";
    $conn = ocilogon("dmg","manager","$db")


    Espero que te sirva.
    ----- Original Message -----
    From: "xfedex" <xfedex@gmail.com>
    To: "PHP-ES" <php-es@lists.php.net>
    Sent: Thursday, August 11, 2005 10:58 AM
    Subject: [PHP-ES] Duda sobre Oracle


    Hola,

    Con PHP me puedo conectar a una base Oracle remota?
    Porque en el manual de php, las funciones para conectarse a Oracle
    dicen solamente 'user' y 'pass'.

    http://us3.php.net/manual/en/function.ora-plogon.php
    http://us3.php.net/manual/en/function.oci-connect.php

    Gracias.
    Saludos,
    pancarne.

    --
    PHP Spanish Localization Talk Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php


    --
    No virus found in this incoming message.
    Checked by AVG Anti-Virus.
    Version: 7.0.338 / Virus Database: 267.10.6/69 - Release Date: 11/08/2005
  • Diego Andrés Firmenich at Aug 12, 2005 at 12:07 pm
    También puedes utilizar el tnsnames.ora (que se encuentra dentro del
    directorio del cliente de oracle) de manera que te quede algo asi alli:
    DB1 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.1)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SID = DBSID)
    (SERVER = DEDICATED)
    )
    )
    DB2 =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.2)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SID = DBSID)
    (SERVER = DEDICATED)
    )
    )

    Luego desde Php simplemente utiliazas la entrada en el tnsnames que
    corresponda:
    $conn = ocilogon("dmg","manager","DB1")
    ó
    $conn = ocilogon("dmg","manager","DB2")

    Es practicamente lo mismo que decia denyl
    Saludos y buen fin de semana =P



    ""Denyl Meneses Guillén"" <dmeneses@olva.com.pe> escribió en el mensaje
    news:005401c59eb4$fc613ca0$7164a8c0@Sistemas02...
    claro que si se puede , hay una forma de poner la IP .

    $db = " (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =
    192.168.1.x)(PORT
    =1521)) (CONNECT_DATA = (SID = dbrack)) )";
    $conn = ocilogon("dmg","manager","$db")


    Espero que te sirva.
    ----- Original Message -----
    From: "xfedex" <xfedex@gmail.com>
    To: "PHP-ES" <php-es@lists.php.net>
    Sent: Thursday, August 11, 2005 10:58 AM
    Subject: [PHP-ES] Duda sobre Oracle


    Hola,

    Con PHP me puedo conectar a una base Oracle remota?
    Porque en el manual de php, las funciones para conectarse a Oracle
    dicen solamente 'user' y 'pass'.

    http://us3.php.net/manual/en/function.ora-plogon.php
    http://us3.php.net/manual/en/function.oci-connect.php

    Gracias.
    Saludos,
    pancarne.

    --
    PHP Spanish Localization Talk Mailing List (http://www.php.net/)
    To unsubscribe, visit: http://www.php.net/unsub.php


    --
    No virus found in this incoming message.
    Checked by AVG Anti-Virus.
    Version: 7.0.338 / Virus Database: 267.10.6/69 - Release Date: 11/08/2005

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-general-es @
categoriesphp
postedAug 11, '05 at 6:19p
activeAug 12, '05 at 12:07p
posts3
users3
websitephp.net

People

Translate

site design / logo © 2021 Grokbase