GeoSQL
GeoSQL

Reputation: 5

Installing CakePHP on Windows with Apache

I'm trying to install CakePHP on my Windows XP machine running Apache 2.2. I have installed the Cake folder in my doc root.

I've read the installation instructions that say to include this line in the httpd.conf file;

<Directory /path/to/cake>

Does anyone know how to translate that into Windows? I currently have the following in my conf file:

<Directory "C:/Apache/Apache2.2/htdocs/cakeapp/">

Whenever I uncomment this line it crashes Apache. I've tried switching the slashes to "\" and I tried taking the slash off the end.

Any advice?

Thanks

Upvotes: 0

Views: 8963

Answers (3)

ozanmuyes
ozanmuyes

Reputation: 806

May be useful for you to develop CakePHP under Windows, you can also use IIS7 with URL ReWrite Module. Download via Windows Web Platform Installer and read this Installing CakePHP on IIS7.

Or install WAMP/XAMPP. They sets up all configuration stuff and you good to go after set up CakePHP a little. I mean database connection etc...

After all put your CakePHP project to ".\your\apache\web\root" related to your installation directory (mine is "C:\wamp\www", and my wamp is under "C:\wamp"). Let's say your project name "asd123", then you should simply put asd123 directory to ".\your\apache\web\root\asd123" (on my computer it should be "C:\wamp\www\asd123").

In httpd.conf write that line:

<Directory "./your/apache/web/root/asd123/"> 

(mine is <Directory "c:/wamp/www/asd123/>)

Upvotes: 2

GeoSQL
GeoSQL

Reputation: 5

Turns out i had both

<Directory "C:/Apache/Apache2.2/htdocs">

and

<Directory "C:/Apache/Apache2.2/htdocs/cakeapp/">

in my conf file and it was causing the error. I commented out the first one, moved a css file and I was in business.

Upvotes: 0

Funky Dude
Funky Dude

Reputation: 3967

it's really simple and dont need to follow their instructions.

  1. extract cakephp to something like c:/htdocs/web/mysite so it looks like

    mysite/app

    mysite/cake

  2. done. provided you set apache document root to c:/htdocs/web/ you can visit your site at http://localhost/mysite

to be fancier:

  1. in httpd-vhosts.conf, add

    < VirtualHost *:80>

    ServerName mysite.local

    DocumentRoot C:/htdocs/web/mysite

    < /VirtualHost>

  2. in c:\windows\system32\drivers\etc\hosts, add

    127.0.0.1 mysite.local

  3. restart apache

  4. done. visit site at http://mysite.local

this is all based on the assumption that your apache/php/mysql is configged correctly.

Upvotes: 1

Related Questions