Unable to select database

Fermé
Oliver37 Messages postés 35 Date d'inscription jeudi 16 janvier 2014 Statut Membre Dernière intervention 8 mai 2020 - 6 mai 2020 à 21:01
Oliver37 Messages postés 35 Date d'inscription jeudi 16 janvier 2014 Statut Membre Dernière intervention 8 mai 2020 - 8 mai 2020 à 16:20
Bonjour,
J'ai créé une base de données sur un serveur ovh. J'ai passé le test n°1 : La base de données est installée. Seulement le test n°2 me renvoie le message suivant : "unable to select database".
Je connais peu les langages SQL et PHP. J'utilise FileZilla pour publier mon site et mes fichiers. C'est une base de données de pédigrés de chiens. J'ai des pages web d'instructions pour installer et faire fonctionner la base de données.
Merci beaucoup de votre aide.


Configuration: Windows / Chrome 81.0.4044.129
A voir également:

7 réponses

jordane45 Messages postés 38138 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 17 avril 2024 4 649
6 mai 2020 à 21:27
Bonjour
avec quoi as-tu réalisé ton site web avec du code que tu as écrit toi-même ou un CMS tel que WordPress ?

as-tu bien saisi les bonnes informations correspondant à ta base de données dans le script de connexion ?

0
Oliver37 Messages postés 35 Date d'inscription jeudi 16 janvier 2014 Statut Membre Dernière intervention 8 mai 2020
7 mai 2020 à 08:21
Bonjour,
J'ai construit mon site avec le logiciel Xara. Je ne sais pas si les informations du fichier à modifier sont correctes?

Merci de votre réponse.
0
jordane45 Messages postés 38138 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 17 avril 2024 4 649
7 mai 2020 à 09:44
Ben on ne peut pas le savoir à ta place.....
Est-ce que, au moins, dans ce fichier, le nom de la base de données est exactement le même que celui qui se trouve sur ton serveur ovh ? ( la bdd que tu viens de créer...).
0
Oliver37 Messages postés 35 Date d'inscription jeudi 16 janvier 2014 Statut Membre Dernière intervention 8 mai 2020 > jordane45 Messages postés 38138 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 17 avril 2024
8 mai 2020 à 09:02
Bonjour,
Ma base de données doit s'appeller pedpoint mais ovh n'autorise que 6 caractères, je ne sais pas comment faire.
Cordialement,
0
jordane45 Messages postés 38138 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 17 avril 2024 4 649 > Oliver37 Messages postés 35 Date d'inscription jeudi 16 janvier 2014 Statut Membre Dernière intervention 8 mai 2020
8 mai 2020 à 09:04

Ma base de données doit s'appeller pedpoint mais ovh n'autorise que 6 caractères

Alors non.. c'est l'inverse. Ce n'est pas toi qui doit définir le nom de la bdd chez ovh ... c'est OVH qui défini le nom de la bdd et toi qui doit adapter ton script pour qu'il l'utilise.
0
Oliver37 Messages postés 35 Date d'inscription jeudi 16 janvier 2014 Statut Membre Dernière intervention 8 mai 2020
7 mai 2020 à 11:48
Non, je vais le modifier puis je reviens vers vous.
Merci.
0
Oliver37 Messages postés 35 Date d'inscription jeudi 16 janvier 2014 Statut Membre Dernière intervention 8 mai 2020
8 mai 2020 à 12:22
Puis-je vous faire voir mon script pour que vous regardiez si quelque chose cloche?
0
jordane45 Messages postés 38138 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 17 avril 2024 4 649
8 mai 2020 à 12:23
Oui.
Et pour poster ton script, il faudra utiliser les balises de code
https://codes-sources.commentcamarche.net/faq/11288-les-balises-de-code
0

Vous n’avez pas trouvé la réponse que vous recherchez ?

Posez votre question
Oliver37 Messages postés 35 Date d'inscription jeudi 16 janvier 2014 Statut Membre Dernière intervention 8 mai 2020
8 mai 2020 à 14:33
Voilà mon script :

<?php
// The following parameters are specified by the user.
// When installing new updates for PedigreePoint, do not replace this file,
// but check the installation notes to find out how to modify this file
// for the new update.
//
// CONFIGURATIONS
//error_reporting( E_ALL );// Uncomment to see PHP errors!!!!!!!
$DatabaseName = "arobasetmhpedpoi";// THIS MUST BE SET
$DatabaseAccount = "arobasetmhpedpoi";// THIS MUST BE SET
$DatabasePassword = "OtAb16nr";// THIS MUST BE SET
$DatabaseHost = "localhost";// usually localhost
$szEncryptionKey = "OtAb16nr";// THIS MUST BE SET - its used when creating a link for "Pedigree w/o Link" - it can be anything!
$szLoaderPassword = "OtAb16nr";// THIS MUST BE SET - used in PedPub TOOLS-Export PedigreePoint
$szMailProg = "/usr/sbin/sendmail" ;
$bIsDemo = false;// You should always set this to false. We set it to true on www.pedigreepoint.com only.
// Set these for each of the databases you want to make available
// CKW - create a string of the format databaseName1:database description1;databaseNamew:database description2; etc....
// Put default table first
$TableNames = "pedigree:Pedigree";// e.g. pedigree:Pedigree"; // list of tables for Search, AdvancedSearch and Trial Pedigrees
    // Each table in the list must be separated by a semicolon and should consist of: tableName:tableDescription.
// E.g. "shetland:Shetland Sheepdog;nova:Novascotia Duck Tolling Retriever"
	// Leave blank if you want the list of table names and descriptions to come from your 'dbtables' table.
$szPhotoPath = "/Images/"; // This is prefixed to all photo paths .. it MUST end in a slash.
            // The path should start with a slash if its an absolute path, i.e. the folder is in root folder of your web site.
            // If it is a subfolder of where the PedPoint PHP files are then don't start with a slash.
$nDaysToKeepLogs = 60;// activity older than this many days is deleted from the logs

// OPTIONS - USER ACCESS
$bUsersMustLogin = true;// set this true if you want to force users to login with an account and password
$bRecordActivity = true;// set this true if you want to record user activity in the activity table, e.g. what reports they run
// and search strings they use
$bLimitNumberOfReports = false;// set true if you want to limit the number of reports a user can run per day
$nAnonymousLimitPerDay=500;// number of reports allowed per IP address per day (only applies to Lite not Pro)

// OPTIONS - WEB PAGE APPEARANCE
$szWebSiteName = "Web Site Name";
$szWebSiteOwner = "Data Owner"; //(Data Owner)
$szWebSiteBreeds = "breed"; // THIS MUST BE SET
$szMailRecipient = "emailaddress";   // change this to your email so you can receive emails
$szLocation = "the USA, State of TX"; // CKW- location for legal proceedings
$szCRYears = '2013 -' . date('Y'); // CKW - Start year through current year for copyright notices
$szTimezone = "America/Indiana/Knox";// see http://www.php.net/manual/en/timezones.php
$szSponsorCredits	= "This online database hosted by $szWebSiteName.  Copyright $szCRYears ";  

// OPTIONS - REPORT APPEARANCE
$nPhotoHeight = 150;// Pixel width of photo displayed in Pedigree
$nPictureGens = 2;// set to the number of generations (starting from parents) to include photos
$szDateFormat = "%d %b %Y";
$nMaxSearchResults = 100; // Number of search results returned per page
$bShowSireDam = false;// Set this to 1 show sire and dam in the search results.
$szVerticalPedField = ', dob, color';// change this to one or more fields which you want to display
// at the end of a name in the Full siblings part of a vertical pedigree, e.g.
// to show three fields change this to ',pretitle, posttitle, regno' (note there must be
// one comma before each field name).
$bColorizeRepeatedAncestor=true;// set true/false - true to show a unique background color for repeated ancestors
$bIgnoreRedMarks = false;// If you are exporting only (red) marked records it can be useful to set this true
                    // so that red marks are not shown.
// Mark colors can be customized. They are set to the colors used in PedPub and PedX.
$aMarkColors = array("crimson", "darkorange", "gold", "chartreuse", "aqua", "royalblue", "blueviolet", "deeppink", 
    "darkblue", "darkgreen", "darkcyan", "chocolate", "darkgoldenrod", "greenyellow", "orchid", "seagreen");                
$aMarkColorTooltips = array(    // Customise the tooltips for what your marks mean
    "Just added",   // These are just examples -- set your own tooltips!!
    "Recently added",
    "White masking gene",
    "Black gene",
    "Genetic diesease1",
    "Genetic diesease2",
    "Genetic diesease3",
    "Genetic diesease4"
    );

// OPTIONS - WEB PAGES
// CKW - added variables for main scripts to allow ability to enable/disable via null string
$szHomePage = "pp_index.php"; // URL for the home page link at the bottom of reports
$szSearchPage = "pp_search.php"; // URL for the search page link at the bottom of reports
$szSuccessLoginPage = "pp_search.php";// page which is displayed after successful login
$szFailLoginPage = "pp_message?msg=Login+failed.";// page which is displayed after failed login
$szLoginPage = "pp_loginform.php";// URL for the login page - displayed on invalid login
$szAdvSearchPage = "pp_advancedsearch.php"; // URL for the advanced search page link at the bottom of reports
$szPPAncestors = ""; //"pp_ancestors.php"; // CUSTOM: Contact Kris Willison (CKW), http://pedigrees.subali-klm.com for more information
$szPPOffspring = "pp_offspring.php";
$szPPCorrection = "" ; //"db_correction.php"; // CUSTOM: Contact Kris Willison (CKW), http://pedigrees.subali-klm.com for more information
$szPPPedigree = "pp_pedigree.php";
$szPPReverse = "pp_reverseped.php";
$szPPSibling = "pp_sibling.php";
$szPPTrial = "pp_trialmating.php"; // Must have record TRIAL PEDIGREE in database
$szPPVertical = "pp_verticalped.php";
$szPPExternalPed = "pp_externalped.php";// for permanent external links and better printing


// CKW - variables used in searching when restricting on sex. Also for adding link to pp_trial.php in scripts
$MSex = "'M','N','Male','Neuter','D'"; // CKW - note single quotes around each choice, double quotes around all
$FSex = "'F','S','Female','Spay','B'"; // CKW - note single quotes around each choice, double quotes around all


// #################################################################
//  DATE_FORMAT(date,format) - section added by CKW for informational purposes
//  -----------------
//  Formats the date value according to the format string.
//  The following specifiers may be used in the format string. The "%" character is required before format specifier characters.
//
//  ID Description
//  %b Abbreviated month name (Jan..Dec)
//  %c Month, numeric (0..12)
//  %D Day of the month with English suffix (0th, 1st, 2nd, 3rd, ...)
//  %d Day of the month, numeric (00..31)
//  %e Day of the month, numeric (0..31)
//  %M Month name (January..December)
//  %m Month, numeric (00..12)
//  %Y Year, numeric, four digits
?>


J'ai modifié les lignes 9 à 14.

P.S. Lors de la création de ma base de données j'ai eu le message suivant : Note#1051 Table 'arobasetmhpedpoi.account' inconnue

Merci beaucoup.
0
jordane45 Messages postés 38138 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 17 avril 2024 4 649
8 mai 2020 à 15:01
Tu le sors d'où ce script ?
Je pense qu'il y a un mode d'emploi qui t'explique comment faire l'installation.

De plus, lorsque tu as un message d'erreur, il faut nous le donner entièrement ( car il contient, le plus souvent, le numérod de ligne et le fichier concerné ).
0
Oliver37 Messages postés 35 Date d'inscription jeudi 16 janvier 2014 Statut Membre Dernière intervention 8 mai 2020
8 mai 2020 à 15:55
Le script vient d'un site australien pour installer une base de données de pédigrés pour chiens.
Voici les liens : http://www.pedigreepoint.com/Installation/Step1.htm
http://www.pedigreepoint.com/Installation/Step2.htm
0
jordane45 Messages postés 38138 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 17 avril 2024 4 649
8 mai 2020 à 15:58
Donc ton souci se déroule lorsque tu "colles" les requêtes SQL dans ton phpmyadmin ? ( Chapitre Install tables du step1 )
Car c'est ça qui permet de créer les tables de ta bdd....
0
jordane45 Messages postés 38138 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 17 avril 2024 4 649 > jordane45 Messages postés 38138 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 17 avril 2024
8 mai 2020 à 16:00
Après.. vu qu'il s'agit d'un "logiciel" payant ... le mieux est de contacter leur support pour avoir de l'aide
support@breedmate.com
0
Oliver37 Messages postés 35 Date d'inscription jeudi 16 janvier 2014 Statut Membre Dernière intervention 8 mai 2020
8 mai 2020 à 16:20
Oui, c'est ça. Je vais essayer de me débrouiller avec le support.
Merci beaucoup.
0