PHP Directory

Blogs

  • Quick Tip: Make Sure Your PHP Version is Safe with Versionscan

    There’s a tool you can use to check that you have a version of PHP with the most bugfixes. The tool is versionscan and it recently got a 1.0 release. This quick tip will show you how to install it into your environment so it’s accessible from any folder, letting you call it at any […]

    Continue reading %Quick Tip: Make Sure Your PHP Version is Safe with Versionscan%

  • Quick Tip: Install Recki-CT into a Vagrant Ubuntu Box

    Recki what? If you don’t know what Recki-CT is, see @ircmaxell’s original post or the repo, we won’t go into depth here. This quick tip will merely show you how to install it on a Homestead Improved box, much like we did with other software before. Step 1 – Homestead Improved First and foremost, get […]

    Continue reading %Quick Tip: Install Recki-CT into a Vagrant Ubuntu Box%

  • Deployment with Zend Server (Part 3 of 8)

    This is the third in a series of eight posts detailing tips on deploying to Zend Server. The previous post in the series detailed creating recurring jobs via Zend Job Queue, à la cronjobs.

    Today, I'm sharing a very short deployment script tip learned by experience.

    Tip 3: chmod

    In the first tip, I detailed writing deployment scripts. One of the snippets I shared was a chmod routine:

    
    $command = 'chmod -R a+rwX ./data';
    echo "\nExecuting `$command`\n";
    system($command);
    
    

    The code is fine; what I did not share is where in the deployment script you should invoke it. As I discovered from experience, this is key.

    Zend Server's deployment scripts run as the zend user. If they are writing any data to the data directory, that data is owned by the zend user and group -- and often will not be writable by the web server user. If you have scheduled jobs that need to write to the same files, they will fail... unless you have done the chmod after your deployment tasks are done.

    So, that's today's tip: if you need any directory in your application to be writable by scheduled jobs, which will run as the web server user, make sure you do your chmod as the last step of your deployment script.

    Next time...

    The next tip in the series is another short one, and will detail how to secure your Job Queue job scripts.

    Other articles in the series

    I will update this post to link to each article as it releases.
  • Interview with Chris Weber

    Blog : https://www.drupal.org/u/cosmicdreams

    Twitter: @chris_m_weber

    Links to sessions mentioned

  • Notes from LaraconEU

  • PHP Spec – a dream come true

    Almost 8 years ago, I wrote “What is PHP anyway?“. This blog is supposed to be about some long-term dreams, and in this case it was the dream come true – Sara Golemon and the excellent Facebook team made a draft PHP spec and with some paint and polish it can become a real spec pretty soon. Not sure if it can be ready by the 8th anniversary of that post, but it probably will be out by the 9th :)

    Talking to people, I recently discovered not everybody knows this thing exists. So here it goes – it exists right here. It is still a draft. If you see something wrong, submit a pull request. If you feel you can contribute more by working on it or refining some points, “standards” mailing list was re-purposed to be the working group list.


    Tagged: language, PHP, specification, standards
  • Single Page App with Laravel and EmberJS

    In this part, we will see how Ember works, how to use Ember Data and how to build something simple with it. Router, Route, Model, Template and Store are some of the concepts of Ember. I’m not going to explain every one of those, so if you feel stuck, use the documentation. As usual, you can download the code for this part here.

    Let’s code

    Note that while developing with Ember, it’s a good idea to download the Ember Inspector. They released Ember with a Chrome Extension and now that extension is also on Firefox.

    For this example, we are going to put every line of JS inside /public/static/app.js. In a real project, this is not a good idea. This simplifies our example but ask yourself - have you ever done some serious work with MVC architecture in just one big file? We saw how Laravel works: controllers are in one folder, each of them in one file, the configuration is in its own folder, the models too. I suggest you do the same thing with Ember when you dive into a proper project.

    The first thing you ever do when starting Ember is create the application. It is a global namespace for everything that you code with Ember. An Application can be created like this:

    App = Ember.Application.create();
    

    I suggest activating a bit of debugging just by adding a line of code when you create the application.

    App = Ember.Application.create({
        LOG_TRANSITIONS: true
    });
    

    It doesn’t do much more than output your movement through the URLs and templates in the console. Also, we are going to use Ember Data which is a separate module of Ember and provides a nice integration with REST, translating everything from Store Object to request on the server. By default, Ember Data uses the Rest Adapter. You can also use the Fixture Adapter for testing and local development. Basically, Ember Data is a bridge between servers (Rest API) and local storage with the Store Object.

    As we saw earlier, our API uses a namespace. Ember’s Data comes with a Rest Adapter which accepts a namespace, a prefix like we saw on Laravel Route groups. Lets pass in our namespace as an argument.

    Continue reading %Single Page App with Laravel and EmberJS%

  • Welcoming New Authors – July, August 2014

    Two more months, and our ranks keep growing - while some authors are basking in the summer heat on beaches around the world, others are hard at work submitting their excellent content and getting the networking they deserve.

    New Authors

    In the past two months, we’ve had a whopping ten new authors join our team, all top quality, all incredibly enthusiastic about both learning and teaching. Let’s welcome them into the fold! Note that from now on, all author descriptions will also have their social icons underneath so you can keep in touch with them via your social network of choice.


    Continue reading %Welcoming New Authors – July, August 2014%

  • PHP 5.6 – looking forward

    Having taken a look in the past, now it’s time to look into the future, namely 5.6 (PHP 7 is the future future, we’ll get there eventually). So I’d like to make some predictions of what would work well and not so well and then see if it would make sense in two years or […]
  • PHP 5.4 – looking back

    With 5.6.0 having been released and 5.4 branch nearing its well-earned retirement in security-fixes-only status I decided to try and revive this blog. As the last post before the long hiatus was about the release of the 5.4, I think it makes sense to look back and see how 5.4 has been doing so far. Great Release […]

:: Our Favorites

Featured Sites Using PHP

>Atlanta Real Estate