Magento: Admin URI 404

Today I was informed that navigating to a (previously working) Magento installations’ admin page was no longer working. Obviously, paid orders cannot be processed. So it’s pretty serious, to say the least.

Stack Overflow gave me the solution, but it’s buried pretty deep down, so I’m copy-pasting for posterity, from

One common cause for this behavior is an invalid value (or no value at all) being set for a custom admin path. Since you can’t access the admin, try running the following SQL query. If you see results similar to the above, or admin/url/custom_path is blank/not-present but admin/url/use_custom_path is still 1 — then that’s your problem.

Hope this helps someone else out there in some small way.

Windows: Laptop can’t find Wi-Fi; others can

From the Start menu, right click “Computer”, then “Manage”.

“Computer Management” window comes up, navigate to System Tools -> Device Manager > Network adapters. Right click the correct one (e.g. Atheros AR5B97 Wireless Network Adapter), then Uninstall. Keep the driver software for the device, now you should have one less adapter.

Again from “Computer Management”, click Action > Scan for hardware changes.

The wireless adapter should be detected, and then previously missing wireless network should re-appear.

Extracted from

Yosemite Mail app: Can’t send Gmail messages

Recently, I decided to download all my mail into Mail app. I wanted to be able to receive and send using my existing Gmail account, but it didn’t work for me. I kept getting a prompt that Gmail was offline, when I knew otherwise. (Sending via web app worked, for example.)

After some digging, I found the solution in an Apple discussion forum. In case the answer ever gets buried (I hope not), it is related to truncation of the SMTP username; e.g. “” is shortened to “kzhiwei”. This does not work. To change, load up Mail, then click into Preferences > Accounts > Outgoing Mail Server (SMTP) > Edit SMTP Server List. Switch to the Advanced tab, then change the “User Name” field. For your reference, mine looks like:

Screenshot 2015-03-09 14.02.46

As usual, your mileage may vary. (And you’ll need to enable IMAP for Gmail, too.)

Android: FBreader screen grabs

I’ve bee doing quite a bit of reading nowadays. Every now and then I happen upon good writing. These resonate with me, so instead of taking a screen capture, I’m re-posting here instead where someone, someday might perhaps admire (and go read the book). This is a sticky post, so it’ll be updated as I slowly move these into text…

The Cuckoo’s Calling (Robert Galbraith): A lie would have no sense unless the truth were felt as dangerous.

The Elfstones of Shannara (Terry Brooks): Give thought to the purpose for those questions. Give thought to their source. Hurt gives way to bitterness, bitterness to anger. Travel too far that road, and the way is lost.

The Elves of Cintra (Terry Brooks): Her presence comforted him as nobody else could, and he was grateful for her beyond anything worlds could express.

Ender’s Game (Orson Scott Card): The story of Ender’s Game is not this book though it has that title emblazoned on it. The story is one that you and I will construct together in your memory. If the story means anything to you at all, then when you. remember it afterward, think of it, not as something I created, but rather as something that we made together.

Ender’s Game (Orson Scott Card): I didn’t want to see you. They told me. I was afraid I’d still love you. I hoped that you would. My fear, your wish — both granted.

Ender’s Game (Orson Scott Card): I am not a happy man, Ender. Humanity does not ask us to be happy. It merely asks us to be brilliant on its behalf. Survival first, then happiness as we can manage it.

The First King of Shannara (Terry Brooks): Time stole away commitments and loosened ties. Friendship were reduced to tales of the past and vague promises for the future, neither strong enough to recover what was lost. But that was what life did – it took you down separate roads until one day you found yourself alone.

The First King of Shannara (Terry Brooks): That’s how it is with parents and children. Each disappoints the other n ways that neither recognizes nor intends, and it takes time to overcome that disappointment.

The First King of Shannara (Terry Brooks): But it marked you. For a time, but not in any lasting way. Perhaps it even helped toughen me. I don’t pretend to know. We grow as best we can under the circumstances given us. What good does it do to second-guess ourselves years after the fact? Better that we simply try to understand why we are as we are and then better ourselves by learning from that.

The Gypsy Morph (Terry Brooks): He says nothing in response, but words are not necessary when she feels the gentle squeeze of his hand over hers. He understands. He is happy, too. They walk for a long time, content just to be with each other, like father and daughter, like family. She thinks of them this way, of herself as his daughter, him as her father. There is more to family than shared blood. There is trust and friendship and commitment. She is only eight years old, but she already knows this.

A Knight of the Word (Terry Brooks): I was just in the neighborhood, and decided to stop by, share a few laughs, maybe see if you’re in the market for a boyfriend.

A Knight of the Word (Terry Brooks): The horror of what had happened enveloped and consumed him. It haunted his sleep and destroyed his peace of mind. He could not function. He sat paralyzed in small rooms far away from San Sobel, trying to regain his sense of purpose. He had experienced failure before, but nothing with consequences that were so dramatic and so personal. He had thought he could handle anything, but he wasn’t prepared for this.

A Knight of the Word (Terry Brooks): He cried often, and he ached deep inside. He replayed the events over and over in his head, trying to decide what it was he had done wrong.

A Knight of the Word (Terry Brooks): We are homeless in the streets and we are homeless in our hearts as well. We have no purpose in the world. We have no center. Our way of life was changed for us long ago, and it will never return.

A Knight of the Word (Terry Brooks): We are a people under siege, walled away from each other and the world, trying to fend a safe path through the debris of hate and rage that collects around us. We drive our cars as if they were weapons. We use our children and friends as if their love and trust were expendable and meaningless. We think of ourselves first and others second. We lie and cheat and steal in little ways, thinking it unimportant, justifying it by telling ourselves that others do it, too. We have no patience with the mistake of others. We have no empathy for their despair. We have no compassion for their misery.

A Knight of the Word (Terry Brooks): What we have in life we can count our own is who we are, and where we come from, she thought absently.

The Ocean at the End of the Lane (Neil Gaiman): An admission about myself: as a very small boy, perhaps three or four years old, I could be a monster. “You were a momzer,” several aunts told me, on different occasions, once I had safely reached adulthood and my dreadful infant deeds could be recalled with wry amusement. But I don’t actually remember being a monster. I just remember wanting my own way.

Running with the Demon (Terry Brooks): Doubts set in. Had he dreamed it all? Had he imagined her? Or worse, had he mistaken her intent? What if the great purpose he had envisioned, the purpose for which he had searched so long, was a lie? Doubts turned to mistrust. What if he had been deceived? He was beset by nightmares that woke him shaking and chilly on the hottest nights, sweaty and fiery on the coldest nights.

Ten Pieces of Inspiration #158 (Trent Hamm): Some of the biggest mistakes in my life have come from giving up on relationships because they happened to not be easy at the moment.

Proftpd for CentOS 6

More of a note to self than anything. As usual, YMMV.

1. Add RPMForge repo.

# rpm --import
# wget
# rpm -Uvh rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm
# yum install proftpd -y
# chkconfig --level 345 proftpd on
# /etc/init.d/proftpd restart
# netstat -tnlp|grep proftpd
tcp 0 0 :::21 :::* LISTEN 36615/proftpd

2. Configure iptables.

# iptables -A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
# etc/init.d/iptables save; etc/init.d/iptables restart

3. New Linux user.

# useradd foo -p /path/to/home/directory
# passwd foo

4a. Failed login #1; e.g.

Command: USER foo
Response: 331 Password required for foo
Command: PASS ********
Response: 530 Login incorrect.
Error: Critical error: Could not connect to server

4b. Note /var/log/secure erros; e.g.

Oct 29 03:41:07 bar proftpd: PAM unable to dlopen(/lib64/security/ /lib64/security/ cannot open shared object file: No such file or directory
Oct 29 03:41:07 bar proftpd: PAM adding faulty module: /lib64/security/
Oct 29 03:41:07 bar proftpd[36319]: ([]) - USER foo (Login failed): Incorrect password.

4c. Fix PAM config for proftpd-1.3.4a-1.el6.rf.x86_64.

# cat /etc/pam.d/proftpd
auth required item=user sense=deny file=/etc/ftpusers onerr=succeed
auth required
auth include system-auth
account include system-auth
session include system-auth
session required
# /etc/init.d/proftpd restart

4d. Failed login #2; e.g.

Command: PWD
Response: 257 "/" is the current directory
Command: TYPE I
Response: 200 Type set to I
Command: PASV
Response: 227 Entering Passive Mode.
Command: MLSD
Error: Connection timed out
Error: Failed to retrieve directory listing

4e. Configure passive FTP.

# iptables -A INPUT -p tcp -m multiport --dports 60000:65535 -j ACCEPT
# etc/init.d/iptables save; etc/init.d/iptables restart
# cat /etc/proftpd.conf|grep PassivePort
PassivePorts 60000 65535
# /etc/init.d/proftpd restart

5. Success!

Command: MLSD
Response: 150 Opening ASCII mode data connection for MLSD
Response: 226 Transfer complete
Status: Directory listing successful


CentOS: httpd invalid command

Was configuring a CentOS 6 server recently, and I decided to comment out all httpd (i.e. Apache) LoadModule directives. Upon restart, there were several invalid commands, so I took the time to note ’em down as it wasn’t obvious (to me, at least) which commands were provided by which modules.

I liken this to a cheat sheet to then:

Invalid command 'AddHandler': mod_mime
Invalid command 'Alias': mod_alias
Invalid command 'BrowserMatch': mod_setenvif
Invalid command 'DirectoryIndex': mod_dir
Invalid command 'IndexOptions': mod_autoindex
Invalid command 'LanguagePriority': mod_negotiation
Invalid command 'LogFormat': mod_log_config
Invalid command 'Order': mod_authz_host
Invalid command 'TransferLog': mod_log_config