Can’t Install Drush On Windows 10 With XAMPP

I’ve been using XAMPP for years. It’s stable, it’s reliable, and most of all, it’s easy. I can install local instances of Drupal, WordPress, whatever. I mostly use it for PHP. It’s very easy to install and get up and running in no time.

Well all that went to shit when I needed to use Drush 8 (for Drupal 8). Since it’s a Windows application, it isn’t very easy to install such things as Composer and Drush. Drush now has the prerequisite of Composer so Composer MUST be installed.

This was a headache in and of itself. I tried to install the windows package but I kept getting:

The “” file could not be downloaded: SSL operation failed with code 1.

I had to install it via the shell in WAMP:

curl -sSk | php — –disable-tls

That worked! I got around the SSL issue.

I had to copy composer.phar to the C:\xampp directory. Composer is currently installed at C:\Users\xxxx\AppData\Roaming\Composer.

I also needed to create a composer.bat file with the following in it:

php “%~dp0composer.phar” %*

I put this in the C:\xampp directory and ran it. Composer now works on any directory.

But the story isn’t over yet. I still had to install Drush 8!

I followed the Drush installation instructions found on modulesunraveled. I tried and modified BOTH my User variables and System variables. No luck. Anytime I tried to do a drush command I would get:

‘drush’ is not recognized as an internal command

From the shell. It would work if I was in the C:\Users\xxxx\AppData\Roaming\Composer\vendor\drush\drush directory but that was no good.

I swear to god nothing comes easy anymore! After DAYS of trying to figure out how to install Drush via Windows with XAMPP I finally reached the solution this morning. I tried a variety of things so I’m not sure what exactly did work about it.

I thought it may have to do with the fact that drush is under C:\Users so I decided to move it under XAMPP so I copied it C:\xampp\php\lib\drush. Don’t judge me. I was desperate.

Then I modified my system variables to add EVERYTHING (i.e. Control Panel –> System –> Advanced system settings –> Environmental Variables). My Path for System variables now looks like this:c:\xampp\php; c:\xampp;c:\xampp\php\lib\drush;c:\xampp\mysql\bin

Like I said, don’t judge cause it works.

Thanks to a forum about a Composer issue (the composer.json wasn’t found when I tried to do composer), I found what then was able to make it all work.

I cd’d into the Drush directory (i.e. cd C:\xampp\php\lib\drush) and did a composer update. All of a sudden all these things started to install which I took as a good sign!

I then tried to do drush which didn’t do anything but dr did! I now get information if I do dr in any directory!

I hope this can help someone else out!

There are NO WORDS about how difficult this process is. I’ve been a developer for many, many years. Drupal 8 is one of the most complex CMSs and the fact that we need to use Composer and Drush along with it is sheer ludicrous. The web and web technologies have totally changed from just a few years ago.

We shouldn’t make things harder we should be making them simpler! Back in the day all you needed was PHP and a MySQL (or any other kind of DB) backend and you were good. Now it’s gotten to the point where you have all these dependencies and if one thing doesn’t work, it all goes to shit.

This shouldn’t be how it is now. Things aren’t documented. Other developers have lots and lots of issues just getting the simplest of applications to work. Why the fuck did they go and make things so complicated? It’s supposed to be easier than this. It’s supposed to be simple. Life is hard enough!

I remember installing MSSQL for free back in like 2008. Everything came with it and it was easy to do. Now you need MSSQL as well as the UI and you have to do all these things just to install it. I needed help from our IT department!

Life SHOULDN’T BE LIKE THIS. Stop making life harder for others. Make it easier and for god sake document your fucking shit. (Ex. LOOK AT THE GOD DAMN FILE FAQ FOR DRUSH! WHAT THE FUCKING FUCK???)

Google Reader Not Working

Google updated Google Reader about two to three weeks ago. The interface is a lot different than what it used to be. Even on, they have a screen shot of the old interface which was a lot nicer and easier.

Anyway, I noticed that I couldn’t read any of my new feeds. If I had a feed that had more than one new posting, I was unable to scroll down to see them. I had tried everything with the new Google Reader. What’s more is that when I tried the new “Sort” feature from the dropdown, it would freeze and not do anything. Here is a screen shots:

Google Reader only showing one result, no scroll option

After a few weeks and tweets about this issue I was running out of ideas and patience. It had never occured to me that it might be my browser. I’m still running FF 3.6 since I have a bunch of add-ons that still aren’t supported by the new FF 292834.

Switching to Chrome, I get a nice little custom scroll bar on the right and all my feeds are able to be read again. And I can even sort!

WTF, Google? Really? You didn’t test the new Google Reader in FF 3.6 which is still used by 8% of the population. And no warning or anything either that I may be using an out of date browser that can’t support your new flashy Reader. So now I’m going to have to view my feeds in Chrome. Does your IE7 crowd (3.5% of the population) get the same respect?

Come on, man!

FireFox Print Bug With MOSS Site

I’ve been assigned the horrifying task of fixing various bugs in MOSS/SP sites at my work. One of the bugs is the inability for FireFox to print documents that span more than one page.

I’ve fixed the issue on another MOSS site but when I went to fix it on another, the same hack didn’t work. I did the same things as I did before. I basically started over on the CSS print style sheet and display: none ‘d everything that shouldn’t be displayed. I also gave everything (*) the values of overflow: visible !important and position: absolute and float: none . None of that worked.

Here’s the rough HTML code:

<div id="ncs">
 <div class="ncs_content">
  <div class="ncs_stage">
   <div class="ncs_stage_top">
    <div class="ncs_stage_content">content...</div>
 <div class="ncs_footer">turned off content</div>
 <div class="ncs_footer_printed_date">print date that needs to be displayed</div>

My CSS before:

#ncs { border: none; width: 100%; height: 100%; float: none; background: none; }

.ncs_content { background: none; border: none; float: none; }

/* this fixes the FF bug */
.ncs_stage_content {
    float: none;
    overflow: visible !important;
    position: absolute;
    height: auto;
    width: 90%;
    font-size: 14px;
    padding: 20px 0px;
    margin: 10px 0px;
    font-size: 120%;
    clear: both;
    display: block;

.ncs_footer { clear: both; height: 100%; position: relative; }

.ncs_footer_printed_date {
    float: left;
    display: block;
    width: 950px;
    position: relative;
    bottom: 0;
    left: 0;
    clear: both;
    height: 120%;
    vertical-align: bottom;

The problem with this was it was displaying the ncs_footer_printed_date at the top. I couldn’t for the life of me figure out how to get it to be at the bottom of the content.

I even went so far as to post it on . No one could figure it out.

I struggled DAYS with it. This was one of the hardest things I’ve ever had to do. I tried explaining to my boss that I didn’t think it was possible. He said to keep playing with it. So I did but how I get I play with it off and on.

I had to modify my CSS for everything to be encapsulated in #ncs. Then I had to play around with different styles so that the bottom would be displayed the same as the content. Here’s my finished CSS:

#ncs {
    float: none;
    overflow: visible !important;
    position: absolute;
    height: auto;
    width: 99%;
    font-size: 12px;
    padding: 20px 0px;
    margin: 10px 0px;
    clear: both;

.ncs_content { background: none; border: none; float: none; }

.ncs_stage_content, .ncs_stage { margin: 0; padding: 0; float: none; clear: both; font-size: 12px; }

.ncs_footer { display: none; }

.ncs_footer_printed_date { margin: 0px; padding: 0px; width: 750px; font-size: 12px; display: block; }

To my lovely FireFox: Screw you. You’ve known about this bug for EIGHT YEARS and you still haven’t fixed it. It’s a bug with YOUR SOFTWARE. Every other browser (even the more standards compliant ones) can print pages without issues. I find it incredibly ridiculous that you haven’t addressed this issue.

I understand about standards compliance. Microsoft doesn’t make any of their web software (let alone any website they create) W3C XHTML 1.0 compliant like it’s supposed to be. They just don’t care.

But you, you’re supposed to be better than that. You’re supposed to be the best. You’re the top browser. And to have known about this bug for eight years and not get around to fixing it is just shameful.

It’s like saying everyone else’s kid in the marching band is off step except mine. They’re all stupid, apparently.

But it’s no reason to not fix a serious problem. A lot of websites can’t print.

You’re wasting people’s time and you’re making it hard on us web developers. I understand you want to go with standards but at the cost of sanity… especially when most of us can’t edit code that we didn’t make (SHAREPOINT).

I expect better from you, FireFox. I was thinking about switching to another browser because of this idiocracy. But, quite frankly, I love FireBug too much and it’s only available in FireFox.

Please fix this printing issue in your next release. I hear good things from FF 4.0. Hopefully one of them will be an end to this madness. Good night and good luck.

How To Insert Images Into Links In Drupal

I only struggled with this for about an hour. I’m not sure why Drupal hasn’t thought of this before, but it would be nice to have images as links once in a while. I needed one for my menu… a home link that was an image of a little house (how cute).

I read on a blog to edit the theme_menu_item_link function located in includes/ . I then added my <img tag to the Description. Well, that didn’t work. I investigated it further and looked at the code and instead put it in the Menu Link Title. That didn’t work either. I even tried the PHP function html_entity_decode, but that didn’t work either. It was still escaping the characters.

Anyway, after googling and reading up on how to do it, I tried to edit the template.php file with no luck. I read some other blogs and tried to edit some other files but it still kept escaping the code. I didn’t want to mess with the other files Drupal had put there.

I finally formed my own solution. I decided to edit the files Dupal put in. I looked for the l() function which is the function that actually forms links.

I added the following to the function l() in the file includes/ on line 1598, right after the default options are declared in the $options array:

if (strpos($text, ‘<img’) === 0) {
$options[‘html’] = TRUE;

Yes, I know it’s unsafe but that’s the only way I could get it to NOT escape. I can now add HTML img script to the Menu Link Title and it display an image.

I’ll make this brief. I don’t know why Drupal didn’t think about images in link lists before. You think that would be obvious. The more and more I learn about Drupal, the more and more I realize how LESS flexible it is than I thought. I will say at least they have a community that can help, which is something that Microsoft seems to lack.

Come on, Drupal, think common sense.

Tackling Prepopulated Email Problem & Annoying Beep In SharePoint

This blog post is actually for two problems with SharePoint I’ve come across.

It was requested of me to figure out how to prepopulate the email address in SharePoint login prompts. When you login to SharePoint, if you want to do anything like open a document, you are prompted for your AD (Active Directory) credentials again and again. Needless to say, this is unnecessary and annoying.

FIX #1
After many hours of googling “prepopulate email address in SharePoint”, I actually found the fix in the SharePoint book. It’s called Enabling Automatic Login. The steps are as followed:

On the CLIENT’S computer (aka not the server… aka everyone who uses SharePoint… their actual computer) in IE (make sure it’s Internet Explorer since SharePoint really only works with IE), go to:

Tools –> Internet Options –> click on the Security tab –> select Local Internet –> then click Sites –> Advanced

Under Advanced, the URL of this website should be in the first form field. Click Add. Then Close, then Ok and Ok again.

That should fix the prompting annoyance.

When in SharePoint, you click anything (and I mean ANYTHING), there is an annoying beep. It’s like on every link, on every page, everywhere. I don’t have speakers but I have headphones hooked into my computer. Needless to say, I heard the beep with my headphones off, it was that loud. It’s annoying.

FIX #2
This fix is for the client’s computer as well… not the server… not an actual setting in SharePoint (at least none that I could find). So… on the clients computer go to:

Control Panel –> Sounds and Audio Devices –> click on the Sounds tab –> under Program Events scroll down to Windows Explorer –> Information Bar –> under Sounds select (None).

It was driving me crazy!

If the simple fact that you MUST use IE with SharePoint wasn’t enough, there aren’t settings in Central Administration nor on the server that solve minor annoyances like this. Microsoft should have thought about these things before they released this hunk of garbage that is SharePoint. I sincerely hope others realize that Microsoft is just a thug corporation who thinks it owns the world.

They don’t comply with standards, they don’t debug, and they don’t test their products.  We are do their tests for them!

About a year ago I ran into a Microsoft error… Emails were not sending which had both .txt and .vcs files attached to them. (In case you don’t know .vcs files are for Outlook calendars.) No errors, just the emails weren’t sending. What was also weird is that some emails actually WERE getting through… and they all did before. It worked before but all of a sudden stopped working. No server changes, no MS Exchange changes.

I ended up calling Microsoft. They sent me a test program which emailed me a .txt and .vcs file. It wouldn’t work. It turns out the problem was on their end.

In the end, the dude wouldn’t stop bugging me on getting me to help him fix it. I was like “isn’t it your problem now”? They did refund me the ticket since it was their fault.

I think it’s a little ridiculous that these problems are easily fixed on the CLIENT’S side. There should be settings in Central Admin or on the actual site that take care of simple things like this so I don’t need to send out an email or post on how to fix it. The fact that every computer you use that has SharePoint, you must configure IE so those little prompts and sounds don’t drive you up the wall is unbelievable.

We don’t want to be prompted on every link or hear that annoying “blimp” every click. Use some common sense, Microsoft. Good night and good luck.

SharePoint Bug With Firefox

I noticed this around the SharePoint site I’m managing with the Central Administration. When going to select something from a drop down, it doesn’t insert it into the form.

Using IE, oddly enough, solves this problem. The selected item is inserted properly into the form.

I’ll begin by saying I am a devoted Mozilla Firefox user. I use IE rarely when Firefox has issues or when TESTING a web application. As a web designer/programmer, I need to make sure that my product can function with any browser. I take the extra step in assuring that my product is fully operational, no matter what browser a user is using. I test my application with Firefox, IE, Safari, and Opera to make sure it works. If it doesn’t, I fix it so that it does work with that browser.

Microsoft programmers, you should be ashamed. To release a tool as powerful and as popular as SharePoint and have it NOT be compatible with one of the most popular browsers as Firefox. How dare you not test your product thoroughly, using multiple browsers. Did you assume that only IE users will use your product? You are wrong, sirs.

If you were to go ahead and make the outrageous requirement to ONLY use IE with SharePoint, why not display an error or a warning message when someone goes to a SharePoint site with a browser other than IE? Seriously. Here I was trying to figure out why it wouldn’t insert my selection when all the while it was because of the browser I was using. Rediculous.

And another thing, why even have this visual show for a simple drop down menu anyway? What a waste of time programming something like that. Why should it open up a completely different window just to insert one little thing? Just make it a simple drop down. Who are you trying to impress? Are we all supposed to be like “ouu, look at that, visually pleasing”. I don’t think so and I am NOT amused.

You wasted my time and my energy trying to research this problem, emailing everyone I could think of who uses SharePoint. Even drafting an email to my boss explaining that I couldn’t do a task because there’s a bug in SharePoint (yeah, that sounds good, right?).

Come on, Microsoft, get with the picture. Good night and good luck.