If you attempt to access your application running inside a Vagrant VM using app_dev.php you’ll receive the following error:
You are not allowed to access this file. Check app_dev.php for more information.
If you look into your app_dev.php file you’ll see a line that looks like the following:
The important part is this line:
This line looks at the IP address you’re using to access the system and makes sure it’s referring to the “local” computer. There are a couple options to fix this. This first is that you can just remove this line and then delete the app_dev.php file when you deploy. This could create a potential security problem because if you forget to remove it someone could access it and use the dev tools.
The better option is to add your local computers IP address to the list. To do this we’re going to change the exit function so it outputs you’re IP address.
Now if you try to access the site you’ll get your IP address:
You are not allowed to access this file. Check app_dev.php for more information. Your IP: 192.168.56.1
I was setting up a virtual server that’s using resque to perform background jobs and when I ran into the following error:
After a lot of fighting I learned that Sinatra wasn’t compatible with rack 1.6.x so the only way to fix the problem was to downgrade to a version that worked. After much testing it appears that 1.5.5 was the last version that worked.
Today marks the one month mark of my move to Jekyll so I thought I would recount some issues I’ve run into.
Feedburner
On my Wordpress installation I installed a plugin that redirected RSS subscribers from the feed hosted on the site to Feedburner so I could get statistics about all of you who are subscribing. I checked my statistics and my subscribers went to zero:
The problem was that the link on my Wordpress install pointed to /feed/ and the plugin redirected the folder to the correct Feedburner URL. The fix was to add a redirect to the site’s configuration:
Increase in 404 errors
On the 15th, I received the following error in my email:
I check the errors and it was mostly /category/ and /tag/ pages that Wordpress creates automatically. Normally people don’t usually use these so I’m not too worried.
Broken Images in RSS
I only post some images but I noticed that the following happened when I looked at my RSS feed:
The fix to this is to prepend all image links with {{site.url}}.
{{site.url}}/assets/2016/brokenimages.png
The horrible downside to this is that {{site.url}} is www.thisprogrammingthing.com and not dependent on what’s being served (which makes sense). So I have to upload all my images to the live server when I’m checking my post because it looks like this otherwise:
Today I was trying to figure out the total amount of space a type of file was taking up on one of our servers so I could free up some space. The result below will give you the total number of bytes.
If you’re going to do something crazy like edit your Apache config on your production server without testing it in a test environment it’s important to at least make sure you’re configuration files are formatted correctly.
Apache provides a command line switch to apachectl to do just that:
This way you can make sure you won’t mess stuff up when you reload the service.
In case you’ve missed it, Apple released a note about their stance on unlocking a terrorist’s work phone. Much has been said about how this makes them unAmerican and I think we really need to applaud them for drawing a line in the sand and saying “No”. This seems like a case where it would be really easy for them to make us less secure as a nation and instead their spending time and money fighting for what they know is right. Over the last couple weeks I’ve heard all kinds of arguments on both sides but I think the take away is that if we give away the ability to have secure phones the only ones losing are the American people.
It’s also going to be hilarious what I can only assume is millions of dollars spent on fighting this the phone contains zero actionable material. :-)