Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
README ------ Welcome to the negative(-11) PHP MVC Framework. You are using version 2 (Chocolate). Features -------- Lightweight MVC PHP Framework. Namespace autoloading Straightforward and easy to use. No complex setup. Free and Open Source. Includes core MVC architecture. Includes basic MySQL package. Includes basic setup for PHPUnit testing. Learn More ---------- You should check out the wiki for more information: https://github.com/negative11/negative11-chocolate/wiki There you will find detailed installation and setup instructions. Requirements ------------ PHP Version 5.3+ Apache Web Server with mod_rewrite enabled (if using included .htaccess file). Basic Installation ------------------ It's very easy to get started. 1. Set application directory as your website root. It is recommended that you keep all other folders outside of the public web directory. 2. Open parameters.php and modify any desired configuration settings. Follow instructions for specifying environment paths and packages. You may need to change the ENVIRONMENT_ROOT directory in index.php if you placed the application directory in a different location than the rest of the framework. 3. Open your browser and point to website. If you have everything configured correctly, you should see the framework information page. 4. If you have difficulties, refer to the full installation guide in the wiki. Common Problems --------------- If you get a 500 error when trying to load the framework, it is possible that mod_rewrite is not enabled. Check your Apache configuration. If you don't see the framework page, ensure that you specified your paths correctly in index.php, and that the user running Apache has the correct permissions to load the files. Apache Issues ------------- If you see a 404 page when loading website for the first time, ensure that the ENVIRONMENT_ROOT in index.php is defined to the absolute path of the folder that contains the system and packages folders. Ensure that mod_rewrite is enabled and that your .htaccess is set to the values provided. Your Apache virtual host must be set up to point the accessed domain at the appropriate folder, as the .htaccess file uses '/' as the RewriteBase (@see http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase for more information regarding RewriteBase). You must set the AllowOverride All directive to enable .htaccess for the project. Sample Apache Virtual Host -------------------------- <VirtualHost *:80> DocumentRoot /var/www/example/application ServerName example.com <Directory /var/www/example/application> AllowOverride All allow from all Options +Indexes </Directory> </VirtualHost> Shared Hosting Environments --------------------------- If you can't seem to load any pages beyond the front page, or if you always see the front page regardless of path, it is possible that $_SERVER['PHP_SELF'] is not set to the expected value. This is very common in shared hosting environments. In parameters.php you may select a different variable as a workaround (either PATH_INFO or REQUEST_URI) by modifying the CORE_SERVER_VAR parameter. The variable you select (PHP_SELF by default) is used during framework routing to determine which controller should be loaded. Note that changing the default variable may break usage of the framework via CLI, as the chosen variable may not be available to the command line. License ------- This framework is dual-licensed under the GPLv3 and/or MIT licenses per your requirements. You may modify it and redistribute it as you wish. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Additional Help --------------- If you get totally stuck, you can contact the maintainer: email@example.com