No known problems

Apache Bench (ab)

Last modified: December 15, 2009 - 05:34

General documentation about db can be found at Apache Bench (ab)

Begin by performing a

cvs update -dP

in order to ensure your source tree is up-to-date.

Then, execute the following from the command line before applying your new patch. This will establish a baseline from which to judge performance improvements or decreases.

ab -c1 -n500 http://head.localhost

The -c command specifies the number of concurrent requests and -n specifies the total number of page requests. In 99 out of 100 cases it is not necessary to specify a higher value than 1 for the concurrency. Increasing c will only put more stress on your server. This is useful if you want a general stress test, but it will falsify your results if you only want to test the impact of a particular patch on a particular Drupal page.

This will produce output similar to:


This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient).....done

Server Software: Apache/2.0.55
Server Hostname: localhost

Step 10 of 10 Securing Solr administrative console

Last modified: December 13, 2009 - 05:56

We're now going to setup security on the first server hosting the Solr engine.

By default the Solr engine administrative console on the first server does not ship with any kind of port protection. This means that anyone who knows the Solr engine administrative console URL can search the database without authenticating. For this reason it is recommended to secure your first server ports by using iptables or a dedicated firewall.

Make sure that you close (deny) the port 8983 to the outside world. And make sure you open (allow) port 8983 to your second server. One way of doing this is using Uncomplicated Fire Wall (UFW). To configure UFW follow the instructions on this page http://ubuntuforums.org/showthread.php?t=823741

Test your configuration by visiting http://123.123.123.123:8983/solr/admin/
(Note: In the above URL replace “123.123.123.123” with your first server IP address. This IP address is provided by your host provider.)

Do another test by visiting http://123.123.123.123:8983/solr/admin/ from an external computer that should not have access.

You have successfully setup security on the first server hosting the Solr engine.

That's it you have completed the essential steps to install Solr search engine on Drupal 6.x.

Enjoy

Installing on CentOS

Last modified: December 13, 2009 - 04:55

Read article by Janak Singh http://janaksingh.com/blog/apachesolr-search-drupal-centos-107

This is a quick and rough writeup on how it was implemented on his personal website.

Tips and tricks

Last modified: December 12, 2009 - 14:23

This page will be a dumping ground for small tips on improving your profiles with Advanced Profile Kit.

#470004: User avatar via CCK imagefield - Not complete but some good ideas there.
http://drupal.org/node/578900#comment-2174250 - Setting some parts of the profile private.

Installing Auto Admin

Last modified: December 12, 2009 - 17:43

This handbook page is part of the documentation for the Auto Admin module.

With drush

Simply do:

$ drush dl autoadmin schema
$ drush enable autoadmin

Manual

  1. Download the .tar.gz files from the project pages of Auto Admin and Schema modules.
  2. Extract into the "sites/all/modules" folder.
  3. Browse to the administration page and enable the modules.

Migrate from Nodewords 6.x-1.6 to 6.x-1.7

Hey,
I recently experienced problems from updateing to a new version of nodewords and removing the nodewords_by_path module. Looks like the format in the DB for nodewords table has changed to the serialized format. The old meta information was still in the database, but it was not recognisible since the format was plain.

So I made a quick script to port the meta tags (abstract, copyright, keywords and description) from one format to another:

Create a page with PHP content and write the following: (it's recommended to backup the database first)

<?php
// PHP Code
$result = db_query("SELECT * FROM nodewords n WHERE ( n.name='copyright' OR n.name='abstract' OR n.name='keywords' OR n.name='description' ) AND n.content NOT LIKE 'a:%{%}';");
while (
$item = db_fetch_object($result)) {
    unset(
$new_content);
   
$new_content = array('value' => $item->content);
    
$data = array(
       
'mtid' => $item->mtid,
       
'name' => $item->name,
       
'content' => serialize($new_content) // looks like drupal_write_record() doesn't serialize this, so I do it manually
     
);
     
   
drupal_write_record('nodewords', $data, 'mtid');

  }
?>

Syndicate content
 
 

Drupal is a registered trademark of Dries Buytaert.