Store aws beanstalk symfony and apache logs in cloudwatch logs

Do you have a symfony app deployed with autoscale capabilities in aws beanstalk and you don’t have a central logging server? Then you may find this post especially relevant.

When your app scale up and down your server created and destroyed dynamically. During this process you loose your logs. This logs may be extremely useful if something goes wrong in your system. Moreover it may be required by local legislation to keep a copy of it.

This will be a recipe on how to setup Cloudwatch logs as a central log storage in AWS. The example is based on a symfony app but with minor adjustments it will work for any LAMP project.

Continue reading

Create your own certificate authority

Why to create your own certificate authority?

Recently I start using my own cloud service storage owncloud to replace dropbox in some scenarios. I wanted to access to my documents throw SSL and for that reason I start checking how to self sign a certificate. Afterwards I realized that I also wanted to protect other websites with my SSL and I decided to create my own Certificate Authority CA. The main reason to create the Certificate Authority is to have only one certificate to install on my devices instead of each of the multiple certificates. Continue reading

How to XDebug PHP on production or a remote application

Does you ever had an issue that only appears on production environment? Have you ever felt how easy could be to solve an issue if you can debug the live system instead of the localhost that just works fine?

Debugging a live system can be scary, but it is not if you follow the right steps. Follow this How to XDebug PHP on production and please comment. Continue reading

XDebug and PHP setup for Mac OSX

Debugging PHP it shouldn’t be painful. XDebug it’s a fantastic PHP extension that provide debugging capabilities. The setup procedure it is easy and it already comes ready to go on XAMP and WAMP.

Let’s start for the mistake when someone try to “debug” a code for the first time. When you are digging into unknown behavior in your code you are running web server while you edit your code and press F5 compulsively. Add a die there, var_dump there and see if there is what you expect until you found something unexpected and start following that clue again. Continue reading

PHP and Symfony certification study guides

This post is a collection of useful links I found to become a better php professional. There is no other aim to have it available for me to check it when I have spare time so it’s not proper written and documented. I write this, by this I mean this blog, as an open public notebook where people can learn, correct and give me and others some tips.

If you are learning PHP or improving your knowledge, you can found this post quiet interesting.  Continue reading