GithubHelp home page GithubHelp logo

akrabat / zf2-tutorial-to-go Goto Github PK

View Code? Open in Web Editor NEW
14.0 5.0 3.0 628 KB

Ready to run version of the ZF2 tutorial

License: BSD 3-Clause "New" or "Revised" License

PHP 15.23% Perl 0.31% CSS 59.30% JavaScript 25.16%

zf2-tutorial-to-go's Introduction

zf2-tutorial-to-go

Ready to run version of the ZF2 tutorial

Installation

From the command line:

$ git clone [email protected]:akrabat/zf2-tutorial-to-go.git
$ cd zf2-tutorial-to-go
$ php composer.phar self-update
$ php composer.phar install

Run

From the command line in the zf2-tutorial-to-go directory:

$ php -S 0.0.0.0:8080 -t public public/index.php

Now open http://localhost:8080 in your browser

(Note: This should be obvious, but don't use the built in PHP webserver in production!)

zf2-tutorial-to-go's People

Contributors

akrabat avatar

Stargazers

JidongLiu avatar Angus H. avatar John Vuong avatar Jean Carlo Machado avatar Oleg Abrazhaev avatar Mohammed Irfan avatar Tom Shaw avatar  avatar Daniel García avatar David Bwire avatar Alejandro Celaya avatar Bicherele avatar Alexander R Torrijos avatar Paulo Eduardo avatar

Watchers

 avatar James Cloos avatar  avatar John Vuong avatar  avatar

zf2-tutorial-to-go's Issues

Unit tests failing

When running the unit tests via command line on Windows via XAMPP, I was getting these errors:

RuntimeException: Connect Error: SQLSTATE[HY000]

I traced it back to the config/autoload/local.php file, specifically the path defined by the getcwd() function. When unit testing in the test folder, getcwd() results in an incorrect path to the SQLite database.

I fixed this problem by changing the code in local.php to:

$app_root = dirname(dirname(dirname(__FILE__)));

return array(
    'db' => array(
        'driver'   => 'Pdo',
        'dsn'      => 'sqlite:' . $app_root. '/data/album.sqlite',
    ),
);

I hope that helps someone.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.