Access denied, forbidden after starting CakePHP or Kohana with .htaccess.

After renaming example.htaccess on Kohana directly after copying the files to the www server, you receive an ‘access denied’ of ‘forbidden’.

image

The solution is to enable FollowSymlinks in the httpd.conf.

So, in the Uniform Server you go to the Server Configuration:

image

Click Apache:

image

Edit httpd.conf

image

Somewhere around line 292 add FollowSymlinks:

image

Save. Stop Apache and Start Apache. And lo and behold:

image

PHP MVC for an ASP.NET MVC developer part 1. Setting the stage.

Jacqie has a little LAMP!

What if the customer is hosting their sites on a LAMP server? Let’s write some PHP! This has a few advantages over IIS hosting. It is super affordable and available. However. Can I use the MVC pattern in PHP? Can I do OO in PHP? Can I have a layered architecture?

Searching DuckDuckGo for PHP MVC frameworks returns lots of results and it seems there are many PHP MVC Frameworks. See this list, for example.  Now which one to choose? I want to be up speed as soon as possible. And that said, how to get that the PHP/MySQL stuff onto my Windows laptop?

Which PHP MVC Framework?

The PHP MVC framework I will use, should have a. enough documentation, b. support the latest and the greatest PHP version and c, be awesome. My winners are: CakePHP, Kohana (which is not that well documented and also pretty hard to use re the web but their website looks awesome) and YII.

Install the LAMP on Windows

To get a WAMP running, I picked the Uniform Server because it’s a small download and supports the latest PHP (5.4) and MySQL. It is also highly configurable and supports vHosts and stuff like that.

Download, extract and save it somewhere directly under the root of a drive. (D:)

image

Next, click Start_as_program.exe and start Apache and MySQL:

image

If that doesn’t work, just make sure you stop other webservers you might be running (run services.msc). The Uniform Server defaults to port 80.

When the services are started you see the default server displayed. The website live in the /www folder. Here you can put your php files.

PHP IDE

So, what is the best PHP editor/IDE then? I installed Netbeans, because it is easier than Eclipse, according to this article and I want to get up and running asap.

And what’s so funny. Netbeans supports Git. Look at this:

image

Next time, you make coffee and I’ll be sure we have some CakePHP.