I'm trying to use cake bake to scaffolding my project but when it goes generate the views I get this errors messages:
Warning Error: dirname() expects parameter 1 to be string, array given in [/Applications/MAMP/htdocs/apeppers/romeo2/lib/Cake/Utility/File.php, line 89]
Warning Error: is_dir() expects parameter 1 to be a valid path, array given in [/Applications/MAMP/htdocs/apeppers/romeo2/lib/Cake/Utility/File.php, line 90]
Warning Error: basename() expects parameter 1 to be string, array given in [/Applications/MAMP/htdocs/apeppers/romeo2/lib/Cake/Utility/File.php, line 91]
Notice Error: Undefined property: File::$table in [/Applications/MAMP/htdocs/apeppers/romeo2/lib/Cake/Model/Model.php, line 1054]
Notice Error: Undefined property: File::$primaryKey in [/Applications/MAMP/htdocs/apeppers/romeo2/lib/Cake/Console/Command/Task/ViewTask.php, line 464]
Notice Error: Undefined property: File::$displayField in [/Applications/MAMP/htdocs/apeppers/romeo2/lib/Cake/Console/Command/Task/ViewTask.php, line 465]
Fatal error: Call to undefined method File::schema() in /Applications/MAMP/htdocs/apeppers/romeo2/lib/Cake/Console/Command/Task/ViewTask.php on line 468
Fatal Error Error: Call to undefined method File::schema() in [/Applications/MAMP/htdocs/apeppers/romeo2/lib/Cake/Console/Command/Task/ViewTask.php, line 468]
Before that I have some error with my database connection which I solved using sudo ln -s
in MAMP mysql bin to library mysql bin.
var_dump()
whatever’s passed todirname()
on line 89 of /Applications/MAMP/htdocs/apeppers/romeo2/lib/Cake/Utility/File.php. That may point you in the direction of what’s wrong. – Martin Bean