Information and Links
Join the fray by commenting, tracking what others have to say, or linking to it from your blog.
Install custom Pear packages on 1and1
Canadians find the weather really interesting. Don't we? I mean, after all, it changes every day from a cool -19°C in the morning to a toasty +6°C in the afternoon. Okay, so maybe not every day do we get extremes like that, But Canadians still seem fascinated with the weather.
For me, I am fascinated with part of the weather, namely METAR data and using it to mash up Google map stuff. I haven't actually done any mashups but I plan too. To help me with my fascination, I was thinking of trying out the PEAR Services_Weather package. Installing this is super easy on my own servers, just enter 'pear install Services_Weather' and poof, there it is. On a 1and1 account, if you have never installed any non-mainstream packages for PEAR, you are in for a short shock. 1and1 won't let you install your own packages by default. Luckily there is a work around, and it is really quite simple.
You need an account with SSH access to do this.
First, take a look at the current configuration in your 1and1 account:
-
pear config-show
-
Configuration (channel pear.php.net):
-
=====================================
-
Auto-discover new Channels auto_discover <not set>
-
Default Channel default_channel pear.php.net
-
HTTP Proxy Server Address http_proxy <not set>
-
PEAR server [DEPRECATED] master_server pear.php.net
-
Default Channel Mirror preferred_mirror pear.php.net
-
Remote Configuration File remote_config <not set>
-
PEAR executables directory bin_dir /usr/bin
-
PEAR documentation directory doc_dir /usr/lib/php/doc
-
PHP extension directory ext_dir /usr/lib/php/extensions/no-debug-non-zts-20020429
-
PEAR directory php_dir /usr/lib/php
-
PEAR Installer cache directory cache_dir /tmp/pear/cache
-
PEAR data directory data_dir /usr/lib/php/data
-
PEAR Installer download download_dir /tmp/pear/cache
-
directory
-
PHP CLI/CGI binary php_bin /usr/bin/php
-
php.ini location php_ini <not set>
-
PEAR Installer temp directory temp_dir /tmp/pear/temp
-
PEAR test directory test_dir /usr/lib/php/test
-
Cache TimeToLive cache_ttl 3600
-
Preferred Package State preferred_state stable
-
Unix file mask umask 22
-
Debug Log Level verbose 1
-
PEAR password (for password <not set>
-
maintainers)
-
Signature Handling Program sig_bin /usr/bin/gpg
-
Signature Key Directory sig_keydir /usr/etc/pearkeys
-
Signature Key Id sig_keyid <not set>
-
Package Signature Type sig_type gpg
-
PEAR username (for username <not set>
-
maintainers)
-
User Configuration File Filename /kunden/homepages/X/dXXXXXXXX/htdocs/.pearrc
-
System Configuration File Filename /usr/etc/pear.conf
The important lines to use are directory entries. Note that they are all out of reach in /usr/bin and /usr/lib. We can't install in there! So how do we install our PEAR package? Easy. Set PEAR up to work from our own home directory.
-
pear config-create $HOME .pearrc
-
pear install -o PEAR
The first command tells pear to create a local config file. The next command simply tells PEAR to install itself according to the local config file you just created. Don't forget to include the new path in your PHP files with something like:
-
ini_set('include_path','/kunden/homepages/NN/dNNNNNNNN/htdocs/pear/php');
Now when you run pear config-show you should see something like this:
-
Auto-discover new Channels auto_discover <not set>
-
Default Channel default_channel pear.php.net
-
HTTP Proxy Server Address http_proxy <not set>
-
PEAR server [DEPRECATED] master_server pear.php.net
-
Default Channel Mirror preferred_mirror pear.php.net
-
Remote Configuration File remote_config <not set>
-
PEAR executables directory bin_dir /kunden/homepages/NN/dNNNNNNNN/htdocs/pear
-
PEAR documentation directory doc_dir /kunden/homepages/NN/dNNNNNNNN/htdocs/pear/docs
-
PHP extension directory ext_dir /kunden/homepages/NN/dNNNNNNNN/htdocs/pear/ext
-
PEAR directory php_dir /kunden/homepages/NN/dNNNNNNNN/htdocs/pear/php
-
PEAR Installer cache directory cache_dir /kunden/homepages/NN/dNNNNNNNN/htdocs/pear/cache
-
PEAR data directory data_dir /kunden/homepages/NN/dNNNNNNNN/htdocs/pear/data
-
PEAR Installer download download_dir /tmp/pear/cache
-
directory
-
PHP CLI/CGI binary php_bin /usr/bin/php
-
php.ini location php_ini <not set>
-
PEAR Installer temp directory temp_dir /tmp/pear/temp
-
PEAR test directory test_dir /kunden/homepages/NN/dNNNNNNNN/htdocs/pear/tests
-
Cache TimeToLive cache_ttl 3600
-
Preferred Package State preferred_state stable
-
Unix file mask umask 22
-
Debug Log Level verbose 1
-
PEAR password (for password <not set>
-
maintainers)
-
Signature Handling Program sig_bin /usr/bin/gpg
-
Signature Key Directory sig_keydir /usr/etc/pearkeys
-
Signature Key Id sig_keyid <not set>
-
Package Signature Type sig_type gpg
-
PEAR username (for username <not set>
-
maintainers)
-
User Configuration File Filename /kunden/homepages/NN/dNNNNNNNN/htdocs/.pearrc
-
System Configuration File Filename /usr/etc/pear.conf
This little how-to would not have been so easy to figure out without the aid of thecodecase.com.


I believe I made the horrendous mistake of choosing a company because it had a 5 page ad in a popular computer magazine. In my opinion 1and1 is a horrible company and many customers have voiced a host of complaints on various blogs. It should be a warning that when their phone is answered by a recording that tells you if you have gotten a notice from NCO, a collection agency, to press a certain number. If they are a reputable business, why do they have to send so many accounts to a collection agency?
Also Investigative journalist, Kelli Jack, has written 30 articles about this company and has a suit pending against them. Kelli alleges that 1and1 stole her domain name and sold it. Kelli states: “1and1 should be shut down.”
And finally, the Washington DC, Pennsylvania Better Business Bureau has them listed as “Unsatisfactory” Read comments on the BBB why. Read some customer comments on Red Flag.