Skip to main content

Posts

Showing posts from November, 2010

Drupal - Custom functions

I created the functions below to easily process the values of a $field in a $table by $number using the specified $params.

Explanation: $number = number
$field = string
$table = string(schema name)
$params = array(
  'fields' => array('uid','nid',...),
  'select' => array('=','>','<',...),
  'update' => array('=','>','<',...),
  'values' => array('1','1',...),
);
/* * This function increases by $number, * the $field of the $table WHERE $params * are valid. This function assumes the * field needs to be updated and NOT created. */ function module_increase_field($table,$field,$number,$params){ $select = "SELECT {$field} FROM {".$table."}"; if(!empty($params['fields'])){ $select .= " WHERE "; for($i=0;$i<count($params['fields']);$i++){ $select .= $params['fields'][$i].$params[…

Openfire - HTTP 500

In near/far future, a guide will be created of how a OpenFire server is installed in Linux. What I want to specify with this post is to read carefully the description of each field of the installation, in order to save time for later.

When entering the setup process, the first step is to fill in the hostname, the unsecured port and the secured port of the computer where openfire is going to be installed. If, buffed up with the installation processes, you type another hostname or IP (e.x. LDAP server's IP) then you won't notice but at the end of the procedure when, suddenly, a HTTP 500 error will be invoked.

Looking for this error, you will eventually find that you must reboot your computer. Been there, done that, rebooting will make you go one step ahead, after clicking 2 steps back and trying again.

The problem was just that the hostname was different than the IP and thus, at the end of the process, where the server was trying to find the setup files, it couldn't.

Drupal: The User Object Variables List

stdClass Object ( [uid] => 5 [name] => %%username%% [pass] => %%md5_coded_pass_string_here%% [mail] => %%my@email.com%% [mode] => %%0%% [sort] => %%0%% [threshold] => %%0%% [theme] => [signature] => [signature_format] => %%1%% [created] => %%1288623095%% [access] => %%1288697282%% [login] => %%1288623155%% [status] => %%1%% [timezone] => %%10800%% [language] => en [picture] => %%sites/default/files/pictures/picture-5.jpg%% [init] => %%my@email.com%% [data] => %%serialized_data_here%% [ldap_authentified] => %%1%% [ldap_dn] =>%%uid=username,ou=Users,dc=example,dc=com [ldap_config] => %%1%% [ldap_drupal_roles] => %%Array ()%% [picture_delete] => [picture_upload] => [form_build_id] => %%form-5d79ba2fcb09b8ddb391cc3f648b88a4%% [roles] => %%Array ([2] => authenticated user)%% [domain_user] => %%Array ( [-1] => -1 )%% [referral_link] => %%refe…