MySQL 5.7.5+ changed the way GROUP BY behaved in order to be SQL99 compliant (where in previous versions it was not).
There is a good overview of the changes here.
Unfortunately, this affects some core queries that Craft uses when fetching elements.
The good news is that this has been fixed already in Craft 3 since we refactored the way that elements ...
Updated 05/03/16: I had a struggle getting this to work with Homestead 5.2. The MySQL error everyone else is seeing, as well as mcrypt error, as mycrypt is not installed by default in Vagrant box laravel/homestead 0.4.1 (Fixed in vagrant box laravel/homestead 0.4.2 — See answer history for 0.4.1 how-to).
So, steps to success:
vagrant ssh into your box
To fix this I have created a .my.cnf in my home-directory with the following content:
After playing with this a little further it seems the unixSocket setting is necessary to get this working so I added:
'unixSocket' => getenv('DB_SOCKET')
To config/db.php and then added:
To my .env file. After that, the installation will go through using the CLI. Perhaps there's still an option that ...
For UBUNTU 16.04 LTS
sudo nano my.cnf
add these two lines:
save file and reset your computer.
We have the same problem. MySQL version (Ver 14.14 Distrib 5.7.9, for osx10.11 (x86_64) using EditLine wrapper)
Had problems SQL statement: SQLSTATE: Syntax error or access violation: 1055 Expression and by adding the code at my.cnf file resolved it for me:
Very likely it cannot connect to the database; that's typically what the 503 error is about:
...so check the credentials in your .env file, and make sure that the version of MySQL that your website is using is the internal MAMP MySQL, and not the system-wide MySQL (if any).
This video may help you: Installing Craft CMS v3 with ...
On the main MyPluginPlugin class, there is a method you can override called onAfterInstall(). Which will run after your plugin is installed.
To create those records, you can place the following code into the method:
public function onAfterInstall()
$record = new MyPlugin_ExampleRecord;
Others have said what the problem is, but in the interest of clarity for future readers...
Cause: The database is expecting a newer version of Craft's filesystem than you have.
Solution: Replace the /app folder with one from a fresh Craft download and visit your admin trigger URL
I was just confronted with this too. You most likely need to specify the unixSocket attribute for the MAMP Pro database. Take a look at my problem and solution at Craft CLI RC1 Connectivity Issues with MAMP Pro. Though if you're not able to get it working at all even manually I would definitely suggest resetting your root password in MAMP Pro as well.
So the way I'd recommend doing it is that you use .gitignore to exclude your /vendor directory from the repo; a good starter .gitignore file can be found here: https://github.com/nystudio107/craft-scripts/blob/master/example.gitignore
Then you'll work on it in local dev, update Craft/plugins in local dev, and on deploy to production have it do composer ...
Finally figured out how to edit this index.php file if you're not able to point your document root to the web folder, or if you are forced to put craft in the folder private_html that shared hosters tend to use (or any other given structure above root)
In the index.php file you only need to edit this line:
The short answer is, we should probably update that :)
The long answer is:
The homepage is a “Single” section, and originally, Singles couldn’t have dynamic Title fields like Channel and Structure sections; their titles were static, based on the section’s name. So in this case, that Homepage entry’s title was “Homepage”, and the only way to change that ...
The specific directive to disallow the /craft/ directory isn't necessary if your craft folder is below the webroot.
However, it's good practice to have a robots.txt for each site, so I don't recommend deleting it altogether. You can change the directives to fit whatever robots criteria you need for your site. (For example, if you launch a beta site, you'd ...
In case it helps someone, my issue was the permissions for the root index.php file...It was 666 (writeable by group) and when I switched that file permissions to 644, the installation was able to move forward.
MySQL 5.7.5+ changed the way GROUP BY behaved in order to be SQL99 compliant (where in previous versions it was not). Either modify the existing mysql queries to be compatible to the new mysql version or make mysql behave as in previous versions , by executing the below queries on the mysql .
SET sql_mode = ''; // current client
SET GLOBAL sql_mode = '';...
The proper fixes have already been answered here; but I'd like to note that another fix is to use MariaDB instead of MySQL. It's a drop-in replacement for it, it's more performant for a number of metrics, and it's created by the original author of MySQL.
Give it a go; you won't regret it.
It depends what you are most comfortable with. PHP and Apache are shipped with macOS by standard but you'd still need to install and configure MySQL (or MariaDB etc), along with manual virtual host configuration.
MAMP makes it much easier but sandboxing it all in one easy to install package with a GUI so if you're not comfortable with the command line and ...
First, I can positively confirm I have Craft running on two not hosted, local servers - one a Ubuntu 14.04 (well, Mint) installation, and one a Windows box using Uniserver. Not sure quite what you're reading - and I think you might be misinterpreting what you're reading - but just about every dev around here will have a local install they work on, one way ...
Talked with Justin via DM on the Craft Slack. As per that discussion, here was the solution:
The Valet docs are extremely misleading. When detailing how to use the park command, they list running laravel new blog as one of the steps. This command has to do with creating a Laravel site and is not necessary at all (and in fact, as seen in this instance, ...
I faced this problem when I upgraded MySQL to version >= 5.7.5 and I'v fixed it by following these steps:
SSH into your server.
Add sql-mode="" to your MySQL config:
echo -e '[mysqld]\nsql-mode=""' | tee --append /etc/mysql/conf.d/craft.cnf > /dev/null
Restart MySQL service:
service mysql restart
Note: you might need to add sudo to those commands.
I'm not sure if this helps, but here is how I (attempt) to manage deployments/installs.
I first create a user so I'm not using the root account. I tie that user to the apache user group. We'll call him 'user1'.
I use beanstalk to deploy, and the deployment credentials are for 'user1'.
Once all of the files have deployed for the first time, I'll log into ...
Thanks for the advice guys. It's helped me rule out the directories being an issue (sort of). Turns out that I was able to access the files in the craft directory all along. My issue related to the database settings.
Typically, the 'server' setting in the 'craft/config/db.php' folder is set to 'localhost'. But for GoDaddy you need to use your hostname. Get ...