Giter VIP home page Giter VIP logo

yii-app's Introduction

yii-app

Latest Stable Version Build Status

A great way to start building your web application with the Yii PHP framework.

Setup

  • Set up Git by following the instructions here.
  • Download and install Composer by following the instructions here.
  • Run composer create-project crisu83/yii-app [APP-NAME] and composer will create the project for you.
  • Browse through the composer.json and remove the dependencies you don't need.
  • Download and install Node.js by following the instructions here here.
  • Run npm install to download the Node.js dependencies.
  • Update the configurations in app/config to suit your needs.
  • Start Grunt by running grunt and it will compile your LESS and deploy your JavaScript files.
  • Run yiic environment dev to activate the development environment.
  • You're done! Navigate to web/index.php to see your application.

Setup using Vagrant (optional)

  • Download and install Vagrant by following the instructions here
  • Download VirtualBox 4.2.12 here and run the installer
  • If you are using Windows you need to run VirtualBox as an Administrator
  • Set up Git by following the instructions here.
  • Download and install Composer by following the instructions here.
  • Run composer create-project crisu83/yii-app [APP-NAME] and composer will create the project for you.
  • Run vagrant up to set up your development environment.
  • You're done! Navigate to http://localhost:8080/index.php to see your application.

For more information on Composer, Grunt and Vagrant:

Extensions

The following extensions are part of yii-app:

Please consult the extension documentation for further information.

yii-app's People

Contributors

crisu83 avatar janisto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yii-app's Issues

provision/bootstrap.sh

I am not sure if I am the only one experiencing this, but 'vagrant up' will hang forever when it is ran for the first time. I've had to kill the process, and run it again. I believe it has to do with the fact that some items in the bootstrap.sh script have an interactive installation. I am not sure how that can be handle during 'vagrant up', but the way I've gotten around this issue is to comment out
config.vm.provision "shell", :path => "provision/bootstrap.sh"
from the Vagrant files, and run the bootstrap.sh script within the vagrant shell after typing 'vagrant ssh'.
Note that you will have to change "fmode=666" to "fmode=777" or "fmode=755" otherwise the shell script wont be executable.

Note that the interactive part is related to "sendmail", so maybe commenting it out might help avoid 'vagrant up' hanging.

Infinite *.less requests

.less extensioned file requests are looping forever.

Running on Xampp server
Installed all requirrements (node.js for less) and less configuration is setted as 'client' as default.

yii-app_bug

Email

Hi Chris,

I'm thankfully using some of your yii-extensions. Thank you for your great contribution!
I have a question about this one. The e-mail extension u use, is there any manual for it? Or at least a short description of how to begin using it?

Thanks in advance.
Greetings,
Laurens

gii, bootstrap template returns white sceen of death

Hello out there.
First of all thanks for providing yii-app.
I have used boilerplate for the last projects, but decided to change to yii-app to use yiistrap. This looks really awesome, well done!

I do have a problem (I guess I installed something wrong).
I installed it as you say in your docs, and appname/web/index.php comes up just fine. So yii is installed ok. I can login as admin etc.
So far so good.

Now I have changed the gii generator to use the bootstrap one.
I am able to create a model, but the bootstrap-crud shows two problems:

  1. If I enter the model name it says that the model does not exist or has errors. But it does work if I enter it with the applciations.modules.Modelname
  2. After creating the crud, clicking on TRY OUT gives me the content of the debug sidebar all over the screen, without any css applied, so tons of text. there is no error message at all displayed. I have also tried to disable the debug bar to be able to see any errors, but nothing is displayed. Firebug shows nothing in the console as well.

Any ideas what I have done wrong?
gb5256

Index.php refers to the wrong configbuilder file location.

I clone the latest Yii-App. After I config all things here is what happens.

Warning: require_once(MY_ROOT_PATH\web/../vendor/crisu83/yii-configbuilder/helpers/EnvConfigBuilder.php) [function.require-once]: failed to open stream: No such file or directory in...

Possible cause
index.php refers to EnvConfigBuilder but the file doesn't exist.

Solution
Just update index.php to use ConfigBuilder file and class.

need update framework to yii 1.1.14

....

  • Installing crisu83/yii-auth (dev-master 6532386)
    Cloning 6532386422c2b879fe5d33b2ca0955d5dc0e8fde
    • Installing yiisoft/yii (1.1.13)
      Loading from cache

....

Multilingual

Hello,

First of all Great work on this app!

It seens ML (Multi Language) is not working, setLanguage function is not callable by app (I have uncommented ML code on main.php) and after dump Yii::app()->language, it never changes.

on my tests i put dies on init and setlanguage and app never dies, after i tried write to a file on hdd, and file is never created...

NOTE: i have create this function to force change language:

// This will prove the session is working
public function setLanguageEx($lang)
{
if(isset($this->languages[$lang]))
$language = $lang;
else
$language = $this->defaultLanguage;

    $this->owner->language = $language;
    $this->owner->user->setState('__locale', $language);
}

it changes correctly on session, and dump session shows correct values, but still happning the same, no language change on app init.

Thanks

Console dev and env commands not working

When installing yii-app, my terminal doesn't accept the yiic command. It only works if I point it to the yiic file in the vendor directory like this:

vendor/yiisoft/yii/framework/yiic

Then still, however, it does not accept the debug and env commands. I get this message:

vendor/yiisoft/yii/framework/yiic env dev
Yii command runner (based on Yii v1.1.13)
Usage: vendor/yiisoft/yii/framework/yiic <command-name> [parameters...]

The following commands are available:
 - message
 - migrate
 - shell
 - webapp

To see individual command help, use the following:
   vendor/yiisoft/yii/framework/yiic help <command-name>

How can I make the integration of these commands in the console work?

error 500 in update

thanks for the fix in previous bug.
i think i got another one.
when i want to updated a record on my db i always got this message

error 1
i already try and error several ways but no luck..

any suggestion?

when i use the normal yii i never got that message...

thanks

Console directory missing

The following lines in the bootstrap script should be changed since the console directory does not exist:

run database migrations

sudo php /vagrant/console/yiic migrate --interactive=false

enable the development environment

sudo php /vagrant/console/yiic environment dev

changing the "/console/" to "/app/" might be a simple solution.

Gii not working

I have trouble in getting Gii of Bootstrap to work.
Within yiistrap, you say that there is a special Gii version and you also show how to enable it.
But those methods are not working (or I am too dumb) with yii-app.
What ever I do, it keeps using the default gii templates

Any ideas?
gb5256


EDIT: Just saw that the yiistrap itself (standalone extension version) does contain a gii folder within the extension. But this folder is not in the yiistrap coming via yii-app.

My application is giving me raw html no bootstrap

i have installed stalled everything .. grunt is "waiting"
i downloaded all the extension and put them in a vendor folder like this

sanap
sana

and i changed my composer.json like this

{
"name": "/yii-app",
"description": "A great way to start building your web application with Yii PHP framework.",
"keywords": ["yii", "application"],
"homepage": "https://github.com/Crisu83/yii-app",
"type": "library",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Christoffer Niska",
"email": "[email protected]",
"homepage": "http://www.cniska.net"
}
],
"repositories": [
{
"type": "composer",
"url": "http://packages.phundament.com"
}
],
"minimum-stability": "dev",
"require": {
"php": ">=5.3.2",
"yii": "1.1.13",
"yii-auth": "dev-master",
"yii-image": "dev-master",
"yii-configbuilder": "dev-master",
"yii-debug": "dev-master",
"yii-formatter": "dev-master",
"yii-multilingual": "dev-master",
"yii-seo": "dev-master",
"yii-debug-toolbar": "dev-master",
"yii-emailer": "dev-master",
"yiipassword": "dev-master",
"yiistrap": "dev-master",
"yiiwheels": "dev-master"
},
"autoload": {
"psr-0": {
"config": "./app"
}
}
}

so i dont know what is wrong!! pls help

Yii-app with yii-auth problem

When I add in config components:

'authManager' => array(
          'behaviors' => array(
            'auth' => array(
              'class' => 'vendor.crisu83.yii-auth.components.AuthBehavior',
            ),
          ),
        ),
        'user' => array(
          'class' => 'vendor.crisu83.yii-auth.components.AuthWebUser',
          'admins' => array('admin', 'foo', 'bar'), // users with full access
        ),

then at all pages it shows the error:

Property "WebUser.admins" is not defined.

Composer fail

Hi Crisu83,

I've tried many times to install yii-app by composer but it fail with errors:

  • Installing yiisoft/yii (1.1.13)
    Downloading: 100%

    [ErrorException]
    ZipArchive::extractTo(vendor/composer/d4ebefa1/yii-e9e4a0d5be901d8bd48e516a
    2d9afe33d6fd05a6\framework\vendors\htmlpurifier\standalone\HTMLPurifier\Con
    figSchema\schema/Attr.DefaultInvalidImageAlt.txt): failed to open stream: No such file or directory

I just try with yii/yiisoft (1.1.14) but still get same error.

Please help me solve this issue.
Thanks,
Quang

Can't click link on navbar?

I've already install Yii-App without any problem. But when I go to the main web page I can't click on the link to other page. For example, login page. It is there in the page but when I click it the browser don't go to that page but the URL itself is fine when I type in the URL directly it's ok. I don't see any error on browser's console. i already try in chrome and firefox and no luck.

i already got the trouble for that error above i descript. i think that because this code
"bootstrap->registerAllScripts(); ?>"
link on the navbar will work if i delete that line but the dropdown menu will not work. any suggestion?

and i got error message like in the image i uploaded.
error message

Any idea what could be the problem. Thanks.

User model and user table of migration script are not consistency

There are

  • Default user model in the project. (app\models\ar\User.php)
  • Migration script contains user table. (migrations\m130214_145027_create_user_table.php)

But the attributes aren't match, I think they should be the same.

Solution
Update either User model or user table to make them match.

Database password mismatch

The password used in bootstrap.sh script

create database

mysql -uroot -pyii_app -e "CREATE DATABASE IF NOT EXISTS yii_app CHARACTER SET utf8 COLLATE utf8_general_ci;"
does not match the password in dev. environment config. file (main-environment.php)
'db' => array(
'connectionString' => 'mysql:host=localhost;dbname=yii_app',
'username' => 'root',
'password' => 'vagrant',
'charset' => 'utf8',
'enableProfiling' => true,
'enableParamLogging' => true,
),

It is not a big deal but making them match will help to have the app configured in the Virtualbox up and running easier.

gii crud generator

thank for thus yii-app, it work great. but i have a question or may be a bug.
when i create a crud process using gii crud generator, my browser can't access the file. its always show "include(some file.php): failed to open stream: No such file or directory" & 'yii-app-master\app\vendor\yiisoft\yii\framework\YiiBase.php(421)'

'Alias "packages.passwordStrategy.*" is invalid. Make sure it points to an existing directory or file.'. i got that error when i try auth. what should i do to fix it?

Grunt keeps waiting...

I managed to follow the installation-procedure up until the running of Grunt. It runs, but gets stuck waiting. I'm waiting several minutes now.

grunt
Running "watch" task
Waiting...

Because it gives no error I don't know what goes wrong. Is this perhaps a common problem? Should I just have more patience? Is there an installation problem?

Request URL /site/login not found on ubuntu server.

Hello, I am kees.
I tried to install the crisu83/yii-app on my ubuntu 14.0.4 LTS.
But i can't install..Please tell me...


Not Found
The requested URL /site/login was not found on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80



Forbidden

You don't have permission to access /worknet/trunk/phpapp/app on this server.
Apache/2.4.7 (Ubuntu) Server at localhost Port 80


Thanks

Error in node when using Grunt

Following the install instructions I get an error when using grunt.

grunt --help

node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
TypeError: Object # has no method 'existsSync'
at Object.exists (/var/www/yii-app/node_modules/grunt/lib/grunt/file.js:372:13)
at Task.init (/var/www/yii-app/node_modules/grunt/lib/grunt/task.js:417:31)
at Object.initTasks (/var/www/yii-app/node_modules/grunt/lib/grunt/help.js:90:14)
at /var/www/yii-app/node_modules/grunt/lib/grunt/help.js:49:54
at Array.forEach (native)
at Object.display (/var/www/yii-app/node_modules/grunt/lib/grunt/help.js:49:17)
at Object.tasks (/var/www/yii-app/node_modules/grunt/lib/grunt.js:101:10)
at Object.cli (/var/www/yii-app/node_modules/grunt/lib/grunt/cli.js:38:9)
at Object. (/usr/lib/node_modules/grunt-cli/bin/grunt:36:20)
at Module._compile (module.js:432:26)

I tried updating node, but this does not seem to help. What am I missing / doing wrong?

bootstrap issue with yii-multilingual module

Hi Cristofer,

I tried to activate the multilingual feature of yii-app and I came across the following issue.

Your MlLanguageMenu widget (from yii-multilingual) extends TbMenu (from yii-boostrap) but in yii-app you are including yiistrap that does not have TbMenu, but rather TbNav.

If I change TbMenu to TbNav, it doesn't complain anymore but the rendering of the languages doesn't render correctly. I still have to investigate how much different TbMenu is from TbNav, so maybe they are not totally compatible without some further changes.

I didn't know where to mention this issue. I didn't think reporting it under the yii-mulitlingual project was correct.

Also can you summarize the differences of yii-boostrap vs yiistrap. Which one are you going to actively develop?

Vagrantfile file permissions

Having the fmode as 666 in the following line:
config.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777", "fmode=666"]
will prevent running the yiic script since it wont be executable, also you wont be allowed to change them using chmod within the vagrant shell.
I was going to suggest using 755, but that wont work either because apache is not able to write to the assets directory. 777 is probably the best for development using vagrant due to the mismatch of user between the host and guest os's.

Bug in documentation

In installing from composer you have written: "composer create-project yii-app [APP-NAME]"

It is supposed to be:
composer create-project crisu83/yii-app [APP-NAME]

It have eaten my good time to figure out the "[InvalidArgumentException] Could not find package yii-app with stability stable." Error!

index.php is missing

I tried to install it according to your instructions but index.php is missing. Any ideea why?

layout on module not loaded

when i try auth module i can't see the tab that i usually see in the demo. i got the view like this picture
bug auth

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.