Bonsoir,
Je viens poster sur ce forum car je rencontre des soucis dans la mise en place d'un plugin de commentaire sur cakephp 2.6.2, sur mac yosemit.( Je ne suis pas encore trés familier de l'environnement mac os).
J'ai voulu intégrer ce plugin de commentaire au site sur lequel je travail actuellement, mais arrivé à l'étape :
-cake schema create --plugin=Comment
de l'installation plusieurs erreurs apparaissent et je n'arrive pas à les résoudre et comprendre pourquoi ce qui se passe.
Aprés la ligne "cake schema create --plugin=Comment", voilà ce qui est retourné :
Warning: strtotime(): 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 /Users/monmacbook/Documents/web/cakephp/sites_cake/cakephp2.6.2-tppt/lib/Cake/Cache/CacheEngine.php on line 60
Warning: strtotime(): 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 /Users/monmacbook/Documents/web/cakephp/sites_cake/cakephp2.6.2-tppt/lib/Cake/Cache/CacheEngine.php on line 60
Welcome to CakePHP v2.6.2 Console
---------------------------------------------------------------
App : monmacbook
Path: /Users/monmacbook/
---------------------------------------------------------------
Cake Schema Shell
---------------------------------------------------------------
Warning Error: include_once(/Users/monmacbook/Config/database.php): failed to open stream: No such file or directory in [/Users/monmacbook/Documents/web/cakephp/sites_cake/cakephp2.6.2-tppt/lib/Cake/Model/ConnectionManager.php, line 67]
Warning Error: include_once(): Failed opening '/Users/monmacbook/Config/database.php' for inclusion (include_path='.:') in [/Users/monmacbook/Documents/web/cakephp/sites_cake/cakephp2.6.2-tppt/lib/Cake/Model/ConnectionManager.php, line 67]
Error: The datasource configuration "default" was not found in database.php
#0 /Users/monmacbook/Documents/web/cakephp/sites_cake/cakephp2.6.2-tppt/lib/Cake/Model/ConnectionManager.php(91): ConnectionManager::_getConnectionObject('default')
#1 /Users/monmacbook/Documents/web/cakephp/sites_cake/cakephp2.6.2-tppt/lib/Cake/Console/Command/SchemaShell.php(316): ConnectionManager::getDataSource('default')
#2 /Users/monmacbook/Documents/web/cakephp/sites_cake/cakephp2.6.2-tppt/lib/Cake/Console/Command/SchemaShell.php(250): SchemaShell->_create(Object(CommentSchema), NULL)
#3 /Users/monmacbook/Documents/web/cakephp/sites_cake/cakephp2.6.2-tppt/lib/Cake/Console/Shell.php(444): SchemaShell->create()
#4 /Users/monmacbook/Documents/web/cakephp/sites_cake/cakephp2.6.2-tppt/lib/Cake/Console/ShellDispatcher.php(209): Shell->runCommand('create', Array)
#5 /Users/monmacbook/Documents/web/cakephp/sites_cake/cakephp2.6.2-tppt/lib/Cake/Console/ShellDispatcher.php(66): ShellDispatcher->dispatch()
#6 /Users/monmacbook/Documents/web/cakephp/sites_cake/cakephp2.6.2-tppt/lib/Cake/Console/cake.php(54): ShellDispatcher::run(Array)
#7 {main}
mbp-elnk:~ monmacbook$
Alors je solicite un peu d'aide pour m'éclairer,
merci
Bonjour,
le warning du timezone n'est pas bloquant.
Le path n'est sans doute pas bon ..
A corriger par :
Path:/Users/monmacbook/app
cordialement
Antho
Je te remercie antho07 de m'avoir répondu aussi rapidement. J'ai en effet du changer le path comme tu me l'avais indiqué.
J'ai aussi du rajouter une ligne a mon database.php dans app/config, :
'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',
pour donner ceci (pr ceux a qui ca arriverait) :
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'login',
'password' => 'password',
'database' => 'database.name',
'prefix' => '',
'encoding' => 'utf8',
'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',
);
}