Monday Aug 31, 2009

The Manga Guide to Databases

You don't know anything about databases and want to get rid of this social stigma? But you don't want to read a 500 pages book about theoretical aspects of relational database management system written by an aged computer science professor who thinks "real life" must be the name of a theater next to the campus?

In this case, this book is just what the nurse ordered: The Manga Guide to Databases.

The story starts like this:

Princess Ruruna and Cain have a problem: Their fruit-selling is a tangle of conflicting and duplicated data, and sorting the melons from the apples and strawberries is causing real difficulties. But what can they do?

Yes, of course they start setting up a database.

manga_db_sample.png

This book is fun, but it's also serious: lots of examples and exercises, and an appendix of frequently used SQL statements gives the tools you need to create and maintain the first databases of your life.

Friday Aug 28, 2009

Apache: No listening sockets available, shutting down

One of the advantages of maintaing a popular project like XAMPP is the immense amount of community feedback you get. In other words: your inbox is a daily challenge. PHP 5.3 incompatibilities are hot topics these days. Here's an Apache related one which hits my inbox on a very regular basis.

Variant 1

Apache complains about:

(98)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs
The "Unable to open logs" in this error message is very confusing and often points people in the wrong direction. There is nothing wrong with directory or file permissions, in this case there is simply another process already occupying port 80 and that prevents Apache from binding to this port. Find out which process is using this port and stop it. Alternatively let Apache use another port.

Variant 2

Actually if it's a permission issue you will see:

(13)Permission denied: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs
Here Apache tried to bind port 80, but got rejected by the system because the Apache wasn't started as root. On Unix systems only processes by the user root are allowed to bind ports below 1024. To fix this: Let Apache bind to a port above 1024 or start Apache as root.

Variant 3

If you just get this error, without "no listening sockets available...":
(98)Address already in use: make_sock: could not bind to address [::]:80
Looks very similar to the first variant, but in this case you probably just have multiple "Listen 80" directives in you Apache's configuration. Become aware of all Include directives in your httpd.conf and remove all Listen duplicates.

Thursday Aug 27, 2009

PHP 5.3 and osCommerce

Over the last weeks I got many emails from users complaining about problems running their PHP apps on PHP 5.3. Todays example is osCommerce 2.2:
Deprecated: Function eregi() is deprecated in /opt/lampp/htdocs/oscommerce/catalog/admin/includes/classes/language.php on line 87
The answer in this case is quite simple: the eregi() function as the whole ereg extension got deprecated with PHP 5.3 (see http://www.php.net/ChangeLog-5.php#5.3.0) and all PHP apps using this handy functions now need to update their code to use PCRE functions like preg_match().

To temporary work around this issue you may lower the error reporting level in your php.ini.

From:

error_reporting = E_ALL | E_STRICT
To:
error_reporting = E_ALL & ~E_DEPRECATED
With this setting PHP will prevent warnings about deprecated functions. But since in PHP 6 the ereg extension will completely removed from PHP this is only a fix of the symptom. And as Frank N. Furter teached us many years ago, it's always better to:
[So I'll] remove the cause, but not the symptom.
And there is nothing to add.

Wednesday Aug 26, 2009

Perl now supports DTrace out of the box

Just scanned through the Perl 5.10.1 delta document and found this promising statement:

Some support for DTrace has been added. See "DTrace support" in INSTALL.

And according INSTALL all you need to do is to add -Dusedtrace to Configure and your Perl will be ready to DTrace. Very cool.

Monday Aug 24, 2009

Test

If you can read this, you're alive and beloved MarsEdit works like a charm with blogs.sun.com.
About

Kai 'Oswald' Seidler writes about his life as co-founder of Apache Friends, creator of XAMPP, and technology evangelist for web tier products at Sun Microsystems.

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today