Read an article about Database Sharding from CodeFutures.
Category Archives: Sys Admin
Wikimedia’s servers
Was doing some research into scaling web applications and came across this diagram of Wikimedia’s servers.
100% Apache-Compliant REQUEST_URI for IIS and Windows
I had a problem with the REQUEST_URI server variable not being available in my PHP app when running under IIS on Windows. I followed these instructions to fix the problem: 100% Apache-Compliant REQUEST_URI for IIS and Windows.
I had to download and install ISAPI Rewrite 3 and Request_URI for IIS 1.1 which I installed into PHP by editing my php.ini file with this line:
auto_prepend_file = C:\Program Files\PHP\request_uri.inc
TortoiseGit
Setup TortoiseGit on my WinXP machine the other day following these instructions. I needed to install msysgit too.
Checking your Ubuntu version
Read about checking your Ubuntu version today and was reminded of lsb_release -a.
phpMyAdmin #1045 Cannot log in to the MySQL server
I was using phpMyAdmin and trying to login to my server with a new user that I’d created called ‘pma’ but I was getting the error “#1045 Cannot log in to the MySQL server”. The ‘pma’ user was also my phpMyAdmin control user and as its login wasn’t working advanced features of phpMyAdmin weren’t functional and I was getting an error letting me know.
I thought maybe the problem was that I’d specified the password for the ‘pma’ user incorrectly so I reset the ‘pma’ user password just to be user:
update user set password=PASSWORD("secret") where user='pma';
But the problem persisted. I had a look in the mysql.user table to see what was in there. The results included the following:
mysql> use mysql; Database changed mysql> select Host, User, Password from user; +-----------+-----------+-------------------------------------------+ | Host | User | Password | +-----------+-----------+-------------------------------------------+ | localhost | | | | % | pma | *BD053A55278DA675E32F28360C759B3FBEE32B3E | +-----------+-----------+-------------------------------------------+
Note the entry on the first line with a blank username. I have no idea how that entry got into my mysql.user table but basically it seems to be interpreted as “any user” at localhost with no password. I didn’t like the look of that so I deleted that entry. After that entry had been deleted the login for my ‘pma’ user started to work.
Thunderbird Message Filter Import/Export Enhanced
Found a Thunderbird plugin which can import and export mail filters: Thunderbird Message Filter Import/Export Enhanced.
MySQL Database Backup Methods
Today I searched for information about backing up MySQL databases and found Database Backup Methods which seemed to be a pretty good run down on what the options are.
My backup strategy at the moment uses mysqldump and there is an article about that too: Using mysqldump for Backups.
Enabling Server Side Includes (SSIs)
I have some old web content that works using Server Side Includes and I needed to get it functional on a new web server. I found this article How do I enable server-side includes (SSIs) on my site? which had everything I needed to know.
First I needed to add the content type and output filter to the Apache configuration:
AddType text/html .shtml AddOutputFilter INCLUDES .shtml
Then I needed to add the IncludesNoExec option:
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
Then I needed to specify the DirectoryIndex:
DirectoryIndex index.shtml index.html
And that was it!
Announcing Jsrun
Shawn Van Ness and I released Jsrun today. Jsrun is a script runner and suite of utility scripts written in JScript.NET for doing handy things on Windows.