Index syndication
comment syndication

Archive for webdev

WordPress 2.7 RC1 on iPhone

Now that I am using wordpress 2.7, I thought it would be good to test the iPhone app for wordpress. This is written on the app itself. I would say that although useful it seems to be more favorable to blog from a computer. The iPhone is suited to short spurts of typing, more on the realms of SMS or twitter.

The capability of quickly adding photos and the tag/category functionality seems full featured, as shown by a photo of my dinner I made from Cook with Jamie.

The app did crash when I tried to load this post from a local draft – it looks like the iPhone app needs a bit more work.

Blogging from the iPhone? 6 out of 10 points.

WordPress 2.7 RC1

I’m lagging so far behind on wordpress that I’m probably breaking all the security rules.
So in an effort to be more proactive in online open-source communities I’m giving WordPress V2.7 Release Candidate 1 a whirl. Looking forward to the new Admin UI.

Does anyone else ride the bleeding edge when it comes to tech blogging?

Edit: The upgrade worked. 2.7 RC1 even worked with all my 2.3 plugins straight up!

MySQL on OpenBSD 4.3 using the Apache Chroot

I’m back with some more tech geek goodness for anyone who uses MySQL and OpenBSD.

OpenBSD by default apache runs in a chroot jail, thereby making it more secure in case the www server is compromised. I have talked about this before.

However if you use wordpress or some other web application that needs MySQL (and I’m talking where apache and MySQL reside on the same host), then the chroot jail will not allow your webapp access to the mysql socket file which is by default located in /var/run/mysql/

There are various solutions available online to wait x number of seconds and then to create symlinks, etc – but this was not always working for me – with the result the server would sometimes be up without database availability.

Here is my solution (thanks to NoMoa for the idea) – very simple, no postfix symlink but there is a symlink to allow other applications to access MySQL locally via the default socket location.

First I create the run dirs in the apache jail:

mkdir -p /var/www/var/run/mysql
chown _mysql:_mysql /var/www/var/run/mysql
chmod 711 /var/www/var/run/mysql

Then I add this to the bottom of /etc/rc.local on the webhost.

#mySQL
if [ X"${mysql}" == X"YES" -a -x /usr/local/bin/mysqld_safe ]; then
echo -n " mysqld"; /usr/local/bin/mysqld_safe --user=_mysql --log --open-files-limit=256 --socket=/var/www/var/run/mysql/mysql.sock &
if [ ! -L /var/run/mysql/mysql.sock ]; then
mkdir -p /var/run/mysql
chown _mysql:_mysql /var/run/mysql
chmod 711 /var/run/mysql
ln -fs /var/www/var/run/mysql/mysql.sock /var/run/mysql/mysql.sock
fi
fi

Lastly I add this to my /etc/rc.conf.local

mysql=YES

Note: you may need to change the open-files-limit to suit, but the above paths are as per a standard OpenBSD 4.3 install using the supplied MySQL pkgs.

I tested this all out on OpenBSD 4.3 and it now works fine for me. Whenever the server comes up I never get the dreaded word press DB failure screen. Good luck

Server Migration complete

I’ve had an on/off outage for most of the past 4 days, so to avoid hassles I put the site into maintenance mode.

I’ve actually had to decommission my 19″ server rack and the multiple servers I had for Tech Debug. There was a DNS server, kerberos, Database and web server. All the separate functions are now hosted on one OpenBSD VM that I’ve built recently. It’s running on the only remaining “non-laptop” left in my residence, which runs 24×7.

The only delay in getting back online in the last 48 hours was the MySQL data export and import. It’s a bit convoluted, and not documented in entirely one place on the MySQL documentation site (backup here, restore here), however once done once it will be easy to repeat. I still like the simplicity of PostgreSQL administration. Specifically the backup and restore:

Backup:
pg_dumpall > savefile.dump
Restore:
psql -f savefile.dump postgres

Well, there are some prep steps you should do; but it is all in one place on their documentation page.

Let me know how the site performs on the VM.

« Previous entries · Next entries »