phpMyAdmin on Windows 7

So, it’s been a while since I upgraded to Windows 7, and I thought everything was tweaked and functioning properly.  Turns out I was wrong.  I tried to login to phpMyAdmin, my favorite means of accessing a database (MySQL), on my localhost today and the go button (the id and password submission button) did nothing.  I did some research with the aid of Google, and some people said it was a software incompatibility issue.  I didn’t buy it.  Apache web server works just fine on Windows 7.  PHP works just fine on Windows 7.  MySQL works just fine on Windows 7.  Why would phpMyAmin not work on Windows 7?

Anyway, to make a long story short, it was a configuration issue of sorts.  For one, the configuration file that I copied from my old XP box, specified a session folder location that didn’t exist (pathway not found) on Windows 7.  So, by just creating the new folder structure, and adding that pathway to PHP’s ini file:  C:\Users\user_name\AppData\Local\Temp\PHP\sessions and C:\Users\user_name\AppData\Local\Temp\PHP\upload, all began working again.  Sure phpMyAdmin continued to complain about needing a blowfish secret password and adding a new user (for advanced features), but it was working and that’s all I cared.

Posted in Computer Stuff | Tagged , , , , , | Leave a comment

Making the General

Here’s a link to a picture I made years ago.  Thanks Photoshop!!!

Posted in Off Thoughts (Off as in Not Quite Right) | Tagged , , , , | Leave a comment

Stories I Tell To Entertain The Weak Minded

When left alone with my nephew (he’s presently 13 years of age) for long periods of time, I try to entertain him with wild stories and daydreams.  The last time I had one of these “daydreams” we were walking to Day Pond (a six mile trek from our apt).  I tell my nephew of a story I concoct for my brother to explain why my nephew is missing, and you have to picture me telling this to my younger relative while acting like I’m in hysterics, loud sobbing, overcome with guilt, inconsolable and distraught:

It was terrible. There he was, swimming in the pond, when suddenly he was surrounded by a school of sharks (or piranha depending on which version I’m telling him). Swim for the shore, I yell to him. Swim!!! His advances are halted by the school of ravenous, fat loving fish, and he screams for my help. At first, I can think of no way to help him, and surely my entering the water will only put me in harm’s way, too, so I dare not do that. Then, out of the corner of my eye, I see a stick (picture something about a foot long with the weight, strength and thickness of a piece of straw) and toss it to him to help him fend off the fish advances.  Unfortunately, it’s too little, too late, and he fades, sinks, slides under the water with glug, glug, glug.

Posted in Off Thoughts (Off as in Not Quite Right) | Tagged , , , , , | 1 Comment

Bagpipes And Bus Rides

Steve was not happy that morning.  Well, to be honest, he was never happy.  How could he be?  Steve!  Steve!  Not Stephan, which could be pronounced like Stefan or Steven, but Steve!  So plain, so ordinary.  How could his parents have been so uncaring, so inconsiderate, so shortsighted, so plain?  Steve.

Steve was quirky for a teenager, even by teenager standards.  He didn’t do the Goth thing, he just didn’t look good in black, and teen angst, well, that had been a part of his life since his earliest childhood memory.  Steve was quirky in that he loved bagpipe music.  He oftentimes imagined the sound coming from two dead, bloated geese being stepped on simultaneously.  Some people likened it to fighting cats, but Steve knew it was dead, bloated geese.  Steve had researched bagpipes and knew that at one time they’d been used to drown out the cries of the wounded on the battlefield, but he focused, instead, on the dead, bloated geese.  Perhaps he’d be lucky enough to see inside the reeds of a bagpipe some day.  Surely, they would be the vocal cords of geese, he thought.

Steve’s difference did not stop with his love for bagpipes.  He spoke a broken English that made him sound like he was from Jamaica, although he’d never been.  Where he picked up that brogue no one knew.  He also liked to wear kilts, and one day, to the amazement of all, showed up for class wearing a kilt.  It caused such a stir that the school was forced to require all students to wear uniforms from that point forward.  That made Steve popular.  Sure it did.

Although he loved his bagpipe music and derived a great deal of pleasure from it, he often listened to it when he was angry.  This was why Steve was listening to his collection of bagpipe music at an ear shattering volume this bright and early morning.  Of course, Steve’s mother couldn’t help but take this opportunity to express her love for him, screaming, “Turn that shit down!  What, are you deaf?”  Yeah, it was the beginning of a long day full of comments and criticism about him, a long day.

The one bright spot in his day was his bus ride home from school.  The city bus he rode consumed and spat out a variety of people, some nice, some not so nice.  The bus driver, though, drowned out their presence and opaqued the background noises.  She was a dark haired beauty with long hair that was usually tied back in a pony tail.  Her laughter and smile were contagious as though her beauty was not enough.  She was a beautiful person inside and out, a hard thing to come by in this world in which we live.  He did not know her name, nor she his.  He did not know her touch or perfume, but still he was smitten.

Steve imagined the bus driver as an elephant tamer with whom he was allowed to ride.  She commanded the great beast with gentle kicks behind the ears.  A kick behind the left and the leviathan turned to the left.  A kick behind the right and it swung to the right.  He watched through his romance colored eyes and was amazed at her adeptness at handling the beast of burden.  At stops she directed the creature closer to the ground to allow departures and arrivals, and he was amazed when it responded by lowering itself.  . . .

Posted in Off Thoughts (Off as in Not Quite Right) | Tagged , , , , , , , | Leave a comment

Salsa Snob or Salsa Connoisseur

Someone in my family calls me a salsa snob, because I turn up my nose at any salsa that’s not fresh. Hey, if it’s cooked (in New York City !?!) and then sits in a bottle on a shelf for six months, it has a taste and consistency more like baby food than salsa, but that’s just my opinion. When I told a close friend, someone who knows salsa better than anyone in my family, that I was referred to as a snob, she said that I’m not a snob, but instead a salsa “connoisseur.” I prefer aficionado, but connoisseur is pretty cool, too. =)

To digress, and to give perspective, I was born and raised (till I was 14) in the Northeast corner of the U.S. This section was, and still is, more in touch with Chinese and Italian food than Mexican food. Good sure, but on the whole, fairly bland compared to Mexican dishes. Just my opinion, take it with a grain of salt.

To give you an idea of the state of things in this area, Taco Bell is the main thrust of Mexican food in these parts, and another relative calls salsa (the Spanish word for sauce) “salsa sauce.” Oh, and while we’re on the subject, or more to the point off the subject, they’re called tortillas (phonetically) tor-tee-yahs, not wraps. And it’s pronounced (phonetically) hah-lah-pain-yo not hah-lah-pee-no (jalapeño).

When I was a teenager in California, my friends and I would test ourselves (yes, we were macho) with burritos from a local shop that were so hot we would have to prepare ourselves before eating by applying chapstick to our lips. Not only that but we would sweat while eating them, while seated outside in the dead of winter without wearing jackets. Granted in the area of California where this occurred winters were especially mild compared to the Northeast, still, no jacket – sweating. That wasn’t the worst of it, though. Later, when it came time to use the facilities is when we really paid.

Okay, I won’t dwell on how tough or cool I think I am/was, but to the point of this rant. I’ve returned to the Northeast and am now forced to shop in stores where their version of fresh salsa has cucumbers in it. What?!!!? Cucumbers? Yup. I’m not trying to be a snob, here, but that’s just plain gross. Don’t get me wrong, I love cucumbers (and pickles for that matter), but not in salsa. I’m sure someone somewhere thought that it was a good filler. Probably a way to save money; read that as ‘cheap.’ Usually is the case, right? Newsflash, money grubbing wh@r3s, real Mexican salsa doesn’t have cucumbers in it!

A general list of ingredients in salsa (please feel free to comment):

  • Tomatoes (I prefer mine hand crushed / cut – yes, I’m being a salsa snob here)
  • Onions (lots)
  • Cilantro (lots)
  • Jalapeño (to taste, I prefer it to bite till my nose runs)
  • Garlic, Salt. Maybe some lemon or lime juice, usually keeps things from browning (oxidizing) too quickly

That’s it. No cucumbers. Got it?

I don’t mind that what you consider hot (with flames on the side to emphasize the heat) is barely warmer than ketchup, but please don’t label it authentic or Mexican. Maybe my relative is right and you should call it salsa sauce. That would be warning enough for me not to eat it.

Posted in Gringo America | Tagged , , , , | 2 Comments

Interview With A Shrink

Went to an interview fairly recently where two people, an HR person and the owner of the company, interviewed me. The owner, I suspect, prescribed (a psychologist or psychiatrist, hence prescribed) the interview process in which I was caught: good cop – bad cop (GC and BC respectively). I won’t go into details, and all names have been changed, even mine – Lord Admiral Reginald Diamondsteed (LARD), to protect the innocent.

GC: Question, question, blah, blah, blah. Smiles. Pleasant. Leaves.

BC (Enters and gives me a look like I was deliberately avoiding the issue): So, I see here you’ve left some things off on your resume.

LARD: What? Like what?

BC: You have some gaps in your work history.

LARD: I have been out of work for the past year and a half.

BC (Question made with accusation in her voice): You mean you didn’t have a job between graduating from school and the first job you listed!?!?

LARD: What? I’ve listed my most recent employment going back more than 10 years. That is what most employers expect.

BC (Cheshire smile. The prey is caught then.): So, you did leave information off your resume then!?

At this point it occurred to me that this woman was off (in the head). She seemed to be insecure, and was trying to assert her dominance over me. Suddenly I recognized her as a smarter, older, more aggressive version of someone I used to work for (for those of you that worked with me recently, wp). The thought sent shivers down my back, and I almost got up to walk out of the interview. I already knew that this was not going to work.

LARD: Yes, I did have jobs before those listed on my resume. But, again, they are more than 10 years in the past, and not related to the position I’m applying for. I have been a machinist, a security guard, a dishwasher, a welder, and many, many more things.

BC leaves and GC returns. I’m thinking, what the heck was that about?

GC: Question, question, blah, blah, blah. Smiles. Pleasant.

I’m leaving out several more transfers of power (switches between GC and BC) during which BC tried to prove to herself (or me?) that I didn’t know what I was talking about and couldn’t do the job. We now skip to the end.

GC leaves and confers with BC outside the interrogation room. In the meantime I peruse articles left on the table describing the insanity prescribed (again I use that word) by BC to her disciples. I’m not buying it. One article in particular sends red flags off in my head. It is on the subject of stress being related to becoming ill. That I accept, but it seems, in this doctor’s opinion, that it’s not stress so much that causes one to become ill. It’s the quick removal of stress. So, one should disengage from stress slowly. What?!!!? So let me get this straight, one should try to remain entangled in stress, so one can ween oneself off stress?

GC and BC Duo: Blah, blah, blah. Hmm, she’s behaving herself in front of the GC. Going through the motions, because I don’t want to work here, and BC isn’t going to let me work here.

So, the interview is over. They don’t even say goodbye, thanks for coming in, nothing. As expected.

I go to the car and tell my brother about the incident on the way home. He often has a way of seeing things in a very different way to me, and says during my description that the BC sounds like a dyke. Pardon the ugly word, his word not mine. I thought about this for a moment, and suddenly realized that maybe he was right. Maybe she wanted to be the man in the room?

As a follow up, I never heard from them ever again. I keep trying to think of some way to put a positive spin on this whole episode, and cannot. Well, maybe this writing is entertaining to someone else? That’s positive, I guess.

Posted in Complaints | Tagged , , , , , | Leave a comment

PHP Image Manipulation

I recently played with some of PHP’s built-in image manipulation features and produced a script that will automatically resize, save, and display an image using hash marks to represent each individual pixel (of the image) in either color or black and white.

As yet I haven’t found anything to use this for, other than amusing myself, but I’m sure there’s something I can use this for.  Nah!

Here is a small screenshot of one of the images:

Me when I was younger, displayed here using hash marks

Me when I was younger, displayed here in black and white using hash marks.

Note: If you magnify the view, click on the image and you’ll go to a larger image, then change the view/zoom of your browser (zoom in), you can see the hash marks.

Posted in Computer Stuff | Tagged , , | Leave a comment

Mail Merge For Something Other Than Letters

First and foremost, I am not saying this is a good use of Mail Merge, nor am I saying that this is anything you should do to make a website. This is only an example of Mail Merge being used for something other than writing form letters, something I did, which set me on the road to scripting languages. Think of it as an experiment in thinking outside the box, a saying I dislike because of its overuse.

For those of you that don’t know what Mail Merge is, it’s a component of Microsoft Word (and other word processing software), and in the words of my brother after explaining it to him, “so, it’s an auto copy and paste.” I prefer to think of it as an advance search and replace, but as long as you get the idea. And how does this work you might ask? Well, basically, you mark places in a document that are automatically filled in by Mail Merge, which gets the data to put in those places from a spreadsheet.

Note: I was using it to make includes (as in SSI, server side includes, .shtml or the likes), but you could make entire pages in this manner.

Say you want to generate some html that contains a linked image (an image that’s clickable), you could do something like this:

<a href="category name.html" title="Something descriptive about this link, which will show up when hovered over"><img src="top-level image folder name/category name/image name.jpg" /></a>

That’s easy enough when doing it one or ten times, but how about 100 or 1,000 or more? Mail Merge to the rescue. So, without further ado:

  1. Create and save your spreadsheet with required fields. Note: The spreadsheet and the Word doc should be put in a folder that will not be moved as Word links to the sheet and gets upset if you move things around. Also, to make things easier, get rid of any unused sheets (in the spreadsheet).
    •  
    • Ex:
    • category_name img_name
    • cat_name_1 img_name_1.jpg
    • cat_name_2 img_name_2.jpg
    • cat_name_3 img_name_3.jpg
    • cat_name_4 img_name_4.jpg
    • cat_name_5 img_name_5.jpg
    • cat_name_6 img_name_6.jpg
    • cat_name_7 img_name_7.jpg
  2. Create and save your Word document with which you will run Mail Merge. To make things easier put it in the same folder as the spreadsheet.
    • Ex:
    • <a href="category name.html" title="Click Here To Go To category name"><img src="top-level image folder name/category name/image name.jpg" /></a>
  3. Start the Mail Merge Wizard (Word 2007, it’s under Mailings):
    1. Select document type: Letters. Next
    2. Select starting document: Use the current document. Next
    3. Select recipients: Use an existing list. Browse (browse and select your spreadsheet – make sure 1st row of data contains column headers is checked, Mail Merge recipients – ok). Next
    4. Write your letter:
      1. Highlight category name in “category name.html.” Click more items. Insert merge field, insert: Database Fields, Highlight category_name, Insert, close.
      2. Highlight category name in “Click Here To Go To category name.” Click more items. Insert merge field, insert: Database Fields, Highlight category_name, Insert, close.
      3. Highlight category name in top-level image folder name/category name/image name.jpg. Do insert as above. Close.
      4. Highlight image name.jpg in top-level image folder name/category name/image name.jpg. Click more items. Insert merge field, insert: Database Fields, Highlight img_name, Insert, close.

      Your document should look like this now:

      <a href="«category_name».html" title="Click Here To Go To «category_name»"><img src="top-level image folder name/«category_name»/«img_name»" /></a>

  4. Next, preview your letters. You can click on the double arrows to cycle through your letters and you should see:
    • <a href="cat_name_1.html" title="Click Here To Go To cat_name_1"><img src="top-level image folder name/cat_name_1/img_name_1.jpg" /></a>
    • <a href="cat_name_2.html" title="Click Here To Go To cat_name_2"><img src="top-level image folder name/cat_name_2/img_name_2.jpg" /></a>
    • <a href="cat_name_3.html" title="Click Here To Go To cat_name_3"><img src="top-level image folder name/cat_name_3/img_name_3.jpg" /></a>

    Etc., etc., etc.

  5. When you’re satisfied that it’s working as it should, Next, Complete the merge.

You will now be able to cycle through your generated mailings by using Mailings, Preview results. If the wrong info is showing, try clicking on preview results again.

Now that Mail Merge is set up, you can modify your spreadsheet (while the Word document is closed, and making sure to leave it where it is) by adding or changing data in fields. You can add or delete rows, but don’t change the number of columns. When opening your Mail Merge document again, it’ll ask you if you want to open a linked database. Just okay it and cycle on through. Now you can copy and paste your letters into html or a different spreadsheet or database.

Posted in Computer Stuff | Tagged , , , , , , , | Leave a comment

Restricting Access To One Folder On Webserver

I have Apache webserver running on my personal computer so I can do testing locally (before embarrassing myself on the internet).  I am also networked locally to other computers in my home.  For reasons I won’t go into, I want to allow the other computers on my intranet access to one of my folders (but not all) on my webserver.  Maybe you have a test folder that you don’t want people at work to see (think ‘your boss might freak to see unfinished work’)?  This’ll work perfectly for that.

I thought at first that this was a job for .htaccess (and maybe that is one way to do it), but that’s not what I ended up modifying.  After a little research I discovered this could be done very easily by modifying Apache’s httpd.conf file.

If you’re looking to do something similar, try adding the following to the end of your Apache httpd.conf file (NOTE:  Do not add my comments as denoted here by #):

<LocationMatch "/">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</LocationMatch>

# First thing we do is restrict everyone from our webserver except our own computer
# What folder do you want this rule to apply to?  We want this rule to apply to the root folder – denoted by /
# Who do we want this rule to apply to? We want this to apply to everyone – Deny from all
# We still want to have access from our own computer, right? Yup – Allow from 127.0.0.1 – that’s your computer

<LocationMatch "/folder_name_that_you_want_to_allow_access_to/">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from 192.168.0
</LocationMatch>

# Now we list the folder we want this rule to apply to, deny access to all (always done first for security), then allow our computer access and other computers on our intranet
# What folder do you want this rule to apply to? We want this rule to apply to a specific folder – put the name of that folder in place of folder_name_that_you_want_to_allow_access_to
# Who do we want this rule to apply to? We want this to apply to everyone – Deny from all
# We still want to have access from our own computer, right? Yup – Allow from 127.0.0.1 – that’s your computer
# What other computers do we want to have access? On my intranet we’re using 192.168.0.X range (your intranet may use a different range), so we allow from 192.168.0 (it’s not a typo leaving the last period and number off here)

That’s all there is to it.  Of course, I’m assuming you have your webserver set up correctly, have pages that display properly, and the correct firewall settings.  Note:  You should check to see if your pages are displaying properly on your intranet before modifying your httpd.conf file.  Also, backing up the file before modifying it is a really smart thing to do.

Oh, almost forgot, if you serve pages to the internet, you need to add your proxy (ip address of your internet gateway) to your allows where appropriate (if different from your intranet ip range).

Note: If you copy the examples above, be sure the quotes are plain quotes (they should be) or the filter may not work.

Posted in Computer Stuff | Tagged , , , , , , | Leave a comment

Dear Mighty Portal

Dear Portal (like Yahoo and other web based e-mail providers):

Recently on one of my junk* e-mail accounts I received an e-mail from a friend that told a well-woven tale of woe.   The gist of it was she was traveling abroad, was mugged, lost all her money, communication devices, identification, and was in desperate need of help ($$$) to return to her native land.  This superbly crafted literary tragedy appeared to come from my friend’s e-mail account (at your portal) with all the fixings to make it look legitimate.  It turns out someone hacked (cracked) my friend’s account on your portal, looked through their e-mails for a writing style, and then sent out these fictitious little goodies.

Should I blame you that my friend’s e-mail account was hacked?  Maybe.  I’m sure she had a password that was easy to crack and she never changed it.   Still, did you insist she have a more complex password and that she change it regularly?  Maybe it was an e-mail she received that made it look like it was from your portal, which sent her to a fake site where she entered her password?  Who knows?  I suppose that’s the reason for the image/challenge question idea that I see popping up here and there.

Anyway, although the e-mail was very suspicious, and although I’m fairly computer savvy, I replied to the e-mail (no money – just sincere wishes for a good outcome).  Who knows what would have transpired should I have had some way of helping?  I’d like to think I would have figured out that it was a scam as it went along.  And lest you think, no harm no foul, I beg to differ.  This caused me a great deal of emotional distress (no not the suing kind) as I was very worried for my friend.

My friend never answered me, so I e-mailed her directly and she recounted the hacking story.  I then went back to the original e-mail and looked it over thoroughly.  Yes, it came from her account – well, you said it was genuine in the headers.  Yes, it used her e-mail signature, and language comparable to hers, but the reply-to address was slightly different.  When looked at closely an ‘m’ in her e-mail address was replaced ‘rn – r n (R N – shown here in upper case for clarity).’  I’ve seen this trick before, and knew to look for it, but it never occurred to me that my friend’s e-mail account would be hacked and used in this manner.

To my point, please dear Portal, ye who were once mighty and powerful, please advise people when the reply-to address is different than the sending/received-from address.  If I had been advised of that, I would have known something was definitely wrong.  You know, it’s called Phishing.

Signed,

A Concerned Web Browser (not to be confused with Internet Explorer, Opera, Firefox, or Safari)

*I call it junk because I get lots of junk mail there and give it out first where ever possible

Posted in Computer Stuff | Tagged , , , , , | Leave a comment