PHP Directory


  • Heroku Alternative: Deploy Apps with Dokku on DigitalOcean

    When Heroku announced their (quite reasonable) new limits for free apps, I realized that I would have to find another source of hosting for all the small, low-traffic projects that I currently have running on Heroku. Way back in the day, Heroku was totally free for apps that only required one dyno, but after years of abuse from jerks like me, they dropped that to eventually allowing free apps to run for 18 out of 24 hours per day (which is ok for low-traffic prototypes) and as of June 1, granting a shared pool of free hours.

    Since I have such an unreasonable number of apps running on Heroku, I thought it was high time to try out Dokku. Dokku is a Heroku-like tool that allows you to deploy complex apps by simply pushing with Git. It supports Heroku buildpacks directly, so you can transition existing apps without difficulty, and has a number of plugins for datastores and other components. And, thankfully, Digital Ocean provides a pre-installed Dokku image that will spare you the trouble of installing Dokku yourself; you can just spin up a server and start Dokku-ing right away! This article will walk you through setting up a Dokku server on DigitalOcean with your own root domain and deploying a simple static site to it.

    Differences between Dokku and Heroku

    • Dokku requires at least some comfort level with running your own servers; you may have to modify nginx configurations, manually configure some plugins, or turn to the system tools for debugging.
    • Dokku utilizes Docker, which is a fine platform but can add an extra layer of complexity to a server install.
    • Dokku requires root access to a VPS to install plugins, run commands, etc.

    In short, you're going to need to do a bit more command line setup on Dokku than Heroku --- nothing you can't pick up along the way, but you might need to do some light reading.

    Creating a Dokku Server on DigitalOcean

    DigitalOcean logo

    First, log in to DigitalOcean and follow this link to create a new server on DigitalOcean using the preinstalled Dokku app. Dokku requires at least 1GB of RAM, but $10/mo to host all your stuff is a pretty small price.

    For your hostname, enter the base domain you want to use to host your apps. Default Dokku apps will appear at . (for example, Make sure you own this domain and register it if you need to!

    Continue reading %Heroku Alternative: Deploy Apps with Dokku on DigitalOcean%

  • Sourcehunt: PHP7-Only Alternative to Laravel, HPKP, and More

    Time to promote some open source projects again!

    Sourcehunt logo

    paragonie/hpkp-builder [15 ★]

    This library aims to make it easy to build HTTP Public-Key-Pinning headers in your PHP projects, and requires at least PHP 7.

    HTTP Public Key Pinning, or HPKP, is a security policy delivered via a HTTP response header much like HSTS and CSP. It allows a host to provide information to a user agent about which cryptographic identities it should accept from the host in the future. This can protect a host website from a security compromise at a Certificate Authority where rogue certificates may be issued for your hostname.

    Read more about HPKP here.

    Rican7/incoming [137 ★]

    Incoming is a PHP library designed to simplify and abstract the transformation of loose, complex input data into consistent, strongly-typed data structures.

    // Create our incoming processor
    $incoming = new Incoming\Processor();
    // Process our raw form/request input into a User model
    $user = $incoming->process(
        $_POST,            // Our HTTP form-data array
        new User(),        // Our model to hydrate
        new UserHydrator() // The hydrator above

    Explaining it to any great detail is outside the scope of this short post, but in essence it allows us to precisely define what kind of input information goes through and hydrates our model, rejecting, filtering, or transforming everything else.

    It's like Fractal, backwards. (Fractal makes sure the output matches a set structure, rather than input)

    The library currently has one outstanding issue - and it's a discussion around a feature - but could definitely use some users and feedback! Maybe even a SitePoint post about it?

    Continue reading %Sourcehunt: PHP7-Only Alternative to Laravel, HPKP, and More%

  • Interview with Dave Stokes

    The post Interview with Dave Stokes appeared first on Voices of the ElePHPant.

  • PHP version 7.0 in Fedora 25

  • Fast Debugging of PHP Code Using PHPEd Part 3: Remote Debugging and Remote Projects

    By Cyril Ogana
    IDEs are good to help debugging your code before it goes to production, but sometimes you need to find bugs in your code that cause problems and can only be observed in production. This is one case on which remote debugging is necessary.

    IDEs like PHPEd support remote debugging. You do not need to download the project files from the production server to debug your project remotely. Thanks to the remote projects feature of PHPEd, it can retrieve only the server files that you need to debug so you can start debugging remote projects very quickly.

    Read this article to learn how to setup and use PHPEd to debug remote projects running in production server for instance.
  • Can Symfony Apps Be Fast on Vagrant? Let’s Check with SuluCMS!

    In this short tutorial, we’ll set up Sulu and optimize on a Vagrant environment. Why a dedicated tutorial handling this? Besides the fact that Sulu has a rather complex initialization procedure, it is based on Symfony which is infamously slow on virtual machines with shared filesystems, and thus needs additional optimizations post-install. The performance hacks in this post, while Sulu-specific, can be applied to any Symfony application to make it faster on Vagrant.

    Would you like to learn more about Symfony and/or SuluCMS? Come join us at WebSummerCamp - the only conference filled to the brim with long, hands-on workshops. The program is out and it’s awesome! Super early bird tickets available until the end of June!

    sulu logo

    As usual, we’ll be using our Homestead Improved box as the base, but the steps below are explained in enough detail for you to follow them on any environment.

    New Box and Folder Sharing

    We start by downloading a fresh box and setting up folder sharing.

    git clone hi_sulu
    cd hi_sulu; bin/

    Once this is done, it’s recommended to set the file sharing type to nfs, due to this known issue, also described here.

    Continue reading %Can Symfony Apps Be Fast on Vagrant? Let’s Check with SuluCMS!%

  • Top 4 Mistakes Developers Should Avoid when Creating Their Own Software Product Business

    By Manuel Lemos
    Many developers try to create their own business based on software that they develop but some fail, often due to the same mistakes that others already committed.

    If those developers knew in advance what are those mistakes, they could have avoided failing, simply by not repeating the same mistakes.

    Watch this short video to learn what are the top mistakes that you should avoid when you try to create your own software product business.
  • PHP 7.1.0 Alpha 2 Released

    The PHP development team announces the immediate availability of PHP 7.1.0 Alpha 2. This is the second alpha release for PHP 7.1.0. All users of PHP are encouraged to test this version carefully, and report any bugs and incompatibilities in the bug tracking system. THIS IS A DEVELOPMENT PREVIEW - DO NOT USE IT IN PRODUCTION! For more information on the new features and other changes, you can read the NEWS file, or the UPGRADING file for a complete list of upgrading notes. These files can also be found in the release archive. For source downloads of PHP 7.1.0 Alpha 2 please visit the download page, Windows sources and binaries can be found on The first beta will be released on the 7th of July. You can also read the full list of planned releases on our wiki. Thank you for helping us make PHP better.
  • On submitting to CFPs

  • Interview with Chris Russell

    The post Interview with Chris Russell appeared first on Voices of the ElePHPant.

:: Our Favorites

Featured Sites Using PHP

>Atlanta Real Estate