Installation


WARNING: Following this procedure will turn port 9925 into an open relay for your server and so is NOT recommended

Some ISPs block access to port 25 so that you have to send email using their SMTP server. This can be a real pain, so what do we do? The simple answer is to set up a proxy on your web server so that you access a different port. Your web server will forward the conversation to port 25. All we need is a piece of software to do this relaying. One is available from Gavin Stewart. Here is how to implement it so that you access your SMTP server via port 9925 instead of port 25.

  • Login to site using PuTTY
  • Create a directory to install to. I chose mkdir /var/www/myapps
  • Change to required directory (cd /var/www/myapps)
  • Download Gavin’s code (wget http://www.stewart.com.au/ip_relay/ip_relay-0.71.tgz)
  • Unzip the contents (gunzip -c ip_relay-0.71.tgz | tar -xv)
  • Edit the start up file (pico /etc/rc.d/inet.d/ip_relay)
  • Add line /usr/bin/perl /var/www/myapps/ip_relay-0.71/ip_relay.pl -d 9925:<yourdomain.com>:25
  • Exit editor (Control-X)
  • Create symlink (ln -s /etc/rc.d/init.d/ip_relay /etc/rc.d/rc2.d/S90ip_relay)
  • Change access rights for ip_relay (chmod 755 /etc/rc.d/init.d/ip_relay)
  • Restart rc daemon (restart). You should see something like

Killing mysqld with pid nnnnn
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Resolving address (yourdomain.com)…..
…. determined as: xxx.xxx.xxx.xxx
Useing command line parameters:
local_port 9925
remote_addrs xxx.xxx.xxx.xxx
remote_port 25
bandwidth 0
forwarder 99 set.

ip_relay.pl Version: 0.71
Copyright (C) 1999,2000 Gavin Stewart

ip_relay 0.71 runs as a daemon and therefore allows restarting through the site manager.
All you now need to do is edit your Email client (Outlook, Thunderbird or whatever you use) to use port 9925 instead of 25. This is probably under advanced settings. If you want to check that this is working, just type telnet yourdomain.com 9925, in a command window on your pc. If you get connect failed, then you have made a mistake.

Bookmark this article

DRAFT POSTING

I want to upgrade the installation of php on my server as I feel it is important to keep abreast of the bug fixes in core applications, especially the popular ones which will be subject to the most abuse.

Required packages:

  • gdbm (a set of database routines that use extensible hashing)
  • bison (general-purpose parser generator that converts an annotated context-free grammar into an LALR(1) or GLR parser for that grammar)
  • flex (A fast lexical analyser generator for generating programs that perform pattern-matching on text.)
  • php

Optional packages:

  • For IMAP support:
    • IMAP
    • Kerebos
    • Pinfo
  • For DB3 support:
    • Berrkley DB
    • AOP
  • For Interbase support:
    • Interbase
    • AOP

Building the libraries

gdbm

The source files for gdbm are available by FTP from the GNU servers. Open a connection to their server and download the latest version (1.8.3 at the time of writing)
# ftp ftp.gnupg.org
# login: anonymous password:anon@
# cd gnu/gdbm
# passive
# dir gdbm-*
# get gdbm-1.8.3.tar.gz
# quit

Next we need to unzip the file we have just downloaded and change to the directory
# gunzip -c gdbm-1.8.3.tar.gz|tar x
# cd gdbm-1.8.3

Then we need to run autoconfigure. As we do not have root access, we need to specify an alternative location for the build. I have chosen /usr/mylocal. We will redirect the output to a couple of files so that we do not miss anything.
# ./configure --prefix=/usr/mylocal >log.config 2>err.config

Check that no errors were encountered and fix any that were logged before proceeding further.
#ls -l err.config
#less err.config

Build the package and check for any errors
#make >log.make 2>err.make
#ls -l err.make
#less err.make

Install the gdbm package
#make install>log.install 2>err.install
#ls -l err.install
#less err.install

bison

We need to follow the same procedure to build the bison library. # ftp ftp.gnupg.org
# login: anonymous password:anon@
# cd gnu/bison
# passive
# dir bison-*
# get bison-2.3.tar.bz2
# get bison-2.3.tar.bz2.sig
# quit
# gpg --verify bison-2.3.tar.bz2.sig
# bunzip2 -c bison-2.3.tar.bz2 | tar x
# cd bison-2.3
# ./configure --prefix=/usr/mylocal >log.config 2>err.config
# make >log.make 2>err.make
# make install >log.install 2>err.install

flex

#wget http://easynews.dl.sourceforge.net/sourceforge/flex/flex-2.5.33.tar.bz2
# bunzip2 -c flex-2.5.33.tar.bz2|tar x
# cd flex-2.5.33
# ./configure --prefix=/usr/mylocal >log.config 2>err.config
# make check >log.check 2>err.check
# make >log.make 2>err.make
# make install >log.make 2>err.make

IMAP Support

ncurses

# ln -s /usr/mylocal/inc/

Pinfo

# wget http://alioth.debian.org/frs/download.php/1498/pinfo-0.6.9.tar.bz2 # wget http://alioth.debian.org/frs/download.php/1499/pinfo-0.6.9.tar.bz2.sig # gpg --verify pinfo-0.6.9.tar.bz2.sig # bunzip2 -c pinfo-0.6.9.tar.bz2 |tar x # cd pinfo-0.6.9 # ./configure --prefix=/usr/mylocal --with-curses=/usr/mylocal >log.config 2>err.config # make >log.make 2>err.make # make install >log.install 2>err.install

Kerebos

IMAP

Build php

php requires the header file for gdbm.h to be in one of four locations, so create a link in /usr/local/include. First, however, we need write access rights to the # chmod u+w /usr/local/include # ln -s /usr/mylocal/include/gdbm.h /usr/local/include/gdbm.h # chmod u-w /usr/local/include

Download the latest source from php.net directly to your server:directory.

  • wget http://uk.php.net/get/php-4.4.4.tar.bz2/from/www.php.net/mirror

Extract the source files using the command gunzip - c php-4.x.x.tar.gz|tar x and then change into the directory you have just created (cd php-4.x.x)

If you already have php installed (as I do), then create a file called phpinfo.php and place it in your webserver's home directory so that you can run it. It should contain the following code:

PHP:
  1. <?php
  2. ?>

When you run this code, it will display the current configuration for your version of php. Copy it for this new build and add the bits in bold. Your configuration command should look something like this and needs to be on one line:

./configure --prefix=/usr/mylocal --with-apxs=/usr/sbin/apxs --with-gd --with-jpeg-dir=/usr/lib --with-gettext=/usr --enable-safe-mode --with-config-file-path=/etc/httpd --with-exec-dir=/usr/bin --with-zlib --enable-magic-quotes --with-regex=system --with-ttf --with-db --with-gdbm --enable-mbstring --enable-mbstr-enc-trans --enable-track-vars --enable-wddx=shared --enable-mm=shared --enable-xml --enable-ftp --disable-debug --with-libdir=/usr/lib --with-db3 --with-interbase=shared --with-pgsql=shared --with-ldap --with-imap --with-pdflib=shared --enable-sockets >log.config 2>err.config

If you get the error configure: error: no acceptable cc found in $PATH, then you do not have a compiler installed. Try something like GCC

--with-imap
error: Cannot find rfc822.h.
Possible SOLUTION: Download and build latest imap.tar.Z from ftp://ftp.cac.washington.edu/imap/ and Kerebos from http://web.mit.edu/Kerberos/dist/krb5/1.5/krb5-1.5.1-signed.tar

The following options are causing problems:
--with-gettext=/usr --with-exec-dir=/usr/bin --with-libdir=/usr/lib

--with-db3
error: Header contains different version
Possible SOLUTION: Missing header files. Download and install BerkleyDB from http://www.oracle.com/technology/software/products/berkeley-db/index.html Current version is 4.5.20, so download is wget http://download-west.oracle.com/berkeley-db/db-4.5.20.tar.gz
Alternative location (for db3) http://packages.slackware.it/package.php?q=current/db3-3.3.11-i486-4

--with-interbase=shared
error: libgds or libib_util not found!
Possible SOLUTION: Download interbase 6.01 from ftp://ftpc.borland.com/pub/interbase/devsupport/open_source/ib_source601.tar.gz
--with-pdflib=shared --with-jpeg-dir=/usr/lib --with-zlib
error:
PDFlib extension requires at least pdflib 3.x. You may also need libtiff, libjpeg, libpng and libz. Use the options --with-tiff-dir=<DIR>, --with-jpeg-dir=<DIR>, --with-png-dir=<DIR> and --with-zlib-dir=<DIR>
Possible SOLUTION: Download PDFLite (for private use) or purchase license from PDFLib
which leaves
./configure --prefix=/usr/mylocal --with-apxs=/usr/sbin/apxs --with-gd --enable-safe-mode --with-config-file-path=/etc/httpd --enable-magic-quotes --with-regex=system --with-ttf --with-db --with-gdbm --enable-mbstring --enable-mbstr-enc-trans --enable-track-vars --enable-wddx=shared --enable-mm=shared --enable-xml --enable-ftp --disable-debug --with-pgsql=shared --with-ldap --enable-sockets --with-mysql=/usr/local/mysql

then type:

make

If you get the error make: *** No targets specified and no makefile found. Stop., then configure did not work properly. Go back and check log.config for the problem. If configure worked properly, then it should contain the following sections:

  • Configuring SAPI modules
  • Running system checks
  • General settings
  • Configuring extensions
  • Configuring PEAR
  • Configuring Zend
  • Configuring TSRM
  • Configuring libtool
  • Generating files
  • before ending with

  • Thank you for using PHP.

and then:

make install

backup your php.ini file:

cp php.ini.bak /etc/httpd/php.ini

you will need to edit your php.ini file now:

pico -w /etc/httpd/php.ini

register_globals = Off

change to register_globals = On

PHP tends to make some changes to your httpd.conf file so you may need too edit it:

pico -w /etc/httpd/conf/httpd.conf

add this line:

LoadModule php4_module /usr/lib/apache/libphp4.so

put it in the #Extra Modules area of the file.

save your changes and now just one more file too edit:

pico -w /etc/httpd/conf/srm.conf

add this line:

AddType application/x-httpd-php .php .php4 .phtml

save your changes, then stop and start httpd:

/etc/rc.d/init.d/httpd restart

(i know this seems similar to other tuts but i learnt from other tuts around this forum and other forums so my way of installing is similar)

This works i have tested it on my machine here at work.


If you get the error configure: error: png.h not found. when you try make install, then install LibPNG


The instructions above suggest including "--with-imap" in the configure line. This was a major problem on my RaQ 550, although I really wanted IMAP support. The error messages in config.log were:

configure:40552: checking whether IMAP works configure:40585: gcc -o conftest -g -O2 -Wl,-rpath,/usr/local/lib -L/usr/local/lib conftest.c -lc-client -lssl -lcrypto -lcrypt -lpam -lttf -lpng -lz -lz -lgdbm -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl -lxml2 -lz -lm 1>&5 /usr/lib/libc-client.a(mail.o): In function `mm_cache': /usr/src/redhat/BUILD/imap-2002d/c-client/mail.c:203: undefined reference to `__canary_death_handler'

Temporarily moving the (non-stackguard) GCC compiler, and linking the StackGuard version of GCC to the default location makes it work.

# mv /usr/bin/gcc /usr/bin/gcc.bak # ln -s /usr/sg/bin/gcc /usr/bin/gcc

Now head over to your PHP source folder and do a standard configuration..

# cd php-4.3.4 # ./configure --configure-options

... finish building PHP, and be sure to move the original GCC back into place when you are done.

# mv /usr/bin/gcc.bak /usr/bin/gcc

Bookmark this article

Direct quotes from WordPress's website

Plugin Installation

To install a plugin, the following are the general directions to follow. Be sure and follow the specific instructions provided by the Plugin author. Remember: BACKUP - just in case.

  1. Read through the "readme" file thoroughly that usually accompanies a plugin, or the website article from where you found the plugin. It is often helpful to print out the instructions so you can check off the installation steps as you complete them.
  2. Upload the plugin to the wp-content/plugins folder in your WordPress directory online.
  3. Make any changes to templates or files as required by the Plugin instructions including adding Plugin template tags.
  4. Activate the Plugin:
    • Access the Plugin Panel in your Admin Panel
    • Scroll down through the list of Plugins to find the newly installed Plugin (if not visible, start from the beginning to check to see if you followed the instructions properly and uploaded the file correctly).
    • Click on the Activate link to turn the Plugin on.
  5. Continue making any modifications necessary from the "readme" file instructions to make the plugin's actions meet your needs.

Hiding Plugins When Deactivated

Some plugins feature tags inside of the template files. If the plugin is not activated, it will "break" the Theme and it may report errors or fail to load. It is therefore imperative to prevent the plugin from being detected in case it is turned off.

To detect if a plugin is installed, you can use a simple function_exists() check. The if (function_exists()) checks for the plugin, and if it exists, it will use it. If it returns FALSE or "not found", it will ignore the plugin tag and continue loading the page.

PHP:
  1. <?php
  2. if (function_exists('FUNCTION NAME')) {
  3.   FUNCTION_NAME();
  4. }
  5. ?>

This example plugin uses a function called jal_get_shoutbox() to print out its contents.

PHP:
  1. <?php
  2. if (function_exists('jal_get_shoutbox')) {
  3.   jal_get_shoutbox();
  4. }
  5. ?>

Troubleshooting Plugins

If you are experiencing problems with a plugin you installed or one that stopped working after upgrading, the following are the steps you need to take to troubleshoot the plugin:

  1. Check that you have followed the plugin author's instructions to the letter.
  2. Check that any plugin tags or usage within your template files are correct, spelled right, and placed in the appropriate place, i.e., within the WordPress Loop or outside of it.
  3. Check that you uploaded the file to the plugins folder under wp-content. If you are uploading a new version to replace the old, delete the old version prior to uploading the new one.
  4. Check that the plugin has been activated in your Plugin Panel of your Administration Panels.
  5. Deactivate and re-activate the plugin to see if this makes it work.
  6. Visit the plugin author's website, typically linked from the Plugin Panel, and look to see if someone else is having the same trouble and an answer has been posted, or a new version released.
  7. Contact the plugin author directly via their website or email requesting assistance.
  8. Search the Internet for the name of the plugin and the trouble you are having as someone else might have had the same problem and found a fix and posted it on their site.
  9. Visit the WordPress Support Forum (http://www.wordpress.org/support) and post a clear question about the plugin and the problem you are having and you may get an answer from someone familiar with the plugin.
  10. If the problem persists and you cannot seem to solve it, check to see if there are any similar plugins that you can try instead.
Bookmark this article

Here are the details on how to install the Serendipity blogging application on a Westhost server.

You will need to have installed PHP Version 4 or greater (PHP 4.3.1 or greater recommended) and MySQL first.

  • Download the latest release from SourceForge or Serendipity. The file name will be something like serendipity-1.0-beta2.tar.gz
  • Upload this file to your webserver. I use /usr/home/xx/apps to build applications
  • Connect to your webserver using SSH
  • Change to the directory where you want to install Serendipity (Example: /var/www/htdocs)
  • Decompress the gz file using the full path and the command tar xzvf ~/apps/serendipity-1.0-beta2.tar.gz.
    Parameter Meaning
    x Extract files
    z Filter archive through gzip
    v Verbose output
    f Use archive file

    This will create a subdirectory called serendipity in the current directory. If you want the directory to be called something other than "serendipity" then change the directory name now using the rename or mv command.

  • Create a database for Serendipity to connect to. In this example we will use MySQL
  • Enter mysqlat the command prompt. The system prompt will change to mysql>. If you need to enter a password, then use mysql -u 'root' -p instead
  • List the current databases by typing SHOW DATABASES; (Remember to terminate all commands with the semicolon!)
  • Create the new database by typing CREATE DATABASE serendipity;
  • You can list the current users by typing SELECT Host, User FROM mysql.user;
  • Create a new user for Serendipity by typing GRANT ALL ON serendipity.* TO 's9yuser'@'localhost' IDENTIFIED BY 's9ypass'with GRANT OPTION; Choose your own user and passwords (instead of s9yuser and s9ypass). You can change the password by typing SET PASSWORD FOR 's9yuser'@'localhost' = PASSWORD('newpass'); If you are using MySQL version 5.0 or later, then you can use CREATE USER user
  • Verify that you have created the necessary items by typing SHOW GRANTS FOR 's9yuser'@'localhost';
  • Exit MySQL by typing EXIT;
  • Open serendipity in your browser using the URL http://www.mydomain.com/serendipity and the installer will say hi to you. Enter the correct details for database name
    Parameter Meaning
    Database Type MySQL
    Database Host localhost
    Database User s9yuser
    Database Password s9ypass
    Database Name serendipity
  • Serendipity ships world-writeable (777) to make installation easier. (permissions are only preserved on Unix/Linux systems using tar). After the install is complete, you should change those base permissions to allow only your web-server user (e.g. nobody) to access the serendipity directory. Serendipity needs to write to its core directory to be able to create the serendipity_config_local.inc.php and .htaccess file. After this has been done, the world-writable folder can be set to the sane permissions again using the command chmod 755 serendipity. Detailed file permission requirements are outlined in the Serendipity FAQ.
Bookmark this article

« Previous Page