Problème installation

97 views
Skip to first unread message

Mohand Bencherif

unread,
Sep 25, 2011, 8:15:30 PM9/25/11
to finemedia-oss
Bonjour,

Après avoir essayé plusieurs installation de temma, sur plateforme
windows 7 et linux, mais sur wampserver 2 (php5.3.5 et MySql 5.5.8),
j'obtiens uniquement des pages d'erreurs (404 pour windows, 500 pour
linux). J'ai pourtant suivi les tutoriels d'installation et de
premiers pas à la lettre.

Des modules spécifiques Apache doivent-ils être activés ? Comment
vérifier que l'URL rewritting fonctionne bien ?

De plus, comment tester ducoup la connexion à ma bdd ?

J'espère vraiment que quelqu'un pourra m'aider à fixer mon problème
car je suis impatient de commencer à développer grâce à ce framework.

Merci pour votre aide.

amaury

unread,
Sep 26, 2011, 3:35:25 AM9/26/11
to finemedia-oss
1. Est-ce que tu as créé un fichier "etc/temma.ini" correct ?
2. Est-ce que tu as créé un contrôleur et un template ?
3. Est-ce qu'il y a des informations dans le fichier "log/temma.log" ?
4. Est-ce qu'il y a des informations dans le fichier de log Apache ?

Tu utilises une configuration par virtual host Apache, ou par
fichier .htaccess ?

Mohand Bencherif

unread,
Sep 26, 2011, 5:44:43 AM9/26/11
to fineme...@googlegroups.com
Merci pour cette réponse rapide.

1. Je n'ai pas de fichier etc/temma.ini mais etc/temma.json. Son contenu:
{
"application": {
                "enableDatabase": true,
"dsn": "mysql://user:password@localhost/base", // lorsqu'il n'y a pas de password, quel format a-t-on ?
"rootController": "ArticlesController"
},
"loglevels": {
"finebase": "WARN",
"temma": "DEBUG",
"myapp": "DEBUG"
},
"errorPages": {
"500": "error500.html",
                "default": "error404.html"
}
}

2. J'ai créé le contrôleur et le template décrit sur le site (avec les actions List et Show).

3. Je joins le fichier log/temma.log

4. Un extrait bien choisir du apache error log:
[Mon Sep 26 11:34:54 2011] [notice] Parent: Created child process 3856
[Mon Sep 26 11:34:54 2011] [notice] Child 3856: Child process is running
[Mon Sep 26 11:34:54 2011] [notice] Child 3856: Acquired the start mutex.
[Mon Sep 26 11:34:54 2011] [notice] Child 3856: Starting 64 worker threads.
[Mon Sep 26 11:34:54 2011] [notice] Child 3856: Starting thread to listen on port 80.
[Mon Sep 26 11:34:57 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /articles/list HTTP/1.1 to file
[Mon Sep 26 11:34:57 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /img/header-bg.gif HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 11:34:57 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /img/content-box-bottom.gif HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 11:34:57 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /favicon.ico HTTP/1.1 to file
[Mon Sep 26 11:34:58 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /articles/list HTTP/1.1 to file
[Mon Sep 26 11:34:58 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /img/header-bg.gif HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 11:34:58 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /img/content-box-bottom.gif HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 11:34:58 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /favicon.ico HTTP/1.1 to file
[Mon Sep 26 11:34:59 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /articles/list HTTP/1.1 to file
[Mon Sep 26 11:34:59 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /img/content-box-bottom.gif HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 11:34:59 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /img/header-bg.gif HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 11:34:59 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /favicon.ico HTTP/1.1 to file
[Mon Sep 26 11:35:00 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /articles/list HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 11:35:00 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /img/header-bg.gif HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 11:35:00 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /img/content-box-bottom.gif HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 11:35:00 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /favicon.ico HTTP/1.1 to file
[Mon Sep 26 11:36:45 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon Sep 26 11:36:45 2011] [notice] Child 3856: Exit event signaled. Child process is ending.
[Mon Sep 26 11:36:46 2011] [notice] Child 3856: Released the start mutex
[Mon Sep 26 11:36:47 2011] [notice] Child 3856: All worker threads have exited.
[Mon Sep 26 11:36:47 2011] [notice] Child 3856: Child process is exiting
[Mon Sep 26 11:36:47 2011] [notice] Parent: Child process exited successfully.
[Mon Sep 26 11:36:47 2011] [warn] NameVirtualHost localhost:80 has no VirtualHosts
[Mon Sep 26 11:36:47 2011] [notice] Apache/2.2.17 (Win32) PHP/5.3.5 configured -- resuming normal operations
[Mon Sep 26 11:36:47 2011] [notice] Server built: Oct 18 2010 01:58:12
[Mon Sep 26 11:36:47 2011] [notice] Parent: Created child process 352
[Mon Sep 26 11:36:47 2011] [warn] NameVirtualHost localhost:80 has no VirtualHosts
[Mon Sep 26 11:36:47 2011] [warn] NameVirtualHost localhost:80 has no VirtualHosts
[Mon Sep 26 11:36:48 2011] [notice] Child 352: Child process is running
[Mon Sep 26 11:36:48 2011] [notice] Child 352: Acquired the start mutex.
[Mon Sep 26 11:36:48 2011] [notice] Child 352: Starting 64 worker threads.
[Mon Sep 26 11:36:48 2011] [notice] Child 352: Starting thread to listen on port 80.
[Mon Sep 26 11:36:49 2011] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/articles, referer: http://zeschool.dev/articles/list
[Mon Sep 26 11:36:49 2011] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico
[Mon Sep 26 11:36:50 2011] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/articles, referer: http://zeschool.dev/articles/list
[Mon Sep 26 11:36:50 2011] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico

J'ai choisi une installation par virtual host. Cependant, comme le virtual host proposé dans etc/apache.conf ne fonctionnait pas (page d'erreur Apache "Not found"), j'ai changé la première ligne <VirtualHost *:80> par <VirtualHost zeschool.dev> sous windows. Aucuns problèmes de virtual host sous linux.

Merci pour votre aide.

--
You received this message because you are subscribed to the Google Groups "finemedia-oss" group.
To post to this group, send email to fineme...@googlegroups.com.
To unsubscribe from this group, send email to finemedia-os...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/finemedia-oss?hl=en.


temma.log

amaury

unread,
Sep 26, 2011, 8:17:37 AM9/26/11
to finemedia-oss
Difficile d'analyser les fichiers de log que tu as envoyé. Ils
contiennent des informations concernant plusieurs requêtes
successives.
Est-ce que tu pourrais vider les logs Temma et Apache, faire une seule
requête simple, et extraire les logs ?

Au passage, je n'ai jamais essayé de connexion sans mot de passe sur
la base de données. Je ne te le conseille pas.
>  temma.log
> 405KViewDownload

Mohand Bencherif

unread,
Sep 26, 2011, 8:23:49 AM9/26/11
to fineme...@googlegroups.com
Je retente alors:

2011-09-26T09:35:00+00:00 DEBUG -temma- [index.php:38] Temma\Framework->process(): Redirecting to '/articles/list'.
2011-09-26T09:35:00+00:00 DEBUG -temma- [Framework.php:326] Temma\Request->__construct(): Request creation.
2011-09-26T09:35:00+00:00 DEBUG -temma- [Controller.php:264] Temma\Response->__construct(): Response creation.
2011-09-26T09:35:00+00:00 CRIT  -temma- Critical error: 'Bad name for controller 'C:'.'

Coté Apache:
[Mon Sep 26 14:20:04 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /articles/list HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 14:20:04 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /img/header-bg.gif HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 14:20:04 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /img/content-box-bottom.gif HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 14:20:04 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /favicon.ico HTTP/1.1 to file

Je ne sais pas si c'est assez détaillé...

amaury

unread,
Sep 26, 2011, 8:30:41 AM9/26/11
to finemedia-oss
Je pense que tout est dans la ligne "Bad name for controller 'C:'."
Le chemin qui mène au contrôleur n'est pas bon. Je n'ai pas vraiment
d'idée de ce qui peut clocher, je n'ai jamais utilisé Temma sous
Windows (mais je sais que d'autres l'ont fait sans soucis). Peut-être
un problème de configuration très spécifique ?

Peux-tu essayer sous Linux, et me donner les logs ?

On Sep 26, 2:23 pm, Mohand Bencherif <mohand.benche...@gmail.com>
wrote:
> Je retente alors:
>
> 2011-09-26T09:35:00+00:00 DEBUG -temma- [index.php:38]
> Temma\Framework->process(): Redirecting to '/articles/list'.
> 2011-09-26T09:35:00+00:00 DEBUG -temma- [Framework.php:326]
> Temma\Request->__construct(): Request creation.
> 2011-09-26T09:35:00+00:00 DEBUG -temma- [Controller.php:264]
> Temma\Response->__construct(): Response creation.
> 2011-09-26T09:35:00+00:00 CRIT  -temma- Critical error: 'Bad name for
> controller 'C:'.'
>
> Coté Apache:
> [Mon Sep 26 14:20:04 2011] [error] [client 127.0.0.1] (20023)The given path
> was above the root path: Cannot map GET /articles/list HTTP/1.1 to file,
> referer:http://zeschool.dev/articles/list
> [Mon Sep 26 14:20:04 2011] [error] [client 127.0.0.1] (20023)The given path
> was above the root path: Cannot map GET /img/header-bg.gif HTTP/1.1 to file,
> referer:http://zeschool.dev/articles/list
> [Mon Sep 26 14:20:04 2011] [error] [client 127.0.0.1] (20023)The given path
> was above the root path: Cannot map GET /img/content-box-bottom.gif HTTP/1.1
> to file, referer:http://zeschool.dev/articles/list
> [Mon Sep 26 14:20:04 2011] [error] [client 127.0.0.1] (20023)The given path
> was above the root path: Cannot map GET /favicon.ico HTTP/1.1 to file
>
> Je ne sais pas si c'est assez détaillé...
>
> ...
>
> read more »

Mohand Bencherif

unread,
Sep 26, 2011, 9:13:00 AM9/26/11
to fineme...@googlegroups.com
Sous linux tout marche bien. J'avais sauté la création du dossier templates/articles. D'où l'erreur 500.

En revanche sous windows rien n'y fait. Je pense que c'est un problème de configuration Apache, qui crée de mauvais chemin vers le controleur.

Je te remets la config du Virtual Host généré par le framework à l'installation:

<VirtualHost *:80>
   ServerName zeschool.dev
   DocumentRoot C:\wamp\www\zeschool.dev/www ## J'ai essayé de terminer par un /, et mettre des / au lieu des \
   <Directory />
           Options         FollowSymLinks
           AllowOverride   None
           DirectoryIndex  index.php
           RewriteEngine   On
           RewriteBase     /
           RewriteCond     %{REQUEST_FILENAME}     !-f
           RewriteCond     %{REQUEST_FILENAME}     !-d
           RewriteRule     ^(.*)$  index.php/$1    [L]
   </Directory>
</VirtualHost> 

Pour que ça marche (du moins pour afficher l'erreur 404), j'ai du virer du http.conf mes autres virtual host (dont localhost).

Apache error log:

Mon Sep 26 15:09:14 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /articles/list HTTP/1.1 to file, referer: http://zeschool.dev/article/list
[Mon Sep 26 15:09:14 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /img/header-bg.gif HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 15:09:14 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /img/content-box-bottom.gif HTTP/1.1 to file, referer: http://zeschool.dev/articles/list
[Mon Sep 26 15:09:14 2011] [error] [client 127.0.0.1] (20023)The given path was above the root path: Cannot map GET /favicon.ico HTTP/1.1 to file

Temma log:
2011-09-26T13:09:14+00:00 DEBUG -temma- [Framework.php:326] Temma\Request->__construct(): Request creation.
2011-09-26T13:09:14+00:00 DEBUG -temma- [Controller.php:264] Temma\Response->__construct(): Response creation.
2011-09-26T13:09:14+00:00 CRIT  -temma- Critical error: 'Bad name for controller 'C:'.'

amaury

unread,
Sep 26, 2011, 9:51:26 AM9/26/11
to finemedia-oss
Bon, je te dirais bien de travailler sous Linux, puisque tes serveurs
tourneront a priori sous Linux...


Il faudrait ajouter du log dans ta configuration Apache. Essaye
quelque chose du genre :

<VirtualHost *:80>
ServerName zeschool.dev
DocumentRoot C:\wamp\www\zeschool.dev\www
<Directory />
Options FollowSymLinks
AllowOverride None
DirectoryIndex index.php
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</Directory>
LogLevel warn
ErrorLog C:\wamp\log\zeschool.dev-error.log
CustomLog C:\wamp\log\zeschool.dev-access.log combined
RewriteLogLevel 1
RewriteLog C:\wamp\log\zeschool.dev-rewrite.log
</VirtualHost>

(il faut adapter les chemins vers les fichiers de log)
Avec ça, tu auras plusieurs fichiers de log Apache avec d'un côté les
données d'accès, de l'autre les erreurs, et enfin un fichier avec les
réécritures.


On Sep 26, 3:13 pm, Mohand Bencherif <mohand.benche...@gmail.com>
wrote:

Mohand Bencherif

unread,
Sep 26, 2011, 11:07:05 AM9/26/11
to fineme...@googlegroups.com
J'ai essayé sur un autre ordi équipé de windows 7 également et le résultat est plus encourageant car la page charge bien la liste des articles, mais le contenu s'affiche comme dans un print_r()

Voici les log erreurs:
[Mon Sep 26 17:03:17 2011] [error] [client 127.0.0.1] PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'smarty/libs/Smarty.class.php' (include_path='C:\\wamp\\www\\temma\\lib;.;C:\\php5\\pear;C:\\wamp\\www\\temma/lib;C:\\wamp\\www\\temma/controllers') in C:\\wamp\\www\\temma\\lib\\Temma\\Views\\SmartyView.php on line 5

Qu'en penses-tu ?

Merci en tout cas pour l'astuce au sujet des logs.

Mohand Bencherif

unread,
Sep 26, 2011, 11:12:23 AM9/26/11
to fineme...@googlegroups.com
Autrement sur mon ordinateur principal, j'ai une erreur intéressante dans rewrite.log:

127.0.0.1 - - [26/Sep/2011:17:09:27 +0200] [zeschool.dev/sid#1708f98][rid#2312b08/initial] (1) [perdir /] internal redirect with /index.php/C:/wamp/www/zeschool.dev/www/articles/list [INTERNAL REDIRECT]
127.0.0.1 - - [26/Sep/2011:17:09:27 +0200] [zeschool.dev/sid#1708f98][rid#2306be0/initial/redir#1] (1) [perdir /] pass through C:/wamp/www/zeschool.dev/www/index.php
127.0.0.1 - - [26/Sep/2011:17:09:27 +0200] [zeschool.dev/sid#1708f98][rid#2306ad8/initial] (1) [perdir /] internal redirect with /index.php/C:/wamp/www/zeschool.dev/www/img/header-bg.gif [INTERNAL REDIRECT]
127.0.0.1 - - [26/Sep/2011:17:09:27 +0200] [zeschool.dev/sid#1708f98][rid#2302be8/initial/redir#1] (1) [perdir /] pass through C:/wamp/www/zeschool.dev/www/index.php
127.0.0.1 - - [26/Sep/2011:17:09:27 +0200] [zeschool.dev/sid#1708f98][rid#2308ae0/initial] (1) [perdir /] internal redirect with /index.php/C:/wamp/www/zeschool.dev/www/img/content-box-bottom.gif [INTERNAL REDIRECT]
127.0.0.1 - - [26/Sep/2011:17:09:27 +0200] [zeschool.dev/sid#1708f98][rid#2330d48/initial/redir#1] (1) [perdir /] pass through C:/wamp/www/zeschool.dev/www/index.php
127.0.0.1 - - [26/Sep/2011:17:09:27 +0200] [zeschool.dev/sid#1708f98][rid#2302ac8/initial] (1) [perdir /] internal redirect with /index.php/C:/wamp/www/zeschool.dev/www/favicon.ico [INTERNAL REDIRECT]
127.0.0.1 - - [26/Sep/2011:17:09:27 +0200] [zeschool.dev/sid#1708f98][rid#2300af8/initial/redir#1] (1) [perdir /] pass through C:/wamp/www/zeschool.dev/www/index.php


il fait une redirection sur : /index.php/C:/wamp/www/zeschool.dev/www/articles/list
ça doit être la raison pour laquelle il considère C comme un controlleur, non?

amaury

unread,
Sep 26, 2011, 11:54:35 AM9/26/11
to finemedia-oss
Mmh... on dirait une erreur assez fréquent dans la bibliothèque
Smarty. Il faut parfois créer un lien symbolique, qui pointe de 'lib/
smarty/libs' vers 'lib/smarty'. Commence d'abord par vérifier que la
bibliothèque Smarty est bien présente dans le répertoire "lib" de ton
projet Temma.


On Sep 26, 5:07 pm, Mohand Bencherif <cay...@gmail.com> wrote:
> J'ai essayé sur un autre ordi équipé de windows 7 également et le résultat
> est plus encourageant car la page charge bien la liste des articles, mais le
> contenu s'affiche comme dans un print_r()
>
> Voici les log erreurs:
> [Mon Sep 26 17:03:17 2011] [error] [client 127.0.0.1] PHP Fatal error:
>  require_once() [<a href='function.require'>function.require</a>]: Failed
> opening required 'smarty/libs/Smarty.class.php'
> (include_path='C:\\wamp\\www\\temma\\lib;.;C:\\php5\\pear;C:\\wamp\\www\\te mma/lib;C:\\wamp\\www\\temma/controllers')

amaury

unread,
Sep 26, 2011, 11:55:33 AM9/26/11
to finemedia-oss
Oui, la redirection est incorrecte, c'est pour cela qu'il croit que
"C" est un contrôleur.
En l'état actuel des choses, je ne peux t'aider plus tant que tu
restes sous Windows. Désolé.

Mohand Bencherif

unread,
Sep 26, 2011, 11:57:45 AM9/26/11
to fineme...@googlegroups.com
Pour régler le problème d'affichage sur le second ordinateur, j'ai modifié le fichier lib/temma/views/smartyView.php et à la ligne 5 j'ai remplacé require_once('smarty/libs/Smarty.class.php') par require_once('smarty/Smarty.class.php').

Cela a l'air de marcher niquel (est ce que je n'ai pas cassé quelque chose qui me servira pour la suite?)

Je vais essayer de comprendre maintenant pourquoi ça marche sur un ordinateur, mais pas sur l'autre.

amaury

unread,
Sep 26, 2011, 12:16:38 PM9/26/11
to finemedia-oss
Non, ta modification du chemin d'inclusion Smarty ne devrait rien
casser par ailleurs.

Concernant les différences de comportements d'un Windows à un autre,
cela peut venir d'une différence de configuration du module
mod_rewrite.

On Sep 26, 5:57 pm, Mohand Bencherif <mohand.benche...@gmail.com>
wrote:
> Pour régler le problème d'affichage sur le second ordinateur, j'ai modifié
> le fichier lib/temma/views/smartyView.php et à la ligne 5 j'ai remplacé
> require_once('smarty/libs/Smarty.class.php')
> par require_once('smarty/Smarty.class.php').
>
> Cela a l'air de marcher niquel (est ce que je n'ai pas cassé quelque chose
> qui me servira pour la suite?)
>
> Je vais essayer de comprendre maintenant pourquoi ça marche sur un
> ordinateur, mais pas sur l'autre.
>
Reply all
Reply to author
Forward
0 new messages