I’m new to CakePHP and I’m just trying to go through the examples. Everything was fine on the CMS tutorial until I had to use “cake bake”. The command spews an HTML 500 error from the server directly onto my console. I think maybe I’m missing something basic here.
I have done this so far:
- Made bin/cake executable
- Modified cake to use php7.1 (exec php > exec php7.1) – can’t change my /usr/bin/php symlink
- Run ./bin/cake help
At this point, I noticed that “bake” wasn’t listed as a command? Is it supposed to be?
I assumed so. I tried installing a bake module with:
php7.1-cli composer.phar require --dev cakephp/bake:~1.0
This seemed to work fine, although from the composer.json file it appeared I had the required versions of cakephp and other items. So, not sure why it didn’t work in the first place. I can’t run composer directly.
This is where I’m stuck. Not sure if I am going down the correct rabbit hole. When I run “bin/cake bake” I do not get anything resembling what the tutorial show. I get raw html on my console.
The hosting company I’m using is 1and1.com. I’ve searched the CakePHP forums and 1and1 and can’t find anything on this issue.
–Thanks in advance
First, on shared hosting don’t bake. Bake on the dev server and upload your project that’s all working. I had godaddy for a while and just uploaded all.
That’s a good point. I have my own local CentOS system, so I could do it there. But I’m using a subdomained site with the hosting company, so it really is my dev system.
I understand ‘cake bake’ is a development tool. If that’s the point of (the hosting company) distributing cake without bake, then I suppose I have to take that up with them. I was looking for a simple solution for development on-the-road.
Thanks for the comment.
You can have a wamp or lamp stack on a laptop.
on some systems it helps to make php execute php file,
php bin/cake.php
Yep, I been down that road long ago, maybe will try it again. I have an Apache server and a postgresql db on my win10 laptop just had trouble finding a satisfactory php windows solution. I was excited when I found this cheap ($60/yr, first year) hosting deal with “unlimited” databases and subdomains (no, I am not affiliated with them). Thanks again.
Yep, did that. Thanks anyway.
If your looking for development on the road have you tried something like putting your code in dropbox? Or if you want your own solution, try next cloud. Then you can have your files synced across all your systems. Have you heard of vagrant? I highly recommend it over something like wamp for a development environment. I forked an instance that I use and you can find it here. https://github.com/JustAWebDev/lamp-vagrant
It’s basically a LAMP stack that runs a virtual machine on your system. You have to install virtual box and vagrant. Then you can clone the above repository and run “vagrant up” from that cloned directory. You can ssh into the VM to run things like bake, just like you would on a real linux server.