Well I thought I’d give you a guys a look at what’s coming up for this blog.
If you’ve used CakePHP for a while you would know that there are a fair few tutorials/guides floating around the web and even a few example applications at CakePHP but their are not very many complete guides.
So coming up in the foreseeable future, you will see a few example applications.
While the blog example at CakePHP gives you a good introduction to the framework, it doesn’t touch on many factors such as user authentication, comments, tags, categories, and an admin backend. So over the next few weeks I will start rolling out some parts to build a complete blog app.
For anybody who has built a user based website, no doubt you’ve come across the issues with timezones.
Obviously, all information stored in our databases are saved using the same timezone. Therefore what happens when users sign up that are in different timezones to your server? Luckily, once again the guys from CakePHP make this very easy for us to modify timezones.
Now first of all, the user needs to specify which timezone they are in. First, create another field in your Users Table.
There’s no doubt that CakePHP’s bake console makes the initial stages of your website extremely easy and simple, but a lot of users run into some common errors when trying to get CLI working.
From what I’ve seen the most common error is this:
‘php’ is not recognized as an internal or external command
‘cake’ is not recognized as an internal or external command
Which means your command prompt can’t find your .bat files, heres the solution for this problem
1. Go to My Computer properties
2. Click advanced tab
3. Click environmental variables
4. Edit “path” under system variables with the paths to the php and cake console folders
NOTE: You will have to change the paths to match yours, also make sure you have ; seperating each path.
Thought I’d write another little article about storing a users last logged in date. Very simple to do, first of all you must set the code below in your app_controller.php
This is my first blog post, (first of many I hope). I thought I may as well make the first post an informative one.
On my recent project of creating a forum for CakePHP, I ran into the situation of how to store user IP address’s, and then once storing them, how to get them back into the view!
With CakePHP there are a number of ways to get the users IP address, such as: