Précédent   Forum des professionnels en informatique > PHP > Scripts
Scripts Forum d'entraide sur les scripts PHP téléchargés. Les meilleurs scripts PHP, la FAQ scripts PHP, toutes les FAQ PHP
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 30/07/2007, 13h35   #1
Membre du Club
 
Inscription : octobre 2006
Messages : 386
Détails du profil
Informations forums :
Inscription : octobre 2006
Messages : 386
Points : 65
Points : 65
Par défaut [OneOrZero] Erreur sur la page PHP

Bonjour,
j'ai installé cet outil bdd créée, table configuration apache.
J'arrive à me connecter à géré l'outil comme il faut mais en en-tete de page j'ai ceci :
Code X :
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
27
28
29
30
31
32
33
34
35
36
37
38
Notice: Use of undefined constant PHP_SELF - assumed 'PHP_SELF' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 46

Notice: Use of undefined constant PHP_SELF - assumed 'PHP_SELF' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 46

Notice: Use of undefined constant PHP_SELF - assumed 'PHP_SELF' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 47

Notice: Use of undefined constant PHP_SELF - assumed 'PHP_SELF' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 47

Notice: Use of undefined constant PHP_SELF - assumed 'PHP_SELF' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 48

Notice: Use of undefined constant server_name - assumed 'server_name' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 69

Notice: Use of undefined constant oneorzero_web_alias - assumed 'oneorzero_web_alias' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 70

Notice: Use of undefined constant max_attachment_size - assumed 'max_attachment_size' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 71

Notice: Use of undefined constant file_upload_directory - assumed 'file_upload_directory' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 72

Notice: Use of undefined constant database - assumed 'database' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 73

Notice: Use of undefined constant db_host - assumed 'db_host' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 74

Notice: Use of undefined constant db_user - assumed 'db_user' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 75

Notice: Use of undefined constant db_pwd - assumed 'db_pwd' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 76

Notice: Use of undefined constant db_name - assumed 'db_name' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 77

Notice: Use of undefined constant table_prefix - assumed 'table_prefix' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 81

Notice: Use of undefined constant sqlite_dbfile - assumed 'sqlite_dbfile' in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 83

Notice: Undefined index: sqlite_dbfile in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 83

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php:46) in c:\program files\easyphp1-8\www\gestion3\common\login.php on line 106

Warning: Cannot modify header information - headers already sent by (output started at c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php:46) in c:\program files\easyphp1-8\www\gestion3\index.php on line 82

Je ne comprend pas d'ou peut provenir ces messages d'erreur.
Merci
.Matthieu
GarsDuCalvados est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/07/2007, 14h00   #2
Membre Expert
 
Inscription : janvier 2005
Messages : 2 288
Détails du profil
Informations forums :
Inscription : janvier 2005
Messages : 2 288
Points : 2 287
Points : 2 287
Peut on voir le code correspondant à l'utilisation de cette constante?
koopajah est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/07/2007, 14h09   #3
Membre du Club
 
Inscription : octobre 2006
Messages : 386
Détails du profil
Informations forums :
Inscription : octobre 2006
Messages : 386
Points : 65
Points : 65
Ce n'est pas moi qui a dev. cette application. je l'ai téléchargé sur internet.
voici le code la page :
Code :
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
/*
 * Date: Dec 19, 2004
 * Filename: init_server_settings.php
 * Author: Adam Hall
 * Description: This file intiliases the variables used in the One OrZero
 * database operations
 
/***************************************************************************
*  This program is free software; you can redistribute it and/or
*  modify it under the terms of the GNU General Public
*  License as published by the Free Software Foundation; either
*  version 2.1 of the License, or (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public
*  License along with This program; if not, write to:
*    Free Software Foundation, Inc.
*    59 Temple Place
*    Suite 330
*    Boston, MA  02111-1307  USA
*
* Copyright 2006 OneOrZero
* info@oneorzero.com
* http://www.oneorzero.com
* Developers: OneOrZero Team / Contributors: OneOrZero Community
****************************************************************************/
 
//*************** Constants *************************************************//
$server_settings_path = "../configuration/server_settings.php";
$root_server_settings_path = "./configuration/server_settings.php";
$website_settings_path = "../configuration/website_settings.php";
$root_website_settings_path = "./configuration/website_settings.php";
$website_settings_header = "These are the One Or Zero Website Settings\n" .
        "The Website Settings area in the One Or Zero Control Panel updates this" .
        " file.  Please do not change these values.";
$version = "1.6.5.4";
//************************Get site variable values*****************************
// set the database variables and determine path to settings file based
// file location.determine path to settings file based
// file location.
if (stristr($_SERVER[PHP_SELF],'logout') or stristr($_SERVER[PHP_SELF],"supporter")
or stristr($_SERVER[PHP_SELF],'admin') or stristr($_SERVER[PHP_SELF],'utilities')
or stristr($_SERVER[PHP_SELF],'sla')) {
    if (file_exists($server_settings_path)){
    $ooz_server_settings = parse_ini_file($server_settings_path);
    }else{
    	printError("The server_settings.php file was not found !");
    	exit;
    }
}else{
	if (file_exists($root_server_settings_path)){
    $ooz_server_settings = parse_ini_file($root_server_settings_path);
	}else{
		printError("The server_settings.php file was not found !");
		exit;
	}
}
//*******************setup our site variables**********************************
if (!isset($_SERVER['DOCUMENT_ROOT']) OR $_SERVER['DOCUMENT_ROOT'] == ''){
	$server_path = $ooz_server_settings[document_root];
}else{
	$server_path = $_SERVER['DOCUMENT_ROOT'];
}
$server_name = $ooz_server_settings[server_name];
$oneorzero_web_alias = $ooz_server_settings[oneorzero_web_alias];
$max_attachment_size = $ooz_server_settings[max_attachment_size] * 1000000;
$file_upload_directory = $server_path . "/".$oneorzero_web_alias."/".$ooz_server_settings[file_upload_directory]."/";
$database = $ooz_server_settings[database];
$db_host = $ooz_server_settings[db_host];
$db_user = $ooz_server_settings[db_user];
$db_pwd = $ooz_server_settings[db_pwd];
$db_name = $ooz_server_settings[db_name];
//$compress_attachments = $ooz_server_settings[compress_attachments];
//Only set the $table_prefix value if we are not using sqlite
if ($database != "sqlite") {
    $table_prefix = $ooz_server_settings[table_prefix];
}
$sqlite_dbfile = $server_path ."/".$oneorzero_web_alias."/sqlitedatabase/".$ooz_server_settings[sqlite_dbfile];
//adjust prefix if the alias is nothing (eg a root server install)
if ($oneorzero_web_alias == ""){
    $oneorzero_http_prefix = "http://".$server_name."/";
}else{
     $oneorzero_http_prefix = "http://".$server_name."/".$oneorzero_web_alias."/";
}
//************setup the table names and add the prefix (if applicable)********
$announcement_table = $table_prefix."announcements"; // announcement table name
$tcategories_table = $table_prefix."tcategories"; // ticket categories table
$tpriorities_table = $table_prefix."tpriorities"; // ticket priority table
$tstatus_table = $table_prefix."tstatus"; // ticket status table
$tratings_table = $table_prefix."tratings"; // ticket rating table
$users_table = $table_prefix."users"; // users table
$sgroups_table = $table_prefix."sgroups"; // supporter group table
$ugroups_table = $table_prefix."ugroups"; // users group table
$faqcat_table = $table_prefix."faqcategories"; // faq categories table
$faqsubcat_table = $table_prefix."faqsubcategories"; // faq sub-categories table
$faqs_table = $table_prefix."faqs"; // faq question and answer table
$platforms_table = $table_prefix."platforms"; // platforms table
$tickets_table = $table_prefix."tickets"; // tickets table
$settings_table = $table_prefix."settings"; // settings table
$themes_table = $table_prefix."themes"; // themes table
$time_table = $table_prefix."time_track"; // table for keeping track of time spent on a ticket
$whosonline_table = $table_prefix."whosonline"; // whosonline table
$survey_table = $table_prefix."survey"; // survey table
$kcategories_table = $table_prefix."kcategories"; // knowledge base categories table
$kbase_table = $table_prefix."kbase"; // knowledge base table that holds q & a's
$attachments_table = $table_prefix."attachments"; // attachments table
$templates_table = $table_prefix."templates"; // templates table
$kb_queries_table = $table_prefix."kb_queries"; // knowledge base queries table
$sla_track_table = $table_prefix."sla_track"; // sla tracking table
$tseverity_table = $table_prefix."tseverity"; //severity table
$tprojects_table = $table_prefix."tprojects"; //projects table
$ugroup_meta_security_table = $table_prefix."ugroup_meta_security"; //projects table
?>
GarsDuCalvados est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/07/2007, 14h13   #4
Membre Expert
 
Inscription : janvier 2005
Messages : 2 288
Détails du profil
Informations forums :
Inscription : janvier 2005
Messages : 2 288
Points : 2 287
Points : 2 287
Remplaces
par
pour les premieres erreurs

Pour les autres c'est le meme principe : rajoute des ' ' dans les tableaux autour des noms qui te font une erreur :
Code :
1
2
3
4
5
6
7
8
9
$server_name = $ooz_server_settings['server_name'];
$oneorzero_web_alias = $ooz_server_settings['oneorzero_web_alias'];
$max_attachment_size = $ooz_server_settings['max_attachment_size'] * 1000000;
$file_upload_directory = $server_path . "/".$oneorzero_web_alias."/".$ooz_server_settings[file_upload_directory]."/";
$database = $ooz_server_settings['database]';
$db_host = $ooz_server_settings['db_host'];
$db_user = $ooz_server_settings['db_user'];
$db_pwd = $ooz_server_settings['db_pwd'];
$db_name = $ooz_server_settings['db_name'];

Code :
$ooz_server_settings['sqlite_dbfile']
koopajah est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/07/2007, 14h32   #5
Membre du Club
 
Inscription : octobre 2006
Messages : 386
Détails du profil
Informations forums :
Inscription : octobre 2006
Messages : 386
Points : 65
Points : 65
Je te remercies mais j'ai toujours des erreurs aprés modification (mais beaucoup moins ;-) ).
Citation:
Notice: Undefined index: sqlite_dbfile in c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php on line 83

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php:83) in c:\program files\easyphp1-8\www\gestion3\common\login.php on line 106

Warning: Cannot modify header information - headers already sent by (output started at c:\program files\easyphp1-8\www\gestion3\common\init_server_settings.php:83) in c:\program files\easyphp1-8\www\gestion3\index.php on line 82
Voici le code modifié :
Code :
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
/*
 * Date: Dec 19, 2004
 * Filename: init_server_settings.php
 * Author: Adam Hall
 * Description: This file intiliases the variables used in the One OrZero
 * database operations
 
/***************************************************************************
*  This program is free software; you can redistribute it and/or
*  modify it under the terms of the GNU General Public
*  License as published by the Free Software Foundation; either
*  version 2.1 of the License, or (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public
*  License along with This program; if not, write to:
*    Free Software Foundation, Inc.
*    59 Temple Place
*    Suite 330
*    Boston, MA  02111-1307  USA
*
* Copyright 2006 OneOrZero
* info@oneorzero.com
* http://www.oneorzero.com
* Developers: OneOrZero Team / Contributors: OneOrZero Community
****************************************************************************/
 
//*************** Constants *************************************************//
$server_settings_path = "../configuration/server_settings.php";
$root_server_settings_path = "./configuration/server_settings.php";
$website_settings_path = "../configuration/website_settings.php";
$root_website_settings_path = "./configuration/website_settings.php";
$website_settings_header = "These are the One Or Zero Website Settings\n" .
        "The Website Settings area in the One Or Zero Control Panel updates this" .
        " file.  Please do not change these values.";
$version = "1.6.5.4";
//************************Get site variable values*****************************
// set the database variables and determine path to settings file based
// file location.determine path to settings file based
// file location.
if (stristr($_SERVER['PHP_SELF'],'logout') or stristr($_SERVER['PHP_SELF'],"supporter")
or stristr($_SERVER['PHP_SELF'],'admin') or stristr($_SERVER['PHP_SELF'],'utilities')
or stristr($_SERVER['PHP_SELF'],'sla')) {
    if (file_exists($server_settings_path)){
    $ooz_server_settings = parse_ini_file($server_settings_path);
    }else{
    	printError("The server_settings.php file was not found !");
    	exit;
    }
}else{
	if (file_exists($root_server_settings_path)){
    $ooz_server_settings = parse_ini_file($root_server_settings_path);
	}else{
		printError("The server_settings.php file was not found !");
		exit;
	}
}
//*******************setup our site variables**********************************
if (!isset($_SERVER['DOCUMENT_ROOT']) OR $_SERVER['DOCUMENT_ROOT'] == ''){
	$server_path = $ooz_server_settings['document_root'];
}else{
	$server_path = $_SERVER['DOCUMENT_ROOT'];
}
$server_name = $ooz_server_settings['server_name'];
$oneorzero_web_alias = $ooz_server_settings['oneorzero_web_alias'];
$max_attachment_size = $ooz_server_settings['max_attachment_size'] * 1000000;
$file_upload_directory = $server_path . "/".$oneorzero_web_alias."/".$ooz_server_settings['file_upload_directory']."/";
$database = $ooz_server_settings['database'];
$db_host = $ooz_server_settings['db_host'];
$db_user = $ooz_server_settings['db_user'];
$db_pwd = $ooz_server_settings['db_pwd'];
$db_name = $ooz_server_settings['db_name'];
//$compress_attachments = $ooz_server_settings[compress_attachments];
//Only set the $table_prefix value if we are not using sqlite
if ($database != "sqlite") {
    $table_prefix = $ooz_server_settings['table_prefix'];
}
$sqlite_dbfile = $server_path ."/".$oneorzero_web_alias."/sqlitedatabase/".$ooz_server_settings['sqlite_dbfile'];
//adjust prefix if the alias is nothing (eg a root server install)
if ($oneorzero_web_alias == ""){
    $oneorzero_http_prefix = "http://".$server_name."/";
}else{
     $oneorzero_http_prefix = "http://".$server_name."/".$oneorzero_web_alias."/";
}
//************setup the table names and add the prefix (if applicable)********
$announcement_table = $table_prefix."announcements"; // announcement table name
$tcategories_table = $table_prefix."tcategories"; // ticket categories table
$tpriorities_table = $table_prefix."tpriorities"; // ticket priority table
$tstatus_table = $table_prefix."tstatus"; // ticket status table
$tratings_table = $table_prefix."tratings"; // ticket rating table
$users_table = $table_prefix."users"; // users table
$sgroups_table = $table_prefix."sgroups"; // supporter group table
$ugroups_table = $table_prefix."ugroups"; // users group table
$faqcat_table = $table_prefix."faqcategories"; // faq categories table
$faqsubcat_table = $table_prefix."faqsubcategories"; // faq sub-categories table
$faqs_table = $table_prefix."faqs"; // faq question and answer table
$platforms_table = $table_prefix."platforms"; // platforms table
$tickets_table = $table_prefix."tickets"; // tickets table
$settings_table = $table_prefix."settings"; // settings table
$themes_table = $table_prefix."themes"; // themes table
$time_table = $table_prefix."time_track"; // table for keeping track of time spent on a ticket
$whosonline_table = $table_prefix."whosonline"; // whosonline table
$survey_table = $table_prefix."survey"; // survey table
$kcategories_table = $table_prefix."kcategories"; // knowledge base categories table
$kbase_table = $table_prefix."kbase"; // knowledge base table that holds q & a's
$attachments_table = $table_prefix."attachments"; // attachments table
$templates_table = $table_prefix."templates"; // templates table
$kb_queries_table = $table_prefix."kb_queries"; // knowledge base queries table
$sla_track_table = $table_prefix."sla_track"; // sla tracking table
$tseverity_table = $table_prefix."tseverity"; //severity table
$tprojects_table = $table_prefix."tprojects"; //projects table
$ugroup_meta_security_table = $table_prefix."ugroup_meta_security"; //projects table
?>
GarsDuCalvados est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/07/2007, 14h37   #6
Membre Expert
 
Inscription : janvier 2005
Messages : 2 288
Détails du profil
Informations forums :
Inscription : janvier 2005
Messages : 2 288
Points : 2 287
Points : 2 287
Dans ton fichier ini 'server_settings.php' est-ce que tu as une ligne qui s'appelle 'sqlite_dbfile' ?

LEs deux autres erreurs viennent de la première, il faut donc trouver comment la régler.
koopajah est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/07/2007, 14h44   #7
Membre du Club
 
Inscription : octobre 2006
Messages : 386
Détails du profil
Informations forums :
Inscription : octobre 2006
Messages : 386
Points : 65
Points : 65
Oui j'ai un fichier qui s'appele comme celà, il y a celà dedans mais il n'y a passqlite_dbfile :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
; <?php exit; ?>
 
These are the One Or Zero Server Settings
The utility 'Setup Server' is located in your /utilities folder and is called
      setup_server.  Please do not change these values.
 
server_name = "localhost"
oneorzero_web_alias = "gestion3"
max_attachment_size = 16
document_root = ""
file_upload_directory = "gestion3"
database = "mysql"
db_host = "localhost"
db_user = "root"
db_pwd = ""
db_name = "gestion2"
table_prefix = "ooz_"
GarsDuCalvados est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/07/2007, 14h50   #8
Membre Expert
 
Inscription : janvier 2005
Messages : 2 288
Détails du profil
Informations forums :
Inscription : janvier 2005
Messages : 2 288
Points : 2 287
Points : 2 287
C'est donc de la que vient l'erreur, maintenant je ne sais pas trop ce que cette ligne doit avoir comme valeur

Mais le probleme vient du fait que tu essaies de récupérer la variable "$ooz_server_settings['sqlite_dbfile'];" alors qu'elle n'existe pas.

Essaies de commenter juste la ligne deja pour voir si ca passe ou si tu as d'autres erreurs? Ensuite il faudra regarder là où tu as trouvé ton script pour voir quelle valeur tu dois y mettre.
koopajah est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/07/2007, 14h53   #9
Membre du Club
 
Inscription : octobre 2006
Messages : 386
Détails du profil
Informations forums :
Inscription : octobre 2006
Messages : 386
Points : 65
Points : 65
Je viens de la commentée et je n'ai plus d'erreur.
Je ne sais pas si j'aurai un bug à un moment dans l'application.
Mais merci pour tes réponses rapides qui m'ont beaucoup aidé.

@++
.Matthieu
GarsDuCalvados est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 20h47.


 
 
 
 
Partenaires

Hébergement Web