Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
User Journal

Journal Journal: PHP & Oracle on Solaris

Think I've found the problem with mod_php segfaulting every Apache child process.

Using the httpd debugging instructions I ran apache in gdb (oh, of course I had to install gdb first), and located the error pretty quickly.

#0 0xfe3007b8 in gslufpFLog () from /home/oracle/product/9.2.0/lib32/libclntsh.so.9.0
#1 0xfe2efb30 in ldap_init () from /home/oracle/product/9.2.0/lib32/libclntsh.so.9.0
#2 0xfeae20ac in openConnection () from /usr/lib/libsldap.so.1

A little googling and I figured out that I'd have to rebuild mod_php, linking against Oracle's LDAP.

Only that doesn't work... same error... Oracle is not using it's own ldap routine....

User Journal

Journal Journal: One More Thing....

And just one more little thing... is it too much to ask to have mouse paste (copy/paste using the mouse exclusively) in OS X?

User Journal

Journal Journal: OS X Sucks 1

Over the weekend, I spent too much time attempting to restore an Apple XServe which would not boot.

Apparently, and as admitted by Apple Support to me over the phone, the OS X Server disk repair utilities are too "conservative" (I'd say, "woefully inadequate"). In other words, they'll fix simple fscking problems, but if the corruption is more severe, you're screwed.

In that case, you must resort to third-party payware utilities, which of course must run on another Mac. Or you can re-install.

In this particular case, apparently the boot info has been corrupted. In Linux, this would be a simple matter. You'd have /boot in a seperate volume, so could boot using the kernel on the install cd, telling it where the root partition is. And if both partitions were corrupt, you could fix them with the tools on the install or rescue cd. Since they are free software, repair options abound for Linux. On OS X, you're S.O.L. ....

User Journal

Journal Journal: Linux on the iMac

A summary of my experience with various Linux distributions on an iMac DV SE. It has an ATI Rage 128 Pro card which is not well-supported by the Linux kernel, and in all cases, had to be installed under text mode.

Yellow Dog 3.0
Install worked, then booted to a nice graphical login. However the screen was shifted left, outside the physical display area. Sound worked. X locked up after the first logout, however subsequent logouts did work. Did not remember volume settings. Sometimes froze at the 'detecting new hardware' boot step. Sometimes locked up in X Windows and had to be reset. Other kernels out there had various problems such as sound not working or the network card not configured. yum is garbage, not recovering from network timeouts, not offering a way to select mirrors, or a graphical interface.
Yellow Dog 4.0
After waiting six months beyond the announced release date, YDL 4.0 finally became available. It did not install a working X Windows.
Mandrake PPC 9.1
Did not install working sound or X Windows.
Mandrake PPC 10.1
Not officially supported (a volunteer project something like Fedora, but with only a few people active on it).
Fedora PPC
Looking at their mailing list archives, it seems this is at best beta-quality (and in fact, YDL 4.0 is based on it).
Debian PPC
I'd run debian on an older powermac, but it also did not provide a working X-windows out of the box.
Gentoo
Excellent documentation guided me to find solutions for all the unusual hardware that this powerpc has. Each step has usually meant another kernel compile, however they have always worked (in contrast to YDL). It runs solidly (no lockups, again in contrast to YDL) and fast. Mozilla and OpenOffice start in seconds.

In summary, I wouldn't recommend Gentoo for a generic x86 box, but if you have odd hardware--if you need to take the time to configure everything yourself anyways--then gentoo is the way to go.

User Journal

Journal Journal: Solaris Is Dead To Me

The lack of an automated package management tool on Solaris makes it pretty worthless to me. I know about pkgadd and at one time there was a port of apt-get, but where are the repositories of free software for solaris?

I've used SunFreeware.com for many years, however it is typically months out of date and only offers a fraction of what is available on Linux (or even OS X).

Recently I had to build a website using apache, postgresql and php. To get going on my development Linux box, it was a simple `urpmi apache2 php postgresql` to get going with all dependencies resolved, packages downloaded, installed and configured.

On Solaris (for the production site), it was a day compiling them from source by hand, figuring out all the config parameters I'd need to get things working together properly. Things still aren't working: php segfaults each apache child process--only when the server is started as root. (I'm guessing some safe mode compile-time option is preventing it from changing UIDs when apache starts). This has cost another day debugging so far.

Solaris is dead in the open water, with Linux distros encircling it like sharks. Don't tell me about fabulous new features like ZFS and DTrace or the supposed opening of the Solaris sources. If it can't interoperate in an easy way with the world of open source & free software already out there, it's dead to me.

User Journal

Journal Journal: MetaData In Oracle

The Oracle Data Dictionary is, among other things, a place to store metadata. You can provide up to 4K comments per object (table, column, whatever).

One way to insert comments is with the COMMENT SQL statement. The format is COMMENT ON TABLE|COLUMN [name] IS '[text]'. Then you can select descriptions out of sys.all_tab_comments and sys.all_col_comments.

A slightly more elegant way might be to have all your descriptions in a XML file, with an embedded XSLT stylesheet to transform it into SQL. A Makefile would call xsltproc, pipe it to sqlplus and, presto, "Bob's your uncle...".

Why would you want to do this? A handy, built-in, centralized location for describing your data.

User Journal

Journal Journal: SSL The Easy Way

Setting up SSL (with a self-signed certificate) in Apache 2 is easier than the docs would have you believe. Basically, it's just two command lines. You don't have to create a shell script.

Before you start, note that the CA name should match your site name. First, create the server key: openssl genrsa -des3 -out server.key 1024.

Next, create the self-signed certificate using the server key: openssl req -new -x509 -days 365 -key server.key -out ca.crt.

That's it, you're done. Check your ssl.conf to make sure that SSLCertificateFile points to the self-signed certificate and that SSLCertificateKeyFile points to the server key. Use apachectl startssl and test it out.

User Journal

Journal Journal: Moore's Law Is Over?

It seems that Moore's Law has hit a slowdown. To boil it down, PowerPoint style:

  • It's 2005, where are the 10 GHz PC's?
    • Difficulty decreasing transistor size
    • Means clock rates have stagnated
  • Chip vendors turning to multi-core
  • Software developers will need to make better use of threads to keep up
  • concurrency the next programming 'revolution' (like OOP)
  • This puts language+API combos such as Java at an advantage
    • excellent built-in concurency support
    • many Java developers already use it

Well I don't totally buy it. At least not the Java part, much as I would like to. Java does have great support for threads (especially now with all the support classes in 5.0), they're easy to use and work well on all the platforms.

However, I think that if typical application developers aren't really pushing the limits of a 2 GHz PC, there will be little impetus to push the limits of a 2x2 GHz PC.

Furthermore, the markets where they are pushing these limits (operating systems, games) there are already good toolkits in place; they won't have to leave the confines of C/C++/inline assembly.

But perhaps, 3-5 years down the road, people like me -- "systems" people aka support staff programmers -- will need to work with threads as much as we work with, say, objects or regular expressions or widgets.

I don't forsee that happenning, but it would be pretty cool if it did.

User Journal

Journal Journal: Gentoo PPC

So I installed Gentoo PPC on my wife's iMac, after trying many other distros over the past year: Yellow Dog, Mandrake, Fedora. This one will stay.

You've got to fight Gentoo to get it installed. Depending on your Linux experience this will be just a matter of whipping out a lengthy series of commands, or a long hard-fought struggle. If you're good, it's like Neo fighting Smith after he's mastered the matrix: just nonchalantly throwing up a hand while Smith batters away at him.

You may find yourself, as I did, muttering things like "so I need to emerge shadow in order to login, but I need eth0 up before I can emerge shadow, but I can't fix eth0 without logging in...."

In this case I tried to get out of the catch-22 by rebooting into single user mode, recompiling a kernel for the proper network driver (for some reason, identified as Sun GEM, not PowerMac MACE), installing the new kernel, and rebooting again.

It worked.

User Journal

Journal Journal: Bash vs. Tcsh

Mildly amusing shell script story today. I share my office space with two co-workers, one who (like me) is partial to tcsh and the other is a bash fan. A particular development task they share only works in the tcsh person's environment, and the bash person is trying to get it to work in his. "But it worked yesterday, I don't understand...", etc. This went on for around 90 minutes, as the possible causes were investigated back-n-forth, spinning out of control. Any programmer will recognize this situation, the solution is usually right under your nose--or (0.01% of the time) is wildly obscure.

Finally I can take it no longer and have to throw my two cents in. I ask about two common mistakes, and both tell me no, those are the first things they checked (of course).

I ask if $variable is set, and of course, they checked it too (now this is definitely the closest possible cause). See, the bash person says, showing an echo $variable statement. Well let me try some things, I say, reaching for the keyboard. For some reason, I want to do env | grep variable first, even though it should be the equivilant of echo $variable. So I do, and boom--$variable isn't set. Aha--there is a difference in bash between set variable and export variable, so it's immediately obvious that he must have done set instead of export. Only export propogates $variable to sub-shells... so I got to look smart, only if I hadn't felt like doing env | grep, I'd probably have been spinning wheels for an hour as well.

Slashdot Top Deals

Your mode of life will be changed to EBCDIC.

Working...