RE: [PHP-DB] Re: Question about ODBC databases
Estimado Gerardo, estoy comenzado a desarrollar una solución utilizando un servicio en NT y un cliente en php (los estoy desarrollando en java). El servicio en NT no es más que un socket server que consulta vía ODBC a los archivos de bases de datos que están en el propio NT Server. Las soluciones de Benjamin Walling [[EMAIL PROTECTED]] y de John Lim [[EMAIL PROTECTED]] no se me habían ocurrido y me parecen por demás ingeniosas. El unico inconveniente que veo es que pasan la consulta por la URL y tengo entendido que esta tiene un tamaño máximo. De la pregunta que me haces, realmente no tengo idea de donde colocar la base de datos en el linux. En cuanto tenga la solución te cuento. Saludos Juan I'm developing a solution by using an NT service and a client into a php code (developed with java). The NT service is a socket server that query the datafiles through ODBC localized in the NT Server. The solutions proposed by Benjamin Walling and John Lim are pretty smart and I didn't occurs to me. But I found some troubles with this approach: as far as I know the URL has a maximum length. About your question, I don't know where locate the datafile in a Linux Server. ASAP I was finished my proposal of solution I'll tell you -Mensaje original- De: Gerardo Morales [mailto:[EMAIL PROTECTED]] Enviado el: Lunes 20 de Mayo de 2002 14:44 Para: [EMAIL PROTECTED] Asunto: Re: [PHP-DB] Re: Question about ODBC databases Gracias Juan. Sobre el mismo tema, aunque a la vez separado, en el caso de que la BD se pusiera en forma local, en que directorio se especifica? es necesario hacer algun cambio en php.ini para especificarle una localidad en especifico?? en el caso de que asi sea, alguien sabra si es posible utilizar MOUNT, NFSD o alguna otra opcion dentro de Linux??? Thanks, Another questions are the following, If I can add the Access DB in a local directory in the Linux server, which location should be (dev/, usr/, etc)?? If I add it in a especific path for example /htdocs/MyDB/Access how can I especified to PHP that read thiis path, Need i modified the php.ini file?? Can I Mount a Network File System on Linux, as I can mount the HD with the DB (win nt OS) to a local Path?? using NFSD, MOUNT or another option?? Thanks In advanced Juan Angel Ringhetti wrote: Gerardo, tuve el mismo problema. Compartir con Samba no te soluciona el problema porque ODBC no cruza servers sino que trabaja en el mismo server. Encontré una solucion con un ODBCBridge (www.easysoft.com) pero su licencia no es gratuita sino que tiene un período de trial. Si resolvés el problema avisame. Juan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: Question about ODBC databases
Anthony, You can certainly connect to a remote database using ODBC, it's simply a case of configuring DSN's on your PHP server to use a local ODBC Driver to connect to the remote database. In the case of MS Access, OpenLink's Multi-Tier ODBC Agent works quite well. This of course requires that the Linux instance of PHP has been built with an ODBC Driver manager, such as --with-iodbc as per the HOWTO on www.iodbc.org. Gerardo, your problem might be no ODBC Driver Manager linked in, as well as no local Driver/DSN. Check the output of a phpinfo(); to see what the state of your instance is with regards to ODBC. Let me know if you have configuration questions. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Virtuoso Universal Server -Original Message- From: Anthony [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 8:14 AM To: [EMAIL PROTECTED]; Gerardo Morales Cc: [EMAIL PROTECTED] Subject: [PHP-DB] Re: Question about ODBC databases As far as I know, you can not connect to an ODBC source remotly. If I could do this (make a NT server running ODBC look like a SQL server), it would make the app I'm working on much easier to develop. I have found a program called ODBCSocketServer, that will send and recieve ODBC requests via an XML stream. This works ok, but is limited and difucult to work with. At the current time it it incapable of sending over a secure port also. If you happen to find a way to make the ODBC server take remote requests, please let me know (I will from then on refer to you as god). Hope this helps. - Anthony [EMAIL PROTECTED] Gerardo Morales wrote: I have a little problem. I must design a little system in a linux server, this should be in php. The system must read a MS Access DB in a remote server (Win NT). After a single process the system must update a MySQL DB in the same server (Linux) and the Access DB. The current code works fine in the Linux server, so i can update the MySQL DB, but it doesn't connect with the NT server. When i tried to connect to it i have the following error. Fatal error: Call to undefined function: odbc_connect() in /usr/local/etc/httpd/htdocs/vox/loginAccess.inc on line 14 I never developed with ODBC DB, only with MySQL. I was searching about what could be the problem, but i don't found it. The code in liginAccess is the following: $dbaccess = array(); $dbaccess[accessserver] = NT.server.ip.address; // Access server hostname $dbaccess[accessport] = ; // Access server port $dbaccess[accessusername] = user; // username $dbaccess[accesspassword] = password; // password $dbaccess[defaultdb] = database; // database $conexionAccess=odbc_connect($dbaccess[defaultdb],$dbaccess[accessuse rname],$dbaccesss[accesspassword],); In the code above i tried to inser the remote server address, port etc, and the error codee is the same I hope you cant help me. I don't who else can i ask for it. Thanks in advanced -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: Question about ODBC databases
Gerardo, Access can only be served by Windows - you need to connect to it remotely. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Virtuoso Universal Server -Original Message- From: Gerardo Morales [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 12:44 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: Question about ODBC databases Gracias Juan. Sobre el mismo tema, aunque a la vez separado, en el caso de que la BD se pusiera en forma local, en que directorio se especifica? es necesario hacer algun cambio en php.ini para especificarle una localidad en especifico?? en el caso de que asi sea, alguien sabra si es posible utilizar MOUNT, NFSD o alguna otra opcion dentro de Linux??? Thanks, Another questions are the following, If I can add the Access DB in a local directory in the Linux server, which location should be (dev/, usr/, etc)?? If I add it in a especific path for example /htdocs/MyDB/Access how can I especified to PHP that read thiis path, Need i modified the php.ini file?? Can I Mount a Network File System on Linux, as I can mount the HD with the DB (win nt OS) to a local Path?? using NFSD, MOUNT or another option?? Thanks In advanced Juan Angel Ringhetti wrote: Gerardo, tuve el mismo problema. Compartir con Samba no te soluciona el problema porque ODBC no cruza servers sino que trabaja en el mismo server. Encontré una solucion con un ODBCBridge (www.easysoft.com) pero su licencia no es gratuita sino que tiene un período de trial. Si resolvés el problema avisame. Juan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: Question about ODBC databases
Anthony, No, you are right. The closest you could do is to use an ODBC-ODBC Bridge, and connect to a DSN on computer A that piggybacked on a DSN on computer B. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Virtuoso Universal Server office 781.273.0900 x 27 mobile 781.608.4127 -Original Message- From: Anthony [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 9:04 AM To: Andrew Hill Cc: [EMAIL PROTECTED]; 'Gerardo Morales' Subject: Re: [PHP-DB] Re: Question about ODBC databases That is not entirely what I'm trying to do. What I need is for the NT server that is running ODBC to respond to remote requests from other servers or clients. In other words, I need computer A to access database on computer B which is running ODBC. Computer A does not have ODBC, I need computer a to be able to query against computer B as if it were a SQL server. As far as I can tell, I can't make an NT server running ODBC respond to remote requests. If I am wrong though, PLEASE let me know. Thanks. - Anthony [EMAIL PROTECTED] Andrew Hill wrote: Anthony, You can certainly connect to a remote database using ODBC, it's simply a case of configuring DSN's on your PHP server to use a local ODBC Driver to connect to the remote database. In the case of MS Access, OpenLink's Multi-Tier ODBC Agent works quite well. This of course requires that the Linux instance of PHP has been built with an ODBC Driver manager, such as --with-iodbc as per the HOWTO on www.iodbc.org. Gerardo, your problem might be no ODBC Driver Manager linked in, as well as no local Driver/DSN. Check the output of a phpinfo(); to see what the state of your instance is with regards to ODBC. Let me know if you have configuration questions. Best regards, Andrew Hill Director of Technology Evangelism OpenLink Software http://www.openlinksw.com Universal Data Access Virtuoso Universal Server -Original Message- From: Anthony [mailto:[EMAIL PROTECTED]] Sent: Monday, January 21, 2002 8:14 AM To: [EMAIL PROTECTED]; Gerardo Morales Cc: [EMAIL PROTECTED] Subject: [PHP-DB] Re: Question about ODBC databases As far as I know, you can not connect to an ODBC source remotly. If I could do this (make a NT server running ODBC look like a SQL server), it would make the app I'm working on much easier to develop. I have found a program called ODBCSocketServer, that will send and recieve ODBC requests via an XML stream. This works ok, but is limited and difucult to work with. At the current time it it incapable of sending over a secure port also. If you happen to find a way to make the ODBC server take remote requests, please let me know (I will from then on refer to you as god). Hope this helps. - Anthony [EMAIL PROTECTED] Gerardo Morales wrote: I have a little problem. I must design a little system in a linux server, this should be in php. The system must read a MS Access DB in a remote server (Win NT). After a single process the system must update a MySQL DB in the same server (Linux) and the Access DB. The current code works fine in the Linux server, so i can update the MySQL DB, but it doesn't connect with the NT server. When i tried to connect to it i have the following error. Fatal error: Call to undefined function: odbc_connect() in /usr/local/etc/httpd/htdocs/vox/loginAccess.inc on line 14 I never developed with ODBC DB, only with MySQL. I was searching about what could be the problem, but i don't found it. The code in liginAccess is the following: $dbaccess = array(); $dbaccess[accessserver] = NT.server.ip.address; // Access server hostname $dbaccess[accessport] = ; // Access server port $dbaccess[accessusername] = user; // username $dbaccess[accesspassword] = password; // password $dbaccess[defaultdb] = database; // database $conexionAccess=odbc_connect($dbaccess[defaultdb],$dbaccess[accessuse rname],$dbaccesss[accesspassword],); In the code above i tried to inser the remote server address, port etc, and the error codee is the same I hope you cant help me. I don't who else can i ask for it. Thanks in advanced -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Question about ODBC databases
Write a simple web service. Put a few PHP pages on the NT server, which take parameters, and return results. For example, create a function that takes a string (sql statement, eg) as a parameter, and echos a comma delimited page (the resulting recordset). Then, on the Linux/Unix box, use the HTTP methods to call the page, passing the string and then parses the output. I've done this with ASP to interact with some VB programs that some of our remote sites use. It works well. Anthony [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... That is not entirely what I'm trying to do. What I need is for the NT server that is running ODBC to respond to remote requests from other servers or clients. In other words, I need computer A to access database on computer B which is running ODBC. Computer A does not have ODBC, I need computer a to be able to query against computer B as if it were a SQL server. As far as I can tell, I can't make an NT server running ODBC respond to remote requests. If I am wrong though, PLEASE let me know. Thanks. - Anthony [EMAIL PROTECTED] Andrew Hill wrote: -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Question about ODBC databases
Gracias Juan. Sobre el mismo tema, aunque a la vez separado, en el caso de que la BD se pusiera en forma local, en que directorio se especifica? es necesario hacer algun cambio en php.ini para especificarle una localidad en especifico?? en el caso de que asi sea, alguien sabra si es posible utilizar MOUNT, NFSD o alguna otra opcion dentro de Linux??? Thanks, Another questions are the following, If I can add the Access DB in a local directory in the Linux server, which location should be (dev/, usr/, etc)?? If I add it in a especific path for example /htdocs/MyDB/Access how can I especified to PHP that read thiis path, Need i modified the php.ini file?? Can I Mount a Network File System on Linux, as I can mount the HD with the DB (win nt OS) to a local Path?? using NFSD, MOUNT or another option?? Thanks In advanced Juan Angel Ringhetti wrote: Gerardo, tuve el mismo problema. Compartir con Samba no te soluciona el problema porque ODBC no cruza servers sino que trabaja en el mismo server. Encontré una solucion con un ODBCBridge (www.easysoft.com) pero su licencia no es gratuita sino que tiene un período de trial. Si resolvés el problema avisame. Juan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php