Map unix group to a windows domain group

Hello world,

here my scenario: i have a webdevelopment server as a domain member and i need the apache user in one of the domain groups so that apache can access readable and writeable files by the webdev group. The problem now is that you can't add unix users to a windows group because the unix user doesn't exist on the windows machine. BUT: you can map an existing unix group to an existing windows group so that the unix group is like an alias for the windows one and add the unix user to that group… and it is quite easy.

Let's say you have group1 on windows and domgroup1 on unix. Here is how to do it:

create a new unix group
# groupadd domgroup1

now map the groups
# net groupmap add ntgroup="group1" unixgroup="domgroup1" type=domain

list the mapped groups
# net groupmap list

now restart samba
# /etc/init.d/smb restart

The only thing left you have to do now is to add the user add to your domgroup1 in /etc/group

Install GeoIP on PHP

Hello,

i had to check which country some visitors come from when visiting a website and i remembered that awstats (statistik tool) uses a plugin called GeoIP. But awstats is written in perl and i asked myself if the extension does not exist for php and guess what: it exists! Here is a small howto to install it on CentOS:

I found GeoIP in a third-party repository named EPEL. Check here if you want to now how to install the repository. So now to the installation:

# yum install gcc php-pear geoip geoip-devel
# pecl install geoip

After that you only have to add following line to your php.ini or create geoip.ini in your php.d directory with following content:

extension=geoip.so

Now restart the webserver and you are good to go. Only one note left: geoip is compiled with your actual running php version, so if you upgrade it you have to recompile your geoip installation.

more infors about the geoip functions can be found here.

Joomla 1.0 and PHP 5.3

hi all of you,

i've just tried to migrate a Joomla 1.0 site to a server running php 5.3. After migrating the files and database i wanted to check the site and bam, guess what? errors…

If you get some errors similar to this one

Warning: Parameter 1 to HTML_content::show() expected to be a reference, value given in /home/xx/public_html/travel/includes/Cache/Lite/Function.php on line 92

it's because Joomla 1.0 is not compatible with php 5.3. The fix is quite simple: add a for-loop to the Function.php file (beginning of the call-function) and everythng runs again. Here the code:

<?php

$arguments = func_get_args();
$numargs = func_num_args();
for ($i = 1; $i < $numargs; $i++) {
   $arguments[$i] = &$arguments[$i];
}

?>

source: http://www.asim.pk/2010/01/13/joomla-does-not-support-php-5-3/