# |
Dec 11th 2019, 09:30 |
gianmarxgagliardi |
? |
# |
Dec 11th 2019, 09:27 |
chechesa |
Probably in lines 266-268 from your cake config |
# |
Dec 11th 2019, 09:26 |
gianmarxgagliardi |
I had already connected the DB to cake |
# |
Dec 11th 2019, 09:23 |
gianmarxgagliardi |
```export APP_NAME="__APP_NAME__" export DEBUG="true" export APP_ENCODING="UTF-8" export APP_DEFAULT_LOCALE="en_US" export APP_DEFAULT_TIMEZONE="UTC" export SECURITY_SALT="33bf94203fd694377af79b7cf59d83a396c1bbc8d99e2747038d7888dbc1ea0a" export DB_HOST='localhost' export DB_NAME='ckcake' export DB_USERNAME='root' export DB_PASSWORD=''``` |
# |
Dec 11th 2019, 09:23 |
chechesa |
If you are using wamp, default user is 'root' with no password (empty string) and you have to add your SQL database name in DB_NAME; you can see this in http://localhost/phpmyadmin |
# |
Dec 11th 2019, 09:23 |
gianmarxgagliardi |
in .env file: |
# |
Dec 11th 2019, 09:20 |
gianmarxgagliardi |
https://pastebin.com/XuRaHyhR |
# |
Dec 11th 2019, 09:20 |
gianmarxgagliardi |
it seems to me that the settings are the same. I do not understand. |
# |
Dec 11th 2019, 09:17 |
chechesa |
In your cake project |
# |
Dec 11th 2019, 09:17 |
chechesa |
It's better in your app/Config/app.php file |
# |
Dec 11th 2019, 09:16 |
gianmarxgagliardi |
See in Mysql.php where do I find it? in cake or in wamp? |
# |
Dec 11th 2019, 09:12 |
chechesa |
You don't have access, you need to config your database user. You can see how here https://stackoverflow.com/questions/30237702/cakephp-error-connection-to-database-not-access-denied-for-user-my-app |
# |
Dec 11th 2019, 09:11 |
gianmarxgagliardi |
ok it works but i don't understand this error |
# |
Dec 11th 2019, 09:10 |
slackebot2 |
<gianmarxgagliardi> |
# |
Dec 11th 2019, 09:10 |
slackebot2 |
Cake\Console\CommandRunner->run(Array) #15 {main} ``` |
# |
Dec 11th 2019, 09:10 |
slackebot2 |
C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Console\CommandRunner.php(385): Cake\Console\Shell->runCommand(Array, true) #13 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Console\CommandRunner.php(162): Cake\Console\CommandRunner->runShell(Object(Bake\Shell\BakeShell), Array) #14 C:\wamp64\www\ctcake\bin\cake.php(12): |
# |
Dec 11th 2019, 09:10 |
slackebot2 |
C:\wamp64\www\ctcake\vendor\cakephp\bake\src\Shell\BakeShell.php(261): Bake\Shell\Task\ModelTask->listUnskipped() #11 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Console\Shell.php(517): Bake\Shell\BakeShell->all() #12 |
# |
Dec 11th 2019, 09:10 |
slackebot2 |
C:\wamp64\www\ctcake\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(1050): Bake\Shell\Task\ModelTask->_getAllTables() #9 C:\wamp64\www\ctcake\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(1065): Bake\Shell\Task\ModelTask->listAll() #10 |
# |
Dec 11th 2019, 09:10 |
slackebot2 |
C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Connection.php(390): Cake\Database\Schema\CachedCollection->__construct(Object(Cake\Database\Connection), true) #7 C:\wamp64\www\ctcake\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(1096): Cake\Database\Connection->getSchemaCollection() #8 |
# |
Dec 11th 2019, 09:10 |
slackebot2 |
#4 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Schema\Collection.php(51): Cake\Database\Driver\Mysql->schemaDialect() #5 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Schema\CachedCollection.php(41): Cake\Database\Schema\Collection->__construct(Object(Cake\Database\Connection)) #6 |
# |
Dec 11th 2019, 09:10 |
slackebot2 |
#2 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Schema\BaseSchema.php(44): Cake\Database\Driver\Mysql->connect() #3 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Dialect\MysqlDialectTrait.php(62): Cake\Database\Schema\BaseSchema->__construct(Object(Cake\Database\Driver\Mysql)) |
# |
Dec 11th 2019, 09:10 |
slackebot2 |
#0 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Driver.php(93): PDO->__construct('mysql:host=loca...', 'localhost', 'localhost', Array) #1 C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Driver\Mysql.php(105): Cake\Database\Driver->_connect('mysql:host=loca...', Array) |
# |
Dec 11th 2019, 09:10 |
slackebot2 |
[PDOException] SQLSTATE[HY000] [1045] Access denied for user 'localhost'@'localhost' (using password: YES) in C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Driv er.php on line 93 Stack Trace: |
# |
Dec 11th 2019, 09:10 |
gianmarxgagliardi |
```Possible model names based on your database: Exception: SQLSTATE[HY000] [1045] Access denied for user 'localhost'@'localhost' (using password: YES) in [C:\wamp64\www\ctcake\vendor\cakephp\cakephp\src\Database\Driver.php, line 93] 2019-12-11 09:09:31 Error: |
# |
Dec 11th 2019, 09:10 |
chechesa |
You can try with php bin/cake.php bake all |
# |
Dec 11th 2019, 09:07 |
chechesa |
I think you are using Windows, have you tried to exec with bin\cake.bat bake all ? (backward slash) |
# |
Dec 11th 2019, 09:04 |
gianmarxgagliardi |
with a new project with three tables (g.e. : https://stackoverflow.com/questions/59141547/cakephp-displays-the-id-display-table-name-from-two-different-tables-with-relati). how do I cook them all with a command from Shells ? if I go into the new project folder and give the command `bin/cake.bat bake all` returns: _"cake.bat" is not recognized as an internal or external command, an executable program or a batch file._ |
# |
Dec 11th 2019, 08:47 |
chechesa |
Is the same A record. When you create a new subdomain you can assign A record and the new IP of your new server. You can have the same domain pointing across subdomains to other servers |
# |
Dec 11th 2019, 08:40 |
jotpe |
Morning |
# |
Dec 11th 2019, 08:17 |
md.islam11 |
@conehead thanks |
# |
Dec 11th 2019, 08:16 |
gianmarxgagliardi |
morning |
# |
Dec 11th 2019, 07:44 |
dev.cyrusjayson |
Guys good morning. I have question in DNS set up (not really related to cakephp but I need to put my cakephp project there). My name domain is pointed to another IP with Type value "A Record" , host "@" and value "IP of the server". So the main domain www.sample.com is pointed to another server, now I want to create subdomain that is pointing to different server what will be my type? AAAA? CNAME? |
# |
Dec 11th 2019, 06:32 |
conehead |
"shows error" is not really helpful. Try `$this->getRequest->getData()` instead |
# |
Dec 11th 2019, 06:12 |
md.islam11 |
I just written as shortcut |
# |
Dec 11th 2019, 06:12 |
md.islam11 |
it is |
# |
Dec 11th 2019, 06:12 |
md.islam11 |
$this->request->getData('name') |
# |
Dec 11th 2019, 06:11 |
md.islam11 |
thats it. |
# |
Dec 11th 2019, 06:11 |
md.islam11 |
shows error |
# |
Dec 11th 2019, 06:11 |
md.islam11 |
that has isset(requet-get('aa')) |
# |
Dec 11th 2019, 06:11 |
md.islam11 |
all the legacy code |
# |
Dec 11th 2019, 06:11 |
niel45 |
or is the error just because of the missing $ for $this |