Pear: “go-pear.phar” Does Not Have a Signature

As I was trying to install Pear for my WampServer 2.0i installation today, I encountered a problem. When I ran the typical “go-pear.bat” script – I was hit with this message:

phar "C:wampbinphpphp5.3.0PEARgo-pear.phar" does not have a signaturePHP W arning:  require_once(phar://go-pear.phar/index.php): failed to open stream: pha r error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in C: wampbinphpphp5.3.0PEARgo-pear.phar on line 1236

Solution

Thankfully, after searching around – I found the solution from a blogger named Latyr, who blogs in French. Since I speak French, I thought I should offer his solution in English. I expanded it into a few steps, for those that aren’t familiar with WAMP and PHP.

1) Locate the “php.ini” file.  In my case, I found it at this path:

C:wampbinphpphp5.3.0php.ini

Don’t use the WAMP system tray icon to edit this file. It didn’t work when I tried – you have to manually locate it.

2) Find the following line, in bold:

; http://php.net/phar.require-hash
;phar.require_hash = On

; http://php.net/phar.require-hash

;phar.require_hash = On

3) Uncomment the “;phar.require_hash = On”line by removing the semi-colon.

4) Change “On” to “Off”.

; http://php.net/phar.require-hash

phar.require_hash = Off

5) Save the file.

After I performed those steps, “go-pear.bat”  began working normally again.

In case you’re wondering about  the phar.require_hash option we just disabled, here’s the php.net description:

This option will force all opened Phar archives to contain some kind of signature (currently MD5, SHA1, SHA256 and SHA512 are supported), and will refuse to process any Phar archive that does not contain a signature.

See Also

The solution offered here was made possible by Latyr’s original blog post, entitled “Bug dans PHP5.3.0 Pear.bat”.

UPDATE January 8, 2023 – Old comments posted to my previous site can be seen here.

Powerful Mail

A friend recently sent me a package – I couldn’t help but laugh when I saw it:

I wasn’t home when this package arrived, and that meant the mailman had to leave note informing me that a package for “Refghi Power” would be waiting for me at the local post office. When I went to get it, I tried to contemplate how I would prove that I am “Refghi Power”, as all my IDs claim I’m “Matt Refghi”. Also, keep in mind that mostly everyone around here speaks French. Thankfully, the guy at the post office laughed and said he got it.

Yahoo! Answers: Suing Facebook

I was genuinely trying to find out if there was a way to have certain pictures of myself removed from Facebook, until I found this:

I like how all the others answers were, for the most part, completely correct – and yet the chosen “best answer” is ridiculous.

UPDATE January 19, 2013: Question was deleted, removed link.

Reducing E-mail Spam by Eliminating Public Listings

I’ve been using Gmail as my e-mail service provider for a few years now, and due to their excellent spam filters, I’ve been able to ignore the continuous stream of junk mail hitting my mailbox every day. Despite their efficiency at identifying and hiding spam e-mails, I remain genuinely concerned about keeping my e-mail address hidden from the public view.  E-mails that are publicly available are easy targets for spambots, which are automated programs that scour the Internet for e-mail addresses. Once “harvested”, these addresses are sent junk mail, spam.

1000 Spams by Allan Reyes.

Sometimes, however, it is desirable to have an e-mail address visible to the public – to do so, a special approach should be taken to protect it from spambots. For example, you can use services like reCAPTCHA Mailhide, which challenges viewers with a CAPTCHA before it displays the full e-mail address.

Curious about whether or not my e-mail was “out there”, I decided to look into it. Below, I explain how you would go about checking for public references to your e-mail address, and how future slips could be prevented.

Google Your E-mail Address

Try searching for the e-mail address using Google. Search engines scour the Internet for web pages, rather than just specific elements in the page (like e-mail addresses). They do so through programs called crawlers, sometimes referred to as spiders. If they have indexed a webpage that has your e-mail address mentioned, you’ll be able to find it in the engine’s search results. The important fact here is this: if you can find it using a search engine, you can safely assume that a spambot would be similarly capable. It is therefore important to remove any references to your e-mail address – in doing so, you’ll be making it a little bit harder for spammers to target your address.

To do so, try launching a Google search for your e-mail address, using this format:

“you@youremailprovider.com”

The double-quotes will tell Google to look for that exact string, which will limit the number of false positive search results that are returned. If you get no results with the double quotes, try removing them.

After running the search, if you spot search results that actually have made your e-mail address publicly visible, you’ll need to try and remove them. In my case, when I did this, all the hits were sites that I could log into, and then remove my address. If you’re lucky, it’ll be that simple. Otherwise, you might have to contact the site owner to get it removed.

Question How Websites Use Your E-mail

To avoid getting into potentially complicated situations, it is worthwhile to spend some time determining how websites intend to use your e-mail. An e-mail is almost always requested when registering, but the uses vary. It could, for example, just be used to contact you to activate your account. Or, it could be used for a multitude of things, including as a publicly viewable piece of information. Take the time to check FAQs, site forums, or even contact the site owners if there are doubts – this could prevent an increase in spam received.

Sometimes, however, it isn’t as straight-forward as them displaying your e-mail address- sometimes certain sites will indirectly expose your address. I’ll give you an example… consider Google Profiles. By default, the URL that points to your profile looks something like this:

http://www.google.com/profiles/114973454253911341512

You can, however, choose to have your username appear at the end, like this:

http://www.google.com/profiles/youruseraccount

This is naturally better for search engine optimization, and it also allows you to memorize your profile link – but it introduces a flaw as well. Looking at that URL, I know that the e-mail address “youruseraccount@gmail.com” exists. It has to, that’s how Google accounts work – they are based on an e-mail address, so there is no doubt about what the username portion is. If I know that, then I can deduce that there must be a spambot out there that is smart enough to exploit the same flaw. Even if no spambots are currently exploiting this, I’m pretty sure one eventually will. Thankfully, though, Google has explained the feature very well on the settings page – reducing the likelyhood that someone would enable it unknowingly:

To make it easier for people to find your profile, you can customize your URL with your Google email username. (Note this can make your Google email address publicly discoverable.)

Notepad++: “nppcm.dll needs to be in the same directory than notepad++.exe”

In the last few weeks, I’ve been having problems launching Notepad++ from the context menu as I usually do. Instead of it launching properly after I select the “Edit with Notepad++” option, I get an error:

Notepad++ error dialog showing the message "Error creating process: nppcm.dll needs to be in the same directory than notepad++.exe"

To get around the error, I had to use the File-Open menu from Notepad++, and locate the file I wanted to open. This was acceptable for a while, but eventually my patience with the issue wore thin.

Solution

I figured out why it was happening. The problem was that the “notepad++.exe” file was set to automatically prompt for administrative privileges via User Account Control. This works fine if you’re launching Notepad++ from a start menu or desktop shortcut, but apparently the context menu didn’t like the setting.

To “fix” this problem, remove the automatic UAC prompt from the Notepad++ shortcut/executable. This restores the context menu option to working order. Matt, what if it needs administrative privileges, you say? Well, as far as I know, the only feature that actually needs administrative privileges is the Update feature. This means you’ll have to launch Notepad++ with administrative privileges manually whenever you want to check for updates, which isn’t great… but at least the above error is no longer an issue.

If that doesn’t work for you, I’ve heard of others that solved this issue by deleting a mysterious extension-lacking “Program” file in their hard-drive root; however, the file didn’t exist on my system. Given how out-right bizarre this file sounds, I would highly recommend you avoid taking that approach – it just doesn’t sound right. I don’t see why Notepad++ would save a file in the root – and if they are going to do so, why name it in such a generic fashion? In any case, if any of you spot this file… please let me know what it contains.

Update: Many thanks to Bram, who wrote a comment about encountering  the “Program” file:

“I had the same problem here, and I also had the file called ‘Program’ in the root folder. That file was 0 KB, so completely empty. It’s not guaranteed that notepad++ somehow creates this file. Anyways, after rebooting the machine, my Windows Server 2003 came up with a warning that there was a file called program in the root which may cause other programs to function incorrectly bla bla bla. Renaming into Program1 solves the issue, and so does deleting the file completely.”

Converting Formatted Text from the Clipboard to Plain Text

Usually when I copy text from web pages, I really don’t want the formatting from the webpage to be kept. I  just want to have the text in the simplest format possible, and then I can set my own styles. Unfortunately, this isn’t normally how it works. Typically, when copying from a web page in a browser, it may also copy any tables, images, and styles that are applied to or mixed with the text. This does depend on where you are pasting the text, though. In my case, I use Microsoft Word most of the time. Word supports a lot of web page elements, meaning they will likely appear in the Word document.

Consider the following text:

This is some example text. You’ll notice that numerous styles are appliedwarning

Here are some bullet points:

  • One
  • Two
  • Three
    • Three Part 1
    • Three Part 2
  • Four

If I wanted to copy that text to Microsoft Word, here is what I’d see:

pastedtoword

The formatting is mostly intact. What if you didn’t want that? What if you just wanted plain text, and you wanted to choose your own styles from scratch? There is one way to do it from within Word (click the wordbutton1 button for these options), but I’ll show you how to do it without such a  feature. To achieve this, I paste the text into Notepad. Yes, Notepad – the simple text editor provided by Windows. Here’s what the text will look like, once pasted:

Notepad will remove formatting from any text you paste into it.

Notice how the image is gone, and all the styles are removed? Now you can copy this text instead, and paste it in Word:

pastedtowordplaintext

No more styles, bullets, or image. You can now style it exactly as you want, without having to start off with the same formatting as the web page. This isn’t, perfect, though – you may have to make corrections to the plain text copy in Notepad, as the removal of the formatting sometimes leaves the text with improper indentation.

I’ve used this little trick in a few different scenarios. Here’s an example: Sometimes I include a quote from a website in my e-mails. The default format for my e-mails is rich text, but when I include something from another source, I really don’t care about formatting – I’ll set my own formatting to suit my e-mail. If I just copy paste the quote into my e-mail, it will include the formatting – this usually ruins the look of my e-mail. To prevent this, what I do first is use Notepad to destroy the formatting, and then paste the plain-text version into my e-mail.

The Snipping Tool Is Not Working On Your Computer Right Now

In a previous post, I described a screen capture application included with Windows, called Snipping Tool.  Since then, I’ve been using it regularly for my screen capture needs. That is, until I realized an interesting flaw: the application, after a few uses, stops working. In Vista, here’s the error message I get:

The Snipping Tool is not working on your computer right now. Restart your computer, and then try again. If the problem persists, contact your system administrator.

It eventually appears when you try to launch the tool, preventing you from using it. The advice the dialog offers (restarting your computer and then trying again) is totally unacceptable, in my mind. Because of this problem, I could not rely on the tool – so I instead started using Jing more often. Eventually, I tried to see if I could do something to fix this problem whenever it occurred.

Solution

The solution I found was to kill the Snipping Tool process, and then re-launch it. This way, rebooting isn’t necessary. Simply fire up Task Manager, right-click the SnippingTool.exe process, and select End Process:

End the "SnippingTool.exe" process using Task Manager

Once the process has been killed, you can try re-launching Snipping Tool – it should now start up correctly.

If that doesn’t fix it, and rebooting also doesn’t, you might need to run Office Diagnostics – other users have had success with that.

See Also

Enabling Theme Support in Windows Server 2003

Microsoft’s Server operating systems are specifically aligned to offer, above all, top reliability and performance. It is therefore no surprise that Windows Server 2003, at first glance, seems to lack the standard Luna desktop theme that XP users have been accustomed to. Here’s the thing: The feature isn’t missing, it’s just “hidden” by default. Solution Here’s how to enable it:

1) Open the Services Management Console by entering “services.msc” in the Run dialog.

To open the Run dialog, click Start > Run, or press Windows Key + R.

2) Locate the Themes service, right-click it, and select Properties.

Screenshot of the Services dialog, with the Themes service selected.

3) On the General tab, select the Startup Type dropdown, and choose Automatic.

4) Click Apply.

5) Click OK.

6) Right-click the Themes service again, and select Start.

7) Close the Service Management Console.

8) Right-click on the desktop, and select Properties.

9) On the Themes tab, select the Theme dropdown, and choose Windows XP.

10) Click Apply.

11) Click OK. The Windows XP option, by default, is not listed as an available theme in the Display Properties dialog. When we started the Themes service, the option was added… and there you have it. You can now use the XP theme (Luna), in a Windows Server 2003 environment.

A screenshot of the Themes tab of the Display Settings dialog, with the Windows XP theme selected.

How to Learn More About the Background Pictures Featured on Bing

When Microsoft announced their new Bing search engine, I was immediately curious about how it compared to Google. I changed Bing to my default search engine, and tried using it daily. Ultimately, I returned to Google, which always seemed to have slightly better search results – in most cases. Despite this fact, I visit Bing it at least once a day  – but not to search. I visit it daily specifically to see the new background image they are using. They change this background image every day, and each one is usually impressive. In fact, in most cases, seeing it actually makes me want to find out more about what I’m seeing.

As an example, consider the following screenshot:

Bing background for July 5th, 2009.

Great image – the type of image that makes me want to know more. This brings us to the problem, though. Bing doesn’t actually tell you anything about what you’re seeing – other than the copyright information. They do give you more information if you are using the United States version of the site – but I’m Canadian. Not only that, but they don’t have the same images on the United States version of the site. Essentially, this means I’m stuck trying to figure out what the photo is depicting, by myself. I found a pretty simple, albeit manual solution: looking at the source code of the page. The background image filename is actually prefixed with some text, in this case, “CalabriaCoast”:

http://www.bing.com/fd/hpk2/CalabriaCoast_EN-CA1974044658.jpg

Once you have that name, you’re in business – search for that text on the web, and you’ll likely find some informative pages among the top results. Worse case, if you don’t have anything useful on the first few pages, at least you have a lead to work with. In my experience, once you have that name – you have it all. That is, of course, if the picture is of something unique, rather than yesterday’s photo: “Zebras”. If you were interested in where the zebras were, you’d have to guess based on the photo alone.

Now… as for how to actually find that name – I have a pretty quick process. I’ll explain how to do it here – covering the major browsers – but keep in mind, these methods aren’t very elegant – some of them require the use of developer tools. I hope Microsoft eventually makes this easier for regular users… and while they’re at it, people that don’t live in the United States.

How to Find the Bing Background Filename Using Your Browser

Google Chrome 2

An example of how to use the Google Chrome Inspector to locate the Bing background filename.

Using Google Chrome

  1. Right-click the background image.
  2. Select “Inspect Element”.

A window appears with the element selected – notice on the right sidebar, you’ll see a URL that is partially cut off. Hover your mouse over this URL, and a tooltip will appear – revealing the whole thing. You can even right-click it, and copy it from there. See the screenshot.

Internet Explorer 8

  1. Right-click the background image.
  2. Select “Save Background As”.

A window pops up asking you to save the file. Take note of the name it is suggesting, as that is the name of the background image.

Mozilla Firefox 3.5

Using Mozilla Firefox's Page Info feature to find the Bing background filename.

Using Mozilla Firefox

  1. Right-click anywhere on the Bing page.
  2. Select “View Page Info”.
  3. Click the “Media” tab.

You’ll see the background listed along with other images. See the screenshot.

Safari 4

  1. Right-click anywhere on the Bing page, and select “View Source”.
  2. Click CTRL+F, and then type in “.jpg” as the search term.

Cycle through the search results – there should only be three. You will find that one of them is actually background image URL.

Steam: Fallout 3 failed to start (error code 80)

Here’s a really quick one: I kept getting this error when I tried to launch my recently purchased copy of Fallout 3. I googled around a bit, and while I found people with the same problem, no fixes were available.

"Steam - Game Launch Failed" error dialog

Solution

While not an actual solution, I’ve been able to circumvent this problem by closing Steam, and re-opening it. This will allow you to launch the game successfully, but only once. If you quit the game, and try to launch it again, it won’t work. To get it to launch again, simply repeat the process – close Steam, re-open it. I’ll try and figure out how to fix this once and for all.

See Also

Steam Forum Post – Fallout 3 fell over and went boom 🙁

UPDATE January 8, 2023 – Old comments posted to my previous site can be seen here.