Problème de base de donnés

Bonjour à tous,

J’ai installer wamp et postgreSQL pour l’installation d’Opencourrier.
J’ai bien installé les Postgis. l’installation de tous les tables s’est bien passé.
Quand je lance opencourrier dans le navigateur voici le message d’erreur :

Deprecated: Non-static method DB::connect() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_application.class.php on line 1165

Je ne sais pas trop ce qui se passe, c’est pour cette raison que je viens vers vous.
Merci pour toute aide.

Bonjour,

La même question a déjà été posée ici :

Bonne soirée :wink:

Bonsoir,

Merci pour pour l’assistance. Voilà ce que j’ai fais:
error_reporting
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT

Après connexion, j’ai deux erreurs :
arning: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in C:\wamp64\www\opencourrier\core\om_logger.class.php on line 71

Et le seconde erreur en rouge:
erreur de base de donnees. Contactez votre administrateur.

Voici mon installation :
PostgreSQL 10, Windows 10 et wamp
Merci

Voici les modifications que j’ai fais dans le fichier config.inc.php

// Display name for the server on the login screen
$conf[‘servers’][0][‘desc’] = ‘PostgreSQL 10’;

// Hostname or IP address for server.  Use '' for UNIX domain socket.
// use 'localhost' for TCP/IP connection on this computer
$conf['servers'][0]['host'] = 'localhost';

// Database port on server (5432 is the PostgreSQL default)
$conf['servers'][0]['port'] = 5432;

// Database SSL mode
// Possible options: disable, allow, prefer, require
// To require SSL on older servers use option: legacy
// To ignore the SSL mode, use option: unspecified
$conf['servers'][0]['sslmode'] = 'allow';

// Change the default database only if you cannot connect to template1.
// For a PostgreSQL 8.1+ server, you can set this to 'postgres'.
$conf['servers'][0]['defaultdb'] = 'template1';

// Specify the path to the database dump utilities for this server.
// You can set these to '' if no dumper is available.
$conf['servers'][0]['pg_dump_path'] = 'C:\Program Files\PostgreSQL\10\bin\pg_dump.exe';
$conf['servers'][0]['pg_dumpall_path'] = 'C:\Program Files\PostgreSQL\10\\bin\pg_dumpall.exe';

// Example for a second server (PostgreSQL for Windows)
//$conf['servers'][1]['desc'] = 'PostgreSQL';
$conf['servers'][0]['desc'] = 'PostgreSQL 10'; //+
$conf['servers'][1]['host'] = '127.0.0.1';
$conf['servers'][1]['port'] = 5432;
//$conf['servers'][1]['sslmode'] = 'allow';
//$conf['servers'][1]['defaultdb'] = 'template1';
$conf['servers'][1]['pg_dump_path'] = 'C:\Program Files\PostgreSQL\10\bin\pg_dump.exe';
$conf['servers'][1]['pg_dumpall_path'] = 'C:\Program Files\PostgreSQL\10\\bin\pg_dumpall.exe';

Bonjour,
Pour le fichier php.ini, il semble que vous n’avez pas effectué la bonne modification.

Le fichier php.ini comporte deux type de lignes:

  • les lignes ignorée
    • lignes vides
    • lignes débutant par ;
  • les lignes fixant un paramètre, au format paramètre = valeur
    -il faut recommenter la ligne de commentaire: ; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
    -et plus loin dans le fichier, là ou la ligne commence par error_reporting = ... s’assurer qu’elle n’est pas commentée, et indiquer la valeur voulue

Pour cela comme pour les messages suivants, une recherche sur le net de vos messages d’erreur et de comment paramétrer PHP (https://secure.php.net/manual/en/function.error-reporting.php) vous permettra d’être plus autonome.
Il semble que votre version de PHP est un peu avancée pour openCourrier qui est resté sur une version 4.4 du framework openMairie. Le plus simple pour démarrer me semble juste de cacher le “WARNING” sous le tapis en passant votre paramètre error_reporting à E_ERROR | E_PARSE

Le second message d’erreur est généré par l’application openCourrier, il faut donc aller voir les traces dans : le fichier C:\wamp64\www\opencourrier\tmp\error_log.txt pour en savoir plus.

Pour la suite sur ce forum vous avez déjà plusieurs sujets qui peuvent vous aider:

Bon courage

Bonjour,

Merci pour votre aide. J’ai fais les modification dans le fichier php.ini que voici:

Citation
; error_reporting
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT

Citation
; error_reporting
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT

Citation
Common Values:
; E_ALL (Show all errors, warnings and notices including coding standards.)
; E_ALL & ~E_NOTICE (Show all errors, except for notices)
; E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.)
; E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (Show only errors)
; Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT

Citation
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
; http://php.net/error-reporting
error_reporting = E_ERROR | E_PARSE

Quand je me connect, voici les message d’erreur

CitationDeprecated: Non-static method DB::connect() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_application.class.php on line 1165

Deprecated: Non-static method DB::parseDSN() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB.php on line 520

Strict Standards: Declaration of DB_pgsql::quote() should be compatible with DB_common::quote($string = NULL) in C:\wamp64\www\opencourrier\php\db\DB\pgsql.php on line 50

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB.php on line 551

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB.php on line 551

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB.php on line 557

Deprecated: Non-static method database::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_application.class.php on line 1170

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_database.class.php on line 34

Deprecated: Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 2200

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 1217

Deprecated: Non-static method database::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_application.class.php on line 1242

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_database.class.php on line 34

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB.php on line 1387

Deprecated: Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 2200

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 1217

Deprecated: Non-static method database::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_application.class.php on line 1242

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_database.class.php on line 34

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB.php on line 1387

Deprecated: Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 2200

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 1217

Deprecated: Non-static method database::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_application.class.php on line 1242

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_database.class.php on line 34

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB.php on line 1387

Deprecated: Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 2200

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 1217

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 1292

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB.php on line 1387

Deprecated: Non-static method database::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_application.class.php on line 1242

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_database.class.php on line 34

Deprecated: Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 2200

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 1217

Deprecated: Non-static method database::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\obj\utils.class.php on line 128

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_database.class.php on line 34

Deprecated: Non-static method database::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_application.class.php on line 1242

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_database.class.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp64\www\opencourrier\php\db\DB\common.php:2200) in C:\wamp64\www\opencourrier\core\om_application.class.php on line 660

Deprecated: Non-static method DB::isManip() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 2200

Deprecated: Non-static method DB::errorMessage() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB.php on line 965

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB.php on line 688

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 1217

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\php\db\DB\common.php on line 1292

Deprecated: Non-static method database::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_application.class.php on line 1242

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_database.class.php on line 34
Erreur de base de données. Contactez votre administrateur.

Deprecated: Non-static method database::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_application.class.php on line 1242

Deprecated: Non-static method DB::isError() should not be called statically, assuming $this from incompatible context in C:\wamp64\www\opencourrier\core\om_database.class.php on line 34

J’ai fais ces modifications et l’application se lance sans problème:

Citation

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

Merci pour tout.
A bientôt.