Security Advisory: Improper header validation in Slim-Psr7
A security issue has recently been reported in Slim-Psr7 with the handling of new lines in headers.
How-to guides and tutorials
View All TagsA security issue has recently been reported in Slim-Psr7 with the handling of new lines in headers.
We are excited to announce the Slim 4.3.0 release. Please direct all your feedback for this release to the Slim 4 Release Feedback Thread. The new docs are located here.
We are excited to announce the Slim 4.0.0 release. Please direct all your feedback for this release to the Slim 4 Release Feedback Thread. The new docs are located here.
We are excited to announce the Slim 4.0.0 beta release. Please direct all your feedback for this release to the Slim 4 Beta Release Feedback Thread. The new docs are located here.
We are excited to announce the Slim 4.0.0 alpha release. Please direct all your feedback for this release to the Slim 4 Alpha Release Feedback Thread. The new docs are located here.
We are very happy to have added our first Slim 3 tutorial to the documentation! Contributed by Lorna Mitchell, First Application Walkthrough guides you through building your first application with Slim Framework.
We are delighted to release the first stable version of Slim 3, 3.0.0 following a series of release candidates.
We have tagged beta 1 of Slim 3 and have started the journey of releasing the first stable version of 3.0. We have also started work on the new documentation.
Treehouse and Hampton Paulk have published a new tutorial series that demonstrates how to create a website with the Slim Framework. It's aimed at PHP beginners, and it teaches you how to use Composer, Slim, SwiftMailer, and Monolog while building a simple website.
Lumen happened. It's a shiny new micro-framework from Taylor Otwell, and it joins the Laravel family today. It looks to be a pretty nice framework, and it shares many of the same features and goals as Slim 3.0. I'm sure this raises a few question about Slim's future roadmap.
It's coming. I promise. As many of you know, I recently finished writing a new book for O'Reilly Media—Modern PHP. I'm excited that my book is nearing publication and should be on bookshelves within a month or two. Unfortunately, writing a book is a time-consuming task. I also have a 9 to 5 day job. Life gets in the way sometimes. Excuses, excuses... I know :) I now have free time to work on Slim again. So what's going on? A lot.
The Slim Framework contains many new and helpful features in version 2.3.0. It is backwards compatible with the previous version. While I update the official documentation, here are some tips to help you get started with Slim’s new features.
I’m building a small Slim Framework application at New Media Campaigns. Because this application is for internal use, I figured I’d learn something new while building it. Even though the database schema is pretty simple, I’ve heard great things about Laravel — a full-stack framework from Taylor Otwell — and how many of its components are available as separate Composer packages on Packagist.
I recently released Slim Framework 2. This is a radical departure from past versions. Version 2 introduces PSR-2 compliance and PHP namespaces. It requires PHP 5.3 or newer.
After launching a ton of Slim Framework applications, I grew tired of re-configuring the same filesystem structure, the same libraries, and the same boilerplate code time and time again. No more.
The Slim Framework for PHP 5 version 1.6.0 (currently in the develop branch) introduces new middleware that will automatically parse the HTTP request body based on its content type. This middleware will parse HTTP requests with a JSON, XML, or CSV content type. To enable this middleware, do this:
Many Slim Framework users are turning to PHPFog — a leader among a growing field of PHP PaaS providers — to host their Slim Framework PHP web applications. By default, a Slim app will not run on PHPFog. Why not? PHPFog’s backend infrastructure relies on the nginx HTTP Proxy Module to communicate between backend tiers; the nginx HTTP Proxy Module speaks HTTP/1.0 while Slim speaks HTTP/1.1. Fear not, there’s an easy workaround. To run a Slim app on PHPFog, you must tell your Slim app to speak HTTP/1.0. You can do this when you instantiate your Slim app, like this:
The Slim Micro Framework is a micro framework that enables developers to quickly write RESTful web applications and APIs. I emphasize micro because Slim is just that — a lightweight and nimble PHP framework used to build smaller web applications and APIs. Unlike CodeIgniter and Symfony (excellent frameworks created by EllisLab and Sensio Labs, respectively), Slim forgoes controllers and abstract components for simplicity and ease-of-use.
This tutorial demonstrates the typical process for writing a Slim Framework application. The Slim Framework uses the front controller pattern to send all HTTP requests through a single file — usually index.php
. By default, Slim comes with a .htaccess
file for use with the Apache web server. You'll typically initialize your app, define your routes, and run your app in the ``index.php`.