I'm trying to bake my models, controllers and views using 'cake bake'.I entered default when it promp for database configuration. Then the command prompt displays an error message saying
Database connection "My sql" is missing or could not be created.
I have edit the path to environment variables as follow;
;C:\wamp\bin\php\php5.4.3;C:\wamp\www\fit or fat\lib\Cake\Console;
I have no idea what about what I should do.
Open the CakePHP site in your browser and go to Documentation / Book / Getting Started/ CakePHP Database Configuration. You'll find an explanation on what file you need to edit to provide your database credentials.
Related
I am using the ready package as a base, I have done all steps in the readme.md file and was able to login as "einstein" user. So all seems to be configured correctly.
Later I have changed the credentials for the ldap server, which is using Active Directory.
While runing command php artisan ldap:test i receive message that i was able to connect correctly. Laravel logs says the same, but I cannot log in to laravel app. While running the command php artisan ldap:import ldap get message that no users where find
In the log file i see something like this:
[2021-04-28 23:04:08] local.INFO: LDAP (ldap://domain.pl:389) - Operation: Search - Base DN: cn=username#domain.pl,ou=Users,dc=domain,dc=pl - Filter: (&(objectclass=top)(objectclass=person)(objectclass=organizationalperson)(objectclass=inetorgperson)(uid=username)) - Selected: (entryuuid,*) - Time Elapsed: 737.37
Have anyone had the same issue with the ldaprecord that he was able to connect to domain but wasn't able to authenticate to an app ? And was able to solve that ?
UPDATE: i've found that auth.php is using wrong User model, it was using OpenLdap not Active directory, changed that but result is still the same
Problem solved, to make it work with AD you need to:
in the auth.php file switch model to ActiveDirectory
in login controller change in the credentials function have to change 'uid' key to 'sameaccountname'
I'm trying to create my first SilverStripe website following this tutorial.
So far I have created my website and configured my .env page.
# DB credentials
SS_DATABASE_CLASS="MySQLDatabase"
SS_DATABASE_SERVER="localhost"
SS_DATABASE_USERNAME="root"
SS_DATABASE_PASSWORD=""
SS_DATABASE_NAME="SS_examples"
SS_ENVIRONMENT_TYPE="dev"
I'm not sure entirely how the database is created when creating a site. I checked my databases and I do not have one for it. I can make one manually but I wasn't sure if I should and list it under SS_DATABASE_NAME, or if it will auto-create the db.
I'm assuming this is why when I visit my local site localhost/SSexample/public I get an error saying "The website server has not been able to respond to your request".
Am I missing a step in setting up the site or should I manually create a db named SS_examples?
on a side note my apache server is set up with xampp and my SilverStripe project is in C:/xamp/htdocs.
Steps I took to create site:
Built site in C:\xampp\htdocs by running: composer create-project silverstripe/installer SSexample
Visited my project by going to localhost/SSexample/public
created .env file as listed above
ERROR LOGS
[2019-12-31 22:29:22] error-log.ERROR: Uncaught Exception SilverStripe\ORM\Connect\DatabaseException: "Couldn't run query: SELECT DISTINCT "SiteConfig"."ClassName", "SiteConfig"."LastEdited", "SiteConfig"."Created", "SiteConfig"."Title", "SiteConfig"."Tagline", "SiteConfig"."CanViewType", "SiteConfig"."CanEditType", "SiteConfig"."CanCreateTopLevelType", "SiteConfig"."ID", CASE WHEN "SiteConfig"."ClassName" IS NOT NULL THEN "SiteConfig"."ClassName" ELSE 'SilverStripe\\SiteConfig\\SiteConfig' END AS "RecordClassName" FROM "SiteConfig" LIMIT 1 Table 'ss_lessons.siteconfig' doesn't exist" at C:\xampp\htdocs\SSlessons\vendor\silverstripe\framework\src\ORM\Connect\DBConnector.php line 64 {"exception":"[object] (SilverStripe\\ORM\\Connect\\DatabaseException(code: 0): Couldn't run query:\n\nSELECT DISTINCT \"SiteConfig\".\"ClassName\", \"SiteConfig\".\"LastEdited\", \"SiteConfig\".\"Created\", \"SiteConfig\".\"Title\", \"SiteConfig\".\"Tagline\", \"SiteConfig\".\"CanViewType\", \"SiteConfig\".\"CanEditType\", \"SiteConfig\".\"CanCreateTopLevelType\", \"SiteConfig\".\"ID\", \n\t\t\tCASE WHEN \"SiteConfig\".\"ClassName\" IS NOT NULL THEN \"SiteConfig\".\"ClassName\"\n\t\t\tELSE 'SilverStripe\\\\SiteConfig\\\\SiteConfig' END AS \"RecordClassName\"\n\r\nFROM \"SiteConfig\"\n\r\nLIMIT 1\n\nTable 'ss_lessons.siteconfig' doesn't exist at C:\\xampp\\htdocs\\SSlessons\\vendor\\silverstripe\\framework\\src\\ORM\\Connect\\DBConnector.php:64)"} []
It seems that the installer at localhost/SSexample/public should allow you to configure your database connection settings (and create the database for you).
Getting The website server has not been able to respond to your request error means that you have a problem with webserver - is it running?
EDIT: The website server has not been able to respond to your request is actually Silverstripe's generic error 500 message.
EDIT2: one has to enable dev environment - by adding SS_ENVIRONMENT_TYPE="dev" to .env file and then access localhost/SSexample/public/dev/build to get database created and populated.
So I'm setting up a sylius project using docker and am getting an error when I first tried to load the page. The docker set up on sylius website didn't seem to work so I made my own docker files and can successfully start the docker containers. The error is below:
An exception has been thrown during the rendering of a template ("Cannot find name for "en_UK" locale code").
During the installation, sylius asks whether you want en_US or something different so I typed en_UK, presuming that was the notation required. Upon setup completion, I tried to load root page and I get the error message above. However, strangely, on the symfony toolbar on the error page it says US web store.
If anyone could help at all it would be greatly appreciated. Thank you in advance.
Possible ways:
go to localhost/admin, enter your login/password which you entered at the install moment, open Channels section, and there add change default locale/add new to locale list;
modify a <project-root>/config/services.yaml and change locale value to another;
in the worst case try to run php bin/console sylius:install command and reinstall database with a en_US at the beginning, then edit Admin section to en_UK
en_UK means "English (Ukraine)". No wonder it was missing. What you wanted was probably en_GB.
After running my Cake application locally i tried to upload it to my
remote server, configured everything properly, checked all the tables,
database access. But I couldn't solve the following error. I can't
find enough resources too.
Missing Database Table
Error: Database table acos for model Aco was not found.
Notice: If you want to customize this error message, create app/views/
errors/missing_table.ctp
I used the ACL component.
This table exists but I found this link:
CakePHP Error: Database table acos for model Aco was not found and this answer from 8vius. By thanks from all.
The answer is:
In the end the error was in my database user configuration. It seems I forgot to set CRUD permissions to the user I use to access the database and that's what gave me the error
I've downloaded the wamp server and it's online. I'm trying to install Joomla.
At page 4 I'm told Unable to connect to the database
An error has occurred:The database details provided are incorrect and/or empty.
Can anyone help me in fixing this error?
This problem has been fixed by Ocaso Protal, finaly this page ocurs
what should I put here ?Site Name? nd finaly why should i use joomla any specific properties of this product ?
Even if you use the default settings for mysql (user: root, password empty) you should put the username root in the Username field in the form that's showed in your first screenshot.
You must check these things before
Setup a blank database from the Cpanel/Mysql Admin
Fix the username/password and user permissions on this database
Run Joomla... and give it the above credentials + localhost
Make sure you have 777 or adequate permissions otherwise some errors may occur#
If im not mistaken the default account for wamp/xamp myqsl is
user: "root"
password: ""
//Password is null - do not write nothing inside