PEAR DB Error: unknown option portability

Pagina: 1
Acties:

  • Slagroom
  • Registratie: Juni 2001
  • Laatst online: 04-12-2025
Hallo,

Ik probeer met de DB package uit de php PEAR library te connecten met de optie portability om de comptabiliteit te vergroten. Dit is de code:

PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
// Inlcude configuration file
require (dirname (__FILE__).'/config.php');

// Include the DB package from the PEAR library
require ('DB.php');

// Setup database connection
$dsn = array (
    'phptype'   => 'mysql',
    'username'  => $_CONFIG['db_user'],
    'password'  => $_CONFIG['db_pass'],
    'hostspec'  => $_CONFIG['db_host'],
    'database'  => $_CONFIG['db_name']
);

$options = array (
    'debug'         => 2,
    'portability'   => DB_PORTABILITY_ALL,
);

$db =& DB::connect ($dsn, $options);

if (PEAR::isError ($db))
    die ($db->getMessage());
?>


Ik krijg deze error:
code:
1
DB Error: unknown option portability


Ik las ergens dat het aan een te oude PEAR versie kon liggen maar ik heb alle libraries geupdated met "pear upgrade-all".

Hoe kan ik dit oplossen?

Ik gebruik trouwens MySQL 4.1.10a. Het blijkt dat je als phptype 'mysqli' moet gebruiken. Nu geeft hij de volgende melding:
code:
1
DB Error: extension not found


Ook hier heb ik op gezocht en de oplossing zou moeten zijn om de volgende regel in php.ini te zetten:
code:
1
extension=php_mysqli.so

Maar dit lost het niet op. Wie weet hoe het wel moet?

[ Voor 37% gewijzigd door Slagroom op 23-03-2005 00:43 . Reden: mysqli gedoe toegevoegd... ]


  • Slagroom
  • Registratie: Juni 2001
  • Laatst online: 04-12-2025
Niemand?

  • Slagroom
  • Registratie: Juni 2001
  • Laatst online: 04-12-2025
Of schop ik nu te vaak?