# Tag: Tiger

If you have an iPhone or iPod Touch and point your Safari browser to this blog you can now view it in optimised format, thanks to the iWPhone WordPress Plugin and Theme. I’ve only changed the CSS slightly to have the same greeny look-and-feel of the current redoable theme.

Upgrading a WordPress-blog running under Tiger (Mac OS 10.4) to Leopard produces a few anxiety moments. All of the standard tools (Apache, PHP and MySQL) seem no longer to work as before. For those of you who do not want to waste too much time over it, I’ll walk through the process.

After upgrading to Leopard you want to check whether your blog is still alive, so you fire up Safari and will be greeted by the message that Safari cannot find your server. Sure enough you forgot to start the WebServer in SystemPreferences/Sharing/Web Sharing. Having fixed this you will see the default Apache-screen because Leopard put these default-files in your webserver-root directory (/Library/WebServer/Documents). In case you installed your blog under a user account you will get a message that you enter forbidden territory, see below for the solution to that problem. Having removed all those index.html files (making sure NOT to delete the index.php of your blog) a more serious problem presents itself : you see the text-version of index.php meaning that PHP isnt working. You check the /etc/httpd/httpd.conf file and it still contains all the changes you made to it to get PHP running under Tiger, so what is going on?

Googling for something like ‘enabling PHP under Leopard’ you’ll discover that the configuration file used by the webserver is in a different location. It now resides at /private/etc/apache2/httpd.conf. You will have to remove the hash sign (#) at the beginning of line 114 so that it reads

Next, you have to create a php.ini file and change one line. The first thing is settled by the following Terminal-commands

cd /private/etc
sudo cp php.ini.default php.ini

and in the php.ini you have to modify line 305 so that it becomes (removing the latter part of the line)

error_reporting = E_ALL

Restarting the webserver enables PHP. If you need more details check out the article Enabling PHP and Apache in Leopard. However, you are not quite done yet. Your blog will now show the WordPress-page that something is wrong with your mysql-database. However, mysql seems to be running fine as you can check from the Terminal so PHP cannot find it.

To remedy this, you have to add the locations (after the = sign) in the follwing two lines of the php.ini file

mysql.default_socket = /private/tmp/mysql.sock
mysqli.default_socket = /private/tmp/mysql.sock

Restarting the webserver should resolve the problem. But then your blog can still choke on old PHP-code in one of the plugins you use. In my case I was using an ancient version of the PHP-Markdown plugin but after replacing it with the newest version NeB looked just like I left it with Tiger…

A final point : webpages stored in personal Sites-folders cannot be served by Apache2 and will produce a message that you have not enough privileges to view the page. To resolve this, type the following command from the Terminal

sudo cp /private/etc/httpd/users/*.conf /private/etc/Apache2/users

Here a list of pdf-files of NeverEndingBooks-posts on general topics, in reverse chronological order.

On my
return from O a brand new 15inch MacBook Pro lie waiting in
my office. By that evening I had wrecked the system to the extend that I
could no longer login and had to reinstall from scratch… I was
about to trow it away but tried it out for a few more days and
eventually began to understand it a bit. In short : the new Intel Macs
promise to be really good hardware, unfortunately some essential
software lags behind, so if you want a stress-free Mac-life… hold
on to your PPC mac a few months longer. If you are impatient and want to
learn some of the pitfalls, read on… I’m ashamed to admit this
but the first thing I did on my new machine was to create a WindowsXP
partition… BootCamp does what it
promises to do and is extremely easy to use once you can start it. The
installation guide does tell that you jave to update your systems
software and firmware, but that’s what you do anyway after a new
install, right? Wrong! You update the software but _not_ the
firmware and it took me some time to come to this simple conclusion. How
to check whether your firmware is up to date? Go under the apple to
‘ Boot ROM Version:’ if it says MBP11.0055.B03 you’re ok, if not
you have to install the newest firmware which is a slightly terrifying experience
with soundsignals included, but works fine. Once this is done, you can
start BootCamp and have a Windows partition in no time. At a certain
moment you have to decide on possible partition-formats for the Windows
part, I choose the ‘Fat’ option to be able to swap files across
the partitions. Next, what does a mathematician wants from a
computer? To run LaTeX! I’ve installed LaTeX on more Macs than I
remember so I continued on automatic pilot, getting Gerben Wierda’s i-Installer, startd it up and
… my machine froze! Nothing, not even a ‘Force Quit’, was
possible any more. Today, there is a clear warning message as the
i-Installer page (i don’t recall seeing it there last week, but then it
is a recent problem. Things broke down on May 11th when I was still in
O)

WARNING: i-Installer on Mac OS X 10.4.6 may trigger
the Mac OS X 10.4.6 bug that partially freezes your system. May 2006:
i-Installer did work perfectly on Mac OS X 10.4.3, the version of Tiger
that was shipped with the Developer Transition Kit. When the first intel
machines were sold by Apple, these contained 10.4.4 and on that system,
i-Installer experiences troubles because of problems deep inside Apple’s
Frameworks. The only way I could solve this was to make i-Installer a
PowerPC-only application again and ask for Apple’s help to determine
where the problem was. So far, this has been s slow process without any
noticeable results. The PowerPC-only version worked fine until Apple
2006-003 and maybe QuickTime). As I am writing this (May 21) a
completely updated Mac OS X 10.4.6 on intel will partially freeze in
various circumstances, triggered by various applications (MatLab,
i-Installer, etc.). Sadly, the just released MacBook (successor of the
iBook) is shipping with this broken version of the OS. Hence, there is
now no i-Installer that reliably works on intel machines with recent OS
versions and even worse, i-Installer may trigger a nasty bug in recent
Mac OS X intel versions.

Scary isn’t it? You have a
brand new expensive machine but cannot typeset a single paper…
Fortunately, the TeXShop
page
not only mentions the problem, but also a workaround

On May 11, 2006, Apple provided security updates for Mac OS
X. These updates broke i-Installer on Intel (it continues to work on
PowerPC). If you have an Intel Mac and you have installed this update,
you must use the MacTeX install package until this problem is fixed.
Once TeX is installed, it works fine.

The first
assertion is true : installing the MacTeX package gives you a working
TeX-installation, with TeXShop, Excalibur, BibTeX and i-Installer coming
for free. But don’t think the i-Installer problem has been solved, I
tried it out and voila another ice-age… So far so good but
sometimes we like to compute things, don’t we? Like some commutative
algebra or algebraic geometry things via Singular? I remembered to
install this via the Fink
project
but already their news-items are not very promissing

A preliminary version of Fink for the Intel architecture is
now ready. No binary packages are available, and things are still rough
around the edges, but it should be usable if you are patient! To
install it, you need to install the XCode compiler and SDK packages (at
minimum). Then you need to get the file fink-0.24.14.tar.gz from the
Sourceforge file release page for Fink, expand the file, and run the
command ./bootstrap.sh . At the end of the bootstrap process, run fink
selfupdate and you’ll get the currently available packages. At last
check, there were about 1750 packages in the “stable” tree,
but about 150 of those did not build. When things are truly stable,
another annoucement will be made here.

The normal
FinkCommander didn’t work either but then I found a version which does
at Charles K. C. Lo’s
Homepage
. I verified it by having the fink-TeTeX package installed
(which works!) and then I wanted to do a Singular-install… Things
seemed to start off well (once you change the freferences to install
also unstable packages) but then the installation procedure halted with
the message

Failed: phase compiling: singular-3.0.1-1013
failed Before reporting any errors, please run “fink
selfupdate” and try again. If you continue to have issues, please
check to see if the FAQ on fink’s website solves the problem. If not,
ask on the fink-users or fink-beginners mailing lists. As a last
resort, you can try e-mailing the maintainer directly: Michael
Brickenstein bricken at mathematik.uni-kl.de Note that many
fink package maintainers do not (yet) have access to OS X on Intel
hardware, so you may have better luck on the mailing lists.

So, maybe I should just donate my MacBook Pro to the
Fink-project? A similar problem with installing Maxima… I didn’t
even try out GAP via Fink but went for a niversal Unix-installation for
GAP and this WORKED! even with all packages and tables and the whole I
dont know what. Thank you, GAPpers, perhaps all algebraists on Intel
Macs should shift to GroupTheory? But hey! My Intel-Mac does have a
WindowsXP partition… So, I did a binary Windows install of
Singular and Maxima and both work without problems. Still, it is a
strange situation. Fortunately, I did resolve these issues but that will
have to wait until tomorrow…

Promises and pie-crusts are made to be broken, a wiser man once
said. Still, promises have a much longer life-span and sometimes their
real content becomes redundant over time.

A year ago, I
promised
to document how I got the
LaTeXRender Plugin for WordPress
working under OS X. The procedure
consisted of some trial-and-error operations, installing non-standard
versions of software and hardcoding certain directories throughout
certain files…

Not something I was looking forward
to when I decided to upgrade this WordPress blog but,
surprisingly, things went pretty smoothly this time (Mac-technology
post
and follow the (late) instructions below.

First
things first : I will assume you have the ‘generic’ LaTeX
LaTeX and Imagemagick! Further, in order to get WordPress up and
running, have the standard
MySQL 4.0 package
installed for 10.3 (not version
4.1…) and don’t use the generic Mac-PHP version, but
Liyanage’s PHP5 package
packages installed (notably, GDlib and MCRYPT which comes in handy if
you want to fight spam-comments using BotCheck).

\r
\n

latexrender.zip
and follow the instructions given to the letter
(there is one undocumented extra directory you have to fill in at the
start of the latexrender-plugin.php file). There is
just one additional thing to do. Find in the
class.latexrender.php file the line starting
with

// convert dvi file to postscript using
dvips

and include the following lines just before it
:

// begin of workaround // extending the PATH
environmental variable Soldpath =
getenv(‚ÄúPATH‚Äù); Swhere_imagemagick_is =
‚Äú/usr/local/bin‚Äù; if (Soldpath) { Swhere_imagemagick_is .=
‚Äú:Soldpath‚Äù;} putenv(‚ÄúPATH=Swhere_imagemagick_is‚Äù); //
end of workaround 

activate the plugin and it
should work! Still, there are three things you may want to change. In
the latex.php file uncomment the indicated lines as
you will be using htmlArea to input your posts. In addition, if you
have the MarkDown-plugin enabled, it is best to append additional
lines such as

 Slatex_formula =
str_replace(‚Äú_‚Äù,‚Äù_‚Äù,Slatex_formula);     Slatex_formula
=
str_replace(‚Äú_‚Äù,‚Äù_‚Äù,Slatex_formula); 

(
between the first ” ” should be the beginning and end
em-tag respectively) or underscores will be interpreted as em-tags.
If you run into additional similar problems, the procedure is to
comment-out the line




near the end of class.latexrender.php , look in the
tmp directory for the TeX-file, detect the problem and add similar
lines to the ones above to solve it. Another useful thing to do
is to add TeX-packages in the class.latexrender.php file. My own
version has the following predefined symbols and loaded
packages

 function wrap_formula(Slatex_formula) {
Sstring  =
‚Äú\\documentclass[‚Äú.Sthis->_font_size.‚Äùpt]{‚Äú.Sthis->_latexclass
.‚Äù}\\n‚Äù;  Sstring .=
‚Äú\\usepackage[latin1]{inputenc}\\n‚Äù;  Sstring .=
‚Äú\\usepackage{amsmath}\\n‚Äù;  Sstring .=
‚Äú\\usepackage{amsfonts}\\n‚Äù;  Sstring .=
‚Äú\\usepackage{amssymb}\\n‚Äù;  Sstring .=
‚Äú\\usepackage{xy}\\n‚Äù;  Sstring .=
‚Äú\\xyoption{all}\\n‚Äù;  Sstring .=
‚Äú\\\\newcommand{\\vtx}[1]{*+[o][F-]{Scriptscriptstyle
#1}}\\n‚Äù;  Sstring .= ‚Äú\\\\newcommand{\\mathbb{C}c}{\\Bbbk}\\n‚Äù;
Sstring .= ‚Äú\\\\newcommand{\\mathbb{C}}{\\mathbb{C}}\\n‚Äù;  Sstring .=
‚Äú\\\\newcommand{\\mathbb{Q}}{\\mathbb{Q}}\\n‚Äù;  Sstring .=
‚Äú\\\\newcommand{\\mathbb{Z}}{\\mathbb{Z}}\\n‚Äù;  Sstring .=
‚Äú\\\\newcommand{\\mathbb{N}}{\\mathbb{N}}\\n‚Äù;  Sstring .=
‚Äú\\\\newcommand{\\mathbf}[1]{{\\\\text{\\em \\usefont{OT1}{cmtt}{m}{n}
#1}}}\\n‚Äù;  Sstring .= ‚Äú\\pagestyle{empty}\\n‚Äù;  Sstring
.= ‚Äú\\begin{document}\\n‚Äù;  Sstring .=
‚ÄúS‚Äù.Slatex_formula.‚ÄùS\\n‚Äù;  Sstring .=
‚Äú\\end{document}\\n‚Äù;          return Sstring;     }


which, among other things, allow all commenters to add
quiver-pictures using xymatrix and vtx to depict vertices. Oh yes, you
can allow comments to include LaTeX-code by uncommenting the
line

  // add_filter(‚Äòcomment_text‚Äô,
‚Äòaddlatex‚Äô); 

in the latexrender-plugin.php
file (but before you do make sure you have spam under control, such as
with BotCheck mentioned above). That’s all for now. If you want
to use TeX in a comment, make sure to put the code between tags [ tex
] and [ /tex ] (omitting the extra spaces). If you want me to add

I got
Tracks working under Tiger by trial and error starting with a suggestion
from Jan who found a fix here. From this I stumbled on for an hour or so on my iMac
untill near the very end I found that the tracks-page itself now
has a Tiger-section. So, let’s try to do it all over again from fresh on
my regular machine (a little iBook).

and read it all the way to the comments. There is a
comment by Jamie on installing Rails and MySQL on a fresh Tiger which
looks like the thing I want followed immediately by another post by Jose
Marinez on
Installing Ruby on Rails on Tiger
which I decided to follow by the
installer on Tiger
. Next, an install of the Standard version of
MySQL. I used version 4.0 for OS
X 10.3 !!!! NOT 4.1 !!!!
. I installed MySQL and the StartUpItem.
Next, I opened Terminal and typed the following commands

– cd
/usr/local/mysql
– sudo chown -R mysql data/
– sudo echo
– sudo ./bin/mysqld_safe &

and verified it by performing a
simple test

/usr/local/mysql/bin/mysql test

Next, I
secured everything by having a root-password

__*

Then I remembered that I’d better
not have to type the whole path so I did a

echo ‘export
PATH=/usr/local/mysql/bin:\$PATH’ >> ~/.bash_profile

Also, I want
installed it. Then I enabled my webserver to use PHP using this post though I
did use vi rather than pico! Next, i did a check whether everything
worked fine by typing in safari