My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for

English, Русский, Deutsche, French, Italiano, Türkçe, Nederlandse


phpDays - flexible php5 framework based on the MVC and ORM design patterns.

Start now

  • About the project (features)
  • Changelog (changes between project versions)
  • Install the framework on your server and then configure a new project
  • Upgrade an application from a previous version
  • Quick start to get your first application up and running
  • Answers to your questions
  • All pages in English

Every day use

  • MVC - basic concepts necessary to work with the framework
  • Library class reference descriptions
  • Ajax support in your applications
  • Multisite - manage many sites from one framework installation

For project members

EnInstall  
Install the framework and create a new project.
Lang-En
Updated Dec 14, 2009 by anton.danilchenko

Download

Go to the download page and select the latest stable version (alpha, beta, RC - are not stable!).

ATTENTION Use phpdays 1.1 beta instead of phpdays 1.0 final release. In phpdays 1.0 final release we found many critical bugs, which were fixed in phpdays 1.1 beta.

Check requirements

On your server (local and real) should be installed:

  • Apache server
  • PHP 5.2.6 or newer with modules: php5-mysql, php5-sqlite, pdo, pdo-mysql, pdo-sqlite (also recommend: php5-syck, php5-curl, php5-xdebug, php-apc, php5-memcache)
  • Database server (supported MySQL, MSSQL, Postgres, Oracle, SQLite)

Install framework

  • unzip the archive
  • upload directory lib to your server (we recommend place directory not in document_root directory, for example to /var/lib)
  • configure Apache server for use /var/www (in Linux) or D:/server/www (in Windows) as document_root

Create new application

  • set option AllowOverride All in Apache configuration
  • FOR LINUX SERVER execute command sudo a2enmod rewrite && sudo /etc/init.d/apache2 restart (enable Apache mod_rewrite)
  • go to apps directory
  • copy new directory to you document_root (to /var/www)
  • rename new directory to real project name (for example use myblog)
  • FOR LOCAL SERVER create .htaccess file in /var/www with content
  • # no scan directories
    DirectoryIndex index.php
    Options -Indexes
    # handle all queries within main script
    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteRule ^index.php$ index.php [L]
      RewriteRule ^/?([^/]+)(.*)$ $1/public/$2 [NC,L]
    </IfModule>
  • FOR LOCAL SERVER create index.php file in /var/www with content
  • <?php
    $dirs = scandir('.');
    echo '<ul>';
    echo '<h2>Projects</h2>';
    foreach ($dirs as $dir) {
        // show directories with projects only
        if ('.' != $dir[0] AND is_dir($dir) AND is_dir("{$dir}/public"))
            echo "<li> <a href='/{$dir}'>{$dir}</a>";
    }
    echo '</ul>';
  • open /var/www/myblog/public/index.php and change path to phpDays framework and you application dir
  • require_once '/var/lib/Days/Engine.php';
    Days_Engine::run('/var/www/myblog/app/', 'development');
  • FOR LINUX SERVER change directories permission for write to: /var/www/myblog/app/system/cache, /var/www/myblog/app/system/log and /var/www/myblog/app/system/view (open terminal and type command chmod 0777 path1 path2 path3)
  • open /var/www/myblog/app/config/development.yaml and change next lines (additional info):
    • db: correct database connection info
    • url/base: path prefix after host name myblog
    • view/engine: template engine. We recommend use smarty or templum

Save files and open you application by url http://localhost/myblog.

Troubleshooting

If start page not shown - please open Firefox browser, install FireBug and FirePHP extensions. After this press F12 for open FireBug and open your site. On tab "Console" see bug messages.

Use many projects

One copy of framework used for many projects. Now we see all available projects by adress http://localhost.


Sign in to add a comment
Powered by Google Project Hosting