Bonjour,
J'ai entrepris (pour apprendre aussi PHP5 & OOP) l'écriture d'un script de validation de forme dans un VirtualHost bien séparé de mon site.
Voici ce qu'il me donne:
Ceci ne représente pas le design écran mais son contenu !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 Validation de votre formulaire Le champ[question] ,Vous êtes obligé(e) de faire un choix ! Le champ[secretanswer] doit avoir une longueur comprise entre 5 et 15 caractères ! Le champ[type] ,Vous êtes obligé(e) de faire un choix ! Le champ[email] doit avoir une longueur comprise entre 8 et 30 caractères ! Le champ[nom] doit avoir une longueur comprise entre 3 et 30 caractères ! Le champ[prenom] doit avoir une longueur comprise entre 3 et 30 caractères ! Le champ[pass] doit avoir une longueur comprise entre 6 et 8 caractères ! Le champ[numero] doit avoir une longueur comprise entre 1 et 5 caractères ! Le champ[zip] doit avoir une longueur comprise entre 5 et 5 caractères !Et ma foi, à part qlques validation et regexp qui sont présentes pour la décoration, il se comporte +/- comme je le souhaite.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 formulaire Prénom Nom Email Conf Email Phone Password Conf Password N° Bte Zip Date Naissance CEE nonoui Question secrète Pays Réponse Type PhotoRandoVoyage Text
Vous trouverez le code en pièce attachée !
Lorsque je l'intégre à mon site, là c'est la cata....
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 dbInst error diagnostic ================ Message: Data TYPE[] doesn't exist ! - File: F:\WebSites\jecrapahute\class\validate.php - Line: 245 Trace: ------ => File : F:\WebSites\jecrapahute\class\validate.php => calling instruction: 201 => error class : Field => error function : execute
et je sais c'est lourd, j'ai mis en gras ce qui me semblait suspicieux dans le log php !
Qui pourrait m'aider à y voir un peu + clair... ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166 [16-Oct-2010 10:59:26] PHP 6. user_error() F:\WebSites\jecrapahute\config\myPage.php:110 [16-Oct-2010 10:59:26] PHP Warning: Missing argument 7 for Password::__construct(), called in F:\WebSites\jecrapahute\doc\do_chgpassword.php on line 22 and defined in F:\WebSites\jecrapahute\class\validate.php on line 552 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP Notice: Undefined variable: classs in F:\WebSites\jecrapahute\class\validate.php on line 553 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP Notice: Trying to get property of non-object in F:\WebSites\jecrapahute\class\validate.php on line 193 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP Notice: Trying to get property of non-object in F:\WebSites\jecrapahute\class\validate.php on line 194 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP Notice: Trying to get property of non-object in F:\WebSites\jecrapahute\class\validate.php on line 195 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP Notice: Trying to get property of non-object in F:\WebSites\jecrapahute\class\validate.php on line 196 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP Notice: Trying to get property of non-object in F:\WebSites\jecrapahute\class\validate.php on line 197 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP Warning: get_class() expects parameter 1 to be object, string given in F:\WebSites\jecrapahute\class\validate.php on line 209 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP 9. Field->execute() F:\WebSites\jecrapahute\class\validate.php:201 [16-Oct-2010 10:59:26] PHP 10. get_class() F:\WebSites\jecrapahute\class\validate.php:209 [16-Oct-2010 10:59:26] PHP Notice: Trying to get property of non-object in F:\WebSites\jecrapahute\class\validate.php on line 210 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP 9. Field->execute() F:\WebSites\jecrapahute\class\validate.php:201 [16-Oct-2010 10:59:26] PHP Notice: Trying to get property of non-object in F:\WebSites\jecrapahute\class\validate.php on line 211 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP 9. Field->execute() F:\WebSites\jecrapahute\class\validate.php:201 [16-Oct-2010 10:59:26] PHP Notice: Trying to get property of non-object in F:\WebSites\jecrapahute\class\validate.php on line 212 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP 9. Field->execute() F:\WebSites\jecrapahute\class\validate.php:201 [16-Oct-2010 10:59:26] PHP Notice: Trying to get property of non-object in F:\WebSites\jecrapahute\class\validate.php on line 213 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP 9. Field->execute() F:\WebSites\jecrapahute\class\validate.php:201 [16-Oct-2010 10:59:26] PHP Notice: Trying to get property of non-object in F:\WebSites\jecrapahute\class\validate.php on line 214 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP 9. Field->execute() F:\WebSites\jecrapahute\class\validate.php:201 [16-Oct-2010 10:59:26] PHP Notice: Use of undefined constant String - assumed 'String' in F:\WebSites\jecrapahute\class\validate.php on line 220 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP 9. Field->execute() F:\WebSites\jecrapahute\class\validate.php:201 [16-Oct-2010 10:59:26] PHP Notice: Use of undefined constant Password - assumed 'Password' in F:\WebSites\jecrapahute\class\validate.php on line 223 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. Skeleton->displayPage() F:\WebSites\jecrapahute\class\newSkelt.php:324 [16-Oct-2010 10:59:26] PHP 5. require_once() F:\WebSites\jecrapahute\class\newSkelt.php:405 [16-Oct-2010 10:59:26] PHP 6. require_once() F:\WebSites\jecrapahute\config\myPage.php:179 [16-Oct-2010 10:59:26] PHP 7. Password->__construct() F:\WebSites\jecrapahute\doc\do_chgpassword.php:22 [16-Oct-2010 10:59:26] PHP 8. Field->__construct() F:\WebSites\jecrapahute\class\validate.php:553 [16-Oct-2010 10:59:26] PHP 9. Field->execute() F:\WebSites\jecrapahute\class\validate.php:201 [16-Oct-2010 10:59:26] PHP Fatal error: Catching[connect error in File: F:\WebSites\jecrapahute\class\validate.php] - line: [201] in F:\WebSites\jecrapahute\class\Exception.php on line 102 [16-Oct-2010 10:59:26] PHP Stack trace: [16-Oct-2010 10:59:26] PHP 1. {main}() F:\WebSites\jecrapahute\chgpassword.php:0 [16-Oct-2010 10:59:26] PHP 2. setScreen->execute() F:\WebSites\jecrapahute\chgpassword.php:13 [16-Oct-2010 10:59:26] PHP 3. Skeleton->execute() F:\WebSites\jecrapahute\class\setScreen.php:136 [16-Oct-2010 10:59:26] PHP 4. myException->display_exception() F:\WebSites\jecrapahute\class\newSkelt.php:332 [16-Oct-2010 10:59:26] PHP 5. user_error() F:\WebSites\jecrapahute\class\Exception.php:102
C'est le même code de validation dans les 2 contextes, alors vous me direz c'est la site alors... pas sûr...
En tout cas grand merci de votre aide
Partager