{ Don't Repeat Yourself ! }

By default User Registration is enabled after a fresh Mantis Installation.
Everyone can easily create an account.

From the documentation its not so clear how to disable it and there is no obvious option in the mantis admin interface either.

To actually disable it, you have to open the fileĀ  config_inc.php
in the mantis root Dir and add this line:

$g_allow_signup = OFF;

In order to read the direct output of a PHP script into a variable for later processing
it needs to be buffered.

a buffer can be started with:

then anything that would output data directly can be executed, for example:
include 'foo.php' ; ( which might contain something like: echo 'bar' ; )

then read the buffer into a variable:
$buffer= ob_get_contents();

and clean the buffer afterwards:

That’s it. Now whatever foo.php was outputting is now stored in
$buffer for further processing.

especially useful when implementing templates with PHP.

With this quick line of code it’s possible to convert arrays into anonymous objects in PHP

$obj = (object) array('foo' => 'bar', 'property' => 'value');

This is actually quite useful when using Zend AMF to transfer objects from PHP to Flex or Flash,
without having to create classes for them.

Creating a new standard object in PHP 5 is simply achieved by using stdClass:

$obj = new stdClass;

another possible way:
$obj = (object) array()

yet another – slightly more complicated method to achieve the above:

class foo {}; //must be declared on top level
$object = new foo();

It’s a bit difficult to get this information from the PHP docs.

In order to get my virtual host setup working with xampp under windows vista,
I had to add this to my virtual hosts file (c:\xampp\apache\conf\extra\httpd-vhosts.conf):

< VirtualHost >
DocumentRoot C:/xampp/htdocs
ServerName localhost

after that I could then add other virtual hosts like so:

< VirtualHost alive >
ServerName alive
DocumentRoot "c:\www"
< Directory "c:\www" >
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</ Directory >
ErrorLog logs/www_error.log
LogLevel warn
CustomLog logs/www_error.log combined
</ VirtualHost >

and of course also need to change the windows hosts file and add this line: alive.localdomain

I just realized that after doing a custom google search on my photo gallery the search results looked somewhat like this:

Best hiking photos. 1. Great North… … 78. Sunset in… 79. Walking in … 80
. Walking in … 81. Walking in … 82. Blue Tounge… 83. Flinders. … – 18k – Cached – Similar pages

Extremely annoying.

By default Gallery2 does not seem to add any meta tags to its generated page headers, so google just displays some jibberish about some link fragments found within the document.

In order to fix that you’ll have to add some description and keyword meta tags to your pages.

Unfortunately there is no real convenient way to fix it, it only works after editing the theme.tpl file by hand.
Here is a link on how to do it:

In this article the author describes how to edit

But actually it is
that needs to be changed.

Now Gallery 2 should automatically add your titles and descriptions to its meta tags.

Get Adobe Flash player