>> Archive 2008
[September 21st, 2008]
Setting Up Your Own OpenID Server
So I went checkin' out the new ingenious sounding, and just opened for public access, Stack Overflow forum. To join I needed an OpenID login. Read a bit regarding how OpenID works and was about to create one through an OpenID provider, but stopped in my tracks when finding out, I could have my own OpenID server! Yeah, that'd be some cool stoke. Downloaded and unpacked phpMyID. Read the README file (something I admittedly don't do often). The server is really 2 php files that you make some simple changes to, then upload to your site, along with a few other steps. Took most the afternoon to get it working correctly. Oh, the happy and semi-prideful man I am. A man who can now "universally" login to any site which supports OpenID.
Steps I followed for future reference:
- Uploaded both MyID.config.php and MyID.php to my website (hosted by hostgater)
- Put URL of the MyID.config.php page in the web browser, which for me was
http://www.j-dude.com/MyID.config.php
, and made note of the Realm:______, which for me was phpMyID. - Followed the directions in the README file for hashing and making needed changes to the MyID.php file. Re-uploaded both files to the web server.
- Re-visited MyID.config.php in the web browser, tried to login, but was met with the error: "Missing expected authorization header."
- To fix this I needed to edit the .htaccess file. Simply created a New Folder on the web server named openid and moved the MyID.config.php and MyID.php files into it. Edited the openid's .htaccess file and copy/pasted the below, which you'll recognize from the provided htaccess file within phpMyID's folder unzipped onto your computer. Just remove the # comment marks from the beginning of each line.
RewriteEngine on RewriteCond %{HTTP:Authorization} !^$ RewriteCond %{QUERY_STRING} openid.mode=authorize RewriteCond %{QUERY_STRING} !auth= RewriteCond %{REQUEST_METHOD} =GET RewriteRule (.*) %{REQUEST_URI}?%{QUERY_STRING}&auth=%{HTTP:Authorization} [L] - Went back to MyID.config.php in the web browser and successfully logged in.
- Edited the
<link rel="openid.server" href="http://www.<domain>.com/MyID.config.php" />
and
<link rel="openid.delegate" href="http://www.<domain>.com/MyID.config.php" />
My path was href="http://www.j-dude.com/openid/MyID.config.php" and put them... - ...Put the openid.server and openid.delegate links into the web page I wanted to 'authenticate as' when logging into sites. This is where I kept getting it wrong. If I want to use http://www.j-dude.com as my login to sites, the openid.server and openid.delegate links from step 7 above need to be in the <head> section of my j-dude.com/index page. Silly me.
- Now to test and make sure it works. Go to the OpenIDenabled test page and enter the URL being used to 'authenticate as'. Example, I used http://www.j-dude.com.
When finished, I logged in at Stack Overflow using OpenID via my very own OpenID server.
By the time you read this I've probably moved the OpenID server into a subdomain. You know, so I can use something dorky/cool like http://www.ilovestarblazers.j-dude.com :) for a login.
[May 21st, 2008]
J-Dude on the Move
After spending my entire 3 year J-Dude life with one web hoster, the time for change had come. I won't go deep into the reasoning, but if you were to read something into #'s 1 & 2 below, you wouldn't be far off.
Top features I was looking for in a new web hoster:
- Live support available via phone, email or live chat. I don't want to jump through hoops (flaming or not) to report a problem.
- Ruby on Rails support. To satisfy my new endeavor.
- Competitive in areas of hosting space, bandwidth and price.
After an intensive search, readings of reviews, live chats with various hosters, and one bad decision, I've taken up residence at HostGater.com. Though they hadn't been my first, they've certainly turned out to be the BEST choice! After signing up, I immediately had FTP access and cpanel access to my new location (as it should be). I right away looked in cpanel for Ruby on Rails, but found it no where. So I took advantage of the live tech support chat feature. Within mere minutes my service was transferred over to a new server with RoR support. A painless, enjoyable, absolutely no hoops experience. It was like a blast of cool minty refreshment. Of course, HostGater has an Affiliates program. Unashamed plug here: If you would like to sign up to host your website with HostGater, feel free to use any of the links featured in this sentence or on this page ;)
The moving process has left me with some added wisdom, which I gladly impart in hopes of helping others and/or saving myself during any future web transfers. All steps are with cpanel in mind.
Transferring the MySQL Databases.
Old Site - Export the database:
- Log into your cpanel, open phpMyAdmin, choose the database you plan to export
- Click Export tab
- Select your tables under the Export section, make sure the SQL radio button is chosen.
- I left the default choices in the Options section as they were.
- At this point you can do 1 of 2 things:
- Create a text file - DO NOT click the Save as File checkbox. Instead, click GO button. You'll get a text readout. Copy the entire contents and paste it into a text editor like notepad. Save the file. I believe this text file method is only good for databases up to 5MB in size.
-OR- - Create a SQL file - Click the Save as File checkbox and give it a file name in the File name template box. Click GO button and it will be saved to your computer as a .sql file
- Create a text file - DO NOT click the Save as File checkbox. Instead, click GO button. You'll get a text readout. Copy the entire contents and paste it into a text editor like notepad. Save the file. I believe this text file method is only good for databases up to 5MB in size.
New Site - Create new database (MySQL):
- Log into your new sites cpanel and first create your MySQL Databases by clicking MySQL Databases.
- Enter name of database, click Create Database.
- Scroll down the page to MySQL Users and create a user, click Create User button
- Just below that, Add User To Database, use drop downs to put the user to a selected Database, Click Add, give user proper permission.
- You'll most likely want to check All Priviledges, unless your adding some limited users. click Make Changes
- The Current Databases section will now display the Database and Users
Import the database tables/data:
- From your new cpanel, enter phpMyAdmin, click your newly created Database in the left nav bar, click Import tab.
- click Browse button and find the file on your computer.
- After selecting the file, click GO button. A bar across the top will tell you if your import was successful or not.
If all went well, then you've successfully completed an export/import of your database from one web host to another. Do not forget to change the username and/or password in your database connection scripts.
Screwed up my indexes: After the process of transferring files and copying redirects into .htaccess, everything was working great. I moved on to the next task, turning off folder indexing (cpanel > index manager) and, in an ill advised move, turned off indexing to the public_html folder. Take this moment to learn from the mistakes of others (me!). After making this and a few other changes, I tried re-testing some pages - and was suddenly met with 500 internal server and 404 not found errors. Uh-oh. Was pretty sure of my mistake and changed the public_html setting back to system default. But the problem persisted. This troubled me for quite some time and even snuck by the eyes of tech support. It finally occurred to me to check the .htaccess file inside the /home/yourUserName directory (cpanel > file manager > click .htaccess checkbox > click edit icon on top). There, on the very bottom line, were the words "Options All". I deleted those 2 words, saved changes, and wah-lah!, pages were re-viewable in the browser.
As mentioned, HostGater was the 2nd choice. I had first chosen AN Hosting. I was woo-ed by their support of Rails 2.0. My excitement soon spiralled. Was hardly intuitive during setup. No access to set up my site via FTP, cpanel or an IP address with a home directory. No reply to questions. This did not bode well for a long term relationship. Three days later I exercised the money back guarantee.
Honorable Mention: I Would've preferred going green, and got all excited by hostpapa.com's green energy hosting, but sadly, they did not offer RoR. Else they would've topped the list.
Side-point: I've always wanted to mention how much I love the Live Chat feature found on many websites. It's incredible, wonderful, magnificent... I cannot over emphasize nor over exaggerate the depths of my feelings. The helpfulness I've received via Live Chat with Dell, AT&T, and web hosting sales to make informed decisions has been unmeasurable.
[March 15th, 2008]
Dell Restore Partition, Medibuntu versions
The recent purchase of a new desktop PC has meant no chance of replacing my 3 year old Inspiron 600m laptop. I contacted Dell and they advised me I could not install a harddrive over 100GB. If anyone has done so and it worked out just fine, please let me know. Upgrading from a 80 to 100GB didn't make much sense, but I did up the RAM from 512MB to 2Gigs. The initial benefits were barely noticeable. And this, in turn, led me to make use of...
Dell's System Restore (DSR). Dell, for a few years now, has been including a DSR partition that uses Symantec's Restore program to restore your Dell laptop or PC to it's original 'factory shipped' state, meaning: it will be just as the day your received it, including all pre-installed software. Doing so has allowed my laptop to experience the full 2GB of RAM benefits, while also ridding myself of a couple untraceable (and annoying) errors, such as an error with MS Word every time I'd close it.
You could experience problems using DSR if you have, at any time, overwritten the MBR, which could have done by simply running 'fixmbr' or 'fdisk /mbr' commands. In that case, here's a link to help troubleshoot and fix the problem.
Below are directions for using Dell System Restore:
- 1st backup any/all data you don't want to lose.
- Turn on your computer and when you see the blue bar across the top of your screen that displays 'www.dell.com' press CTRL+F11
- On the next screen choose 'Restore'
- The restore process will only take about 10-12 minutes
- When it's done, choose 'Finish' and let it reboot
Your computer is now restored to the day you received it and you'll have to walk through the initial setup process (EULA, Computer Name, etc... )
Ubuntu and Medibuntu versions: Was recently helping Gary in A/V set up an Ubuntu 7.10 machine and kept running into the error: "list of resources could not be read". I narrowed it down to Medibuntu. Maybe someone reading this isn't aware, as I wasn't, that you need the Medibuntu version according to your Ubuntu version. If encountering this error, you can remove the incorrect Medibuntu with the following commands:
sudo rm /etc/apt/sources.list.d/medibuntu.list sudo aptitude update sudo aptitude upgrade
Here's a link for correct Medibuntu repositories.
And a couple useful resources for Ubuntu 7.10 Gutsy Gibbon:
Creating Your ultimate Ubuntu 7.10 Desktop
Unofficial Ubuntu 7.10 Starter Guide
I've also been enjoying Marc's Taiwan adventures.
[January 21st, 2008]
Vista-ization
Couple months ago the old Dimension 8300 finally met it's demise. Made due with the laptop until finally making aquisition of a brand new Dell PC, and decided for Vista-ization. It's certainly more visually appealing than XP. You can't complain there, especially if your a fan of the Linux Beryl desktop. I won't bother complaining in depth about the User Access Control (UAC) pop up boxes. In Ubuntu & Fedora you'll get a pop up when entering areas that allow system changes, which doesn't bother me. The difference? Linux's pop up is sometimes, Vista's pop up seems to be all the time. I left it on for a few days to fully experience everyone's annoyance. Disabling wasn't initially intuitive. This link gives you 4 methods for disabling UAC. I chose #4, using control panel (you shouldn't choose #2, editing the registry, unless you know what your doing.)
Another encountered problem, Microsoft Photo Gallery was displaying pictures with a horrible yellowish tinge. This solution worked for me:
- Right-Click desktop > select Personalize
- Select Display Settings > click Advanced Settings > choose Color Management tab
- Click Color Management button
Check the "Use my setting for this device" check box > now click Add... button - Choose "sRGB IEC61966-2.1" and click OK
- Choose your new "sRGB ..." profile and click "Set as Default Profile" button
- Last but not least, you must reboot for change to take effect
I needed to follow those steps for each user account, else the other users still suffered the yellow tinge.
It also concerned me when editing an image for whatever reason, then arrowing to the next image in the folder, Photo Gallery says "Saving...", not "Do you want to save changes?" Does this mean my original has now been overwritten? I mean, what if I was just goofing off? Is the original now lost? Does the original still exist? It's a curious thought. Turns out, all is okay. You can always make copies before any editing, but even if you save settings you do not like, the next time, anytime, days later, you can view the image > click fix > and there will be a "revert" choice at the bottom where normally "undo" would be. Click revert and you can revert to it's original state before all the changes. That ain't bad, though it should certainly ask if you'd like to save changes instead of auto-saving like it does. Here's the quick explanation from Microsoft that set me straight.
On a positive note, there are a lot of little features in Vista I can't help but like. I just wanted to document a couple problems I personally ran into and a couple solutions that might help others. Another thing of note, "Add or Remove Programs" is now called "Programs and Features".



