Wednesday, February 4, 2009
Show me my public ip address!
Well, alas, another small kink in the making of a distributed web app: finding my new EC2's public ip address. I would have thought there was a really easy way to do this from the command line on linux machines and maybe there is and I am completely ignorant. But, be that as it may, I figured the easiest way to solve my problem was to solve it myself. Introducing.....show me my public ip address Hit up this script with whatever kind of http producing program you got and all it will return is some headers followed by your public ip address. I am going to use it.
Tuesday, February 3, 2009
{"success":false, "error":"invalid arguments"}
Well, that was a junky three hours of my life. I am using php to implement my stuff and I actually went ahead and implemented RFC1867. The sad part is...no matter what I did, the app server rejected me like a stinky bum from the street.
Sadly, I had to admit that the black-box app server knew better than I or in other words, I couldn't figure out what I was doing wrong with my implementation of the RFC. I ended up just making a system call to curl. How sad is that...a computer beat me.
I think I am going to go read the real RFC and see exactly what I was doing wrong.
Sadly, I had to admit that the black-box app server knew better than I or in other words, I couldn't figure out what I was doing wrong with my implementation of the RFC. I ended up just making a system call to curl. How sad is that...a computer beat me.
I think I am going to go read the real RFC and see exactly what I was doing wrong.
sendToHost - the php way
Just a heads up for any php guys. I have been using a function I found randomly through google to get all the replies from the app server. If you don't like raw http you probably shouldn't use it but I found it on this site.
I customized it myself so it worked better for me. One other thing that you might try is curl for php. I am pretty sure there is a library that allows you to create a curl object in php and use that to hit other sites. Anyway, good luck.
I customized it myself so it worked better for me. One other thing that you might try is curl for php. I am pretty sure there is a library that allows you to create a curl object in php and use that to hit other sites. Anyway, good luck.
Saturday, January 31, 2009
Unstable URL Usage

Well, I looked at the urls for project 2 and just about fell out of my chair. I have chosen to use php and well, php and no suffix on the end of urls doesn't mix...or so I thought?!
I tried to fool around with mod_rewrite but I have been having a whale of a time trying to get mod_rewrite to work correctly on this computer. Anyway, tried writing some rules, they didn't seem to be working.
Then, all of a sudden, things just began showing up. I was puzzled. I don't think I did anything?!, I thought to myself. It took me a few minutes but I finally realized that apache is so smart that if I have a file called submit.php and I navigate to www.bla.com/submit that it will run the php file. How cool is that? Really, wickedly awesome cool.
App-Server from the comfort of the living room

Just looking at the number of EC2 images running under our account makes me wonder if people are missing something or are way ahead of me. What I think they might be missing is that we can develop all our html/
All we have to do is download apache, install the packages for the language above and then stick our files in the www dir (on default linux install anyway). Then we can visit them and they can do anything we want! They can hit the app server. Or they can steal off of the normal server or anyone else's server.
That is one of the best things about the internet. You can do anything you want to whoever is connected and has a public ip address. Granted, they may not respond or you might end up in jail but hey, you can still do it.
Basically, what this boils down to, is come back home! Work from your living room on your own computer without worrying about AWS stuff. Once your page is working, then you can get it onto an AWS instance and such. But if it works from your couch in your house, then it will work on AWS (provided you have the same packages installed.)
Elasticfox erratic error
Well, my first experience with elasticfox was not the best I have ever had. I think the whole plugin to firefox idea was, frankly, genius. It would have been way harder for me to want to use all the command line tools but with the quick plugin to a program I have open anyway, it's easy!
Back back to the task at hand! The bug I found was small, but very annoying. I created a new credential and messed up the secret key part
. At first, I didn't notice so I was pretty miffed about why I couldn't connect to the account. Then, I finally realized that I had entered the password wrong, so I highlighted the user and changed the secret key and hit add. Then I went back and it still wasn't working.
After several days of being disgruntled and crabby about junky elasticfox, I tried something new. I removed the old user and added a new one; this time I made sure to have the right password. And whaaa bam! It worked everything was great.
So while everyone might not consider this a bug, I personally just assumed that clicking add after updating a credential would change it. Well, just so everyone knows...it doesn't!
. At first, I didn't notice so I was pretty miffed about why I couldn't connect to the account. Then, I finally realized that I had entered the password wrong, so I highlighted the user and changed the secret key and hit add. Then I went back and it still wasn't working.After several days of being disgruntled and crabby about junky elasticfox, I tried something new. I removed the old user and added a new one; this time I made sure to have the right password. And whaaa bam! It worked everything was great.
So while everyone might not consider this a bug, I personally just assumed that clicking add after updating a credential would change it. Well, just so everyone knows...it doesn't!
Subscribe to:
Posts (Atom)