CakePHP 3.0.2 installation

I ran into trouble setting up authentication with CakePHP 2.6.2. Given the choice between two branches, I usually choose the newer one. I decided it would be a good time to install CakePHP 3.0.2. There are some issues to keep in mind.

The composer file that was present at the end of April 2015 does not give a complete install. It chokes at the composer file for cakephp/migrations. For some reason, it can’t read what looks like a valid constraint string: “>=0.4.2 < 1.0”. The string looks fine, but I still decided to download the zipped version of the installer and move the vendor folder over to the original installed location by hand.

I then connected the install to my git application. I noticed that it connects to the original masters run by the CakePHP group. I need to remember not to push my changes to them, but to my own repository.

I opened the default CakePHP 3 page, in this case, bookmarker/index.php and saw a blank page. I forgot that I needed to set up a config/app.php page, which I did.

I saw a page with what I’m guessing is the CakePHP default style, with error messages about an inability to write to log files. I remembered that I had to allow write permissions to the tmp folder, so I did that. For OS X 10.9, try “sudo chgrp -R _www tmp; sudo chmod -R g=rwx tmp” inside the directory holding the Cake 3 files.

The default page appears, with more messages. I needed to add a salt value to config/app.php. (Done.) CakePHP could not connect to the database. I created the databases needed for the bookmarker tutorial applications and added that info to config/app.php. Once that new file was read, I finally saw the default page with no errors.

I ran through the basic tutorial and followed through to the authentication section. Authentication and authorization seem to be working, finally. This is good.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s