Posts tagged php.ini

Change php directives with suPHP

You need to create 2 files in public_html of website where suPHP is enabled. A .htaccess specifying path to php.ini configuration and a php.ini with directives.

 

Example for account “account-name”. Make sure you update that in .htaccess content:

.htaccess

suPHP_ConfigPath /home/account-name/public_html

 

php.ini

register_globals = Off

Related Posts:

Install GeoIP PHP Extension

Install GeoIP C API
Change 1.4.6 to downloaded version.

wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz
tar zxvf GeoIP.tar.gz
cd GeoIP-1.4.6
./configure
make
make check
make install

Install PHP PECL extension

wget http://pecl.php.net/get/geoip
tar zxvf geoip
cd geoip-1.0.7
phpize
./configure
make
make check
make install

Find php.ini

php -i | grep php.ini

Enable extension to load in php.ini:

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension=geoip.so

You may need to restart HTTP server (apache) to apply changes.

Download Geo Lite City database

wget -N -q http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
mv GeoLiteCity.dat /usr/local/share/GeoIP/GeoIPCity.dat

For more accurate detection and production projects, buy the full GeoCity database from MaxMind.

Related Posts:

Go to Top