[horde] installation: sql DB::connect on horde 3.0

Fran ç ois Helly francois.helly at wanadoo.fr
Wed Oct 16 16:59:19 PDT 2002


Hi,

I'm designer and I began few months ago an application based on the horde's
application skeleton.

The main goal of this application is to connect and consult an image
database system developped by a french University which wants to publish
books (old one's) on the net.

I use for it a connection on an sql database using pear::DB
(mysql for the moment and sybase in few months) image's database application

I want know to try the implementation of the horde's application framework
to my app because I think it will be a smart way to have sessions and users'
management and all the fonctionalities from it.
I want to start using turba also.

I run an apache server (1.3.26) with php (4.2.3) on a linux box (mandrake
9.0) and a mysql server (3.23.52). I use phpMyAdmin to manage my mysql
databases (it helps).

The only way a found to access to my database was to modify the installation
procedure described in the INSTALL file:
- modify privileges of the "horde" user (in the "user" and "db" tables of
the "mysql" database);
- modify the functions _connect() in the files sql.php as follow:



+------------------ start of modified part of function _connect--------+


/* Connect to the SQL server using the supplied parameters. */

include_once 'DB.php';

// as described in tne DB doc
$this->dsn = $this->_params['phptype']  ."://";
if(!empty($this->_params['syntax']))
    $this->dsn .=   this->_params['syntax'] ;
if(!empty($this->_params['username']))
    $this->dsn .=       $this->_params['username'];
if(!empty($this->_params['password']))
    $this->dsn .=     ":".$this->_params['password'];
if(!empty($this->_params['hostspec']))
    $this->dsn .=      "@".  $this->_params['hostspec'];
if(!empty($this->_params['port']))
    $this->dsn .=      ":". $this->_params['port'];
if(!empty($this->_params['database']))
    $this->dsn .=      "/". $this->_params['database'];
if(!empty($this->_params['path']))
    $this->dsn .=       "//". $this->_params['path'];
// comment the original line
// $this->_db = &DB::connect($this->_params, true);
$this->_db  = &DB::connect($this->dsn, true);


+------------------- end of modified part of function _connect --------+

I hope it could help, I guess I'm not the only one who had the same pb

Best regards to the whole developpment' staff


François



PS
I made some changes to the old file (2.0) ./admin/css/index.php
= inclusion of files ok
= TODO need to read the registry array to find apps (add a localisation in
it?) and make a loop to create the select button...
But maybe it's too late, and the dev' staff changed his plan (I didn't
exprore the entire 3.0 dist...)


RE-PS
pardon me if my english syntax is self-developped reading systems and
servers documentation...


------------------------
francois helly
designer
17, rue de Nuits
69004 LYON - France
tél./fax 33 [0]4 78 28 73 30
portable 06 16 17 78 84
e-mail: francois.helly at wanadoo.fr
------------------------





More information about the horde mailing list