Rio Bautista’s TechLog

Tech solutions worth remembering

Installing CakePHP

I’m now setting up CakePHP for my PharmaSIS website. I haven’t tried this before so I’m logging my every move:

  1. Using Eclipse I checked out a copy of CakePHP from https://svn.cakephp.org/repo/trunk/cake/ and selected 1.2.x.x
  2. I’m now trying to get the initial page running:
    1. Added a virtual host to my Apache httpd.conf file:

      <virtualhost 80="">
      ServerName demo.PharmaSIS
      DocumentRoot "c:/projects/cake/CakePHP12/app/webroot"
      DirectoryIndex index.php
      <directory "c:/projects/cake/CakePHP12/app/webroot">
      AllowOverride All
      Allow from All
      </directory>
      </virtualhost>

    2. Added an entry in my /etc/hosts:
      • 127.0.0.1 demo.PharmaSIS
  3. Restarted Apache
  4. Accessed http://demo.PharmaSIS and got to the default CakePHP page
    1. There’s this notice which I’ll try to figure out that says:
      “Notice (1024): Please change the value of ‘Security.salt’ in app/config/core.php to a salt value specific to your application [CORE\cake\libs\debugger.php, line 535]”
    2. Changed my security salt to some random string by edting app/config/core.php
  5. That removed the Security.salt notice but it’s now telling me I don’t have a database configuration file
    1. Renamed the database.php.default to database.php and edited the settings to:

      class DATABASE_CONFIG {
      var $default = array(
      'driver' => 'mssql',
      'persistent' => false,
      'host' => 'mssql12.mssqlserver',
      'port' => '',
      'login' => 'myusername',
      'password' => 'mypassword',
      'database' => 'thedatabasename',
      'schema' => '',
      'prefix' => '',
      'encoding' => ''
      );
      }

    2. I’m not able connect to the database.
    3. Apparently, there’s nothing like a default port so I had to specify the port (using the MSSQL default 1433)
  6. The page is showing all green and seem to be correct.

That ends the installation portion of this session. Next thing I’ll do is probably to experiment on authentication.

Advertisements

January 8, 2008 - Posted by | CakePHP, php

No comments yet.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: