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/

Roaming profiles permissions

Hi again, when i installed a windows 2008 server and configured the roaming folders for domain users, the permissions were wrong and the folders were not created automatically. So here is a basic overview of some working permissions:

NTFS-Level permissions:

Windows User Account Minimum permissions required
Creater/Owner Full Control, Subfolders And Files Only
Administrator None
Security group of users needing to put data on share List Folder/Read Data, Create Folders/Append Data – This Folder Only
Everyone No Permissions
Local System Full Control, This Folder, Subfolders And Files

SMB-Level permissions:

Windows User Account Default Permissions Minimum permissions required
Everyone Full Control No Permissions
Security group of users needing to put data on share N/A Full Control

Following NTFS permissions are set automatically when the folder is created:

Windows User Account Default Permissions Minimum permissions required
%Username% Full Control, Owner Of Folder Full Control, Owner Of Folder
Local System Full Control Full Control
Administrators No Permissions No Permissions
Everyone No Permissions No Permissions

for more information check here.