Friday, October 18, 2013

Ubuntu 13.10 PHPMyAdmin - mcrypt extension is missing

I am setting up a new Drupal installation with LAMP on Ubuntu (Saucy Salamander - 13.10). Installing the LAMP server and PHPMyAdmin was like a breeze. I just needed the following command:
sudo apt-get install lamp-server^ phpmyadmin
Once I logged into the fresh PHPMyAdmin interface, I realized that "mcrypt" module is missing in default Ubuntu installation. The error I found at the bottom of the PHPMyAdmin page simply page said:

"The mcrypt extension is missing. Please check your PHP configuration."

After doing a quick "apt-cache search", I found the right php5-mcrypt module that I was missing. So I issued:
sudo apt-get install php5-mcrypt
sudo service apache2 restart
Interestingly, even after this I had the "mcrypt missing" error. So I took a quick look inside my /etc/php5/ directory and found the "mcrypt.ini" inside /etc/php5/conf.d. Now for apache2 PHP5 module, the configuration files are located inside /etc/php5/apache2/conf.d (not in /etc/php5/conf.d). So I realized that although mcrypt was installed for PHP5, it was not being loaded fro Apache.

So the fix was as shown below. Basically I am just creating a symlink for mcrypt.ini inside PHP5's Apache configuration directory.
cd /etc/php5/apache2/conf.d
sudo ln -s ../../conf.d/mcrypt.ini 30-mcrypt.ini
sudo service apache2 restart
 Hope you find it useful too!

Thursday, May 16, 2013

Disabling LightDM Lock-screen on Ubuntu 13.04

I have a custom LXDE on a Lubuntu installation. After the most recent upgrade to 13.04 (Raring Ringtail), I realized all my custom Compiz shortcuts were all overwritten. I used to use Ctrl+Alt+L as a shortcut to launch xscreensaver to lock my screen, which worked coherently with Synergy that allows me to use my laptop's  keyboard and touch-pad to control other machines in the same network. Not surprisingly after the upgrade Ctrl+Alt+L stopped launching xscreensaver and the same key-combination would fire-up LightDM lock-screen. LightDM's lock-screen is actually quite nice and I would love to keep it if it would work with Synergy, but it doesn't. So I had to disable it. Here's how you do it:
gsettings set org.gnome.desktop.screensaver lock-enabled false
After disabling LightDM, I can launch xscreensaver as shown below to lock my screen:
xscreensaver-command -lock 
Hope it helps someone in my situation. 

Wednesday, December 12, 2012

Disable HP EliteBook Laptop Keyboard HotKey Popups

Source:  HP Tech. Support

Basically HP is providing some registry keys to preferably enable/disable pop-ups that appear when Caps-Lock, Num-Lock, volume or brightness control buttons are pressed. The pop-ups are very annoying, takes longer than multiple seconds to disappear and appears on top of all other windows.

So, if you are alike me and want to stop the pop-ups from appearing forever, just download/save the following registry file and import into your registry (Saving the text below into a *.reg file and double-clicking should do the trick in case you haven't ever done it before).

P.S.
I just realized, the registry trick doesn't work if you have an older version of  "HP Hotkey Support" module installed. According to the source page, the latest version can be downloaded from here: ftp://ftp.hp.com/pub/softpaq/sp57501-58000/sp57879.exe


Monday, September 24, 2012

MiKTex 2.9: Packages and Styles Not Found Error on Windows 8

I just tried to compile one of my old Latex documents (which compiles fine on my Linux boxes) on my freshly installed Windows 8 machine with MiKTeX 2.9 and all hell broke loose with different a million "missing package" and "missing styles" error. My document is a IEEE conference paper. So it all started with a "IEEEtran.sty missing" error. Interestingly, although I had "Install missing packages on the fly" set to "Yes" (as can be seen on the screenshot), still I was getting this error.

A little bit of debugging through the error messages reveals - it's all about file write permission. Windows 8 has a stricter ACL set for the installed programs on write access. Therefore, the "on the fly" installable packages, although were being fetched, were failing to get installed.

The trivial solution was to launch the "command prompt" (cmd.exe) as administrator and do a "pdflatex document.tex". This time all my missing styles and packages were fetched and installed!

P.S.
  • To manually install Latex packages on Windows 8, run "C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\mpm_mfc_admin.exe", select and install your package.
  •  To set your packages to install automatically, run "C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\mo_admin.exe" and set "Install missing packages automatically" to "yes" as shown in the screenshot.

Monday, September 10, 2012

Fix Error Code 2503/2502 on Windows 8

I have decided to give Windows 8 a few more days of my life (before deciding if I am going back to Windows 7). So I am re-installing many of the programs that I used everyday on my Windows 7 setup. Some of them are giving me this - "Error code 2503" dialog box followed by one more with "Error code 2502" while installation.

It appears that these installation packages lack required permissions to access and deploy files  necessary files due to Windows 8's strict security model. Right-clicking the installer (MSI or EXE) and selecting "Run as Administrator" solves the issue.

P.S.
Just realized that some of you might still be struggling to find the option "Run as Administrator" in the context menu. Try right-clicking on you MSI or EXE with the Shift button pressed (Shift+Right Click that is), you should have the option now.

The second option would be to search for the file through Window 8's unified start-button-search.
  1. Press the Windows key 
  2. Type part of the file name and navigate to the file
  3. Now press Ctrl+Shift+Enter
This will run your MSI or EXE as administrator. Cheers.